Skip to content

fix(web): keep the thread still around composer trays - #1348

Merged
nixuuu merged 1 commit into
devfrom
fix/prompt-composer-stable-transitions
Nov 27, 2026
Merged

nixuuu merged 1 commit into
devfrom
fix/prompt-composer-stable-transitions

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 27, 2026

Copy link
Copy Markdown
Member

Problem

  • Opening a composer tray (tasks, subagents, queue, goal details) moved the whole thread up with it. Closing the tray snapped the thread back down.
  • After the composer shrank, up to ~120 px of empty space stayed between the last message and the composer. This happened after sending a multi-line draft, or when a strip above the composer went away.

Cause

Both problems come from the feed's end reserve (footer-reserve.ts), introduced in #756:

  • Tray jump. The reserve counted an opening tray's height. It grew every frame and pinned a reader at the end, so the rows moved with the tray. When the tray closed, the reserve shrank in one step and the rows jumped back.
  • Gap. The reserve shrank only when it was more than 2 × margin (80 px) too large. Any shrink under 80 px stayed on top of the 40 px margin.

Changes

  • footer-edge.ts: footer content marked data-feed-overlay no longer counts towards the reserve. This covers every measurement: the first one, the ResizeObserver path and the settle path (reserveHeight).
    • ComposerPanelBody (tasks, subagents, queue) and the GoalBar details carry the marker, so these trays open over the thread.
    • Panel headers still count towards the reserve.
  • footer-reserve.ts: for a reader at the end, the reserve now shrinks with the footer frame by frame, the same way it grows. For a reader scrolled up, the reserve keeps the space until they follow the end again, as before.
  • Tray motion is unchanged: it already uses the motion tokens (open on --duration-slow, close on --duration-medium, --ease-smooth-out).
  • Comments in footer-reserve.ts and motion.css now describe the new behaviour.

Trade-off: an open tray now covers the bottom of the thread instead of pushing it up. The tray is at most 20dvh. This is how the composer's own fold already behaves.

Verification

Tested in Chrome on the dev-only /dev/long-thread route with a temporary footer: a real TasksPanel above a resizable composer box, using the same footerFit as the thread page. The temporary changes are not in this PR. Positions were traced every frame:

Scenario Before After
Tray open, then closed (last row's top) 636 → 543 px with the tray, then a jump to 627 px stays at 636 px
Composer grows by 64 px, then shrinks back (gap to composer) 96 → 160 px 96 px, rows glide down with the composer
Reader scrolled up, composer grows and shrinks (row position) — stays at 259 px
  • Local checks: oxlint on the edited files and svelte-check for apps/web both pass.
  • Left to CI: the full gate.
  • No test added: the repo rules exclude web UI tests.

Copy audit (docs/copy.md §8): not applicable, no UI text changed.

Fixes: #756

🤖 Generated with Claude Code

Opening a composer tray (tasks, subagents, queue, goal details) grew the
feed's end reserve frame by frame and pinned a reader at the end, so the
whole thread moved up with the tray and snapped back when it closed. Tray
disclosures now open over the thread: footer content marked
`data-feed-overlay` does not count towards the reserve.

The reserve also shrank only when it was more than twice the margin too
large, so a composer that shrank (a sent multi-line draft, a strip that
left) kept up to ~120 px of empty space above it. For a reader at the end
it now shrinks with the footer, frame by frame, like growth; anyone else
keeps it until back at the end.

Fixes: #756

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@nixuuu
nixuuu enabled auto-merge (squash) November 27, 2026 16:29
@nixuuu
nixuuu merged commit f842ac8 into dev Nov 27, 2026
11 checks passed
@nixuuu
nixuuu deleted the fix/prompt-composer-stable-transitions branch November 27, 2026 16:32
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.

1 participant