fix(frontend): the layer gates cover what the move left outside them, and each page keeps its own logic
Gates the folder move had narrowed or left open: the MenuCheck contract scans the whole app again (it saw only components/); local/layers refuses an import of an entry (main.tsx, the /watch page) from any layer, and reads a backtick import() as the path it is; the /watch contract forbids the shell, the modules and the features by folder (its one path to App had gone stale); chunkGuard's own test gets the vitest focus/skip rules. The root tests' exemption from local/layers is in the gate register, with its three imports. Placement: Plex's chip builder moves into lib beside the feed's, the folder names into features/folders, and three files only one page uses into that page. ui/FilterRail takes its reset from useRail instead of a page id. The channel page reads the feed's view and builds "Show in feed" itself, and the feed's scroll key is the feed's hook, so the shell holds no feed logic. The floating header re-measures when one page's pills replace another's in the same commit (the claim count stayed equal, so only the observer caught it). A Plex view applied and edited now stays across a visit to another page, as the feed's does: pinned by a test. docs/development.md says what a page with a rail adds in lib.
This commit is contained in:
@@ -133,7 +133,12 @@ type Snapshot = {
|
||||
|
||||
/** The register scope a code file belongs to, by its path (relative to frontend/). */
|
||||
function scopeOf(file: string): string {
|
||||
if (!file.includes("/")) return /[.][mc]?js$/.test(file) ? "js configs" : "ts configs";
|
||||
if (!file.includes("/"))
|
||||
return /[.][mc]?js$/.test(file)
|
||||
? "js configs"
|
||||
: /[.]test[.]ts$/.test(file)
|
||||
? "tool tests"
|
||||
: "ts configs";
|
||||
if (file.startsWith("e2e/")) return "e2e";
|
||||
if (file.startsWith("src/design-lab/")) return "design-lab";
|
||||
// the network owners (NETWORK_OWNERS in eslint.config.js)
|
||||
|
||||
Reference in New Issue
Block a user