Skip to content

fix(web): drag preview opens no blank gaps under folded groups - #234

Merged
pandec merged 2 commits into
devfrom
fix/sidebar-active-placeholder-gap
Oct 7, 2026
Merged

pandec merged 2 commits into
devfrom
fix/sidebar-active-placeholder-gap

Conversation

@pandec

@pandec pandec commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Dragging a sidebar thread opened blank space under group headers below the pins. The drag preview treated a folded Active as empty and reserved its empty-Active placeholder slot, which stayed blank. Hovering a folded group's header also opened a card-sized slot under it, but the row folds away on drop. With custom groups, an expanded but empty Active opened the placeholder slot without its hint, because the hint counted every active thread rather than just the Active group's.

  • The sorting strategy takes foldedGroupIds (null = Active). A folded group opens no slot for the dragged row unless it is the open thread, which stays visible in folded groups. A folded Active opens no placeholder. The header stays the drop target.
  • The empty-Active hint counts only the Active group's own threads, so any placeholder slot it opens always shows the dashed "Active" hint.

The Pinned-label and gap-under-pins issues seen in the installed Dev app come from a build older than #227. They do not reproduce on dev.

Verified in a dev build seeded with real data and thread groups: a collapsed Active shows no gap, a folded custom group header opens no slot when hovered, an empty expanded Active shows its hint, and pinned drags show no extra label or gap.

Opus 5.5 via Claude Code

pandec added 2 commits October 7, 2026 09:50
- Collapsed Active hides its rows, so the drag preview opens no empty-Active slot
- The empty-Active hint counts the Active group only, so with custom groups the opened slot shows it
The dragged row folds away on drop, so only the open thread (which stays
visible) opens a slot there. Count Active-group threads only where the hint renders.
@pandec pandec changed the title fix(web): a folded Active opens no blank gap while dragging fix(web): drag preview opens no blank gaps under folded groups Oct 7, 2026
@pandec
pandec marked this pull request as ready for review October 7, 2026 07:57
@coderabbitai

coderabbitai Bot commented Oct 7, 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: 1d923441-fc62-4ec0-832b-06b30e7cc29c
📥 Commits

Reviewing files that changed from the base of the PR and between a0f093a and cb3a23a.

📒 Files selected for processing (3)
  • apps/web/src/components/Sidebar.drag.test.ts
  • apps/web/src/components/Sidebar.drag.ts
  • apps/web/src/components/Sidebar.tsx

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


📝 Walkthrough

Walkthrough

The sidebar drag strategy now accounts for folded groups, route-thread visibility, and the Active shelf state. The Active drop hint uses ungrouped Active threads. Tests cover drag projections for expanded and folded groups.

Changes

Fold-aware sidebar dragging

Layer / File(s) Summary
Folded drag previews and Active drop hint
apps/web/src/components/Sidebar.drag.ts, apps/web/src/components/Sidebar.tsx, apps/web/src/components/Sidebar.drag.test.ts
The sidebar passes folded group IDs to the drag strategy. Drag previews omit the active thread from folded groups unless it is the route thread, and the Active placeholder is omitted when Active is folded. The Active drop hint now depends on ungrouped Active threads and shelf state. Tests cover the resulting projections.

Priority: ⬇️ Low

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

Change: Bug fix

Suggested reviewers: juliusmarminge, t3dotgg

Merge Risk: ⚪ Minimal · up to cb3a2

The reviewed drag-preview behavior presents no identified obstacle to merging after normal checks.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: preventing blank drag-preview gaps under folded groups.
Description check ✅ Passed The description explains the problem, the change, and specific verification results. It does not include the required UI screenshots or recording, and it does not link scope approval or explain why 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.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@pandec
pandec merged commit 824f33f into dev Oct 7, 2026
3 checks passed
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