Skip to content

fix(web): expanding stacked notices no longer scrolls a working thread - #20086

Open
derektrimm wants to merge 1 commit into
pingdotgg:mainfrom
derektrimm:fix/notice-stack-late-jump
Open

derektrimm wants to merge 1 commit into
pingdotgg:mainfrom
derektrimm:fix/notice-stack-late-jump

Conversation

@derektrimm

@derektrimm derektrimm commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #19880

Hovering the notice stack's peek strip expands the stacked notices inside the composer overlay. publishComposerOverlayHeight measured that growth and added it to the timeline's footer reservation. TIMELINE_MAINTAIN_SCROLL_AT_END ignores footer growth, so nothing moved at first, but the next row on a working thread re-pinned the timeline to the new end and the thread jumped up by the expanded height. As triaged on the issue, the covering is intended and only the late jump is the bug.

The reservation now leaves out how far the stack grew past its collapsed height (the min-h-3 that holds the peek strip), rounded once so it equals the collapsed overlay. ComposerBannerStack marks its container with data-composer-banner-stack for this, the same way the model strip is found. Working threads now behave like idle ones: the expanded notices cover the last rows until the pointer leaves, and nothing moves on expand, on the next row or on collapse.

Checked in a dev web build (vp run dev) on Linux, headless Chromium at 1280x640, with a Claude thread running sleep 3; echo progress N steps. Switching the project's branch mid-turn stacked a "Branch changed" notice behind /usage-limits. I scrolled to the end, hovered the peek strip and sampled the timeline's scrollTop and scroll range every 100 ms:

  • main: expanding grew the scroll range by 31 px (805 to 836), and 0.3 s later a row update scrolled the thread up those 31 px.
  • this branch: expanding left the range at 876, each new row moved the thread by exactly its own height (71 px), and collapsing changed nothing.

Recordings (14 s each, hovering the stack while rows stream in): before, on main and after, on this branch.

The new case in composerFooterLayout.test.ts fails on main and passes here. Typecheck and lint pass for apps/web.

Not checked: the three-account /usage-limits stack from the issue, since this machine has one account; the stacked notice here was the compact branch notice, so the measured jump was 31 px rather than 360 px. Mobile renders its own composer and does not use this stack.

Made with Claude Opus 5.5 in Claude Code, running in T3 Code.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Oct 16, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 00fe53e

Macroscope's review found this PR approvable — This is a localized web bug fix that prevents expanded stacked notices from increasing the timeline reservation and causing a later scroll jump. Existing behavior remains unchanged when the optional adjustment is absent, and the new calculation is covered by focused tests.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7f6ebd7e-e730-4ad4-aa8a-27761433efcc
📥 Commits

Reviewing files that changed from the base of the PR and between e7ed45a and 5004d02.

📒 Files selected for processing: 4
  • apps/web/src/components/ChatView.tsx
  • apps/web/src/components/chat/ComposerBannerStack.tsx
  • apps/web/src/components/composerFooterLayout.test.ts
  • apps/web/src/components/composerFooterLayout.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

📝 Walkthrough

The composer measures expanded notice height and excludes that height from the timeline inset calculation. Tests cover resting and expanded composer states.

Changes: Composer notice timeline inset

Layer / File(s) Summary
Measure and exclude expanded notice height
apps/web/src/components/composerFooterLayout.ts, apps/web/src/components/chat/ComposerBannerStack.tsx, apps/web/src/components/ChatView.tsx, apps/web/src/components/composerFooterLayout.test.ts
The inset resolver accepts expanded notice height and subtracts it from the overlay height. The composer measures the notice stack’s growth above its minimum height and passes that value to the resolver. Tests cover resting and expanded composer states.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Low

Suggested reviewers: maria-rcks

Merge Risk: ⚪ Minimal · up to 5004d

No concrete merge-blocking issue is established in the supplied review evidence; the reported layout change is suitable to merge subject to normal checks.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Linked Issues check Warning Issue [#19880] requires the end-following timeline to move with notice expansion so the last message is not covered, for idle and working threads. This change subtracts expanded notice height from the… Implement the [#19880] expansion behavior that keeps the last message clear for idle and working threads. Add automated coverage for expansion, the next streamed row, and collapse.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main fix: expanding stacked notices no longer causes a working thread to scroll unexpectedly.
Description check Passed The description explains the problem, intended behavior, implementation, scope, verification steps, observed results, limitations, and test status. It also includes recordings and identifies the issue…
Out of Scope Changes check Passed The changes stay within the [#19880] composer notice and timeline layout scope. ComposerBannerStack adds the measurement marker, ChatView excludes expanded notice growth from the reservation, and …
Full details: Description check

Explanation

The description explains the problem, intended behavior, implementation, scope, verification steps, observed results, limitations, and test status. It also includes recordings and identifies the issue. The description does not include before-and-after screenshots or an explicit maintainer approval comment, but it is otherwise sufficiently complete for this focused bug fix.

Full details: Out of Scope Changes check

Explanation

The changes stay within the [#19880] composer notice and timeline layout scope. ComposerBannerStack adds the measurement marker, ChatView excludes expanded notice growth from the reservation, and composerFooterLayout.test.ts covers the inset calculation.

Full details: Linked Issues check

Explanation

Issue [#19880] requires the end-following timeline to move with notice expansion so the last message is not covered, for idle and working threads. This change subtracts expanded notice height from the reserved inset. The added test confirms that the inset remains stable while notices expand. The implementation therefore removes the late jump after a new row, but it intentionally leaves the last rows covered during expansion. The direct issue requirement remains unmet.

Resolution

Implement the [#19880] expansion behavior that keeps the last message clear for idle and working threads. Add automated coverage for expansion, the next streamed row, and collapse.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@derektrimm
derektrimm force-pushed the fix/notice-stack-late-jump branch from 00fe53e to e7ed45a Compare October 16, 2026 01:02
Hovering the composer's notice stack grows the overlay, and the timeline
reserved that growth as footer space. The thread did not move at once, but
the next row re-pinned it to the new end, jumping by the expanded height.
The reservation now leaves out how far the stack grew past its collapsed
height, so working threads behave like idle ones: the expanded notices cover
the last rows until the pointer leaves.

Fixes pingdotgg#19880
@derektrimm
derektrimm force-pushed the fix/notice-stack-late-jump branch from e7ed45a to 5004d02 Compare October 16, 2026 14:07

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Expanded composer notices cover the last messages, and the thread only moves up when the next row arrives

1 participant