Skip to content

fix(chat): drag handle replaces pin icon on hover (no left-gutter shift)#291

Merged
blove merged 3 commits into
mainfrom
claude/grip-replaces-pin
May 13, 2026
Merged

fix(chat): drag handle replaces pin icon on hover (no left-gutter shift)#291
blove merged 3 commits into
mainfrom
claude/grip-replaces-pin

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented May 13, 2026

Summary

  • Drops the standalone .chat-thread-list__grip button that PR feat(chat): drag-to-reorder pinned threads + Move up/Move down #280 introduced as a sibling of the row's main click button (always reserved 18px of inline space whether visible or not)
  • Wraps the existing pin SVG in a new .chat-thread-list__pin-slot (13×13px); renders the grip glyph as an absolutely-positioned sibling inside the same slot
  • CSS opacity-toggles on :hover / :focus-within swap which icon is visible
  • The <li> wrap remains the drag source — all drag handlers untouched

Result: zero left-gutter layout shift between unpinned, pinned, and pinned-hover states.

Spec & Plan

  • docs/superpowers/specs/2026-05-12-grip-replaces-pin-design.md
  • docs/superpowers/plans/2026-05-12-grip-replaces-pin.md

Test plan

  • Two new vitest tests assert the pin-slot structure
  • All five PR feat(chat): drag-to-reorder pinned threads + Move up/Move down #280 tests (grip presence, drag-and-drop, Move up/down) continue to pass
  • Manual (reviewer):
    • Pinned row left edge aligns with unpinned rows (no gutter)
    • Hover pinned row → pin icon fades to grip glyph in same slot
    • Drag-reorder still works
    • Move up / Move down menu items still work (keyboard path)

🤖 Generated with Claude Code

blove and others added 3 commits May 12, 2026 21:21
Eliminate the always-reserved 18px left gutter that pinned rows take
for the grip button. Swap the drag affordance into the same slot as
the pin icon via opacity transition. Zero layout shift, zero new
state.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Single-task TDD plan: structural test → template restructure → styles
replacement → verify all PR #280 tests still pass → PR.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
PR #280 introduced a standalone grip button as a sibling of the row's
main click button. The grip occupies 18px (16px width + 2px margin)
of inline space whether visible or not, so pinned rows sat 18px right
of unpinned rows. The user disliked the constant layout shift.

Drop the standalone grip. Wrap the existing pin SVG in a fixed-size
.chat-thread-list__pin-slot span; render the grip glyph as an
absolutely-positioned sibling inside that slot. CSS opacity-toggle on
:hover / :focus-within swaps which icon is visible. Zero layout
shift, same affordance.

The <li> remains the drag source — all drag handlers untouched. Move
up / Move down menu items (keyboard path) unchanged.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cacheplane Ready Ready Preview, Comment May 13, 2026 4:33am

Request Review

@blove blove merged commit 45cdcec into main May 13, 2026
14 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