Skip to content

fix(web): tagging a thread by drag no longer scrolls the sidebar - #31924

Merged
t3dotgg merged 1 commit into
mainfrom
t3/fix-thread-tag-sidebar-scroll
Nov 6, 2026
Merged

t3dotgg merged 1 commit into
mainfrom
t3/fix-thread-tag-sidebar-scroll

Conversation

@t3dotgg

@t3dotgg t3dotgg commented Nov 6, 2026

Copy link
Copy Markdown
Member

Dragging a thread from the sidebar into the composer to tag it scrolled the sidebar, often all the way to the bottom.

The path out of the list usually crosses dnd-kit's autoscroll edge zone at the bottom of the sidebar. At that point the drag is still a reorder drag, so dnd-kit autoscrolls fast. Autoscroll turns off once the pointer leaves the list, but the scroll has already happened.

The sidebar now saves its scroll position when a drag starts. It restores that position when the drag leaves the list to become a tag drag, and again on drop. Reordering inside the list still autoscrolls as before.

This works with #27691, which tunes reorder autoscroll (smaller edge zone, slower). That makes tag-drag scroll rarer, but leaving through the edge zone still scrolls. This PR removes the leftover scroll for tag drags. The two PRs change different lines.

Before After
Before: sidebar scrolled 217px while hovering the composer After: sidebar stays at its start position

Sidebar text is pixelated because the test data is real.

Proof: in the web dev app (1280×800, about 500 seeded threads), a slow drag from a low sidebar row to the composer. Measured sidebar scrollTop while hovering the composer: 217px before, 0 after. The tag still lands in the composer. vp run check:changed passes. No automated test was added: no existing harness renders the full sidebar with a long list and drags from it.

Reviewed with sol-loop: 1 pass with GPT-6.1 Sol. Sol verdict: approved

Created with Claude Opus 5.5 in T3 Code (Claude Code harness).

🤖 Generated with Claude Code

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Nov 6, 2026
@macroscopeapp

macroscopeapp Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at d604a91

Macroscope's review found this PR approvable — This preserves the sidebar’s starting scroll position when dragging a thread out of the list for tagging. The change is limited to transient UI state and leaves tagging and persistence behavior unchanged.

No code changes detected at eed671f. Prior analysis still applies.

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

@coderabbitai

coderabbitai Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Thread drags now save the sidebar viewport and its scroll position at drag start. The saved position is restored when a context drag moves or drops outside the thread list. The saved state is cleared when the drag finishes.

Changes: Sidebar drag scroll preservation

Layer / File(s) Summary
Capture and restore drag scroll position
apps/web/src/components/Sidebar.tsx
Thread drag handling captures the sidebar viewport and its scrollTop. It restores that position during moves and drops outside the thread list, then clears the saved state when the drag finishes.

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

Change: Bug fix

Possibly related issues

  • pingdotgg/t3code#27669: This issue describes unwanted sidebar autoscroll during thread drags, which this change addresses for context drags outside the thread list.

Possibly related PRs

  • pingdotgg/t3code#30346: Both changes address sidebar scrolling during thread drags, with this PR restoring the starting position for context drags outside the list.
  • pingdotgg/t3code#28038: This PR uses the same context-drag movement and drop handlers that this change updates.
  • pingdotgg/t3code#26724: Both changes affect thread context drags to the composer and their sidebar autoscroll behavior.

Suggested labels: bugfix, size:S

Suggested reviewers: maria-rcks

Merge Risk: Minimal · up to d604a

No merge-blocking risk was established from the available review evidence.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title clearly identifies the web fix: preventing sidebar scrolling when tagging a thread by drag.
Description check Passed The description explains the problem, implementation, scope interaction with PR #27691, manual verification, screenshots, and the absence of automated coverage. It does not use the template headings o…
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.
Full details: Description check

Explanation

The description explains the problem, implementation, scope interaction with PR #27691, manual verification, screenshots, and the absence of automated coverage. It does not use the template headings or explicitly document approval or an obvious-bug scope exemption, but it is otherwise mostly complete and focused.

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 202d5b5 and d604a91.

Files selected for processing: 1

  • apps/web/src/components/Sidebar.tsx

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

Dragging a sidebar thread into the composer crosses dnd-kit's autoscroll
edge zone on the way out, so the sidebar scrolled, often to the bottom.
Remember the sidebar scroll position at drag start and restore it once
the drag leaves the list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@t3dotgg
t3dotgg force-pushed the t3/fix-thread-tag-sidebar-scroll branch from d604a91 to eed671f Compare November 6, 2026 10:25
@t3dotgg
t3dotgg merged commit c8267db into main Nov 6, 2026
31 of 32 checks passed
@t3dotgg
t3dotgg deleted the t3/fix-thread-tag-sidebar-scroll branch November 6, 2026 10:33
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Nov 6, 2026
**v0.1.8-nightly.20261106.4275** · 12 changes from 6 contributors

**8 bug fixes and performance improvements.**

<details>
<summary>Full changelog</summary>

## What's Changed
* fix(desktop): arm64 macOS builds no longer ship x64-only objc-js binary by @joshuarossi in pingdotgg/t3code#31285
* fix(web): keep task updates static in the timeline by @Yash-Singh1 in pingdotgg/t3code#31888
* fix(devices): keep devices listed when simulator discovery fails by @shivamhwp in pingdotgg/t3code#25971
* fix(web): dragging a sidebar thread no longer scrolls the list to the bottom by @juliusmarminge in pingdotgg/t3code#27691
* fix(web): tagging a thread by drag no longer scrolls the sidebar by @t3dotgg in pingdotgg/t3code#31924
* ci: stacked PRs stop evicting the shared pnpm cache by @t3dotgg in pingdotgg/t3code#31937
* fix(web): remote subagents no longer split from the lineage list by @t3dotgg in pingdotgg/t3code#29285
* perf(ci): release uploads stop recompressing installers and CLI archives by @t3dotgg in pingdotgg/t3code#31942
* feat(antigravity): identify as T3 Code to agy acp 1.5.1+ by @patrick-toulme in pingdotgg/t3code#31158
* ci(release): JS bundle jobs stop building an unused Linux helper by @t3dotgg in pingdotgg/t3code#31941
* feat(marketing): help search engines tell t3.codes apart from copycat sites by @t3dotgg in pingdotgg/t3code#31142
* perf(server): background service launcher uses 75% less memory by @t3dotgg in pingdotgg/t3code#29284

## New Contributors
* @joshuarossi made their first contribution in pingdotgg/t3code#31285
* @patrick-toulme made their first contribution in pingdotgg/t3code#31158

**Full Changelog**: pingdotgg/t3code@v0.1.8-nightly.20261106.4262...v0.1.8-nightly.20261106.4275

</details>


Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.1.8-nightly.20261106.4275
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: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.

1 participant