Skip to content

Keep the panel's writing posture while a modal stands over it - #3390

Merged
max-sixty merged 2 commits into
mainfrom
attachment-escape-rewrap
Oct 20, 2026
Merged

max-sixty merged 2 commits into
mainfrom
attachment-escape-rewrap

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Pressing a draft's attached image opens the image viewer, a modal outside the panel. The panel's standing readers took the move into it as the user leaving the panel: the page field dropped its typing posture, so the counts came back beside the field and the draft rewrapped, and Escape returned the user to the thumbnail without restoring it, so a click back into the field rewrapped it again. A rewrite in a thread view let go of the view's held height the same way, growing the view behind the viewer.

Standing in a modal over the panel (overPanel in floating-panel.js) now leaves both readings as they were, the reading the panel's pointerdown handler already gave a press there. Reproduced in Chromium and Firefox before the fix and checked in both after. The new test covers the page field and the rewrite; each half fails without its guard. The module's two inline image pastes now use the shared paste_image helper.

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

max-sixty and others added 2 commits October 20, 2026 16:17
Pressing a draft's attached image opens the image viewer, a modal outside the panel. The panel's standing readers took the move into it as the user leaving the panel: the page field dropped its typing posture, so the counts came back beside the field and the draft rewrapped, and Escape returned the user to the thumbnail without restoring it, so a click back into the field rewrapped it again. A rewrite in a thread view let go of the view's held height the same way, growing the view behind the viewer.

Standing in a modal over the panel (`overPanel`) now leaves both readings as they were, the reading the panel's pointerdown handler already gave a press there. The new test covers the page field and the rewrite; each fails without its guard. The module's two inline image pastes now use the shared `paste_image` helper.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit 6f104ab into main Oct 20, 2026
3 checks passed
@max-sixty
max-sixty deleted the attachment-escape-rewrap branch October 20, 2026 23:31
max-sixty added a commit that referenced this pull request Oct 20, 2026
While the field holds a draft, Send now stays in the field's corner and
the counts stay aside for it, whether or not the caret is in the field;
they come back when the field empties. Before, the counts came back as
the caret left, which narrowed the field (494px to 389px at a desktop
width) and rewrapped the draft each time the user stepped out of it and
again as they came back. The user chose this on 20 October, reversing
the 15 October note in `notes/floating-panel/GOAL.md`, which is updated.

The posture (`drafted` in `floating-panel.js`, `data-drafted` on the
panel) reads the draft alone and changes only at the user's typing or a
view changing; standing no longer moves it. Send and the field's end
room show while the user writes or while the field holds a draft. This
replaces the page field's half of #3390, whose guard in the writing
reader is deleted; the rewrite's guard stays, since it holds the thread
view's height, not the posture.

`test_send_stands_in_the_counts_place_while_the_field_holds_a_draft` now
asserts the field's box is unchanged after a press away and a press
back, and that the counts return once the field empties; it fails with
the old rule. Checked in Firefox with a probe.
`test_a_draft_draws_a_bullet_list_as_the_message_will` fails on this
branch's base as well, so it is inherited.

> _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.

2 participants