Skip to content

Commit 23f96fa

Browse files
feat: enhanced byot ux. (#29)
1 parent 0d57885 commit 23f96fa

10 files changed

Lines changed: 604 additions & 26 deletions

File tree

.github/instructions/pr-review.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
applyTo: '**'
3+
---
4+
5+
# Pull Request Review Guidance
6+
7+
You are reviewing changes for @knighted/develop. Be concise, technical, and specific. Prioritize actionable feedback tied to concrete files and lines.
8+
9+
## Browser support policy
10+
11+
- Target evergreen browsers only (current stable Chrome, Edge, Safari, and Firefox).
12+
- Do not require old-browser compatibility unless the PR explicitly expands support scope.
13+
- Do not request legacy polyfills or fallback-only workarounds by default.
14+
15+
## Focus areas
16+
17+
- CDN-first runtime integrity: imports and fallback behavior should remain compatible with src/modules/cdn.js patterns.
18+
- UI state correctness: drawers, toggles, dialogs, and compact/mobile states should remain synchronized and predictable.
19+
- BYOT safety: token handling must stay browser-local, avoid leakage, and preserve clear user-facing privacy/removal cues.
20+
- Accessibility and semantics: form controls, labels, button types, ARIA relationships, and keyboard interactions should be valid.
21+
- Build and workflow stability: scripts and output behavior should remain consistent unless change is explicitly documented.
22+
- Tests and docs alignment: behavior changes should update tests and relevant docs.
23+
24+
## What to verify
25+
26+
- No generated artifacts are edited (dist/, coverage/, test-results/).
27+
- CDN import/fallback behavior is not bypassed with ad hoc URLs in feature modules.
28+
- Sensitive values (PAT/token) are not logged or exposed in UI/status output.
29+
- New UI behavior is covered in Playwright where appropriate.
30+
- Lint/build expectations still pass for changed areas.
31+
32+
## Validation expectations
33+
34+
- Run npm run lint for code and HTML/a11y checks.
35+
- Run npm run build when touching scripts/, bootstrap/runtime wiring, or import map behavior.
36+
- For interactive UI changes, confirm behavior in compact/mobile layout and at least one non-default mode.
37+
38+
## Review output format
39+
40+
- Present findings first, ordered by severity.
41+
- Label each finding as blocking, important, or nit.
42+
- Include file reference and the minimal fix direction.
43+
- Keep summary brief and secondary to findings.
44+
45+
## Ask for changes when
46+
47+
- Behavior changes ship without corresponding test updates.
48+
- New dependencies are added without clear approval.
49+
- Build/CI/import-map contracts change without docs updates.
50+
- Accessibility regressions or semantic HTML issues are introduced.
51+
- Feedback requests are based on unsupported legacy-browser constraints.

AGENTS.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@ Repository structure:
5555
- Maintain graceful fallback behavior when CDN modules fail to load.
5656
- Keep the app usable in local dev without requiring a local bundle step.
5757

58+
## Browser support policy
59+
60+
- Target evergreen browsers only (current stable Chrome, Edge, Safari, and Firefox).
61+
- Prefer platform features available in evergreen browsers without adding legacy polyfills.
62+
- Do not add legacy-browser workarounds unless a task explicitly requires expanded support.
63+
- In code review, treat requests for old-browser compatibility as out-of-scope unless documented.
64+
5865
## Testing and validation expectations
5966

6067
- Run npm run lint after JavaScript edits.

eslint.config.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import playwright from 'eslint-plugin-playwright'
22
import tsParser from '@typescript-eslint/parser'
3+
import htmlPlugin from '@html-eslint/eslint-plugin'
34

45
const playwrightConfig = playwright.configs['flat/recommended']
6+
const htmlRecommendedConfig = htmlPlugin.configs['flat/recommended']
57

68
export default [
79
{
@@ -28,4 +30,32 @@ export default [
2830
...playwrightConfig,
2931
files: ['playwright/**/*.{ts,tsx,js,jsx}'],
3032
},
33+
{
34+
...htmlRecommendedConfig,
35+
files: ['src/**/*.html'],
36+
},
37+
{
38+
files: ['src/**/*.html'],
39+
plugins: {
40+
'@html-eslint': htmlPlugin,
41+
},
42+
rules: {
43+
// Formatting is delegated to Prettier; keep html-eslint focused on semantics and a11y.
44+
'@html-eslint/indent': 'off',
45+
'@html-eslint/attrs-newline': 'off',
46+
'@html-eslint/element-newline': 'off',
47+
'@html-eslint/no-extra-spacing-attrs': 'off',
48+
'@html-eslint/require-closing-tags': 'off',
49+
'@html-eslint/use-baseline': 'off',
50+
'@html-eslint/require-input-label': 'error',
51+
'@html-eslint/require-button-type': 'error',
52+
'@html-eslint/no-accesskey-attrs': 'error',
53+
'@html-eslint/no-positive-tabindex': 'error',
54+
'@html-eslint/no-invalid-role': 'error',
55+
'@html-eslint/no-redundant-role': 'error',
56+
'@html-eslint/no-abstract-roles': 'error',
57+
'@html-eslint/no-aria-hidden-body': 'error',
58+
'@html-eslint/no-aria-hidden-on-focusable': 'error',
59+
},
60+
},
3161
]

package-lock.json

Lines changed: 216 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)