Skip to content

archive threads with middle click#2782

Open
tarik02 wants to merge 2 commits into
pingdotgg:mainfrom
tarik02:feat/archive-by-middle-mouse-button
Open

archive threads with middle click#2782
tarik02 wants to merge 2 commits into
pingdotgg:mainfrom
tarik02:feat/archive-by-middle-mouse-button

Conversation

@tarik02
Copy link
Copy Markdown
Contributor

@tarik02 tarik02 commented May 22, 2026

What Changed

Middle-clicking a sidebar thread now archives it.

Why

Faster thread cleanup without changing normal left-click navigation or context menu behavior.
Everyone do similar: browsers/editors close tabs on middle mouse click.

UI Changes

_20260522_101801.webm

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Low Risk
Low risk UI interaction change localized to the sidebar thread row; main risk is unintended interference with mouse events (e.g., selection/navigation) on different browsers/platforms.

Overview
Adds middle-click (mouse button 1) handling on sidebar thread rows to archive a thread directly. A mousedown handler prevents the default middle-click behavior, and an auxclick handler stops propagation, clears any pending archive confirmation state, and calls attemptArchiveThread for the clicked thread.

Reviewed by Cursor Bugbot for commit 7c19250. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Archive threads with middle click in sidebar

Adds middle-click support to SidebarThreadRow in Sidebar.tsx. A mousedown handler prevents the default browser scroll behavior, and an auxclick handler calls attemptArchiveThread on the target thread while clearing any pending archive confirmation.

Macroscope summarized 7c19250.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 22, 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: b23566af-1b91-48e0-ac6c-4c3599c1f4d3

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

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 and usage tips.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels May 22, 2026
void attemptArchiveThread(threadRef);
},
[attemptArchiveThread, clearConfirmingArchive, threadRef],
);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Middle-click bypasses user's archive confirmation preference

Low Severity

The handleRowAuxClick handler directly calls attemptArchiveThread without checking appSettingsConfirmThreadArchive. The existing archive UI (icon button click) respects this user setting by routing through handleStartArchiveConfirmation when enabled, requiring an explicit "Confirm" click before archiving. Middle-click silently ignores this preference, which is especially risky since middle-click can be accidentally triggered during scroll-wheel usage.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 2879af1. Configure here.

@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp Bot commented May 22, 2026

Approvability

Verdict: Needs human review

This PR introduces a new user-facing feature (middle-click to archive threads) and has an unresolved comment identifying that it bypasses the user's archive confirmation preference setting, which is a behavioral inconsistency that warrants review.

You can customize Macroscope's approvability policy. Learn more.

Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7c19250. Configure here.

void attemptArchiveThread(threadRef);
},
[attemptArchiveThread, clearConfirmingArchive, threadRef],
);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Middle-click archives running threads, showing confusing error toast

Medium Severity

The handleRowAuxClick handler doesn't check isThreadRunning before calling attemptArchiveThread. All other archive paths in this component are guarded by !isThreadRunning — the archive buttons are only rendered when the thread isn't running (line 653). The middle-click bypasses this, causing archiveThread to throw "Cannot archive a running thread," which surfaces as an unexpected error toast to the user instead of being silently prevented.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 7c19250. Configure here.

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:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant