Repository navigation
Keep a seated card's reply box at the margin card's width, and test the seated card #6682 drew - #6713
Merged
Merged
Conversation
…he seated card #6682 drew #6682 seated every thread as a card that fills its widget's row, with the margin card's message width, but left the reply box spanning the whole row. A rewrite takes its message's width, so in a seat it stood 128px narrower than the reply box beside it, and a reply typed across the row rewrapped narrower once sent. The reply box now ends where the card's messages do, as in the margin card, so its words wrap where they will once sent and a rewrite is as wide as it. Two tests asserted what #6682 deliberately replaced: the forced-colors test now checks the card's 1px outline frame and the reply field's own ring, where it checked a 2px ring on the whole thread; the seated-threads test checks framed cards a gap apart, where it checked a rule between them. The user's-words test now expects a seated card's user and agent words to end together, as the margin card's do. Closes #6709
This was referenced Nov 22, 2026
Closed
This was referenced Nov 22, 2026
leaf-agent
added a commit
that referenced
this pull request
Nov 22, 2026
…ose (#6717) `test_a_coarse_pointer_keeps_useful_status_without_keyboard_hints` has failed on main since #6687. That change made a touchscreen show no press at the floating panel field's end, because the maintainer judged that a word alone there reads as status, and the panel's menu and lists already reach each press. The test still expected a notice on a coarse pointer to read `Saved · Next On Me`. The page now shows `Saved`, as #6687 intended, so this PR changes the assertion to the notice's words alone and checks that no `.lf-compose-press` is drawn. #6687's own `test_on_a_touchscreen_hiding_annotations_offers_no_press` makes the same check. No product code changes. The test fails on `b54a16fc4` (current main) with the placeholder reading `Saved` and then the panel's status, and it passes on this branch. The same CI run, [44977598913](https://github.com/max-sixty/leaf/actions/runs/44977598913), had four other failures. All four were seated-thread tests that #6713 fixed, and #6713 merged after that run's commit. Refs #6716 — automated triage Co-authored-by: leaf-agent <[email protected]>
This was referenced Nov 22, 2026
leaf-agent
added a commit
that referenced
this pull request
Nov 22, 2026
…est hold on macOS (#6750) Two of the macOS-only journeys in #6744 failed because their setup depended on the runner, not because the behavior they protect broke. Each test now reads that behavior in a way that holds across platforms and CPU speeds. In a `flake` dispatch on the macOS runner, every case passed 18 of 18 copies on this branch ([run 45021918699](https://github.com/max-sixty/leaf/actions/runs/45021918699)). On main at `d53e9994f`, the three desktop `seat-resize` cases failed 18 of 18 and the toc `[long]` case failed 14 of 18 ([run 45018312974](https://github.com/max-sixty/leaf/actions/runs/45018312974)). **`test_native_reply_edits_after_semantic_paint_keep_the_first_line[seat-resize-*]`.** #6713 keeps a seated card's reply box at the margin card's width, as intended. At the journey's 1600px window, the box is now 564px wide instead of 710px. Between the 484px narrow box and the 564px wide box, the eight-sentence draft lost one line on Linux (156px → 135px, just past the test's 20px precondition) and no lines with macOS fonts (135px → 135px). A sixteen-sentence draft loses two lines on Linux (303px → 261px). The assertions after that precondition, that a native edit after a semantic paint keeps the first line, are unchanged. **`test_a_contents_spine_fades_its_words_as_one_and_frees_the_prose_at_once`.** The map's fade is a 0.24s CSS transition. The test sampled it with a frame loop that, on each frame, reads every visible word's opacity through its ancestors. On the 80-section page on the macOS runner, no frame landed inside the fade (frames read 1, 1, then 0). The test now arms a `transitionrun` listener before the pointer leaves the map. The listener pauses each CSS transition in the frame the browser starts it, so a driver descheduled between the gesture and its next call can't let the fade finish. The test then reads the held fade at 0, 120 and 240ms, and its later label check holds its fade the same way. With a 0.6s sleep after each gesture, the test still passes. With the transition removed from `toc.css`, it fails with "leaving the map started no transition". #6744's other failures are left as they were: the Firefox comment-mark case, the shift-watch overshoot case, the github-discoveries axe `target-size` finding, and the margin-marker teardown shift (`tabs`, `application_boundary[Feed]`). The issue records what the dispatch showed for each. Refs #6744 — automated triage --------- Co-authored-by: leaf-agent <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Nov 23, 2026
…6710) The served state named where work stands in thirteen enumerations: a delivery stage, a failure condition and its operation, a to-do's state, a plan step's, an obligation's status, a thread's attention, the page's activity kind and seven counts. `waiting` meant the user's turn on the page and the agent's in a thread. Every obligation record, every update's delivery, every to-do, every plan step, each thread and the page now say it in the same fields: `next_actor`, `state` (`waiting`, `running`, `blocked`, `done`), the `reason` a state leaves out, and how a done one ended (`outcome`). This answers the entry "Make tasks and work in progress clear" in `notes/TODO.md`. This is the first of two pull requests, split at Max's request. Here a to-do keeps its own served list and takes the new fields; #5979, on top of this one, makes a to-do an obligation record and deletes that list. ## Where to look - `src/leaf/standing.py` is the contract: the vocabulary, which record speaks for a place, and what a job that outlives a turn is (whatever holds an item's start other than the turn that wrote it). - `src/leaf/activity.py` is the one producer of `running` and `blocked`, for each delivery, each update's record, each to-do and the page. The page reads the agent's side of all of it beside `presence` (here, away, gone, closed). - `src/leaf/served_state/state.schema.json` loses `Stage`, `Attention`, a workflow's `condition` and `at_work`, `Obligation.status`, `Activity.kind` and a plan step's `owner`, and gains `WorkState`, `WorkReason` and `Outcome`. - In the browser, `thread/workflow.js` words every standing and `activity-words.js` the page's. ## A thread the user resolves Two rules, both from a week of Max's own use: on the 13 pages he used that week, 63 threads were resolved over a message the agent had not answered, 50 of them within four seconds of sending. By my reading 39 ask for work or an answer and 24 close the exchange. - The request stays owed (`events.owed_turns`). The user's resolve takes a thread off their list and settles nothing the agent owes in it: the message keeps its record and its place on the agent's list and holds the Stop hook. The agent's own resolve still answers for a thread. This stands beside #6106, under which either side's resolve ends the questions the agent asked there. - The thread stays closed until someone reopens it (`thread.post_reply`, a reply's `unannounced`). What the agent says in a thread the user resolved goes into it without reopening it, the status line announces none of it (`announces` in `thread/model.js`, which `isNews` reads too), and the reply's record says so (`stays-closed`), since the user's resolve reaches the agent only where it retires a question the agent asked. `leaf thread reopen` is the agent's choice to bring the thread back, with the `unresolve` event the user's Reopen writes. `threads.md` gives the goal and no rule: the user closed the thread, so it returns only for news they would want to stop and read, such as that the agent could not do what they asked. A question to the user there reopens it by itself. A Codex turn's final message prints its agent nothing, so the turn's handling has it post such news by command. Max picked both halves: the answer leaves the thread closed, and bringing it back is the agent's call (root `AGENTS.md`, "Leaf's role"). What follows: when this lands, each session still holding a page is asked to answer the old messages its user resolved this way, among them `/gpk` and `/dispatch` commands. A logged user `resolve` takes a new meaning, a `reply` gains a field and an `unresolve` may be the agent's, so the page protocol moves from 53 to 54; the plan-outline work in #6707 also takes 54, so whichever lands second moves to 55. ## What users see differently The research note's scenarios S1–S15, built as real logs with 62 checkpoints, ran on `main` and here; their builders have left the tree since and are at d986f9c. The words on every surface are identical at 40. At 11 the live words change: the 5 where the panel and the thread contradict each other about the same work, an update the agent started whose turn then ended with nothing watching (the panel now asks for a nudge), a dialog open in the agent's own window (the thread says Waiting in the terminal), and the 4 where the user resolved a thread before the agent answered. At 11 only the Done list changes: at 10 a request answered with a promise no longer reads Answered while its to-do is open, and at 1 the request the user resolved is listed as Answered once the agent answers it in the closed thread. A to-do whose start stopped or went quiet keeps the line it last said under Stopped or Gone quiet, and the receipt word Up next is gone. ## A preview fix that rides along A pointer moved onto a control whose face redraws within the preview's 200 ms dwell got no preview until it left and came back: the `pointerover` the browser sends for the new node under the resting pointer cancelled the dwell, whatever had arrived (`preview.js`). The dwell now ends only when another target arrives under the pointer, or the pointer carries a press. This pull request's `test` job met it in the feature gallery's journey, which the change edits. On Linux a margin entry's centre lies on the edge of its icon's stroke, and the innermost node there flips between the icon's `svg` and its `path` as the entry repaints. The journey failed in 5 of 13 Linux runs of this branch and in none of 15 of `main` and #6762. Six traced copies of the step in the Linux job, [on this branch](https://github.com/max-sixty/leaf/actions/runs/45268635289) and [on `main`](https://github.com/max-sixty/leaf/actions/runs/45268643151), showed the dwell armed on the `svg` and cleared 6 and 9 ms later in the two that failed; they did not show why the `svg` comes first more often on this branch. [With the fix](https://github.com/max-sixty/leaf/actions/runs/45273513465) all six show the preview, four of them through a redraw that cancelled it before. `test_a_target_redrawn_under_the_pointer_that_came_to_it_still_previews` holds the fix in Chromium and Firefox and fails in both without it. ## What it costs - The public package API changes: an obligation record has `state`, `reason`, `outcome` and `answered` in place of `status`, and a thread's `attention` is a record or a to-do. `lf-deck`, `lf-tabs` and the feature gallery are updated. - A to-do in `leaf page state` says where it stands in the new fields, and `conversation-loop.md` teaches that reading. - The row record moves to format 54 with the protocol, so a page served by an older Leaf and one served by this do not list each other. - 133 files, +4,989 −2,732, and the code is no smaller. Python and JavaScript outside tests gain 125 lines of code, of which #5979 removes 76, and 92 decision points, 56 of them in `activity.py` and `activity-words.js`, which decide and word the liveness cases above. `canonical_activity` goes from 278 lines and 61 decision points to 298 and 82. Tests are +2,189 −1,212, and the new eval case is 709 lines. What shrinks is the contract: across the stack the schema's enumerations for where work stands go from 12, with 43 values, to 6 with 22. ## Checks - Evals, Claude Code against `main`'s instructions, three samples a case on the 22 cases whose tags cover the changed passages: 55 of 66 pass on the stack's text and 54 of 66 on `main`'s, and no case differs by more than one sample. `resolved-request-stays-owed`, new here, passes 10 of 10. After Max's call that the agent decides when a resolved thread comes back, that case ran again, five samples a variant: given a request it cannot carry out, 5 of 5 agents reopen the thread, both where the delivery shows it resolved and where only the reply's record does, against 0 of 5 under the rule before, where only a question reopened it; an answer that delivers what was asked leaves it closed 5 of 5 in each. On Codex, 5 of 5 turns post such a request by command, against 0 of 5 with the rule only in `harness-codex.md`, and 5 of 5 leave an ordinary answer to the final message. The suite read the stack's final wording; the wording of the to-do reading that only this pull request carries has no score of its own. - The Claude Code agent journey, which the change to `hooks/claude-code.ts` calls for, passes every step. Its `withdrawn` step changed: a resolve that changes nothing the agent owes reaches no hook here, so the step takes the comment back. - `tests/model`, `dev/tests/model`, `tests/smoke`, the runtime's Node tests and `pnpm run check` pass here. [A manual dispatch](https://github.com/max-sixty/leaf/actions/runs/44976806053) of every product test, on Linux and macOS, ran on the unsplit branch as it stood before the closed-thread rule was widened. 25 tests failed, 2 because of this change, and both are fixed: one passes under the rule as it now stands, and the other, the Undo row's age, assumed the user's resolve leaves nothing owed, so its fixture now has the agent answer first. The other 23 fail without this change: in `main`'s nightly run or another branch's full run on 21 November (9), on `main` until #6713 and #6717 (5), on `main` today, run there by name (7), or on macOS only (2). [A second dispatch](https://github.com/max-sixty/leaf/actions/runs/44996782669), of this branch beside [`main`'s own](https://github.com/max-sixty/leaf/actions/runs/44989336653), failed no test on Linux that `main`'s run passed. On macOS it failed six that `main`'s run passed, and none of the six fails in six runs by name on this tree on a Mac; `main`'s macOS job failed four that this branch's passed. - `test_an_exact_workflow_reports_stale_work_beside_a_live_page_claim`, a journey test this change edits, has failed on `main` since #6796, whose checks never ran it: its helper now opens threads in the panel, and the test goes on to read a card. Here it chooses cards again first. Max asked for this as one of the long-stuck design questions. No person has read it. Codex reviewed the model and the first resolve rule, the review bot the unsplit pull request and this one, and fresh agents the 21 November merge with `main`, the closed-thread rule and the agent's reopen; their findings are fixed. > _This was written by Claude Code on behalf of max-sixty_
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.
#6682 seated every thread as a card that fills its widget's row and keeps the margin card's message width, but its reply box still ran across the whole row. A message's rewrite takes the message's width, so in a seat the rewrite stood 128px narrower than the reply box beside it (566px vs 694px), and a reply typed across the full row rewrapped narrower once sent. The reply box now ends where the card's messages end, which is how the margin card lays it out. Its words wrap where they will once sent, and a rewrite is as wide as the reply box.
test_a_rewrite_is_the_reply_box_where_the_words_stood[seat]fails on main and passes here.On screen: a seated card's reply field, in a diff line or file thread, a command hub task row or a visual review case, now ends at the messages' right edge instead of the card's. The card itself still fills the row, and the comment box a seat opens keeps the seat's full width, as #6682 set it.
Three tests asserted the seated design #6682 replaced. They now assert its replacement:
test_forced_colors_keep_inline_thread_focus_visible: in a forced palette the card's frame is a 1px outline on its edge (Seat thread cards in their widget's box and ground, as the margin card #6682's rule), and the focused reply field draws its own 2px ring. Before, the test expected a 2px focus ring on the whole thread.test_inline_thread_surface_has_room_without_focus_reflow: seated threads are framed cards a gap apart, with no rule between them. Seat thread cards in their widget's box and ground, as the margin card #6682 deleted that rule on purpose.test_the_user_s_words_end_where_the_agent_s_do[seat]: a seated card ends every message's words one inset in (--lf-msg-text-end), as the margin card does, so the user's and the agent's words end at the same place. The panel case is unchanged.All four tests from #6709 fail on main and pass on this branch. The seated-thread, resolving, diff-controls and diff widget browser files pass (133 tests). Pictures:
leaf-dev stills --state diff-line-threads, plusdiff-file-reply,hub-seat-commentandhub-seat-held-news, which change the same way.Narrowing the reply field is a visible choice that #6682 didn't settle explicitly. An issue asks the maintainer to confirm it.
Closes #6709 — automated triage