From 9700959c9e98e5bc66f1be4d1cbd0001e2cd7cf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Padez?= Date: Sat, 15 Aug 2026 21:58:46 +0000 Subject: [PATCH] =?UTF-8?q?todo:=20files=20routing=20=E2=80=94=20what=20la?= =?UTF-8?q?nded,=20and=20the=20half=20that=20did=20not?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The URL model is done; rows are still opaque-click divs, which was the original finding and is now easier to fix than it was. Recorded honestly rather than leaving an entry that reads as untouched work. Also recorded the pattern behind the four bugs this produced: the list of overlay params has an owner, the acts that clear it do not, and every site deciding for itself is what let the breadcrumb ship wrong an hour after the rule was written. Co-Authored-By: Claude Opus 5 --- TODO.md | 58 +++++++++++++++++++++++++++++++-------------------------- 1 file changed, 32 insertions(+), 26 deletions(-) diff --git a/TODO.md b/TODO.md index b2636c67..7d0ff3da 100644 --- a/TODO.md +++ b/TODO.md @@ -285,36 +285,42 @@ error boundaries** anywhere in the repo; and `dashboards.id` is a **global** pri ## Files app — routing -- [ ] **The files app needs a routing pass (noted 2026-08-15, after `31d8d725`).** Do this after the - file-browser test pass, alongside the code-editor work above. `docs/navigation-audit.md` is the - authority and names the anti-pattern; this is where it still lives. +**The URL model is done (2026-08-15).** The folder is the pathname — +`/files/archive/Tests/platform/docs` — and `?view=` is a NAME within it, not a second copy of the path. +Deep links and refresh work, which they never had. Landed across `559560de`, `98ba604a`, `7e31564c`, +`0dc88b51`, `7359af2f`, with `files-route.ts` + 23 tests as the one owner of encoding and of which params +belong to the overlay. - **What prompted it.** Closing a viewer pane sent you back to home. `onCloseViewer` was - `setSearchParams({})` — a wholesale wipe that took `?path=` with it. Fixed, but the shape of the bug - is the point: four handlers touched the same query string and only one of them wiped it, because no - single thing owns that URL. +Four bugs came out of that work and are fixed: closing a pane sent you home; `?view=` was stripped on +every page load by a mount effect that had made deep links impossible since 2026-02-23; navigating kept a +pane belonging to the folder you left; and the breadcrumb opted out of that last rule because it is a +`` and never called the function enforcing it. - **Verified state, so the next pass does not have to re-derive it:** +- [ ] **Rows are still not links.** This is the half that did not get done, and it is the original + finding. Both list and grid render `
` (`FileItem.tsx:701,748`), and search + results render `
` (`FileViewContainer.tsx:187`) — the "opaque click" that + `docs/navigation-audit.md` names. No cmd-click into a new tab, no middle-click, not + link-focusable, and the target lives in a closure rather than the DOM. - - **Rows are not links.** Both list and grid render a `
` with `onDoubleClick` - (`FileItem.tsx:701,748`) — the "opaque click" the audit names. No cmd-click into a new tab, no - middle-click, not link-focusable, and the target is in a closure rather than the DOM. - - **Search results are the same** — `
handleSearchResultClick(entry)}>` - (`FileViewContainer.tsx:185`), and that handler both navigates the folder AND opens the viewer. - - **The breadcrumb already got it right** and is the model to copy: it renders a real `` when - given `searchForPath`, and falls back to a `