Skip to content

fix(web): keep scroll-to-end button close to composer - #10543

Merged
maria-rcks merged 2 commits into
pingdotgg:mainfrom
Bil0000:t3code/a430e90b
Sep 8, 2026
Merged

fix(web): keep scroll-to-end button close to composer#10543
maria-rcks merged 2 commits into
pingdotgg:mainfrom
Bil0000:t3code/a430e90b

Conversation

@Bil0000

@Bil0000 Bil0000 commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

The Stash tab added 34 px of empty space between the composer and “Scroll to end” in both the collapsed and expanded states. The button now clears only attached content that overlaps its width. In the real app, the gap falls from 52 px to 18 px in both states.

The existing height measurement still drives composer transitions and timeline spacing. Full-width attachments and Stash at narrow widths keep their clearance. This changes the shared web/desktop chat view; the native mobile client is unchanged.

Verified with 35 composer layout tests, the web type check, targeted lint and formatting, and real-app checks at 1280, 600, and 375 px. Focus/scroll transitions, opening Stash, and scrolling to the end worked. Lint reports existing warnings in ChatView. Browser checks used an isolated local server with sample messages; the Electron shell was not launched.

State Before After
Collapsed Collapsed before Collapsed after
Expanded Expanded before Expanded after

Model: GPT-6. Harness: Codex.

Note

Fix ChatView scroll-to-end button clearance to account for attached banners

  • Adds resolveScrollToEndClearance in composerFooterLayout.ts to compute clearance from overlay height, main-surface position, button bounds, and attached-banner rectangles. Clearance is reduced only when a banner sits above the button without horizontally overlapping it.
  • ChatView now measures the composer, scroll-to-end button, and banner surfaces, stores the resolver's clearance, and reruns the measurement effect when scroll-to-bottom visibility changes.
  • ComposerBannerStack keeps the notices container at minimum height in both collapsed and expanded states, and remounts the front banner wrapper when the front item changes.
  • Risk: clearance now shrinks when a non-overlapping banner is present; callers relying on the full overlay-height clearance when banners exist should verify ChatView.tsx overlay-height fallback logic.

Macroscope summarized 1784151.

Summary by CodeRabbit

  • Bug Fixes

    • Improved scroll-to-end button positioning when the message composer includes attachments or banners.
    • The timeline now reserves appropriate bottom clearance based on visible composer content.
    • Positioning updates correctly when the scroll-to-bottom control appears or disappears.
    • Composer banner spacing remains consistent when banners are collapsed or displayed.
  • Tests

    • Added coverage for scroll-to-end clearance across attachment overlap and button placement scenarios.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Sep 7, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Sep 7, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 1784151

Macroscope's review found this PR approvable — This is a contained web UI bug fix that adjusts existing scroll-to-end clearance and composer banner layout, with focused resolver tests and no schema, infrastructure, security, billing, or default-setting changes. The runtime impact is limited to positioning and transition/layout behavior within the existing chat composer.

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

@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 34ef3f6f-f6b0-4a9a-80d4-2e37bf1f9370

📥 Commits

Reviewing files that changed from the base of the PR and between b1d453a and 1784151.

📒 Files selected for processing (1)
  • apps/web/src/components/chat/ComposerBannerStack.tsx

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


📝 Walkthrough

Walkthrough

The change adds resolveScrollToEndClearance, uses composer and attachment geometry to calculate scroll-to-end clearance, and recalculates composer layout when scroll-to-bottom visibility changes. Banner stack rendering now uses stable keys and reserves collapsed height.

Changes

Scroll-to-end clearance

Layer / File(s) Summary
Clearance helper and validation
apps/web/src/components/composerFooterLayout.ts, apps/web/src/components/composerFooterLayout.test.ts
The helper calculates clearance from overlay, surface, button, and attachment bounds. Tests cover overlapping, spanning, absent, and separated attachments.
Composer layout integration
apps/web/src/components/ChatView.tsx
ChatView uses the helper during overlay measurement and reruns layout calculation when scroll-to-bottom visibility changes.
Banner stack rendering
apps/web/src/components/chat/ComposerBannerStack.tsx
The front banner wrapper uses the banner ID as its React key. The stack container always reserves the collapsed cap height.

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

Merge Risk: ⚪ Minimal · up to 17841

The banner stack now maintains stable rendering identity and reserved collapsed spacing, with no identified impact on chat functionality or merge readiness.

Sequence Diagram(s)

sequenceDiagram
  participant ChatView
  participant ComposerGeometry
  participant ClearanceHelper
  participant ScrollButton
  ChatView->>ComposerGeometry: measure overlay and composer surfaces
  ComposerGeometry->>ClearanceHelper: pass surface, button, and attachment bounds
  ClearanceHelper->>ScrollButton: calculate reserved end clearance
  ScrollButton-->>ChatView: apply clearance to layout
Loading

Suggested reviewers: juliusmarminge

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the primary change: keeping the scroll-to-end button close to the composer.
Description check ✅ Passed The description explains what changed, why it changed, the affected platforms, verification steps, and UI changes with before-and-after screenshots. It does not use the template headings or include th…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@macroscopeapp
macroscopeapp Bot dismissed their stale review September 7, 2026 20:19

Dismissing prior approval to re-evaluate 1784151

@macroscopeapp macroscopeapp Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All clear

Posted via Macroscope — Effect Service Conventions

@maria-rcks
maria-rcks merged commit 50a76ce into pingdotgg:main Sep 8, 2026
26 checks passed
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Sep 8, 2026
## What's Changed
* fix(web): open proactive panels when entering threads by @maria-rcks in pingdotgg/t3code#10610
* fix(native): wait for the KDE feedback test listener by @juliusmarminge in pingdotgg/t3code#10645
* fix(desktop): resolve local media linked from remote threads by @maria-rcks in pingdotgg/t3code#10619
* fix(web): add bottom padding to project actions header by @flamboh in pingdotgg/t3code#10634
* fix(web): update machines together in auto balance by @maria-rcks in pingdotgg/t3code#10596
* fix(preview): transfer recordings to the agent environment by @maria-rcks in pingdotgg/t3code#10572
* fix(web): navigate markdown images as galleries by @maria-rcks in pingdotgg/t3code#10625
* chore: upgrade to TypeScript 7.0.2 by @juliusmarminge in pingdotgg/t3code#10663
* fix: hide email-bearing account labels in usage limits by @juliusmarminge in pingdotgg/t3code#10668
* fix(web): keep scroll-to-end button close to composer by @Bil0000 in pingdotgg/t3code#10543
* chore(deps): upgrade Effect to rc.112 and Alchemy to beta.76 by @juliusmarminge in pingdotgg/t3code#10652
* chore(refs): sync Effect reference to rc.112 by @juliusmarminge in pingdotgg/t3code#10653
* chore(refs): sync Alchemy reference to beta.76 by @juliusmarminge in pingdotgg/t3code#10654
* fix: generate thread titles with the selected model across connections by @Bil0000 in pingdotgg/t3code#10526
* fix(desktop): enable context menus in the browser by @juliusmarminge in pingdotgg/t3code#10670
* fix(desktop): stop generating declarations during bundling by @juliusmarminge in pingdotgg/t3code#10679
* fix(desktop): restore layout control hit targets by @juliusmarminge in pingdotgg/t3code#10673


**Full Changelog**: pingdotgg/t3code@v0.0.41-nightly.20260908.1377...v0.0.41-nightly.20260908.1387

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.41-nightly.20260908.1387
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants