Repository navigation
Give package presses their symbol and name from their action - #4572
Merged
Merged
Conversation
Done had three faces: the word on a thread's to-do line and on its On me card, and ✓ in the panel row's way out of a to-do. The thread line was worded because ✓ is the thread head's Resolve, and the row's end takes only a symbol. Done now names its own symbol, a ticked circle as task apps draw a finished task, so it is one symbol on the thread line, the On me card and the row's end, and never reads as Resolve. `ACTIONS.done` points at the new `checked` icon; browser/AGENTS.md's example of ✓ now names resolve. Behavior: the Done buttons on a thread's to-do and on an On me card show the symbol with "Done" as tooltip and accessible name, rather than the word.
A role's symbol press took its symbol and name from `ACTIONS`, but a press
whose face its surface draws, such as the floating panel's, a message's
controls, the composer's Send and Dictate and a recording's Full screen,
drew `actionTemplate(action)` and spelled its tooltip and accessible name by
hand. The two could drift: On me's Show was "Show" where the action said
"Show on page".
`nameAction(control, action, {label, title, className})`, and the template
directive `namedAction`, give such a press the action's symbol and name, as a
symbol role does, with `label` and `title` saying more where the press needs
to. Every such press in the runtime uses it; `actionTemplate` stays for a
symbol that is not a press's whole face, such as a menu row's icon or the
second of two symbols a press swaps by CSS. `actionName` is the one home of an
action's name, read by both paths.
The `show` action's name is now "Show": it takes the reader to where a thing
stands, which On me's Show does whether that is the page or a message. The
thread view's seat and About's row say "Show on page" or "Show in message" as
their label.
Behavior: the panel's Find, the recording's Full screen and the expand toggle
now carry a tooltip matching their accessible name; names are otherwise
unchanged.
# Conflicts: # browser/runtime/floating-panel.js # dist/kernel/kernel.json # dist/kernel/leaf.js
# Conflicts: # dist/kernel/kernel.json
A package press whose face its widget draws still showed an action's symbol with `showAction` or `actionTemplate` and spelled its name by hand, so the two could drift as the runtime's could before #4563. The public package API now offers `nameAction` and `namedAction`, and lf-sample's Full view, lf-diff's and lf-call-diff's Expand/Collapse all, lf-deck's forward press and lf-file-editor's Retry use them, saying their own label where it says more. `showAction` and `actionElement` leave the public package API: no package uses them, and `nameAction` covers a press whose action follows its state. `actionTemplate` stays for a symbol that isn't a press's whole face, such as a trace's play/pause pair. module-reading.md's Icons section says which to use. No protocol bump: the public package API doesn't bump it. Behavior: none; each press keeps its symbol, label and tooltip.
leaf-agent
approved these changes
Oct 28, 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.
#4563 gave every runtime press whose face its surface draws its symbol and name from
ACTIONSthroughnameAction. Package presses still pairedshowActionoractionTemplatewith a hand-written name, so the two could drift there.The public package API (
widget-api.js) now offersnameActionandnamedAction, and these presses use them, keeping their own labels where they say more:lf-sample's Full view / Return to pagelf-diff's Expand/Collapse all files andlf-call-diff's Expand/Collapse all call-tree rootslf-deck's forward press (Start / Next)lf-file-editor's RetryshowActionandactionElementleave the public package API: no package uses them, andnameActionalready swaps the symbol for a press whose action follows its state.actionTemplatestays for a symbol that isn't a press's whole face, such aslf-trace's play/pause pair.module-reading.md's Icons section says which to use. No protocol bump, since the public package API doesn't bump it (#4551).No behavior change: each press keeps its symbol, label and tooltip, and each keeps its own face.
Checks:
pnpm run check(runtime tests 693/693) and 9 focused browser tests covering each of these presses (live samples' full view, diff fold-all, call-diff rows, deck, file-editor status controls on a phone).