Repository navigation
Share one retained-face base and one activity reading across the banner, trays and thread list - #1214
Merged
Merged
Conversation
…er, trays and thread list Five light-DOM Lit owners copied the same present/commit/roll-back body and the same failure capture in `scheduleUpdate`: the Ask banner faces, the Asks tray list, the Leaves banner face and list, and the Threads panel list. Two of them also copied "the focused row left the list, so focus its nearest surviving neighbour". The banner and the Leaves tray each derived the same activity facts (which timestamp dates a silence, the queued and waiting count phrases, and whether input is still on its way), and #915 had to edit both. ### Retained faces `runtime/retained-face.js` holds `RetainedFace`, a light-DOM `LitElement` whose `paint(model, {now})` assigns a reading and rejects with that update's own captured failure, plus `commit()`, `retainCommitted()` and the `committed` reading. `RowFocus` is the neighbour rule: `hold(next, prior)` before an update, `restore(fallback)` after it, and `land(key)` for an owed landing. Every listed class now extends the base. The thread list keeps its generation and focus guards and still paints in the sending turn (`now: true`); its `committedReading` became the base's `committed`. One behaviour moved: the Asks progress face's committed reading starts as its initial empty model, so a failure before its first commit rolls back to what the face showed rather than leaving the failed reading up. ### Activity facts `activityFacts(state)` in `banner.js` returns `tone`, `work`, `left`, `silentSince`, `listening` and the `waiting` phrases, and `countUpdates(n)` is the shared noun. The banner's `statusWords` and the Leaves tray's `rowPresence` read it and keep their own wording; `toneFor` and `workWords` are gone. No wording changed. The group's third item, the focusable-row walks, lands in its own PR. Checks: focused browser runs over the Leaves, Asks, banner status, tray and Threads panel tests (about 150), and the changed-file pre-commit hooks, dependency-cruiser included. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Sep 26, 2026
max-sixty
added a commit
that referenced
this pull request
Sep 27, 2026
The concept survey's drifted duplicates now each have one owner (#1214–#1221, #1223, #1228, #1231, #1235, #1244, #1245, #1247, #1250, #1251, #1254, #1260), so the survey note never lands. What it found and nobody has taken becomes `TODO.md` entries: - **Shared definitions** (new section under Next): re-addressing resource references in one pass instead of `http.py`'s regex scopers and three head composers; `tests/render_harness.py` `told()` beside `pageReadiness`'s `data` and `log` stages (#1250), which answer the same question; Python still naming a thread's identity a root (`thread_roots`, `FrozenThreadReading.roots`) now that the runtime keys threads on the served `id` (#1260). - **Requests**: the existing "Decide whether requests earn their weight" entry now says kept requests need one owner for seat availability, which four runtime modules restate. - **Implementation candidates**: the unresolved-gesture ledger as one state machine, deferred until a change has to touch it, since nothing there has drifted and it is the hottest race path. The survey's small undrifted items and its list of deliberate splits are dropped: none has drifted, and the splits are intended. 🤖 Generated with [Claude Code](https://claude.com/claude-code) > _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
Oct 6, 2026
The Leaves drawer keyed each neighbour row, and the focus it keeps across a repaint, by the neighbour's URL. A neighbour whose server came back on another port therefore read as one page leaving and another arriving. The focused link was removed, and focus fell back to the drawer. Each entry in `state.others` now carries `page_key` (`state.page_key`, the identity that page's state-home records already use) beside `url`. The drawer keys rows and focus by `page_key` and links by `url`. A restarted neighbour keeps its node and its focus, and Enter opens the new address. The fresh-server check is unchanged: a neighbour with no running server still leaves the list. `test_a_leaf_served_at_a_new_address_keeps_its_row_and_focus` restarts a focused neighbour on a new port. It takes the route a taken port's refusal names: the service record is deleted, and the old port stays held. The test fails on main because the row lost its node and focus. With this change it passes. This resolves comparisons proposal #5, which is removed from `notes/comparisons.md`. **Is there a more underlying fix? No.** I tried these candidates: - Enter on the retained link opens the new address. Covered in the new test. - The retained node's `href` follows the new URL. Covered in the new test. - Other code that reads a neighbour's identity: a grep of the runtime and the Python found none. `presence.js` reads only the neighbours' activity. - During a restart, the row is absent from the moment the old server stops until the new server publishes. A measurement showed about 70 ms of that gap falls after `start_server` returns and before the first row publication. The drawer treats an absent row as removal, and the proposal keeps that behaviour (it retains the fresh-server checks). So the gap is outside this change. - History: the keying lines have stayed as written since #666 and #1214, with no earlier patch to this condition. Tests run: the new test (it fails on main and passes here); the drawer's browser tests in `test_render_controls.py` and `test_render_navigation.py` (49 passed); the neighbour tests in `test_interact_server.py` (21 passed); pre-commit. > _This was written by Claude Code on behalf of max-sixty_ Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
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.
Five light-DOM Lit owners copied the same present/commit/roll-back body and
the same failure capture in
scheduleUpdate: the Ask banner faces, the Askstray list, the Leaves banner face and list, and the Threads panel list. Two of
them also copied "the focused row left the list, so focus its nearest
surviving neighbour". The banner and the Leaves tray each derived the same
activity facts (which timestamp dates a silence, the queued and waiting count
phrases, and whether input is still on its way), and #915 had to edit both.
Retained faces
runtime/retained-face.jsholdsRetainedFace, a light-DOMLitElementwhose
paint(model, {now})assigns a reading and rejects with that update'sown captured failure, plus
commit(),retainCommitted()and thecommittedreading.
RowFocusis the neighbour rule:hold(next, prior)before anupdate,
restore(fallback)after it, andland(key)for an owed landing.Every listed class now extends the base. The thread list keeps its generation
and focus guards and still paints in the sending turn (
now: true); itscommittedReadingbecame the base'scommitted.One behaviour moved: the Asks progress face's committed reading starts as its
initial empty model, so a failure before its first commit rolls back to what
the face showed rather than leaving the failed reading up.
Activity facts
activityFacts(state)inbanner.jsreturnstone,work,left,silentSince,listeningand thewaitingphrases, andcountUpdates(n)isthe shared noun. The banner's
statusWordsand the Leaves tray'srowPresenceread it and keep their own wording;toneForandworkWordsare gone. No wording changed.
The group's third item, the focusable-row walks, lands in its own PR.
Checks: focused browser runs over the Leaves, Asks, banner status, tray and
Threads panel tests (about 150), and the changed-file pre-commit hooks,
dependency-cruiser included.
🤖 Generated with Claude Code