Files
siftlode/frontend/src/watchMain.tsx
T
peter 63a0fecc8b 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.
2026-10-22 23:12:45 +02:00

27 lines
1.1 KiB
TypeScript

import React from "react";
import { createRoot } from "react-dom/client";
import { CrashBoundary } from "./components/ui/CrashBoundary";
import WatchPage from "./watch/WatchPage";
import { T } from "./watch/watchStrings";
import "./index.css";
import { installStaleBuildReload } from "./lib/staleBuild";
// The entry of a public /watch/<token> link (watch.html). Whoever opens it got the link from a
// friend: signed out, often on a phone, often on mobile data — so it imports the player page and
// what that page renders, and none of main.tsx's app (no providers, no app i18n, no client-log
// wiring: an anonymous viewer has no diagnostics consent to send it under). A contract test walks
// this file's imports and fails on any of those (`watchEntry.contract.test.ts`).
// A tab left open across a release reloads onto the new build instead of failing on a chunk.
installStaleBuildReload();
const crashCopy = () => ({ title: T.crashTitle, subtitle: T.crashHint, reload: T.reload });
createRoot(document.getElementById("root")!).render(
<React.StrictMode>
<CrashBoundary copy={crashCopy}>
<WatchPage />
</CrashBoundary>
</React.StrictMode>,
);