feat(client): close the active file tab on Cmd/Ctrl+W #3

Merged
w33ble merged 2 commits from feat/close-tab-hotkey into main 2026-09-02 11:32:48 -06:00
Collaborator

Cherry-picks from dev:

  • feat(client): close the active file tab on Cmd/Ctrl+W — new useTabCloseShortcut hook; capture-phase keydown listener so it wins over Monaco, dirty-tab confirm before closing, Keyboard Lock API claim for Chromium (fullscreen/app-mode), best-effort elsewhere
  • refactor(client): migrate tests from vitest to bun test — removes vitest config/deps, adds bunfig.toml + test-setup.ts (jsdom), drops bun.lockb entries for vitest, AGENTS.md updated

Checks: bun install --frozen-lockfile and bun run test pass locally (60 tests, 0 fail).

Cherry-picks from `dev`: - **feat(client): close the active file tab on Cmd/Ctrl+W** — new `useTabCloseShortcut` hook; capture-phase keydown listener so it wins over Monaco, dirty-tab confirm before closing, Keyboard Lock API claim for Chromium (fullscreen/app-mode), best-effort elsewhere - **refactor(client): migrate tests from vitest to bun test** — removes vitest config/deps, adds `bunfig.toml` + `test-setup.ts` (jsdom), drops `bun.lockb` entries for vitest, AGENTS.md updated Checks: `bun install --frozen-lockfile` and `bun run test` pass locally (60 tests, 0 fail).
refactor(client): migrate tests from vitest to bun test
All checks were successful
test / client (pull_request) Successful in 20s
test / server (pull_request) Successful in 1m15s
a8d954e33d
vitest under the bun runtime silently ran only the first test file
(vitest#10590); bun's native runner has no such gap. Since the repo is
bun-only (no node), drop vitest entirely:

- jsdom preload via bunfig.toml (client/test-setup.ts), mirroring the
  old vitest environment
- shared api mocks in src/test/apiMocks.ts; hook tests install them
  with mock.module before importing the hook
- explicit cleanup() in afterEach for RTL files (no auto-cleanup under
  bun), plus a synchronous notifyManager scheduler so query/mutation
  notifications land inside act
- test script split into two bun test invocations: the real-module api
  tests first, then everything else (one shared module registry per
  run, so mocks must not leak into api.test.ts)
- AGENTS.md test docs updated accordingly
hijynx force-pushed feat/close-tab-hotkey from a8d954e33d
All checks were successful
test / client (pull_request) Successful in 20s
test / server (pull_request) Successful in 1m15s
to 42bb1ae051
All checks were successful
test / client (pull_request) Successful in 19s
test / server (pull_request) Successful in 46s
2026-09-02 11:31:29 -06:00
Compare
w33ble approved these changes 2026-09-02 11:32:42 -06:00
w33ble merged commit 42bb1ae051 into main 2026-09-02 11:32:48 -06:00
w33ble deleted branch feat/close-tab-hotkey 2026-09-02 11:32:49 -06:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
w33ble/pipit!3
No description provided.