Repository navigation
Let a mode own the panel's row: its name beside its ✕, Close esc at the field's end, no writing, Escape ends what came last - #6461
Conversation
What the floating panel's empty field says, how long each reading holds it, what
leads its words and what its end offers was spread across fieldReading's branch
order, passing(), SAYS_ELSE, the page editor's enters, the module header and the
guide's table. field-readings.js now declares the readings in the order they claim
the field, each with its lifetime, its product decisions, what leads it ("standing",
"stance" or nothing) and what its end offers ("key", "comment", "moment", "none").
readField walks it over the moment's facts, which fieldReading reads for the page's
field or a thread's reply box. The page and thread editors take the field's end
straight from the reading, and SAYS_ELSE and the dead `more` branch of standing go.
Behavior that changes:
- The Go-to word and a walk's position lead with the stance alone, as a notice did,
rather than with everything where the user stands. With annotations hidden, `t`
now reads "Thread 1 of 2" for its moment instead of "Annotations hidden · Thread 1
of 2"; the status's own words bring the rest back when the moment ends. This
reverses the earlier rule that only a notice took the stance alone.
The guide's "What the panel's line says" gains the held-keys row and the Go-to word,
corrects the caret's words to Comment… and Reply…, and a runtime test holds its rows
to FIELD_READINGS' order. The precedence, the end presses and the leads are tested in
Node (tests/runtime/field-readings.test.mjs) rather than only through the browser.
Max asked for this as #3 on the handback page for #6421: one home for the field's
precedence, "much more cohesive".
Codex reviewed the field-readings commit and found the rule still had second homes: - The folded leaf's peek chose notice, then Go-to word, then walk position in `passing()`, beside the same order in the field's notice reading. `passingWords` in field-readings.js now holds that order, and both read it; selected words read its Go-to-or-step half. - The Errors dot predicted which errors the field says, through its own copy of "a press notice beats an error", and counted every error the field could say as said, though it says only the newest. It now reads the field's reading: the one error the field says goes undotted. Behavior change: with two errors about nothing raised before the user writes, the older one, which the newer covers, now dots the leaf and the menu's Errors at once, where before it showed nowhere until the first edit passed both. The test asserting the old dot is rewritten. - `pressing` was derivable from the notice's press and the caret, so the error reading derives it and the fact is gone. Two further behavior changes from the previous commit, named here: while the page holds early keys, an open thread's reply field offers nothing at its end, as the page field does, where before it showed its key; and a reply field whose thread has left the reading says nothing, an error included, for the paint before its route retires. Tests: the runtime test for the readings gains the selection's end and ink, the turn's, the status's lead, held keys in a thread, and the peek's order. Runtime suite 1059 pass; 134 panel, notice, held-key and peek browser tests pass.
#6429 gave a thread's reply field Reply… and its key after a notice that offers no press, through the panel's SAYS_ELSE. This branch moves the field's ends into field-readings.js, so that rule now lives in `endOf`'s thread case, with a runtime assertion beside the Go-to notice's. The field-readings header names ⌘Z, the key #6429 gave undo.
…o FIELD_READINGS #6442 has each surface of the panel hear what passes through what its own words already say of where the user stands (`says`): on the page field a notice about one of those facts is left to them, and a walk over a list one of them is about says its place alone ("5 changes since v2 · 1 of 5"). The panel now gathers that per surface (`passingFacts`), so the field's facts, the folded leaf's peek and FIELD_READINGS keep one order and one rule. Behavior change against this branch's earlier head: the Go-to word and a walk's position lead with all of where the user stands again, as on main, while a notice keeps the stance alone (`lead` on the "notice" reading). #6442's place-alone wording counts on it, and with it #6444 changes no words. Leading every passing word with the stance alone, as this branch had it, is still open with Max. The guide's Go-to example reads "No visible threads", as #6442 words it.
#6447 holds an undo's notice until the next input. Its comment in notifications.js now points at field-readings.js for the press the field's end says, and the readings' header and the guide's table of the panel's line say that an undo's notice, like one offering a press, holds until the next input; so does the guide's Notices lede, which still said four seconds for every notice.
…eply A stance entered while a thread stands open in the panel, such as Go-to, the target picker, Draw mode or Design mode, went unnamed: the thread's reply box said Reply… and its turn, and the stance's ✕ waited for the view to close, so nothing on screen said the next key went to the stance or how to leave it. In a thread, where the user stands is now the stance alone, which leads the reply box's reading as it leads the page's status, drawn beside the leaf before whose turn it is: "In Draw mode · Your turn … Reply… c". The stance's ✕ takes the row's seat while a view stands, since a thread's reply ends in Reply rather than Close; only the menu, whose search holds the field, still keeps the seat empty. A reply drafted in the thread rewraps as a stance comes and goes, as a page draft already does. Max asked for this after #6448 made Go-to a stance; it applies to every stance.
# Conflicts: # browser/runtime/field-readings.js # browser/runtime/floating-panel.js # tests/runtime/field-readings.test.mjs
…ds beside a view The thread's turn reading no longer leads Reply with the stance: turnLead, which already composes what stands beside the leaf in a thread, was the only place that drew it, and fieldHint stripped the reading's lead again to keep it off Reply. Now the stance has one home there and fieldHint loses its strip. A thread's native placeholder says Reply… c again, as it did before the stance was named; the stance still leads what passes in a thread, such as Go-to's word. The stance's ✕ also takes the seat over a list view (On, Threads, the plan, All pages) while the page's field is focused or holds a draft, since the field then doesn't say Close at its end. The Row and Opened sections said the field runs to the panel's edge whenever a view stands; they now say the stance's ✕ is the exception.
Max asked for the mode's name next to its ✕, as search's scope stands beside its own, rather than first beside the leaf before whose turn it is, which stood it at the row's far end from the ✕ it names. The mode chip now names the stance whenever its ✕ holds the seat and the field's words don't already lead with it: always beside a thread's reply, and on the page's field while the caret or a draft stands there. Whose turn it is stands alone beside the leaf again, and what passes in a thread says no stance, as on main; field-readings.js and its test are main's again. The chip keeps out where the page's words already lead with the stance, as with words selected in Design mode, where a second name overflowed a 320px row.
leaf-agent
left a comment
There was a problem hiding this comment.
The description no longer matches the diff, and since the squash merge makes it main's commit message, it would record a design this PR dropped. f39a85e moved the stance's name out of turnLead and into the mode chip beside the ✕, and the new test asserts that the lead does not say "Draw mode". The body still describes the version before that commit:
- It says
turnLeaddraws the stance at the row's start, so the row reads "In Draw mode · Your turn … Reply… c ✕". At the head, the turn stands alone beside the leaf and the chip reads "In Draw mode" just before the ✕. - The To weigh paragraph weighs placing the stance at the row's start, including the narrow-row cut "In the target pick… Reply… ✕". That trade-off no longer applies. The question the head raises is the chip beside the ✕, and it would be worth asking instead.
- The screenshot is likely from that earlier version too.
- Tests cites "a runtime case checks a thread's Reply leaves the stance's Close to the seat". f39a85e deleted that case from
tests/runtime/field-readings.test.mjs, and the PR now changes no runtime test.
The code holds together otherwise. The new browser test and the panel's other mode tests pass locally.
… ends it first
Max asked, on the explainer page for this PR, that a mode stop writing in the
field ("shall we just disable writing there while we're in a mode?"), that Reply…
and the microphone go while one stands, that "In … mode" become a word ("just say
Draw or Design"), and that Escape end a mode entered from a thread before the
thread ("presumably the mode was selected most recently").
- While a stance stands, on the page and in a thread alike, its ✕ takes the row's
seat and the mode chip names it by its scope's `says`: Draw, Design, Go to,
Select, Capture. The page's field no longer leads with the stance or ends in its
Close, so field-readings.js loses the stance lead, the `close` fact, `exits` and
the panel's `stanceClose`, and `fieldExit` and `stanceName` lose their guards.
On Me's count gives the seat up while a stance stands, which reverses the page
field's Close at rest; that part is still put to Max on the page.
- The field takes no words while a stance stands (`still`): the editor's new
`closed` option makes it read-only, keeps the caret off it on a press, and hides
Send and the microphone; its end offers nothing that enters it, and `c` is no
longer live where its box is read-only. Words selected on the page still offer
their comment, which opens a box of its own.
- Escape takes whichever of a panel view and a stance came last: the panel's rung
yields to a stance that wasn't standing when its view opened (`openedIn`). Before,
the view always closed first.
Tests: the runtime readings test and the panel, Go-to, picker, drawing, aim,
pins, capture and Design-mode journeys that held the old row now hold the new
one; the two panel tests assert Escape's order both ways.
# Conflicts: # browser/runtime/floating-panel.js
leaf-agent
left a comment
There was a problem hiding this comment.
The new readOnly write in the field's render undoes the lock addMedia puts on the box while an image uploads. addMedia sets ta.readOnly = true and calls refresh(). refresh() calls field.requestUpdate(), and the render it schedules now runs if (ta.readOnly !== shut) ta.readOnly = shut;. Outside a stance shut is false, so the box becomes writable again for the rest of the upload, before the uploaded paths are checked against arrivals. No test covers that lock, so the suite stays green. The suggestion keeps the paint as the one place that sets readOnly and folds the upload into it. With it, the save and restore of wasReadOnly in addMedia has no work left and could go too.
The other changes in this push hold up. The field-readings runtime test, the two rewritten panel tests, the Go-to test and the picker test all pass locally.
# Conflicts: # docs/using.html
…or c leaf-agent's review of f967bcb found that the comment field's paint, which now writes `readOnly` from the box's `closed`, undid the lock `addMedia` puts on the box while a pasted picture uploads: the paint it requests set `readOnly` back to false, so the user could type into a draft whose picture was still on its way. The paint is now `readOnly`'s one writer, locking the box while it is closed or uploading; `addMedia` only sets `uploading`, so its save and restore of `readOnly` goes. Send and the microphone still hide only for `closed`. The same lock also stopped `c` from moving the comment box to another passage mid-upload, since `c` asked the destination box's `readOnly` whether it takes words. `c` now asks the box's own `closed` through `takesNoWords` (composing/input.js), so an upload in flight no longer blocks it while a mode still does. Tests: `test_a_box_takes_no_words_while_its_picture_uploads` types during a held upload and after it lands; it fails on the previous head. `test_a_mode_entered_from_the_panel_owns_the_row` now presses `c` in Draw mode and finds the field unfocused. The two existing upload tests pass, `test_a_picture_still_uploading_stays_out_of_the_next_passages_draft` included, which the readOnly-based check for `c` had broken. Co-Authored-By: Claude <[email protected]>
#6483) The panel field's end now shows a press only while one of its keys would make it. Where none would, as with the caret in a thread card's reply, where `m` types a letter, the end shows nothing, and the press returns with its key once the caret leaves. A touch device, which is shown no keys, still shows the press's word alone as the finger's route to it. max-sixty asked for this: "The point of that section is to show shortcuts. if we don't have the active shortcut, then it shouldn't show anything." The rule lives in one place, the box's press at rest (`composing/input.js`), so it covers every press the end offers. | Caret in a card's reply | Caret left the box | |---|---| | Before: <img src="https://gist.githubusercontent.com/max-sixty/fb0d59eebe41c08b42d1d3024196a76b/raw/f950b780a79914043762a05dddc6229574ec301a/row-before.png" width="420"> | | | After: <img src="https://gist.githubusercontent.com/max-sixty/fb0d59eebe41c08b42d1d3024196a76b/raw/f950b780a79914043762a05dddc6229574ec301a/row-after.png" width="420"> | <img src="https://gist.githubusercontent.com/max-sixty/fb0d59eebe41c08b42d1d3024196a76b/raw/f950b780a79914043762a05dddc6229574ec301a/row-after-caret-left.png" width="420"> | **What else leaves the end.** Close while Escape would first take back a typed hint letter or close something over the mode; Open latest while the caret is in a box, where the leaf menu's row still opens the latest; a Reopen's Undo while the caret is in the reply it lands in; a Resolve's Undo until the log has the Resolve, when ⌘Z can't take it back yet either. **The row's seat is unchanged.** As on main, it keeps the On Me mark while the field offers a stance's Close, so while that Close is hidden the row offers no pointer way out of the stance; Close returns once Escape would take the stance off again, as when the caret leaves the box. #6461, open, removes the stance's Close from the field's end and puts the mode's ✕ in the row, which ends that gap; it edits the same stance-Close lines, so whichever of the two lands second takes the other's edits there. Tests: the changed assertions are listed in the commit message. 51 affected browser and journey cases pass on the branch merged with main, and the field's end was probed in Chromium and Firefox with the caret in and out of a card's reply. > _This was written by Claude Code on behalf of max-sixty_
# Conflicts: # browser/runtime/field-readings.js # browser/runtime/floating-panel.js # browser/runtime/keyboard/AGENTS.md # docs/using.html # tests/browser/test_render_semantic_selection.py # tests/journeys/test_render_early_threads.py
leaf-agent
left a comment
There was a problem hiding this comment.
One stale line outside the diff: the header comment in browser/styles/floating-panel.css that begins "Any other reading keeps its words" still gives "a stance's Close" as its example of the press at the field's end. This PR removes that press from field-readings.js (moment), so the example now names a reading the field no longer produces. Dropping the clause, so the sentence reads "ends in the press the moment offers, else in Comment and its key…", would bring it in line.
leaf-agent's review of 986fed9 found the header comment in floating-panel.css still giving "a stance's Close" as its example of the press at the field's end, a reading this branch removes. The sentence now names the moment's press without that example. Co-Authored-By: Claude <[email protected]>
The user asked that, in a mode, the field's end show Close and esc rather
than Next On Me: the end shows the shortcut for the press that matters
most, and in a mode that is leaving it. This branch had dropped the
stance's Close when the mode's ✕ joined the row, which left Escape
unsaid, a reading the user had rejected on main ("the ✕ with Escape
unsaid in a stance").
The Close comes back as the end's press in every stance, on the page and
in an open thread, after a notice's press and in place of the page's own
(Next On Me, Open latest). It stands only while Escape would end the
stance, so a thread opened inside a mode, which Escape closes first,
leaves the end empty. Under a finger the ✕ beside the mode's name is the
way out, so Close stands only where keys show. The ✕ and the name stay.
In a thread the reply box kept the Send corner's room while a stance
stood, through the writing posture and the turn reading's `offers`,
which stood Close 26px further from the mode's chip than on the page.
The row takes no writing posture while a stance stands, and a reading
with no words names no press, so Close stands in the same place in both.
Co-Authored-By: Claude <[email protected]>
# Conflicts: # tests/journeys/test_render_early_threads.py
…#6514) `g i` (Go-to, then Resume writing) raised **"That writing place is unavailable"** even though the field then got focus and its draft. #6461 made a stance shut the panel's field, and the field's `closed` read the stance from the repaint frame's copy (`statusContextReading().stance`). The Go-to destination ends the stance and runs `writing.resume` in the same task, before that frame. So `resumeAt` saw the field's painted `readOnly` still set and raised the error. The field's `closed` now reads the stance from the dispatcher (`stanceWords(innermostStance()?.scope)`), the same thing `paintStatusContext` computes. The row's words (`still`) and the writing posture keep the frame's copy, so #6461's decision that the field and the row's ✕ change in the same paint still holds for what is painted. `resumeAt` now asks `takesNoWords(field)` instead of the painted `readOnly`. That also covers any other Go-to destination that writes into the field in the same task. One behavior moves beyond the failing case. `readOnly` is also set while an image uploads, so Resume writing used to refuse a box with an upload in flight. It now moves the caret there. `takesNoWords`'s own comment already says that box stays one `c` may move to. `test_writing_reaches_the_field_however_the_panel_stands` fails on `main` (`2cd1bda49`) with the error's count at 1 and passes on this branch. The panel tests matching stance, mode, Escape, resume and writing pass, and so do `pnpm run test:runtime` and `pnpm run check:browser`. Closes #6513 — automated triage Co-authored-by: leaf-agent <[email protected]>
While a stance stands (Draw mode, Design mode, Go-to, the
spicker, Capture area), the panel's row is the stance's, on the page and with a thread open alike: its name in one word stands in the mode chip beside the ✕ that ends it, as search names its scope beside its own ✕; the field's end offers Close withescwhile Escape would end the stance; and the field takes no words, so Reply…, Send and the microphone go. Escape ends whichever came last of the stance and a panel view: a mode entered from an open thread ends before the thread closes, and a thread or list opened in a mode closes first.Max asked for each part on the explainer page: the name beside the ✕ rather than first beside the leaf, one word rather than "In Draw mode", no writing, Reply or microphone in a mode, Escape ending the mode entered last, and Close
escat the field's end in every mode rather than Next On Me, since that end shows the shortcut for the press that matters most. The stance no longer leads the page field's words, which removes the stance lead andexitsfrom field-readings.js.To weigh: On Me's count gives up the row's seat to the ✕ while a mode stands (
mstill walks it). Close stands only while Escape would end the mode, so not with a thread opened inside it, and not under a finger, whose way out is the ✕. A draft written before a mode stays in the field, unwritable, until the mode ends, andcdoes nothing meanwhile. Escape's order now depends on which came last, which keyboard/AGENTS.md records.Tests: the field readings runtime test covers
stilland the stance's Close; the panel tests check both Escape orders and the row in a thread and on the page; the Go-to, picker, drawing, aim, pins, capture and Design-mode journeys that held the old row hold the new one.pnpm run check:browserand the runtime tests pass.