Skip to content

Stand the panel field's end press one place from the leaf, with one owner for the field's corner - #6801

Merged
max-sixty merged 5 commits into
mainfrom
panel-row-gap
Nov 23, 2026
Merged

max-sixty merged 5 commits into
mainfrom
panel-row-gap

Conversation

@max-sixty

@max-sixty max-sixty commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

In an open thread, the floating panel's empty field ended in Reply… c 26px further from the leaf than the page field's Next On Me m whenever focus wasn't in the reply, and always in Firefox. Two owners decided what stands in the field's corner: the composer drew the end press, Dictate and Send, while the panel showed or hid Dictate and Send, and reserved their room, by a posture of its own that lasted while focus stayed anywhere in the panel. A rule kept the corner's room for every thread's turn reading so Reply wouldn't move as Dictate came and went, which left an empty gap whenever Dictate was absent.

Now the composer owns one fact, writesIn (focus in the box, or a dictation running in it), and decides from it which of the end press, Dictate and Send stands; the panel's field passes cornerAtRest, and the panel keeps the corner's room exactly while a press shows there. A reply reads its box options from the view that holds its row, so one handed between views follows its new view. The thread rule, the panel's writing/drafted postures and its own show/hide rules are gone. The panel's repeated 6px text edge and corner width each get one token, which also aligns the views' words with the field's under a finger (1px off before).

Behavior to weigh: Dictate leaves the corner once focus moves elsewhere in the panel (it returns in the field; Tab still reaches it), and a running dictation keeps its Stop wherever focus goes. Send keeps the panel's old rule: words loaded into the empty field from elsewhere, such as another tab's, bring no Send until the user writes there.

Max reported the gap; three independent Codex reviews found more corner disagreements along the way, fixed in the later commits. Three it found that also reproduce on main (search or Draw hiding a running dictation, a live sample's host interrupting a child's dictation, Dictate vanishing mid-press) are left for a follow-up. Tests: three new tests fail on main, and a fourth guards a resting pointer against another tab's words; two journeys that asserted Dictate lingering after a send now enter the field first.

This was written by Claude Code on behalf of max-sixty

…read

An open thread's empty reply field ended in "Reply… c" 26px further from
the leaf than the page's field ends in "Next On Me m": the field kept the
room of its corner press (Dictate, then Send) whenever a thread's turn
reading showed, whether or not anything stood in the corner. In Firefox,
which has no speech recognition and so never draws Dictate, the corner
was always empty there.

The reserve covered a disagreement between two facts both called
"writing". The row's posture (Dictate in the corner) lasted while focus
stayed anywhere in the panel after the caret entered the field; the
field's reading (Reply and its key at the end) followed the caret alone.
With focus on a thread's view or Resolve, both stood at once, and the
reserve kept Reply still as Dictate came and went. The page's field had
no such reserve, so its "Next On Me m" slid 26px when focus left Dictate
for the page. The posture's reason for lasting through the panel, the
On Me mark that stepped aside while the user wrote, left the row in
#6569.

Now both read one fact, `writesIn`: focus in the field's editor or on its
corner's press. Dictate and the end press never stand together, the
field keeps the corner's room only while Dictate or Send stands there,
and the thread's special reserve is gone. Behavior changed: Dictate no
longer stays in the corner once focus moves elsewhere in the panel, such
as onto the thread's view after a send; it returns when the user is back
in the field. Tab from the field still lands on Dictate.

The same pass gives the panel's other repeated geometry one home each:
- `--lf-fp-text-edge`, where the panel's words start, for the view's
  heads, tabs, rows and the line over the row, which wrote `6px` where the
  field reads `--lf-fp-row-pad`, 7px under a finger; under a finger the
  views' words stood 1px left of the field's.
- `--lf-fp-corner`, the corner press's width, written three times.

Tests: `test_the_field_s_end_press_stands_one_place_beside_the_leaf`
fails on main by 26px in the reported route (`t` from the page to a
thread) and, with only the CSS half, after stepping out of the reply.
`test_every_comment_surface_shares_the_empty_microphone_and_typed_send`
now enters the panel's field before looking for Dictate, and
`test_refused_reply_retains_its_live_foot` compares the corner press only
where one stood while the reply was in flight.
…e room on it

The first commit kept `writesIn` in the panel while the composer drew
Dictate, Send and the field's end press, and the panel's posture CSS
overrode what the composer drew. That left two owners of what stands in
the corner, and an independent review found five states where they
disagreed:
- a passage comment seated in the row lost its Dictate, since the
  panel-wide rule hid every microphone in the panel;
- Stop disappeared while a dictation still listened, once focus left the
  field;
- with focus on Dictate, an error's Resume writing press stood 26px in,
  then slid out as focus moved on;
- a pointer on a view's Close left the caret in the field but dropped
  Dictate and its room;
- a draft mirrored from another tab rewrapped under a finger as focus
  came and went.

Now the composer owns `writesIn` (focus in the box, or a dictation
running in it). For a box whose corner stays empty at rest
(`cornerAtRest: false`, the panel's field), it shows Dictate or Send only
while the user writes or the box holds words, and its end press stands
only while the user doesn't write. The panel keeps the corner's room
exactly while a press shows there (`:has(… :not([hidden]))`) and drops
its `writing` and `drafted` postures, their attributes, and its own
Send and Dictate display rules.

Behavior changed: Send shows as soon as words reach the field, words a
refused send hands back or a draft mirrored from another tab included,
rather than at the user's next keystroke; a dictation keeps its Stop
wherever focus goes.

Tests: `test_stop_stands_while_its_dictation_runs` and
`test_closing_a_view_leaves_dictate_beside_the_caret` fail on main; the
seated comment box test asserts its own Dictate; assertions on the
removed `data-lf-drafted` now assert Send. `FAKE_RECOGNITION` moves to
`render_harness.py` for both modules that use it.
…rom its view

A second review of the corner's new owner found three regressions and a
related defect, each now fixed:
- words another tab wrote into the empty field brought Send under a
  pointer resting where the corner stood empty, so a press meant for the
  field sent the draft. Words that arrive from elsewhere (`sync.load`)
  now mark the field `data-lf-send-fresh`, and Send lets presses through
  to the words until the pointer moves or the user edits. This holds in
  every composer, where a mirrored draft could swap Dictate for Send the
  same way.
- a reply another view took over (`take`) kept the words, keys, stance
  and corner of the view it was made for, so a widget's reply moved into
  the panel showed Dictate at rest there and stayed writable in Draw
  mode. A reply now reads them from the view that holds its row
  (`Binding.box`).
- the leaf's dot for a put-away draft stayed hidden after a dictation
  ended with focus elsewhere: the composer's `writesIn` read the
  dictation's phase as a plain value. It is a signal now, so the panel
  hears it end.
- an attachment-only draft left the field's end press standing under
  Send, whose press then sent the photo. The end press now goes while the
  box holds any draft.

`cornerAtRest` becomes a function, so a moved reply reads it live.

Tests: `test_send_another_tab_brings_lets_a_resting_press_through` fails
on the previous commit. The runtime test of a reply's forwarded callbacks
now checks what they return rather than their identity, since they read
through the view that holds the row.
…ng it back

A third review found the previous commit's guard incomplete: Send that
words from elsewhere brought into the corner let presses through until
the pointer moved, but a touch's pointerleave cleared the guard before
its click, so lifting a resting finger could still send another tab's
draft; and the guard also stopped a press on a Send that already stood
under the pointer when a mirrored edit changed its words.

A field whose corner stays empty at rest now shows Send only while the
user writes in it or while it holds words they put there: the words it
was made holding, or ones written in it since it was last empty
(`ownWords`). Words loaded into it empty, such as a draft mirrored from
another tab or the words a refused send hands back, bring no Send until
the user's own move, as the panel's `drafted` posture did before this
branch. The `data-lf-send-fresh` mark and its rule are gone.

Tests: `test_words_another_tab_writes_bring_no_send_under_a_resting_pointer`
replaces the resting-pointer test; the refused-reply journey no longer
expects Send over words handed back while the user stands on the view.
@max-sixty
max-sixty merged commit 10ac9da into main Nov 23, 2026
6 checks passed
@max-sixty
max-sixty deleted the panel-row-gap branch November 23, 2026 03:15
max-sixty added a commit that referenced this pull request Nov 23, 2026
…ad padding token

Main's #6801 made the panel's padding `--lf-fp-row-pad` (7px under a finger) and #6800
drew the card reply box's inset ring on its ::after. Resolving both against this branch:

- `--lf-fp-row-pad` becomes `--lf-thread-pad`, now 7px under a finger, so the panel, a
  card, a seated card and the comment box read one padding; under a finger a card's
  padding grows a pixel and every thread's words stand 16px in, as the panel's did.
- A card's reply box takes Send's and Dictate's insets inside its own pixel border, so
  they stand centred (they stood a pixel high under a mouse) and under a finger the box
  is the line and the padding, 48px, as the panel's field and the comment box are. The
  card's reply row then has one formula under either pointer.
- The comment box draws its inset ring on its ::after, over an error about it, as the
  card's reply box does, and its error stands inside its pixel edge with its rounding.
  New stills state `triage-composer-error` and a test for its ring.
max-sixty added a commit that referenced this pull request Nov 23, 2026
…no thread scrolls sideways and every box written in is one height (#6803)

A thread card holding a summary scrolled sideways by a pixel, and the
summary's tint stood 10px inside the card on one side and 1px on the
other, its words 5px in (Max's report, in Firefox). #6773 cut the card's
padding and the thread's text inset, but the tint kept its own offsets,
and its end ran past the room the card's scrolling transcript keeps. The
tint and its open fold now stand at the frame's padding, as a rewrite's
frame does: 7px inside a card, a seated card or the panel on both sides,
with the words 15px in. The same pass makes the panel's messages and
working steps end their words 15px in (they ended 19px and 27px in),
holds a seated card's summary and step words to its messages' width
(they ran 902px against 562px), keeps only the gap above each transcript
item (a closed summary stood 48px over the next message in the panel and
seated cards, 24px in a card), and anchors Resolve to the head's logical
end, which in a right-to-left page stood it over the head's words.

Max also asked that every box written in be one size. A card's reply box
now takes in the card's padding around its field, as the panel's field
does while it holds the caret, and the alt+click comment box is now the
frame of the card it becomes, cut to a reply box round its words: as
wide as that card, and 44px inside its edge (48px under a finger) like
the card's reply box and the panel's field. Words, Send and a press
anywhere in each box are unchanged, the comment box reserves the same
room so it opens where it did, and the card Send opens grows out of it
with no word moving. Its focus ring stands inside its edge, drawn over
an error as #6800 draws the card's.

Every thread frame now reads one padding token, `--lf-thread-pad`, and
`--lf-thread-frame` adds the frame's one-pixel edge. It takes in
`--lf-fp-row-pad`, the panel's padding since #6801, which is 7px under a
finger, so under a finger a card's padding grows to 7px and words stand
16px in everywhere. Under a mouse the panel, cards and summaries draw as
before, except that Send and Dictate in a card's reply box now stand
centred, their insets taken inside the box's own border.

To weigh: under a finger, cards gain a pixel of padding to match the
panel. `browser/AGENTS.md` now says a field running to its frame's edges
adds the frame's padding to `--lf-line`, as the card's reply box, the
comment box and the panel's focused field do.

Tests: the focused browser tests for summaries, card replies, rewrites,
thread layout, Send placement, the comment box at rest and open,
pictures on a comment, the panel's thread, field and row, and rings over
errors pass, as does `pnpm run check`. New tests hold a comment box to
its card's width and reply box height, and its ring over an error; new
stills states show a summary in the panel and an error over the comment
box.

> _This was written by Claude Code on behalf of max-sixty_
leaf-agent added a commit that referenced this pull request Nov 23, 2026
…6841)

`test_a_control_a_widget_built_is_told_from_a_label_it_wrote` failed on
`main` because of #6801 (`10ac9da49`). Bisecting over
`017ddeccf..10ac9da` gives `52258cd8b` passing and `10ac9da49`
failing. With this change the test passes on current `main`
(`49007d755`) and still passes at `52258cd8b`.

**Cause.** #6801 made the composer own which press stands in the field's
corner. The panel field's resting Dictate is now hidden with the
`hidden` attribute, where the panel used to hide it with `display:
none`. Dictate's keyboard command is available only while `!mic.hidden`
(`browser/runtime/composing/input.js`, `text.dictate`), so the scope
marks the hidden button `aria-disabled="true"` (`keyboard/scopes.js`,
`reflectButton`). The test gathers every spent `[data-lf-offer]` press
and requires its face to change when the disabled state is lifted. A
disabled disc keeps the quiet ink at full opacity (`controls.css`, "A
press disabled keeps the quiet ink"), so the hidden Dictate looked the
same either way. That is the one entry in the failure whose `face` and
`armed` matched.

**Repair.** The test now leaves out presses whose own `hidden` is set.
They draw nothing, so their face has nothing to tell apart. #6801's
intent and the interface are unchanged. The behavior the test protects,
that every spent control on screen looks different from its live face,
is still asserted on the composer's Send and the media viewer's
controls.

One observation for a later look, not changed here: a *visible* Dictate
marked disabled, as while a send or upload is in flight, also keeps its
resting face, since `controls.css` gives a disabled disc the quiet ink
Dictate already wears. Only the cursor and the missing hover tint show
it is spent. That is the stated design, and this page never draws that
state.

Closes #6837 — automated triage

Co-authored-by: leaf-agent <[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.

2 participants