Skip to content

Show archive action on hover with confirm focus#1561

Merged
juliusmarminge merged 2 commits intomainfrom
t3code/archive-icon-hover
Mar 30, 2026
Merged

Show archive action on hover with confirm focus#1561
juliusmarminge merged 2 commits intomainfrom
t3code/archive-icon-hover

Conversation

@juliusmarminge
Copy link
Copy Markdown
Member

@juliusmarminge juliusmarminge commented Mar 30, 2026

Summary

  • Show the thread archive action only on hover/focus instead of tracking row hover state in React.
  • Keep the archive confirm flow keyboard-accessible by focusing the confirm button after the first click.
  • Add coverage for hiding the archive action when the pointer leaves a thread row and for showing the confirm action after archive click.

Testing

  • bun fmt
  • bun lint
  • bun typecheck
  • bun run test

Note

Low Risk
Low risk UI/interaction change limited to sidebar thread rows, plus new browser tests; main risk is minor regressions in hover/focus behavior or keyboard accessibility.

Overview
Updates sidebar thread rows so the archive button is only revealed on hover/focus via CSS (removing React hoveredThreadId tracking) and hides thread metadata while the action is shown.

When confirmThreadArchive is enabled, clicking archive now auto-focuses the confirm button (via stored refs + requestAnimationFrame) and confirmation state is cleared on pointer leave or when the row loses focus.

Adds browser test coverage asserting the archive action hides when leaving a row and that the confirm-archive control appears after clicking the archive button (using new data-testids like thread-row-*, thread-archive-*, thread-archive-confirm-*).

Written by Cursor Bugbot for commit 88d88ba. This will update automatically on new commits. Configure here.

Note

Show archive action on thread row hover using CSS and focus confirm button on click

  • Replaces React hover state tracking with CSS-based hover/focus visibility for the archive action in Sidebar.tsx, removing hoveredThreadId state entirely.
  • When confirmation is enabled, clicking the archive button sets confirmingArchiveThreadId and focuses the confirm button on the next animation frame; when disabled, it archives immediately.
  • Thread metadata (jump hint or relative time) fades and becomes non-interactive during confirmation or hover states.
  • confirmingArchiveThreadId clears on mouse leave or when focus leaves the thread row via onBlurCapture.
  • Adds data-testid attributes to thread rows, archive buttons, and confirm buttons, with browser tests covering hover visibility and confirm-on-click behavior.

Macroscope summarized 88d88ba.

- Reveal thread archive controls only while hovering or focusing the row
- Keep the confirm action accessible after starting archive confirmation
- Add coverage for hover hide/show and confirm button behavior
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 30, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: df8d51bc-2802-4977-a400-400e65b35020

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch t3code/archive-icon-hover

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

@github-actions github-actions bot added size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Mar 30, 2026
- Add isolate to thread rows so the archive control layers correctly
- Remove unnecessary z-index from archive confirm affordances
@juliusmarminge juliusmarminge merged commit 59f23d7 into main Mar 30, 2026
11 checks passed
@juliusmarminge juliusmarminge deleted the t3code/archive-icon-hover branch March 30, 2026 01:36
aaditagrawal added a commit to aaditagrawal/t3code that referenced this pull request Mar 30, 2026
Integrates upstream changes including:

- Refactor terminal manager onto Effect runtime (pingdotgg#1525)
- Refactor web orchestration sync to incremental events and
  isolated recovery (pingdotgg#1560)
- Remove redundant add-project cancel button (pingdotgg#1302)
- README documentation updates (pingdotgg#1406, pingdotgg#1564, pingdotgg#1565)

Conflict resolution across 8 files: adopted upstream's incremental
event store architecture, terminal Effect runtime, and batched
orchestration effects while preserving fork's multi-provider state.
aaditagrawal added a commit to aaditagrawal/t3code that referenced this pull request Mar 31, 2026
Sync fork with upstream/main (post-pingdotgg#1561, 6 commits)
Chrono-byte pushed a commit to Chrono-byte/t3code that referenced this pull request Mar 31, 2026
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.

1 participant