refactor(desktop): remove the notch-era window modes and hover machinery
Follows #1926 (merged). Dean asked: "We also still have a similar weird notch behavior for sign-in. Let's have that workspace clean up all old notch interactions." #1926 replaces the sign-in slot. This PR removes the notch-era window-mode and hover/leave machinery that no longer means anything in an ordinary window.
Why it was safe: in a normal window pointerInside starts true, and the only place that sets it false is onHitRegionLeave, which every caller reaches only after checking !pointerInside(). So the hover-leave / settle / receded chain could never run. The window-mode act always answered "expanded".
Removed
IPC and main process
ACT_KIND.WINDOW_SET_EXPANDED(window.setExpanded): its schema, router row, and testing fixtureWindowMode(packages/surface/src/geometry.ts, plus re-exports in@sidecar/surfaceandshared/messages/session.ts)PanelManager:setMode,modeFor,initialMode,diagnostic,onWindowFactsChanged. Also the"mode:expanded"lifecycle send.AppWindowFacts.modeand.display, plusDisplayDiagnostic. The snapshot guard now checks only the role.- The second launch's
--expandedbranch (window-service.ts), and the flag inscripts/evidence.shanddocs/PLANNING.md. A plain second launch already reconciles and focuses the window. - The
setPointerInterceptionbridge entry and itssetIgnoreMouseEvents(ā¦, { forward: true })report. Nothing called it.
Renderer
use-panel-presentation.ts, the whole file: hover timers,onHitRegionLeave,panelReceded,changeAskEngagement,settle,changeMode,applyAuthoritativeMode, the planning-call hold. Replaced by oneuseStateWithRef<PanelPresentation>inApp.LEAVE_DELAY_MSandSETTLE_DELAY_MS(panel-state.ts)App: the greeting effect that "opened the panel" on a gated launch, theonLifecyclesubscription (mode:expanded, andtab:settings, which nothing sends), theplanningHeld/feedbackHeldrefs, and the effect that released a call's hold on the pointer- The Escape ladder's last rung (
changeMode(false), "close the panel"). Escape on the new-plan page now does nothing. - The settings-search engagement chain (
onEngagedChangeāonSearchEngagedāonSettingsSearchEngaged), which only held the panel open against the pointer PanelEntrySurface/use-panel-entry.ts:pointerInside,onReleasedWhileAway,cancelHover,settle,heldRef, and the post-send settle branch- Three
WINDOW_FOCUS_PANELcalls on focus (settings search, select rows, shortcut recorders). They worked around a notch panel that could show without being the key window. planningCallHoldsPanelrenamed toplanningCallInProgress; nothing holds a panel any moreuse-panel-presentation.tstaken offeffect-edges.json'srawAsyncPrimitives
Kept on purpose
- The voice window (
renderer/voice/) andWingFace: both live. - The feedback slot and its plumbing (
PANEL_PRESENTATION.FEEDBACK,usePanelEntry,.panel-surface,.desktop-scrim,data-presentation,panelOpen): the feedback-composer redo (another workspace) is replacing them with a dialog. Whichever of us merges second deletes what is then dead. - The notch geometry and caption choreography CSS in
base.css(--capsule-*,--peek-*,--voice-band-*,--slot-*,.panel-surface), whichdesktop.cssmostly overrides. It is tangled with the feedback sheet, so it goes in a follow-up once the feedback redo lands. - The caption's hover hold (
strip-hold.ts): it still works in a window, keeping a reply up while the pointer rests on it. WINDOW_FOCUS_PANELitself: #1926 uses it to bring the window back after the browser sign-in.
Tests
bridge.test.ts: a snapshot whose window carries only its role is accepted (the old guard refused it), and one with no role is refused.act-router.test.ts: the cases that usedwindow.setExpandedas a sample valued act now usemicrophone.request.- No other behaviour a user can observe changes, so the rest is deletion covered by the existing suites.
./scripts/check.sh exits 0.
Mac verification: CI builds nothing for the Mac and could not verify this. ./scripts/verify.sh was not run (this was built on a Linux VM). The scripts/evidence.sh edit only drops a flag the first launch never read. LUKE-159 is the manual Mac pass.
š¤ Generated with Claude Code