Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions frontend/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
dist
public
package-lock.json
src/routeTree.gen.ts
3 changes: 2 additions & 1 deletion frontend/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ The sections below describe the existing code, which predates [PHILOSOPHY.md](PH

React SPA in `frontend/src/`:

- Routing: TanStack Router, file-based under `src/routes/` — thin `.tsx` route files lazy-load the legacy pages. Search-param Zod schemas and the string-preserving `parseSearch`/`stringifySearch` (snapshot IDs must never be JSON-parsed) live in `shared/lib/searchParams.ts`
- Pages: `GraphPage` (force-graph visualization), `MetadataPage`, `TimelinePage`, `FileTreePage`, `SnapshotSelectionPage`, `HomePage`, `DocsPage`
- `TableLayout.jsx` wraps all table-specific pages; `context/TableSpecsContext.jsx` shares table state
- `TableLayout.jsx` wraps all table-specific pages and provides graph data via `features/table/tableGraphData.ts`; `context/TableSpecsContext.jsx` shares table state
- `graphConstants.js` defines node/link visual constants and `fileTypeLabel()` for human-readable node types
- `uiTypography.js` — shared Tailwind class tokens for labels, body text, inputs, buttons, and toolbar controls
- `layoutConstants.js` / `appConstants.js` — layout dimensions and app-wide constants
Expand Down
16 changes: 15 additions & 1 deletion frontend/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const philosophyRules = {
};

export default tseslint.config(
{ ignores: ["dist", "public", "node_modules"] },
{ ignores: ["dist", "public", "node_modules", "src/routeTree.gen.ts"] },

// eslint-disable comments must carry a justification (PHILOSOPHY.md 'Tooling & enforcement')
{
Expand Down Expand Up @@ -85,6 +85,20 @@ export default tseslint.config(
},
},

// TanStack Router file routes: exporting `Route` and throwing redirect()
// are the router's own documented pattern —
// https://tanstack.com/router/latest/docs/framework/react/routing/file-based-routing
{
files: ["src/routes/**/*.tsx"],
rules: {
"react-refresh/only-export-components": [
"error",
{ allowExportNames: ["Route"] },
],
"@typescript-eslint/only-throw-error": "off",
},
},

// Component files: 200-line cap (lint-enforced per PHILOSOPHY.md)
{
files: ["**/*.tsx"],
Expand Down
2 changes: 1 addition & 1 deletion frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@

<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading
Loading