Skip to content

Feat/tanstack router swap - #139

Open
Razberrry wants to merge 7 commits into
masterfrom
feat/tanstack-router-swap
Open

Feat/tanstack router swap#139
Razberrry wants to merge 7 commits into
masterfrom
feat/tanstack-router-swap

Conversation

@Razberrry

@Razberrry Razberrry commented Aug 15, 2026

Copy link
Copy Markdown
Collaborator

replaced with tanstack router for better type support, and the echo system

Razberrry and others added 7 commits August 14, 2026 11:25
Behavior-identical router swap per the approved plan:
- File routes under src/routes/ (pathless _shell layout keeps 404s
  blank; /table parent preserves the no-remount tab-switch guarantee)
- Custom string-only parseSearch/stringifySearch: snapshot IDs exceed
  Number.MAX_SAFE_INTEGER and must never be JSON-parsed; URLSearchParams
  serialization keeps dup/cache_id URLs byte-identical
- z.looseObject search schemas so unknown params survive carry-forward
- Outlet context replaced by features/table/tableGraphData.ts
- Mock-mode redirects moved to beforeLoad; QueryClientProvider added
  (unused until page migrations)
- main.jsx/App.jsx replaced by main.tsx + routes; react-router-dom
  still installed until final removal commit

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The five raw history.pushState/replaceState sites replaced the whole
history.state object, clobbering the index TanStack Router stores
there. Spread the existing state so back/forward tracking survives
graph-selection navigation. graphSelection behavior unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
SKILL.md URL contract re-verified — no change needed (all params,
routes, and semantics identical).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A first-visit tab chunk suspending reached the root Suspense boundary,
whose fallback unmounted TableLayout — re-running its mount effect and
wiping the graph selection (sessionStorage cleared). Caught by the
browser smoke suite; boundary below TableLayout restores the pre-swap
no-remount behavior (plan risk R5's designated mitigation).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Remove @tanstack/react-query + QueryClientProvider; nothing consumed
  them, they were staged for a later page migration
- Flatten routes/_shell/** to routes/**; NavBar moves into __root.tsx.
  The pathless layout existed only so unknown URLs rendered without a
  NavBar; that parity isn't worth a whole nesting level, so a 404 now
  shows the NavBar with no page content

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…om import

The master merge kept both sides' import blocks in FileTreePage, declaring
FileType twice (ESLint parse error, failing CI) and reintroducing
useOutletContext from react-router-dom, which this branch removed as a
dependency and no longer calls.
@YanivZalach

YanivZalach commented Aug 16, 2026

Copy link
Copy Markdown
Owner

GraphPage writes to history directly under a router that owns it

GraphPage.jsx still calls history.pushState / replaceState itself (lines 243, 259, 453, 512, 562) plus a raw popstate listener at 475. TanStack Router owns the history stack and keeps its own bookkeeping in history.state (index/key).

Spreading { ...history.state } was the right fix for the clobbering, but it has a second effect: node selection pushes a new entry carrying the same router index. The router reads that entry as the same location, so back/forward deltas can desync after a few selections.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants