Skip to content

fix: restore history positions between side-list tabs - #3998

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-3995
Oct 25, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/issue-3995

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

Root side-list tabs claimed Back and Forward to reveal their destination, which also suppressed history's saved viewport restoration. They then landed at the tab set's start. Traversal handlers can now resolve to false after revealing a view to let history restore the entry's viewport. Side-list tabs use that route; page-flow tabs retain their per-view placement, and ordinary tab presses keep their existing behavior.

The browser regression reproduced Back landing at 160px instead of 3000px before the fix. It now restores A at 3000px and B at 4000px through Back, Forward and Back again, covering mouse, keyboard and touch activation. The existing page-flow tab journey and viewport/focus/selection history test pass, along with pnpm run check. A served startup comparison against the base loaded the same 43 code requests before presentation, with 325 fewer code bytes.

Closes #3995 — automated triage

Let a traversal claimant reveal its view and return viewport placement to history. Side-list tabs no longer replace a saved return position with the set's start; page-flow views keep their landmark placement and ordinary tab presses are unchanged.

Closes #3995
@leaf-agent
leaf-agent merged commit 0311fef into main Oct 25, 2026
5 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-3995 branch October 25, 2026 18:28
max-sixty added a commit that referenced this pull request Oct 27, 2026
test_a_side_list_is_a_queue_beside_the_item_it_opens ended by scrolling a
root side list to 1600px, pressing Back and asserting the set's start landed
in view. Main's #3998 changed that behavior on purpose: Back and Forward
between side-list tabs now restore the entry's own viewport (900px here, so
the set's top read -768), and it removed the `#land()` the assertion
described. The journey runs only in the daily tier, so it fails on main too
(bec2f8d), not through this branch.

test_side_list_history_restores_the_reading_offset_of_each_entry, which
#3998 added, owns the current behavior by pointer, keyboard and touch, so the
journey drops its stale copy rather than restating it.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty added a commit that referenced this pull request Oct 27, 2026
#4323)

UI defects kept reaching the user one screenshot at a time because
nothing judged a change the way its user would, and Leaf let each widget
choose its own control faces. This branch narrows Leaf's control
vocabulary to one face per role, removes 22 things shown at rest that no
task needed, and makes a UI review use the change before reading its
code. The user picked each removal from proposals with captures on a
Leaf page.

### Controls are built by role

A widget names a role and never a face's classes: `offerAction(role,
className, label, {title, icon})`, or `offeredAction(…)` in a template,
from `widget-api.js`. The four roles are `symbol`, `word`, `commit` and
`mark`. Their face classes are spelled once, in `ACTION_FACES` in
`browser/runtime/prepaint.js`, and
`test_controls_are_built_by_role_and_never_by_face` fails when any other
bundled module spells one. Every runtime and package control is cut
over, including controls main added while this branch was open (the
Other responses trigger, the playground's instruction bar, page
diagnostics).

Symbols and worded buttons are quiet until hovered or reached by key;
only the committing press keeps a frame, in the accent. The word role
absorbs the old item role. `module-authoring.md` lists the roles for
package authors, and says a control shows a symbol only where a standard
one for its action exists.

A pressed quiet button no longer keeps its hover chip, and a tapped
button no longer keeps its hover face on a touch screen: hover faces
apply only where a pointer hovers.

### Removed at rest

The twelve clear cuts from the surface audit, nine of its judgment
calls, and the panel seat's agent-message count:

- Panel and threads: an untitled thread view's repeated heading; "New"
on unread rows in Threads; the seat's "2 agent messages in 2 threads"
(now announced only); the widget kind on On me cards; a message's age
where it repeats the one above; the "Chose X — sent" notice (announced
only).
- Decisions: the § reference where all rows point at one block; the "✓
selected" chip on a picked card; the option count on a settled decision.
- Queues: "To answer" under rows the user owes.
- Diffs: the filter bar on a one-file diff; the open reply field under
each conversation, which now rests as a one-line Reply that click, Tab
or `c` opens; "Changed" on worktree rows.
- Evidence: the trace timeline's legend line; four of the five places a
trace showed its playhead time; the count in "Moments (3)"; a
visual-review case's empty discussion box, its "Unchecked" label and its
long capture caption.
- Playgrounds and samples: the "Controls" and "Starting points" labels
(kept as accessible names); "LIVE SAMPLE ·" and "INTERACTIVE SAMPLE ·"
captions (quoted samples keep "QUOTED ·").

Each module whose header recorded the old behavior as a product choice
now records the new one and the alternative it replaced.

### Alignment

Option titles line up across a row whatever chips a card has, a row of
metric tiles sets every figure on one line, and a board card's prose
starts on its title's next line in every shape. Where chips wrap,
Chromium still sets that title lower; `authoring-on-me.md` now asks for
labels of a word or two, and the `options-label-what-sets-them-apart`
eval gained a `labels-fit-one-line` metric (both arms 3/3;
`facts-labelled` 1/3 → 3/3).

### Review and tests

- `developing-leaf` states the review a UI change gets in place of the
`/ui-sweep` line sessions skipped: use the live change for the user's
task by every route before reading its code, judge each control against
its neighbours, and keep appearance in any reviewer's brief. Fresh
sessions writing a reviewer brief asked for that on 3 of 3 runs with the
new text and 0 of 3 with the old.
- The shift watch credits a sticky box's animated inset only by its move
within its block. Box-motion's ride animates sticky heads' `top` against
the carry, and the watch read that as an offset;
`test_send_grows_thread_around_the_words` failed at random on main too.
- The stills catalogue gains states for the timeline, Threads, a pick's
notice, option references, the visual review, a picked card, a settled
option and an interactive sample.

### Two regressions from main, fixed here

- Main's #4270 read an option's computed `display` while lf-options
rendered, forcing a Firefox layout mid-render that drops a card's
baseline shift, so one card's title sat 44px low. The option's
consequence is now read only when On me, the command reference or a
touch menu shows it (`notes/browser-support.md` records the Firefox
behaviour).
- Main's #4302 dropped `!important` from the print rule hiding the
inline response bar, which a more specific rule then beat, so an open
comment field printed. The rule that shows an open bar now applies on
screen only.

### Behavior changes in tests

Tests that asserted removed words or framed faces now assert their
absence; the worktree column and playground region tests were adjusted
for rows without a status word and a rail without labels; the trace
journeys read each playhead fact from its one label; a side-list Back
check that main's #3998 superseded is removed. Each commit message names
the behavior it changed.

Focused tests for each change, `pnpm run test:runtime` (668) and `pnpm
run check` pass locally; the broad suite runs here.

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

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
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.

Back and Forward between a side list's tabs lose the reader's place

1 participant