todo: group the url and query-string items into one theme
files-app becomes url-state: the file browser is where the work happened, but where selection lives and who clears a query string are framework questions. The panel framework's version of the same question moves in beside them, extracted from the deep-read item, which keeps it as one of its three questions. Item ids changed with the theme. Done now deliberately — no board reads them yet, and this is the last cheap moment to move one. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
---
|
||||
theme: url-state
|
||||
heading: "URL state — routing, query strings and selection"
|
||||
kind: theme
|
||||
---
|
||||
|
||||
**Grouped 2026-08-21.** This was `files-app`, and the file browser is still where most of it is —
|
||||
but the question underneath is not the file browser's. Where selection lives, what a query string is
|
||||
allowed to mean, and who is responsible for clearing one are framework questions that happen to have
|
||||
been answered first in `/files`. The panel framework's own version of the same question is here too,
|
||||
rather than filed under the framework's deep read where nobody comparing the two would find it.
|
||||
|
||||
`docs/navigation-audit.md` is the authority for all of it.
|
||||
|
||||
**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.
|
||||
|
||||
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
|
||||
`<Link>` and never called the function enforcing it.
|
||||
@@ -0,0 +1,14 @@
|
||||
---
|
||||
id: url-state/a-panel-s-folder-is-still-not-addressable
|
||||
title: "A panel's folder is still not addressable"
|
||||
theme: url-state
|
||||
status: open
|
||||
created: 2026-08-20
|
||||
date_source: assumed
|
||||
order: 3
|
||||
---
|
||||
|
||||
**A panel's folder is still not addressable.** `urlPath` is true only on the `/files` screen;
|
||||
panels keep the path in local state, so they always open at their base and cannot be linked or
|
||||
restored. Deliberate as written — a dashboard can hold two browsers and one URL cannot serve both —
|
||||
but worth re-deciding rather than inheriting.
|
||||
@@ -0,0 +1,29 @@
|
||||
---
|
||||
id: url-state/can-the-query-strings-come-out-of-the-flow
|
||||
title: "Can the query strings come out of the flow?"
|
||||
theme: url-state
|
||||
status: open
|
||||
created: 2026-08-20
|
||||
date_source: assumed
|
||||
order: 4
|
||||
---
|
||||
|
||||
**Can the query strings come out of the flow?** One of the three questions the Workspace/Panel deep
|
||||
read set out to answer rather than assume (`workspaces-panels/a-deep-read-of-the-whole-framework-to`),
|
||||
pulled out to sit beside the file browser's version of the same problem — which is the only place the
|
||||
question has actually been worked through end to end.
|
||||
|
||||
What makes it a real question rather than a tidy-up: a query string is doing several different jobs at
|
||||
once across the app. In `/files` it names the open overlay (`?view=<name>`), which is addressable state
|
||||
and belongs in the URL. `src/workspaces/components/NavLink.tsx` appends a **global** query string to
|
||||
every link it renders — a different job again, and one most callers never think about. And
|
||||
`docs/navigation-audit.md` prescribes `?selected=<id>` for a master list with a live preview, because
|
||||
the detail route is the full page.
|
||||
|
||||
So "come out of the flow" is not one change. Deciding which of those uses are load-bearing addressable
|
||||
state and which are ambient plumbing being carried around is the work, and the answer probably differs
|
||||
per case.
|
||||
|
||||
Related, and the reason this theme exists: `url-state/the-acts-that-clear-the-overlay-have-no-owner`
|
||||
is the same shape one layer down — the params are named in one place, but every site still decides for
|
||||
itself whether to honour them.
|
||||
@@ -0,0 +1,24 @@
|
||||
---
|
||||
id: url-state/rows-are-still-not-links
|
||||
title: "Rows are still not links"
|
||||
theme: url-state
|
||||
status: open
|
||||
created: 2026-08-20
|
||||
date_source: assumed
|
||||
order: 1
|
||||
---
|
||||
|
||||
**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 `<div onDoubleClick>` (`FileItem.tsx:701,748`), and search
|
||||
results render `<div onClick>` (`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.
|
||||
|
||||
It is now much easier than it was: `folderHref(path)` gives a folder's URL and `hrefForPath` gives
|
||||
a full `To` with the overlay already stripped, so a row becomes
|
||||
`<Link to={hrefForPath(childPath)}>` and a file row becomes a link that sets `?view=<name>`. The
|
||||
breadcrumb has done exactly this since before today and is the model.
|
||||
|
||||
Watch for: a row is also a click target for SELECTION (single click selects, double opens,
|
||||
shift/cmd extend). An anchor changes what those gestures mean by default, so the selection
|
||||
handlers have to keep working and `preventDefault` where they win.
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
id: url-state/the-acts-that-clear-the-overlay-have-no-owner
|
||||
title: "The acts that clear the overlay have no owner, only the list does"
|
||||
theme: url-state
|
||||
status: open
|
||||
created: 2026-08-20
|
||||
date_source: assumed
|
||||
order: 2
|
||||
---
|
||||
|
||||
**The acts that clear the overlay have no owner, only the list does.** `VIEWER_PARAMS` and
|
||||
`withoutViewerParams` live in `files-route.ts` and are shared. But every site still decides FOR
|
||||
ITSELF whether to call them, which is precisely how the breadcrumb shipped wrong an hour after the
|
||||
rule was written. Three bugs in a row came from this. A single `navigateToFolder()` that every
|
||||
caller must go through — rather than a helper they may remember — is the fix if a fourth appears.
|
||||
Reference in New Issue
Block a user