refactor(frontend): the flat components/ folder moves into shell/, modules/<page>/ and features/<name>/

A pure move (git mv, history kept): 333 files leave components/, which now holds only the platform
layer (ui/) and the legal pages. The shell is the frame (App, header, nav rail, palette, boot); each
page lives in modules/<page>/ with its rail, store and tests; what several pages share sits in
features/<name>/; the shared-link page is watch/. Domain-free helpers went straight to ui/
(ViewSwitcher, FilterRail, the confirm dialog, the language switcher, the copy rows).

Every relative specifier was rewritten (imports, dynamic imports, vi.mock, new URL), and the
contract tests that scan sources now scan the whole app source, not only components/ — each glob
was counted before and after so none went green over fewer files. The locale-format rule matched
`/src/components/` only, so the move would have taken ~300 files out from under its i18n-singleton
check; it now covers every folder that holds components, with a test per folder.
This commit is contained in:
2026-10-22 23:12:45 +02:00
parent fdf8076013
commit 63a0fecc8b
356 changed files with 2433 additions and 2332 deletions
+3 -3
View File
@@ -108,7 +108,7 @@ describe("the media colours", () => {
);
expect(native).not.toMatch(/\baccent-accent\b/);
expect(native.match(/\baccent-chosen\b/g)).toHaveLength(2);
const plex = readFileSync(new URL("../components/PlexPlayer.tsx", import.meta.url), "utf8");
const plex = readFileSync(new URL("../modules/plex/PlexPlayer.tsx", import.meta.url), "utf8");
// No accent fill at all on the Plex player: its progress bar's played part is white and its head
// the media amber — a marked place, like the intro / credits markers and the clip's playhead.
expect(plex).not.toMatch(/\bbg-accent\b/);
@@ -117,7 +117,7 @@ describe("the media colours", () => {
// The player's own components are chrome throughout: nothing chosen there is the accent's text
// (a light theme's accent is dark on it — Slate 2.84:1).
for (const f of ["PlexPlayer.tsx", "PlexPlayerSettings.tsx", "UpNextCard.tsx"]) {
const src = readFileSync(new URL(`../components/${f}`, import.meta.url), "utf8");
const src = readFileSync(new URL(`../modules/plex/${f}`, import.meta.url), "utf8");
expect(src, f).not.toMatch(/\btext-accent\b/);
}
// A class string that paints the chrome carries the media marks (media-scope re-points them
@@ -183,7 +183,7 @@ it("a tonal fill under text is an opaque tint", () => {
const sites = [
"components/ui/Badge.tsx",
"components/ui/ItemCount.tsx",
"components/FilesRail.tsx",
"modules/files/FilesRail.tsx",
];
const offenders = sites.flatMap((f) => {
const src = readFileSync(new URL(`../${f}`, import.meta.url), "utf8");