fix(chat): drag handle replaces pin icon on hover (no left-gutter shift)#291
Merged
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.chat-thread-list__gripbutton 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).chat-thread-list__pin-slot(13×13px); renders the grip glyph as an absolutely-positioned sibling inside the same slot:hover/:focus-withinswap which icon is visible<li>wrap remains the drag source — all drag handlers untouchedResult: zero left-gutter layout shift between unpinned, pinned, and pinned-hover states.
Spec & Plan
docs/superpowers/specs/2026-05-12-grip-replaces-pin-design.mddocs/superpowers/plans/2026-05-12-grip-replaces-pin.mdTest plan
🤖 Generated with Claude Code