Skip to content

feat(tabs): implement maximize/reset-split chord shortcuts + cross-group tab movement - #237

Merged
h4yfans merged 1 commit into
mainfrom
debt/phase-5.1-chord-shortcuts
Apr 16, 2026
Merged

feat(tabs): implement maximize/reset-split chord shortcuts + cross-group tab movement#237
h4yfans merged 1 commit into
mainfrom
debt/phase-5.1-chord-shortcuts

Conversation

@h4yfans

@h4yfans h4yfans commented Apr 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Part of Phase 5 (UI stubs + polish) in the tech-debt-remediation plan — see .claude/plans/tech-debt-remediation.md § 5.1.

Closes four TODOs in apps/desktop/src/renderer/src/hooks/use-chord-shortcuts.ts (lines 90, 104, 128, 133).

Reducer changes

  • TOGGLE_MAXIMIZE_GROUP: snapshots state.layout into preMaximizeLayout, collapses the tree to a single leaf on the active group, and sets isMaximized: true. Second dispatch restores from the snapshot.
  • RESET_SPLIT_RATIOS: recursively rewrites every SplitLayout node's ratio to 0.5.

State changes

  • TabSystemState.isMaximized?: boolean
  • TabSystemState.preMaximizeLayout?: SplitLayout

Hook changes

  • ⌘K ⇧→ / ⌘K ⇧← — move the active tab across adjacent groups (wraps) via existing MOVE_TAB action.
  • ⌘K M — dispatch TOGGLE_MAXIMIZE_GROUP.
  • ⌘K O — dispatch RESET_SPLIT_RATIOS.

Tests

  • Reducer unit tests for both new actions (including idempotent restore and nested tree resets).
  • New use-chord-shortcuts.test.tsx covering the four chord paths with a mocked useTabs context.
  • Extended tabs.e2e.ts Playwright spec exercising cross-group move + maximize + reset in a real Electron window.

Test plan

  • pnpm exec tsc -p tsconfig.web.json --noEmit clean in the worktree
  • CI: pnpm test --filter @memry/desktop green on reducer + hook tests
  • CI: pnpm test:e2e --grep chord green against a built bundle
  • Manual smoke: open two tab groups in pnpm dev, exercise ⌘K ⇧→, ⌘K M, ⌘K O

…oup tab movement

Phase 5.1 (ref .claude/plans/tech-debt-remediation.md § 5.1).

- Reducer: TOGGLE_MAXIMIZE_GROUP snapshots current layout, collapses tree to
  a single leaf on the active group, restores on second toggle.
- Reducer: RESET_SPLIT_RATIOS recursively rewrites every SplitLayout node's
  ratio to 0.5.
- State: isMaximized + preMaximizeLayout fields wired into TabSystemState.
- Hook: ⌘K ⇧→ / ⌘K ⇧← now dispatch MOVE_TAB across adjacent groups (wraps).
- Hook: ⌘K M toggles maximize, ⌘K O resets split ratios.
- Tests: reducer unit tests cover both new actions; new use-chord-shortcuts
  hook tests cover the four chord paths; tabs.e2e.ts extended with
  Playwright coverage for move-tab + maximize + reset.
@h4yfans
h4yfans merged commit 017fbf3 into main Apr 16, 2026
2 checks passed
h4yfans added a commit that referenced this pull request May 6, 2026
…oup tab movement (#237)

Phase 5.1 (ref .claude/plans/tech-debt-remediation.md § 5.1).

- Reducer: TOGGLE_MAXIMIZE_GROUP snapshots current layout, collapses tree to
  a single leaf on the active group, restores on second toggle.
- Reducer: RESET_SPLIT_RATIOS recursively rewrites every SplitLayout node's
  ratio to 0.5.
- State: isMaximized + preMaximizeLayout fields wired into TabSystemState.
- Hook: ⌘K ⇧→ / ⌘K ⇧← now dispatch MOVE_TAB across adjacent groups (wraps).
- Hook: ⌘K M toggles maximize, ⌘K O resets split ratios.
- Tests: reducer unit tests cover both new actions; new use-chord-shortcuts
  hook tests cover the four chord paths; tabs.e2e.ts extended with
  Playwright coverage for move-tab + maximize + reset.
@h4yfans
h4yfans deleted the debt/phase-5.1-chord-shortcuts branch May 6, 2026 16:36
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