Skip to content

Keep the margin reply card's bottom steady while drafting - #1147

Merged
max-sixty merged 3 commits into
mainfrom
codex/thread-card-reply-foot
Sep 25, 2026
Merged

max-sixty merged 3 commits into
mainfrom
codex/thread-card-reply-foot

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

The margin conversation card aligned its top to its source on every placement. When a reply gained a line, the textarea grew but the card's bottom moved under the user's hand.

Right-rail cards now follow their source by the top while reading and hold their bottom relative to the source while the reply has focus or draft text. CSS keeps that edge steady during intrinsic textarea growth, and geometry remeasures and clamps the card to its visible boundary. Browser cases cover incoming replies, typing, leaving an empty editor, long drafts, and a draft carried from a narrow layout into the right rail.

Tests: uv run pytest tests/test_render_margin.py -q; uv run pytest tests -q; npm run test:runtime; pre-commit on changed files.

This was written by Codex on behalf of max-sixty

@max-sixty
max-sixty merged commit abdf0a8 into main Sep 25, 2026
5 checks passed
@max-sixty
max-sixty deleted the codex/thread-card-reply-foot branch September 25, 2026 01:20
max-sixty added a commit that referenced this pull request Sep 25, 2026
#1147 drove the stand-in Reply button and its collapse hook, which this
branch removes. Its cases now click the editor, and leave the empty
editor by blurring it, which #1147's focusout already repositions on.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty added a commit that referenced this pull request Oct 5, 2026
A placement design review found that the comment box and the thread card
share one rule for their side and line, but the card decided on its own
which edge to hold as its thread grows. That held-edge policy has been
reversed once and patched five more times (#1147, #1159, #1303, #1380,
#1429, #1453, #1552, #1574). This change gives it one owner.

- `comment-placement.js` now owns the policy (`holding`, `heldAt`,
`heldHeight`) for both surfaces. `margin-projection.js` reports what it
knows of the thread (the transcript's extent, whether the user is
drafting, the latest turn and the draft's words) and no longer keeps
`previewHold`. The logic moved verbatim. The comment box has no turns,
so it never asks.
- The "One writer for each fact" table in `skills/leaf/assets/AGENTS.md`
names the owners of comment placement and of margin-row seating, so a
change that decides either elsewhere shows up in review.
- Margin-entry labels measure their room through `shownWindow` instead
of reading `.lf-banner` and `.lf-shortcut-bar` themselves.
- Two TODO items whose tests already pass are removed: landing a sent
comment's thread where its box stood, and the composer on a page with a
margin on `html`.
`test_an_aimed_comment_keeps_its_place_with_the_asks_drawer_open` now
also runs at 1200px, the width that TODO described.

No user-visible behavior changes. An earlier commit on this branch also
moved the box's scrolled-away trigger into the shared module and applied
it to the card. That part came out when #1705 changed the box to follow
its passage out of view.

New runtime tests cover the held-edge policy. `npm run test:runtime`
passes. The focused browser tests for send placement, the comment box,
the margin card and replies pass, except three cases of
`test_a_thread_resolved_while_its_reply_is_written_keeps_the_user_on_it`,
which fail identically on `main`.

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