Repository navigation
feat: hide the desktop lobster while other OpenClaw windows are open - #2340
Conversation
Add a default-on minimized-window preference and reversible native entrance and exit motion. Preserve saved choices, desktop position, quick-chat state, and notification suppression across automatic hiding. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. What this changesAdds a default-on preference that hides the desktop lobster while app-owned Workspace or setup windows are visible, with animated hide and restore transitions. Example: Desktop lobster is enabled and Workspace is restored.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains Keep this maintainer-authored draft open: current main lacks the feature, and source review found no definite introduced defect. Priority: P3 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherWindowManager reports aggregate window visibility to DesktopCompanionController, which combines it with saved preferences and notification state to control the existing native lobster window. flowchart TD
A[Workspace and setup windows] --> B[WindowManager]
B --> C[DesktopCompanionController]
D[Saved preferences] --> C
E[Notification service] --> C
C --> F[Native lobster window]
Technical reviewBest possible solution: Complete the existing-owner implementation with demonstrated native transitions and preservation of saved settings across upgrade. Do we have a high-confidence way to reproduce the issue? This is a feature request rather than a broken-contract report; current-main source confirms that other windows do not currently control lobster visibility. Is this the best way to solve the issue? The implementation uses the appropriate existing owners, preserves explicit settings choices and retained chat state, and adds distinct persistence, controller, and native-window coverage without unnecessary architecture. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8ffe470e7d50. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 19, 2026, 3:35 PM ET / 20:35 UTC. |
Gate visibility callbacks during shutdown while retaining window observation cleanup. Cover shutdown events and a progressed animation reversal with native regressions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Require a visible, partly translated mascot immediately before reversal. Locate the size picker among expander rows and wait for the new independent toggle to mount before inspecting its accessible name and action. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
What Problem This Solves
The desktop lobster competes with Setup and the main chat/dashboard window for screen space while those windows are open. Users want it to return when those windows are minimized, without repeatedly switching the lobster off and on.
User Impact
User impact: Desktop lobster now has a default-on "Only show when other OpenClaw windows are minimized" preference. Both lobster preferences default on when absent, while explicitly saved choices are preserved.
The lobster rises into view and tucks away over 180 ms, without bounce or activation. Windows animations off makes the transition immediate. The preference observes app-owned Workspace and setup windows, not external browser dashboards.
Why This Change Was Made
WindowManager remains the owner of main-window visibility. DesktopCompanionController applies the preference and hides the existing lobster instead of destroying it, retaining its desktop anchor and quick-chat state without replaying notifications received while hidden. DesktopCompanionWindow owns the reversible native animation and reduced-motion handling.
The Settings row is localized in all six supported locales. Motion follows the native design contract, with inspiration from upstream motion guidance, rather than importing a separate pet-animation system.
Evidence
Focused managed coverage passed for defaulting, explicit opt-out persistence, hide/restore reuse, and notification suppression. Seven focused native ARM64 cases now pass, including a genuinely progressed exit reversal, shutdown visibility suppression, and the new independent Settings toggle.
Live UI Automation against the isolated mock Gateway showed both preferences on and the task-owned mascot after minimizing Workspace. Screenshot capture returned blank images, so visible animation quality is not claimed.
The Hanselman review used
claude-opus-5.5(default context) andgpt-6-astra(long context), both at high reasoning effort. Both reviewed the complete initial headc63a08de306777915c411eb3ebadbd4ffd2292feand the repair deltas throughb722579b00a96bbb21c7c7cd4b3a9fc151489d20. The observed main tip is8ffe470e7d505aec19b6e59593f982c8ac6893ca; the PR comparison base isa912363c971a3ddf79a6f91a8dcf81c486fbb650. These were app-native, read-only source reviews, not helper-isolated runs or independent runtime validation.Both reviewers found weak reversal coverage. Opus alone found shutdown visibility callbacks could reopen the lobster; a new native negative control reproduced the unwanted
falsepublication. Both issues are repaired, with cleanup retained. CI also exposed an existing Settings test's single-row assumption, repaired without weakening the size-picker check. Both reviewers found no new verified defects in the final delta. Opus's speculative animation-snap concern did not justify a production change; the native test now requires an intermediate translation, but visible smoothness remains unproven.Draft / blocked: Final-head build, Shared and Tray checks pass. A wider native attempt failed an untouched shell geometry assertion (
64versus63.999996185302734) and then the test host crashed. That attempt is not passed, and no merge-base reproduction was performed. Visible animation quality, runtime reduced-motion proof and final-head hosted CI remain unverified.Change Type
Scope
winnodeRequired proof pools
windows-winui-interactive: Verify aggregate minimize/restore behavior, visible entrance/exit and reversal, and Windows reduced-motion behavior in the isolated native app.windows-11-arm64: Native ARM64 build and selected window behavior were exercised locally; this is not complete pool or release proof.Validation
Final-head ARM64 build and the required Shared and Tray suites passed.
$artifactsin the commands below names the task-owned session artifact directory. Earlier failures and the wider native failure remain disclosed..\build.ps1: passed, including documentation validation.dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore --logger 'trx;LogFileName=shared.trx' --results-directory $artifacts --verbosity quiet: passed, 5,911 passed / 0 failed / 28 ordinary opt-in skips.dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore --logger 'trx;LogFileName=tray.trx' --results-directory $artifacts --verbosity quiet: passed, 6,758 passed / 0 failed / 0 skipped.dotnet test .\tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj --no-build --no-restore -r win-arm64 --filter 'FullyQualifiedName~WindowManagerRuntimeAnchorTests|FullyQualifiedName~AutomaticHide_ClosesBubbleButRetainsMountedMascotAndDesktopAnchor|FullyQualifiedName~AnimatedRestore_ReversesAProgressedExitWithoutALateHide|FullyQualifiedName~DesktopLobster_HasNamedDisclosureAndIndependentToggleWithNoneditableSizePicker' --logger 'trx;LogFileName=review-final-focused.trx' --results-directory $artifacts --verbosity quiet: passed, 7 passed / 0 failed / 0 skipped. Tests were compiled from the source committed unchanged to the final head.Assert.Empty, with visibility publications[False]; it passes after the repair..\scripts\validate-test-timing-patterns.ps1: passed; unrelated baseline-lowering warnings were not changed.DesktopCompanionTests: 28 passed / 0 failed / 0 skipped in the earlier recorded owner run.git -c core.whitespace=cr-at-eol diff --check: passed before committing.A wider native attempt that also selected
SettingsPageInsetTests.Shell_DeliversFullAndEmbeddedInsetsWithoutMovingBackdropOrReplacingContentaborted. Its unchanged exact-double assertion expected64, received63.999996185302734, and the host subsequently failed. The focused seven-case result does not replace that failed attempt. An initial assertion on the newly expanded toggle also ran before its name binding resolved; the test now waits for loaded/named readiness and retains the strict accessible-name assertion.Earlier Shared attempts at the initial candidate failed: 5,909 passed / 2 failed / 28 skipped (
ConnectAsync_TimedOutRetry_DoesNotDisposeNewerConnectionDuringBackoff,ConnectAsync_ManualFailureBeforeHeaders_CannotSatisfyHeldRetryHealthyPrerequisite); an isolated WebSocket selection failed with 63 passed / 1 failed / 0 skipped (ConnectAsync_NewerFailedAttempt_DoesNotAbandonActiveReconnectLoop). The first full motion attempt had 5,908 passed / 3 failed / 28 skipped (ConnectAsync_TimedOutRetry_DoesNotReplaceNewerConnectionAfterAuthorization,ConnectAsync_WhenUpgradeResponseStalls_TimesOutAndRetries,ConnectAsync_StaleAuthorizationDenial_DoesNotFailNewerConnection). No WebSocket code or tests were changed. These attempts are retained, not treated as passing; the latest full suites above ran freshly at the final head.Real Behavior Proof
Environment tested: Windows ARM64, native Debug WinUI tests with isolated profile overrides. Earlier manual observation used the isolated synthetic
chat-interactiveGateway and disposable profile. No real Gateway/provider or normal user profile was used.PR head or commit tested:
b722579b00a96bbb21c7c7cd4b3a9fc151489d20for the latest full build/Shared/Tray checks. The seven-case native run used candidate-equivalent source compiled before the commit; the recorded patch SHA2567AC6F2E1FED25BEFFCA8AF96AC071CD77D8E0CA7C5D0BE83D7CD481AD43EE7B8matches the committed final test delta. The earlier live mock observation below usedc63a08de306777915c411eb3ebadbd4ffd2292fe, not a fresh final-head launch. No binary provenance attestation is claimed.Exact steps or command run: Run the seven-case native filter in Validation. It hides/closes an owned setup window after
BeginShutdown, reverses a visible exit with strict intermediate mascot translation, observes the restored window for a bounded late hide, and mounts/invokes the named Settings toggle. Earlier manual steps were to enable the master lobster toggle in the synthetic fixture, confirm minimized-only was already on, and minimize Workspace.Evidence after fix: Native TRX reports
7 passed / 0 failed / 0 skipped, including the explicitly animation-enabled reversal case. Historical copied live UI Automation output:Observed result: Current-source native tests confirm no shutdown visibility publications, a progressed reversal with no later hide, mounted-control/anchor retention, aggregate setup-window visibility, and the mounted Settings toggle. The historical mock observation exposed the task-owned mascot after minimizing Workspace. Native state is not rendered pixel or smoothness proof.
Screenshot or artifact links verified? (
Yes/No/N/A): N/A. No public media or local-only artifact links are presented as reviewable evidence.Not verified or blocked: Visible animation quality (earlier computer-use captures were blank), runtime reduced-motion changes, complete accessibility/pool proof, and final-head hosted CI. Native Settings assertions do not prove view-model persistence; managed coverage owns that boundary. The wider shell-geometry failure and subsequent host crash remain disclosed, without a merge-base comparison. The earlier private-desktop lobster test could not initialize because existing
IsShownInSwitchersbehavior returnedE_NOTIMPL; normal-desktop selected native cases passed. The two independent source reviews do not satisfy these runtime gaps.Security Impact
Yes/No): NoYes/No): NoYes/No): NoYes/No): NoYes/No): NoYes, explain the risk and mitigation: N/ACompatibility and Migration
Yes/No): YesYes/No): Yes. Adds persistedDesktopCompanionOnlyWhenMinimized, defaulting to true when absent.Yes/No): NoReview Conversations