Skip to content

Give the floating panel's views one table - #3744

Merged
max-sixty merged 3 commits into
mainfrom
panel-view-table
Oct 23, 2026
Merged

max-sixty merged 3 commits into
mainfrom
panel-view-table

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

The floating panel decided what each of its views is by comparing the route's name at each site that needed to know: about 60 view === "thread" / "threads" / "queue" / "versions" branches, with the sizing rule ("a thread's view follows its messages; a list fits what its tab shows and holds that") restated at five of them and in the prose above each. A new view had to find and join every one of those branches, the way a new seated component had to join the CSS exclusion list #3710 fixed.

Now VIEWS in browser/runtime/floating-panel.js is the one table of what each route is: its key, its title (and heading, and whether its tabs already name it), what it draws and what stands at its foot, what Leaf's reader draws into it (nominate), whether it is a menu list or a view over the row and which menu row opens it, the rows the arrows walk, the lists it opens over, and which mark it presses. Every former branch reads the table, and routeKey, titleOf, pathTo, the view switch, the menu's list ternary, LIST_ROWS, LISTS, OWN_VIEWS and levelRow are gone or derived from it.

The sizing rule turned out not to be an independent per-view fact: a view follows its content exactly when it is a thread's view, the one Leaf's reader draws a transcript into. So the table states it once: a route that names a thread is that thread's view and follows its messages; every other view fits what it shows and holds that. The sizing sites (holdThread, pressAt, the rewrite hold, holdRoom, fitAnswer, data-lf-rises) all read the route's thread, rather than half of them reading a flag and half the route.

Two smaller idioms collapse with it:

  • "the thread this route shows" is threadOf(route) wherever it was spelled out as top?.view === "thread" ? threadByKey(top.thread) : null.
  • "is this view standing" was written four ways across the go-to doors, Versions' keys and On's and Threads' own code; it is now showing(route), for menu lists and views alike.

controlsTemplate keeps the shared foot (the way back, what stands in its row, then the view's presses), and each view's own presses moved into threadsControls, queueControls and threadControls, which the table names. Threads' search lasts while Threads stands in the trail, which is what the old "not threads and not thread" exception meant.

Behaviour that belongs to one view and that no other would declare (On's card seats and walk landing, Threads' resolve landing and its / key) still names its view, through showing. The DOM attributes tests and CSS read (data-view, data-open, data-level, data-lf-rises) are unchanged, and the kernel is rebuilt.

No behaviour change is intended. pnpm run test:runtime passes, and so do 25 focused tests in tests/browser/test_render_floating_panel.py covering threads and their filters and search, a thread's sizing, answer growth and press holds, unread replies, On, Versions, the menu's lists and errors, About's copy fallback, the go-to doors, All pages, a sample's threads and a conversation reader arriving later.

This was written by Claude Code on behalf of max-sixty

max-sixty and others added 3 commits October 23, 2026 04:39
The panel decided what each view is by comparing the route's name at each site
that needed to know, about 60 branches, with the sizing rule restated at five
of them. `VIEWS` now holds each route's key, title and heading, what it draws
and what stands at its foot, what Leaf's reader draws into it, whether it is a
menu list and which menu row opens it, the rows the arrows walk, the lists it
opens over and the mark it presses; every former branch reads it. A route that
names a `thread` is that thread's view, which follows its messages; every
other fits what it shows and holds that, a rule now stated once at the table.

`threadOf` replaces the repeated "the thread this route shows" idiom and
`showing` the four ways "is this view standing" was written. No behaviour
change is intended.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts:
#	browser/runtime/floating-panel.js
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit 6736e12 into main Oct 23, 2026
3 checks passed
@max-sixty
max-sixty deleted the panel-view-table branch October 23, 2026 11:57
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