Skip to content

Rebuild the floating panel to the look chosen in its design review - #2696

Merged
max-sixty merged 8 commits into
mainfrom
floating-panel
Oct 13, 2026
Merged

max-sixty merged 8 commits into
mainfrom
floating-panel

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Rebuilds the opt-in floating panel (?lf-chrome=floating, from #2647) to the look the user chose in a design playground. The user's verdict on #2647's version was that it "doesn't seem elegant generally, nor that consistent with our aesthetic. The menus are quite bad, very large spacing. Things like 'layout' should not need to be selectable in a menu". Classic chrome stays the default; this is the base for the work in TODO.md #28.

What the panel is now

  • Three sizes, set by what the user does rather than a setting. Folded is the leaf in the window's corner, with a badge for what waits on the user and a dot for threads with news. The row holds the leaf, the field and marks with counts for Questions and Threads, plus a pen for Annotations. Opened is a view above the row: Questions, Threads, a thread, Versions, or a group of the page's controls. The Layout row and the Minimal/Moderate displays are gone; the lfChrome preference keeps only rest.
  • The field holds the status. The empty field says what the agent is doing, whose turn a thread is, or what a passing notice says. Notices no longer stand at the window's head (--lf-notice-seat: panel).
  • The leaf's menu is a small list, one line per row, each with its shortcut. The toolbar row contract (banner-toolbar.js) gains shortcut.
  • Look: the page's own ground with a hairline ring, 12px corners, a compact width (540px), 13/12px sans in two inks, and the page's serif for questions.
  • Motion moves no layout. The box changes size in one step; a separate surface layer follows its outline by a clip-path animation, so the shift watch sees nothing travel.
  • Keyboard: . folds and unfolds (panel.floating.fold). Escape clears a search, then closes the menu, then a view, through a floating panel rung on the page's ladder, wherever focus is.
  • Annotations leaves out Select element, which the page starts on selection or s.

Review guide

skills/leaf/assets/runtime/floating-panel.js and skills/leaf/assets/styles/floating-panel.css are rewrites; their headers state the contract. chrome.css is regenerated. The rest is small: banner-toolbar.js (shortcut), keyboard/touch-controls.js and keyboard/shortcut-bar.js (rows supply it), keyboard/register.js (rung and command), prepaint.js (drops display), and icons.js (down, search).

Testing

tests/browser/test_render_floating_panel.py covers sending and replying, filters, folding, Questions, Versions, modes, routes into a thread, Send standing in for the counts, and writing from any size. Each assertion added here fails against the commit before it. Those tests and the shift watch pass with the CPU slowed tenfold. pnpm run test:runtime passes.

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

max-sixty and others added 6 commits October 12, 2026 15:15
The panel now has three sizes chosen by what the user does: folded to the leaf in
the window's corner, the row, and a view opened above the row. The Layout row, the
Minimal and Moderate displays and the Classic choice leave the panel; the
preference keeps only where it was left. The empty field says the agent's status,
a thread's turn, or a passing notice (a new notice seat, panel). The row holds
marks with counts, and Send stands in their place while typing. The leaf's menu is a
small one-line menu whose rows carry their shortcut (a new `shortcut` in the
toolbar row contract). A view's head carries where the user is, its filters,
search, Resolve and Close.

Size changes take effect in one step and a separate surface layer follows by a
clip-path animation, so no layout tweens and the shift watch sees nothing move
after the gesture.

The panel's tests follow the new structure: the destination line is .lf-fp-context,
folding is in the leaf's menu, and Send replacing the counts while typing replaces
the test that counts moved onto the destination line.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…om when it opens

Review of the rebuild found three ways the panel's open state fell out of sync with
what it showed:

- Send stayed after a send, hiding the counts: the row read a cached copy of the
  draft that only saving updated. It now reads the editor's own draft.
- Escape stopped closing a view once focus fell to the page, as it does after Done,
  Undo or Resolve: the key was the panel's own scope. The open menu or view is now a
  step of the page's Escape ladder (`floating panel` in register.js), and a search
  holding words clears first. Swapping the field's editor hands the caret across.
- News moved the controls at a view's head: a view's height followed its contents.
  Each view's room is now fixed once it is first drawn whole, and what arrives
  scrolls inside it.

Folding to the leaf becomes a page command (`.`), so the menu's row carries its key.
Threads' first filter is Open, matching the thread mark's count. The menu's head is
the state in a word over one line, with the whole status on hover, and its arrows
walk the rows. A finger opening a thread is not handed the keyboard. The unread
root attribute nothing read is gone.

Tests: sending a reply brings the counts back; Escape closes Questions after Undo;
a thread arriving leaves Close where it was; `.` folds and unfolds.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
… land past the user's own

Holding each view's height kept a new page comment's thread at the height of its one
message, so the user's reply and the agent's arrived hidden below it. A thread now
takes at least 280px, or its cap, and its replies arrive in that room without moving
what is read. The reader lands at the end once the message the user just sent is
drawn, rather than on the first paint after the send, before it was. A paint's room
is held inside the paint guard.

Test: the reply just sent stands inside the thread's view.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The user, reviewing the rebuilt panel: "I don't think we need the select mode;
we get that just through selecting, or hitting `s`". Annotations no longer lists
Select element; the menu, its groups and the test of which groups exist share one
`listed` reading of the rows held elsewhere. Two class names nothing styled or
queried go too.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts:
#	skills/leaf/assets/runtime/banner-toolbar.js
#	skills/leaf/assets/runtime/chrome.css
#	skills/leaf/assets/runtime/floating-panel.js
#	skills/leaf/assets/styles/floating-panel.css
The panel's stylesheet repeated chrome.css's rule that leaves the foot's status
line only a walk's position when a notice is seated elsewhere. One container query
now names both seats, and the panel's copy goes.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The leaf menu becomes unreachable when a tall view is open: with 20 threads in a 1280×600 window, opening the menu puts its top 217 px above the viewport. Its bottom: calc(100% + 8px) measures from the full panel, whose height includes the open view. Anchor the menu to the leaf and bound its height to the viewport so the same controls remain reachable from every panel size.

max-sixty and others added 2 commits October 12, 2026 17:11
…the open view

The menu measured from the whole panel, so with a tall view open (20 threads in a
1280x600 window) its top stood 217px above the window. It now anchors to the leaf,
which it can only do from after the leaf in the tree, and takes its content's
height within the room between the leaf and the window's head, scrolling past it.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts:
#	skills/leaf/assets/runtime/floating-panel.js
@max-sixty
max-sixty merged commit ad5dcff into main Oct 13, 2026
3 checks passed
@max-sixty
max-sixty deleted the floating-panel branch October 13, 2026 00:28
max-sixty added a commit that referenced this pull request Oct 22, 2026
… the cross (#3606)

An attachment's removal and a drawing's Undo last stroke and Remove
drawing were dark filled discs with a light icon, while the floating
panel's fold, the same kind of round control riding a corner, was a disc
of the panel's ground with a hairline ring, a lift and a dim icon. The
user asked for the fold's treatment on the attachment's ✕.
`.lf-corner-mark` (`browser/styles/components/controls.css`) is now the
one face all four wear, and the icon carries the meaning: `subtract`
folds, `cross` removes.

- The disc is 20px everywhere (`--corner-mark` in
`browser/styles/theme.css`), up from the attachments' 18px. Its reach is
the aim floor on both axes (24px with a mouse, 44px under a finger); the
fold's reach used to grow only vertically.
- A surface sets `--lf-ground` and `--lf-ring` for what it raises. The
panel already did this for its attached pictures as `--lf-media-ground`
and `--lf-media-ring`, set on the field; it now sets the renamed pair
once on the panel, and its marks and pictures both read them.
- The panel's base button reset stops at `.lf-corner-mark`, as it
already stops at the attachment shelf, so the fold takes the shared face
rather than a panel press's.
- The visual review's two popovers (Inspection settings, Threads on this
case) closed with a "Close" text button; they now wear the quiet ✕ every
other closable surface uses (`closeControl`'s anatomy), titled with Esc.
- `leaf-dev stills` gains `page-comment-photo-hover` (light and dark)
and `panel-corner-hover`.

The panel's open view still closes with a down chevron: it lowers the
view into the row rather than dismissing a surface, and came from the
panel's design review (#2696).

Checked in Chromium and Firefox, light and dark, mouse and touch: the
marks compute the same disc, ring, lift and ink, and hit-testing reaches
the full aim floor. The fold's still is pixel-identical before and
after.

> _This was written by Claude Code on behalf of max-sixty_

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty added a commit that referenced this pull request Nov 18, 2026
…o longer covers its count (#6336)

A margin entry holding several threads, one with an unread answer, drew
its blue unread dot over its black count badge, so the count read as a
crescent. Each badge (count, unread dot, error dot) was seated on a
corner by its own CSS rule, some by left and right and some by start and
end, on two controls. Probed in Firefox on `main`, four of eight
control, place and direction cases drew one badge over another: the rail
entry left to right, a pin on a right-to-left page, and the folded leaf
in both directions, where an unseen error's dot sat wholly under the On
Me count left to right.

Both controls now put their badges in one `.lf-badges` flex row along
the top edge (`browser/styles/components/controls.css`): the count on
one corner, the dots side by side on the other, and the dots on the
count's corner when no count shows. That is the arrangement chosen for
the folded leaf in #2696, now on the margin entry too. The row runs left
to right whatever the page's direction, since both controls stand at the
window's right, and each badge keeps its size, so badges wider together
than their control run past its left end. The margin entry's dot becomes
an `.lf-unread-dot` element that `presentContributionEntry` draws from
an `unread` option, replacing a `::after` copy of the dot's face,
`syncContributionUnread` and `data-lf-unread` on entries.

To weigh: with a count, the margin entry's dot now stands on the corner
opposite it, and the folded leaf's error dot rides its top edge beside
the news dot rather than inside its corner. A lone count or dot stands
where it did, except a right-to-left page's lone dot, now on the right.
The feature gallery gains a "Count and news" sample, so the stills
catalogue shows the pair.

Asked for by the user after meeting the overlap on a figure with three
threads. Tests: `test_a_control_s_badges_stand_apart_whichever_show`
(both controls, both directions, two-digit counts; fails with a count
pulled over the dot, a dot positioned onto the leaf's count, or badges
allowed to shrink), the tests whose selectors changed, `pnpm run
test:runtime`, `pnpm run check:browser`. Firefox stills of the margin,
Page Map and panel states are pixel-identical to `main`.

> _This was written by Claude Code on behalf of max-sixty_
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