Skip to content

Add configurable thread rename and archive shortcuts - #1172

Merged
ymichael merged 3 commits into
get-bb:mainfrom
ryanbbrown:feature/thread-archive-shortcut
Aug 10, 2026
Merged

ymichael merged 3 commits into
get-bb:mainfrom
ryanbbrown:feature/thread-archive-shortcut

Conversation

@ryanbbrown

@ryanbbrown ryanbbrown commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1157.
Closes #1242.

Summary

  • expose Rename thread and Archive thread in Settings → Keyboard without assigning default shortcuts
  • support assigning, clearing, and resetting keyboard commands that have no default shortcut
  • route both commands to the focused thread and target only the focused pane when multiple threads are visible
  • reuse the existing rename dialog and archive lifecycle, including child handling, pane cleanup, navigation, and toast behavior
  • ignore archived threads instead of turning the archive command into an archive/unarchive toggle

User impact

Users can choose keyboard shortcuts for renaming and archiving the focused thread. Neither command is assigned by default, and the existing rename and archive behavior remains unchanged.

Testing

  • full GitHub CI matrix
  • pnpm exec turbo run test --filter=@bb/app -- --run src/components/settings/KeyboardSettingsSection.test.tsx src/lib/keyboard-shortcut-settings.test.ts src/views/thread-detail/ThreadRenameCommandHandler.test.tsx src/views/thread-detail/ThreadArchiveCommandHandler.test.tsx
  • pnpm exec turbo run test --filter=@bb/server -- --run test/system/app-keybindings.test.ts
  • pnpm exec turbo run typecheck --filter=@bb/app --filter=@bb/server --filter=@bb/domain --filter=@bb/server-contract --filter=@bb/plugin-sdk --filter=@bb/templates
  • full local app suite: 330 test files and 2,484 tests
  • manual QA by assigning the shortcuts and renaming or archiving focused threads in single-pane and split views
  • git diff --check

@ymichael
ymichael force-pushed the feature/thread-archive-shortcut branch from 5ecfa54 to fc83c63 Compare August 10, 2026 22:37
@ymichael
ymichael marked this pull request as ready for review August 10, 2026 22:39
@ymichael ymichael self-assigned this Aug 10, 2026
@ymichael ymichael changed the title Add configurable thread archive shortcut Add configurable thread rename and archive shortcuts Aug 10, 2026
@ymichael
ymichael merged commit ceb899a into get-bb:main Aug 10, 2026
9 checks passed
amadad pushed a commit to amadad/bb that referenced this pull request Aug 14, 2026
Closes get-bb#1157.
Closes get-bb#1242.

## Summary

- expose **Rename thread** and **Archive thread** in Settings → Keyboard
without assigning default shortcuts
- support assigning, clearing, and resetting keyboard commands that have
no default shortcut
- route both commands to the focused thread and target only the focused
pane when multiple threads are visible
- reuse the existing rename dialog and archive lifecycle, including
child handling, pane cleanup, navigation, and toast behavior
- ignore archived threads instead of turning the archive command into an
archive/unarchive toggle

## User impact

Users can choose keyboard shortcuts for renaming and archiving the
focused thread. Neither command is assigned by default, and the existing
rename and archive behavior remains unchanged.

## Testing

- full GitHub CI matrix
- `pnpm exec turbo run test --filter=@bb/app -- --run
src/components/settings/KeyboardSettingsSection.test.tsx
src/lib/keyboard-shortcut-settings.test.ts
src/views/thread-detail/ThreadRenameCommandHandler.test.tsx
src/views/thread-detail/ThreadArchiveCommandHandler.test.tsx`
- `pnpm exec turbo run test --filter=@bb/server -- --run
test/system/app-keybindings.test.ts`
- `pnpm exec turbo run typecheck --filter=@bb/app --filter=@bb/server
--filter=@bb/domain --filter=@bb/server-contract --filter=@bb/plugin-sdk
--filter=@bb/templates`
- full local app suite: 330 test files and 2,484 tests
- manual QA by assigning the shortcuts and renaming or archiving focused
threads in single-pane and split views
- `git diff --check`

---------

Co-authored-by: Michael Yong <[email protected]>
SawyerHood added a commit that referenced this pull request Aug 19, 2026
## What was wrong

Archiving a thread from the sidebar took two or three actions: open the
`…` menu or the right-click menu, then pick Archive. Users who clean up
many threads a day asked for a one-click hover button like Cursor has
(#1958, which supersedes #1159; the keyboard shortcut from #1172 is
opt-in and not discoverable from the list).

## What changed

- `apps/app/src/components/thread/ThreadActionsMenu.tsx`: new
`ThreadArchiveQuickAction`, an icon button with a tooltip that calls the
same `archiveThreadAndChildren` / `unarchiveThread` actions as the menu
entry. It uses the existing `Archive` / `ArchiveRestore` icons and stops
propagation so the row link does not navigate.
- `apps/app/src/components/sidebar/ThreadRow.tsx`: the hover overlay is
anchored `inset-y-0 right-0` so it can hold two actions; the archive
button sits left of the `MoreHorizontal` trigger with a 2px gap.
- `apps/app/src/components/ui/theme.css` + `sidebar-hover-actions.ts`:
new `bb-sidebar-hover-actions-inset` class reserves one action width on
the title under the same row states that reveal the overlay (hover,
focus-visible, open menu), so long titles truncate instead of running
under the button. Reset to 0 on coarse phones where the overlay is
hidden. Not applied when the row shows a shortcut pill instead of hover
actions.

No wire, CLI, or doc changes; no new icon registered.

## How you verified

- New `ThreadArchiveQuickAction.test.tsx`: one click archives without
bubbling to the row; an archived thread unarchives instead.
- Updated `ThreadRow.test.tsx` mock and wrapped
`ProjectRow.interactions.test.tsx` renders in `TooltipProvider`.
- `pnpm exec turbo run typecheck lint test --filter=@bb/app`: 404 files,
3100 tests pass.
- Manual: dev app in headless Chromium — hover shows the button left of
`…`, click removed the row and set `archived_at` in the dev DB; long
title truncates before the button.

Fixes #1958

> AGENT GENERATED: by Claude Opus 5

---------

Co-authored-by: Claude <[email protected]>
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.

Add a configurable shortcut for archiving the focused thread Add a configurable shortcut for renaming the focused thread

2 participants