Skip to content

Restore message width priority over margin marker clearance - #2330

Merged
max-sixty merged 4 commits into
mainfrom
codex/restore-message-width
Oct 11, 2026
Merged

max-sixty merged 4 commits into
mainfrom
codex/restore-message-width

Conversation

@max-sixty

@max-sixty max-sixty commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

Floating messages were narrowed to keep margin markers exposed whenever a 320px message would fit beyond them. Restore the requested width priority: the composer and sent card use the marker strip unless the full preferred message width fits beyond it. The shared solver compares that footprint in client coordinates, including CSS zoom.

Update the regression assertions that encoded the reversed behavior, retain coverage for full-width marker clearance, and add a catalogue still for the middle-width case.

Validation: all 314 runtime tests, 14 focused browser cases (including the full gallery), and all eight message-delivery snapshot journeys pass locally, along with lint. Fault controls restoring the old threshold or copying the solver reference each fail their regression assertion. The zoom integration test exercises the real rule, both reference wrappers, driver, and Floating UI reset at 120% and 75% scale. Served before/after comparison confirms the message gains 83px at a 1920px viewport, with no added startup requests. The broader Python, Node, bundle, and site gates pass on the final head c6e90b5, which also has exact-head automated approval.

This was written by Codex on behalf of max-sixty

Keep the marker row clear only when the complete preferred message footprint fits beyond it. Both the composer and sent card inherit this decision from their shared placement solver, including scaled positioning spaces.

This deliberately reverses the minimum-width clearance introduced in #1810. Update the tests that enshrined that reversal, retain full-width clearance coverage, and capture the middle-width state in the stills catalogue.

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The placement contract still promises marker clearance: marginSpot in margin-layout.js says the comment keeps its row clear, and the margin-packing comment in margin-projection.js says the card never stands over moved controls. This change intentionally allows that overlap when clearing the row would narrow the message, so those comments need the new rule.

Comment thread tests/test_render_margin.py Resolved
@max-sixty
max-sixty marked this pull request as ready for review October 11, 2026 01:42
A compact gallery marker can end within the gap beyond the words. The message still gains width by declining marker clearance, without covering the marker itself. Assert that width gain while retaining the words-relative start and visible-edge end. Align margin ownership comments with the preferred-width clearance rule.

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CSS zoom reset cannot change the rectangle that Floating UI measures. In floatingPlacement.position, client is captured from the reference before computePosition, and the proxy passed to the solver always returns that captured rectangle. The new box.width change and reset: { rects: true } in commentPlacement therefore leave rects.reference at the initial 100% zoom choice. At 75% zoom, a lane that should clear the marker still uses the words-edge reference; at 120%, the inverse can happen. The zoom test calls the middleware directly, so it misses the frozen proxy. Please make the scaled margin choice part of the rectangle the driver supplies to computePosition, or make the driver's reset refresh that snapshot.

Exercise commentPlacement, commentReference, floatingPlacement.position, and real computePosition together at 120% and 75% scale. Both wrappers retain the mutable synthetic DOMRect, so a rects reset observes the scaled clearance choice. Assert the reread reference and final client position. A fault control copying the rectangle fails this integration test, while the implementation passes. Clarify that capturing a geometry reading does not clone its synthetic rectangle.
@max-sixty
max-sixty merged commit cd3dd19 into main Oct 11, 2026
6 checks passed
@max-sixty
max-sixty deleted the codex/restore-message-width branch October 11, 2026 04:39
max-sixty added a commit that referenced this pull request Oct 12, 2026
…a red test (#2607)

Bot CI repairs have reversed deliberate behavior twice. After #1781 let
thread cards cover the margin rail to keep message width, #1810 changed
the code back to satisfy an old test, and #1838 rewrote the remaining
test to match; #2330 restored it. Then #2102 landed after "Reading a red
suite" already asked Tend to preserve intended behavior. It let every
widget-offered control keep its pointer gestures in Draw mode, so
clicking a choice selected it, and it rewrote the capture test on the
bot reviewer's request; #2341 repaired it.

"Reading a red suite" now names what a repair weighs: the intent of the
change that turned the test red, and the interface users and callers
rely on. A repair keeps both where it can. Where no repair can,
reverting the change, or the part at fault, is allowed. A revert, any
intent given up, or an interface moved beyond the change needs an issue
addressed to the change's author, so the fix can return deliberately.
For a bot's change, that is the person who requested or merged it, or
the maintainer. The rule covers changes still in a pull request, and the
review threshold holds any fix for a red test to it.

Validation: a scratch A/B with each arm's running-tend pasted into the
prompt (Opus 5.5; 2–3 runs per scenario per arm). Both arms reverted an
unsafe change and filed an issue; the new text's issues carry the
intent, the conflict and what was given up. Both arms updated only the
test, with no issue, for a pure rename and for a test the change
deliberately made stale. Both refused to merge the #2102 shape. These
cases establish conformance, not a measured improvement: the failures
happened deep in long CI sessions, which a cold scenario does not
reproduce. Codex reviewed the text, and its two findings (scope to open
pull requests, an addressee when no person touched a bot change) are
applied.

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