Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
0c5bacb
feat(frontend): v1 scaffold, strict TypeScript and import boundary (U…
jaseemjaskp Oct 26, 2026
5c55a7c
fix(frontend): close v1 guardrail bypasses found in self-review (UN-4…
jaseemjaskp Oct 26, 2026
87c803c
feat(frontend): run v1 checks in CI and tighten what pages may import…
jaseemjaskp Oct 27, 2026
f86de0b
refactor(frontend): address SonarCloud findings on the v1 guardrails …
jaseemjaskp Oct 27, 2026
67be34b
refactor(frontend): split the contract-matrix builder to cut its comp…
jaseemjaskp Oct 27, 2026
81e15b1
fix(frontend): check every glob pattern and v0 -> v1 imports Biome ca…
jaseemjaskp Oct 27, 2026
664d1cf
fix(frontend): typecheck v1 tests that import vitest; skip cloud plug…
jaseemjaskp Oct 29, 2026
787bf8b
fix(frontend): close v1 guardrail gaps from team review (UN-4270)
jaseemjaskp Oct 29, 2026
b9bed0d
feat(frontend): add an assets/ folder to the v1 taxonomy (UN-4270)
jaseemjaskp Oct 29, 2026
3889a34
fix(frontend): find v1 imports only in executable code, not in string…
jaseemjaskp Oct 29, 2026
feb8c5f
fix(frontend): don't read JSX apostrophes as strings in the v1 scanne…
jaseemjaskp Oct 29, 2026
7af9264
fix(frontend): read v1 imports from a Babel AST, not a hand-written t…
jaseemjaskp Oct 30, 2026
daa1a18
fix(frontend): read v1 import specifiers through TypeScript assertion…
jaseemjaskp Oct 30, 2026
73b9ffa
fix(frontend): close v1 boundary gaps from the daa1a182d review (UN-4…
jaseemjaskp Nov 2, 2026
7fdcb02
fix(frontend): read CSS image-set() and escaped url()s; allowlist v1 …
jaseemjaskp Nov 2, 2026
ee517cb
chore: git-ignore cloud v1 plugins copied into src/v1/plugins/ (UN-4270)
jaseemjaskp Nov 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion .github/workflows/ci-frontend-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
uses: actions/checkout@v6

- name: Setup Biome
uses: biomejs/setup-biome@v2
uses: biomejs/setup-biome@4c91541eaada48f67d7dbd7833600ce162b68f51 # v2.7.1
with:
version: "2.3.13"

Expand Down Expand Up @@ -121,6 +121,31 @@ jobs:
working-directory: frontend
run: bun run typecheck

# src/v1 is excluded from the step above and checked under its own
# stricter tsconfig, after scripts/check-v1.mjs checks file types,
# placement, symlinks and the folder taxonomy.
- name: Run v1 typecheck
working-directory: frontend
run: bun run typecheck:v1

# Biome on src/v1, then scripts/check-v1.mjs: the folder import
# contract, v0 reaching v1 only through `@v1`, PropTypes and `ant-`.
- name: Run v1 lint
working-directory: frontend
run: bun run lint:v1
Comment thread
jaseemjaskp marked this conversation as resolved.
Resolved

# The guardrail fixtures run under `node --test` (Node 22 APIs).
- name: Setup Node
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: "22"

# v1 unit tests, then the fixtures proving each guard above fails and
# passes when it should.
- name: Run v1 tests
working-directory: frontend
run: bun run test:v1

# ci-test.yaml runs the same suite as the rig's `frontend` group, but its
# tiers skip frontend-only PRs; this job is what gates those.
vitest:
Expand Down
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,12 @@ eggs/
lib/
lib64/
# The Python `lib/` rule above also matches the frontend's shadcn/ui helper
# directory (`@/lib/utils` per components.json). Keep that tracked.
# directory (`@/lib/utils` per components.json), the v1 `lib/` folder and the
# v1 guardrail fixtures. Keep those tracked, or their files are silently left
# out of commits.
!frontend/src/lib/
!frontend/src/v1/**/lib/
!frontend/test-fixtures/**/lib/
parts/
sdist/
var/
Expand Down Expand Up @@ -635,6 +639,10 @@ workers/pluggable_worker/*
# FE Plugins
frontend/src/plugins/*
frontend/public/llm-whisperer/
# v1 cloud plugins are copied in at build time; only the placeholder manifest
# is public.
frontend/src/v1/plugins/*
!frontend/src/v1/plugins/manifest.ts
Comment thread
greptile-apps[bot] marked this conversation as resolved.
Resolved


# TODO: Ensure its made generic to abstract subfolder and file names
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ repos:
- id: check-docstring-first
- id: check-ast
- id: check-json
# Both files are JSONC — their tooling (VS Code, tsc) allows comments,
# These files are JSONC — their tooling (VS Code, tsc) allows comments,
# but this hook parses with strict `json.loads`, which does not.
exclude: "(\\.vscode/launch\\.json|frontend/tsconfig\\.json)$"
exclude: "(\\.vscode/launch\\.json|frontend/(src/v1/)?tsconfig\\.json)$"
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: check-toml
Expand Down
94 changes: 93 additions & 1 deletion frontend/biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,5 +129,97 @@
"assist": {
"enabled": true,
"actions": { "source": { "organizeImports": "on" } }
}
},
"overrides": [
{
"includes": ["src/v1/**"],
"linter": {
"rules": {
"style": {
"noRestrictedImports": {
"level": "error",
"options": {
"paths": {
"prop-types": "v1 is typed with TypeScript; PropTypes are not used under src/v1.",
"antd": "antd is not used under src/v1."
},
"patterns": [
{
"group": [
"../**",
"..",
"./../**",
"/**",
"@/**",
"src/**"
],
"message": "v1 imports nothing outside src/v1, and never with '../'. Use './' within a folder and '@v1/...' across folders."
},
{
"group": ["@ant-design/**", "antd/**"],
Comment thread
jaseemjaskp marked this conversation as resolved.
Resolved
"message": "antd is not used under src/v1."
},
{
"group": ["prop-types/**"],
"message": "v1 is typed with TypeScript; PropTypes are not used under src/v1."
},
{
"group": [
"**/*.css",
"**/*.less",
"**/*.sass",
"**/*.scss",
"**/*.styl",
"**/*.stylus",
"**/*.pcss",
"**/*.postcss",
"**/*.sss",
"!@v1/styles/**"
],
"message": "No component .css under src/v1; style with tokens and Tailwind. Global v1 styles live in @v1/styles/."
}
]
}
}
},
"suspicious": {
"noExplicitAny": "error"
}
}
}
},
{
"includes": ["src/**", "!src/v1/**"],
"linter": {
"rules": {
"style": {
"noRestrictedImports": {
"level": "error",
"options": {
"patterns": [
{
"group": [
"@v1/**",
"@/v1",
Comment thread
jaseemjaskp marked this conversation as resolved.
Resolved
"@/v1/**",
"src/v1",
"src/v1/**",
"/src/v1",
"/src/v1/**",
"./v1",
"./v1/**",
"../**/v1",
"../**/v1/**",
"!@v1"
],
"message": "v0 may import only the v1 public entry, as '@v1'."
}
]
}
}
}
}
}
}
]
}
3 changes: 3 additions & 0 deletions frontend/bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions frontend/jsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
"@/*": ["./src/*"],
"@v1": ["./src/v1/index.ts"],
"@v1/*": ["./src/v1/*"]
}
},
"include": ["src/**/*"],
"exclude": ["node_modules", "build"]
"exclude": ["node_modules", "build", "src/v1"]
}
8 changes: 7 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@
"check:fix": "biome check --write src/",
"lint:all": "biome check --write src/",
"lint:changed": "(git diff --name-only --diff-filter=ACMR; git ls-files --others --exclude-standard) | grep -E '\\.[jt]sx?$' | sed 's|^frontend/||' | sort -u | xargs -r biome check --write",
"typecheck": "tsc --noEmit"
"typecheck": "tsc --noEmit",
"typecheck:v1": "node scripts/check-v1.mjs --files && tsc -p src/v1/tsconfig.json",
"lint:v1": "biome lint src/v1/ && node scripts/check-v1.mjs --code",
"test:v1": "vitest run --dir src/v1 --passWithNoTests && node --test test-fixtures/v1-boundary/boundary.fixtures.mjs"
Comment thread
jaseemjaskp marked this conversation as resolved.
Resolved
},
"browserslist": {
"production": [
Expand All @@ -92,6 +95,7 @@
]
},
"devDependencies": {
"@babel/parser": "^7.28.6",
"@biomejs/biome": "^2.3.13",
"@tailwindcss/postcss": "^4",
"@tailwindcss/typography": "^0.5.20",
Expand All @@ -106,6 +110,8 @@
"autoprefixer": "^10.5.4",
"baseline-browser-mapping": "^2.9.19",
"happy-dom": "^20.10.2",
"postcss": "^8.5.23",
"postcss-value-parser": "^4.2.0",
"tailwindcss": "^4",
"typescript": "^7.0.2",
"vite": "^7.3.5",
Expand Down
Loading
Loading