fix(desktop): keep Kaipu in the Dock and Cmd+Tab after recording and camera toggles #366
Note (correctness): isVisible() probe may lag right after dock.show(), risking repeated show
The ADR itself notes app.dock.isVisible() can lag after DockShow. If a re-assertion (e.g. recording stop followed closely by applyDockPolicy()/⌘⌃O) lands in that window, the probe reports not-regular and the setter calls app.dock.show() again on an active app. That is the window-churn this cache was introduced to prevent. The ADR calls this theoretical because setActivationPolicy runs synchronously first. It is untested against real AppKit, so keep it on the owner QA list (rapid start/stop and camera toggles).
Note (adr): ADR 0029 status differs between the index and the ADR page
The index lists 0029 as "Proposed — implemented, owner QA pending". The ADR page's status row says "Implemented on fix/dock-lost-after-floating-panels; owner QA outstanding". It also names a branch, which will go stale after merge. Use one status vocabulary in both places and drop the branch name.
Claude review of the whole pull request, at 9f67c3c: all 12 files reviewed.
2 finding(s), 0 to fix; 2 on their lines. Reply in a comment's thread to answer it.
Summary
I found no blocking correctness or security problems in this PR. The settings-store probe, the two panel changes, the tests and the docs are consistent with each other. I left two notes. One is the app.dock.isVisible() lag risk, which only owner QA on a packaged build can settle. The other is that the ADR status wording differs between the index and the ADR page.
<sub>Claude Sonnet 5.5 · $0.12</sub>
<!-- claude-review sha=9f67c3c7947b9e0ee413a4fa5ec01c1ca481dcea -->
Measured rather than argued, on Electron 39.8.10 against real AppKit (a throwaway script creating the same windows): app.dock.isVisible() reads true immediately after app.setActivationPolicy("regular"), before app.dock.show() runs, and stays true at 1, 5, 20, 100 and 300 ms. The lag Electron documents is the transform it dispatches 1 ms later inside DockShow; the setter calls setActivationPolicy first, so a re-assertion landing in that window sees cache and probe agree and touches nothing — a repeated dock.show() cannot come from the probe. The same run confirmed the cause (a plain window joining full-screen Spaces without the flag flips the probe to false at once) and the recipe (a panel with the flag leaves it true). Recorded in bda1ea95: the ADR now states the measurement instead of calling the window theoretical, and the backlog QA list gains the rapid start/stop and camera-toggle step you asked for.
Fixed in 17eb1cbf: both the index row and the ADR status row now read "Proposed — implemented in #366, owner QA pending"; the branch name is gone.
csdev19
What
On macOS, Kaipu dropped out of the Dock and ⌘-Tab after the first recording of a session and after every camera toggle. The app kept working; only toggling Show in Dock & app switcher off and on brought it back. Reported on desktop 0.14.1.
Why
Two defects together (full chain in ADR 0029):
1.
control-bar-window.tsandcamera-bubble-window.tscalledsetVisibleOnAllWorkspaces(true, { visibleOnFullScreen: true })withoutskipTransformProcessType. Electron 39 then runsapp.dock.hide()(Browser::DockHide→TransformProcessType(kProcessTransformToUIElementApplication)) to get a plain window over a full-screen app. That removes the Dock icon and the ⌘-Tab entry.2. Since #255 (2026-10-07, "apply the macOS activation policy only on an actual transition") the policy setter skips any call that matches its cache. The cache said
regularthe whole time, soforceRegularPolicy()at start,applyDockPolicy()at stop, after the camera toggle and from⌘⌃Owere all no-ops. Before that fix the bug was masked by accident:app.dock.show()ran under a second before the bar was created, and Electron ignores aDockHidethat lands within a second of aDockShow.Fix
type: "panel"on macOS and passskipTransformProcessType: true— the recipe the capture panel, overlays and toast already use.app.dock.isVisible()(Electron reads the realNSRunningApplication.activationPolicy) agree. A Dock dropped behind its back is restored at the next re-assertion; a matching re-assertion still touches no AppKit state, so the blur fix stays intact.Docs
bug-app-lost-from-app-switcher(🟢 Ready to validate) with owner validation steps; follow-up note onbug-main-window-hides-on-blur; both pages added to the sidebar.Verification
floating-window-policy.test.ts, plus cases insettings-store.test.tsandrecording-hub.test.ts. All five fail on the previous sources and pass now.check-types,oxlint,oxfmtclean on touched files. Docs site builds.Owner QA (packaged build)
1. Record once and stop; repeat with the camera on/off. Kaipu stays in ⌘-Tab and the Dock.
2. Put another app in full screen and record it: the bar and bubble float over it, drag, and the bar's buttons respond without pulling the main window forward. This is the one behaviour I could not verify from here — the panels are now non-activating
NSPanels.3. With the Dock setting off: record and stop; the app stays menu-bar only.
4.
⌘⌃Obrings the main window forward in every state above.🤖 Generated with Claude Code