Repository navigation
Give the floating panel's views one table - #3744
Merged
Merged
Conversation
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]>
leaf-agent
approved these changes
Oct 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
VIEWSinbrowser/runtime/floating-panel.jsis 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, androuteKey,titleOf,pathTo, the view switch, the menu's list ternary,LIST_ROWS,LISTS,OWN_VIEWSandlevelRoware 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
threadis 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'sthread, rather than half of them reading a flag and half the route.Two smaller idioms collapse with it:
threadOf(route)wherever it was spelled out astop?.view === "thread" ? threadByKey(top.thread) : null.showing(route), for menu lists and views alike.controlsTemplatekeeps the shared foot (the way back, what stands in its row, then the view's presses), and each view's own presses moved intothreadsControls,queueControlsandthreadControls, 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, throughshowing. 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:runtimepasses, and so do 25 focused tests intests/browser/test_render_floating_panel.pycovering 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.