Skip to content

fix(macos): use personal identity for team dashboards - #137933

Merged
steipete merged 15 commits into
mainfrom
codex/mac-team-profile-identity
Sep 4, 2026
Merged

steipete merged 15 commits into
mainfrom
codex/mac-team-profile-identity

Conversation

@steipete

@steipete steipete commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

Closes #137916

What Problem This Solves

Opening a Team dashboard through the macOS app could show Owner instead of the signed-in person. The embedded dashboard reused the native SSH/shared-credential connection, which authenticates the machine as the Gateway owner. The authenticated Gateway hello now advertises an eligible HTTPS personal sign-in URL. The Mac opens that URL without native tokens, passwords, or TLS pins, clears a previously cached shared token, and lets normal Team sign-in establish the person's profile.

Native RPC and Quick Chat retain their separate machine identity. Shared-secret gateways retain their supported dashboard flow. No configuration option, database/schema change, or protocol-version bump is introduced.

Implementation

Identity discovery belongs to the serving ingress: configured HTTPS for trusted-proxy authentication, or the lifecycle-owned hostname of an active managed Tailscale Serve route. Generic public origins, stopped routes, and Funnel do not establish personal authentication. The existing published-route record also supplies MCP links. Withdrawing or replacing a Serve claim retires the connections that received that exact lifetime, using the existing reconnect close code; old cleanup cannot revoke its replacement.

Native scripts, metadata, callbacks, and commands are constrained to the current dashboard origin, mount, route lease, and document generation. HTTPS sign-in redirects remain in the window, and native commands wait for the actual dashboard listener. Recovery preserves later navigation, notifications, and pending picker commands. Closing a window retires its pending lookup even if the same native shell reopens; other primary windows remain independent. Network and explicit failures share one action-retirement policy.

Saved-profile windows observe their own native connection. A fresh hello reconciles that profile's windows, while profile revisions fence retired announcements and delayed work. Existing reconciliation preserves unchanged documents and later selections. Discovery and observation share one awaited connection provider. Cosmetic relabeling would hide the attribution problem; an admin-only configuration probe would exclude read-only operators and could advertise an inactive route.

Validation

Required CI 33882899608 passed on signed head ab76a915d5dc23a963e82fa8fc3d4fad8465419a, attempt 2. The required aggregate check passed at 15:29 UTC. All 132 executed prerequisite jobs passed, including Mac Release, 1,629 shared Swift tests, 2,101 Mac app tests, IPC/CLI, core/browser checks, iOS Release, lifecycle/UI, Watch, and screenshots. Six jobs were skipped according to the existing PR scope.

The first attempt completed its core/browser/screenshots work, but the two Blacksmith Mac jobs never received runners. Its iOS logic suites passed 321 lifecycle and six voice tests; Xcode then timed out launching the app for the UI case before its assertions. After all active jobs finished, the supported partial retry preserved successful jobs, moved Mac phases to hosted runners, and reran the failed iOS job. Mac tests and the complete iOS retry passed without further source or deadline changes.

The previous branch validation 33870230433 passed all Mac, shared, IPC/CLI, Linux, Windows, Android, browser, and mobile checks at 87637. The PR-attached run 33870230930 instead tested merge 0a8f8d7f into main 72a1d6f: it exposed the already-repaired Code Mode fixture, one PowerShell process startup timeout before completion code ran, and a blocking wait in the Mac stderr fixture. All other lanes passed, including iOS and screenshots.

The stderr fixture now suspends through its existing async wait helper instead of blocking the executor needed by cleanup. Its original two-second limits, zero-time check, and drain/cancellation assertions remain. The failing CI captured the original timeout; formatting, strict lint, and independent P0–P2 review pass for the correction (test-only +9/-9, production zero). The final hosted run passes both stderr cases and the complete native suites.

Focused hello/startup, shell/settings, and native-shell suites passed (37, 57, and 38 tests). Ingress/lifecycle/MCP coverage passed 52 cases; three real-WebSocket withdrawal regressions failed before the lifetime repair, then all 65 owner/sibling cases passed, followed by the strengthened 31-case hello suite. Tailscale itself is a fixture here, not a live Tailnet proof.

Hosted differential tests cover window close, saved-profile hello withdrawal/replacement, delayed discovery completion, pending picker commands, and close/reopen of the same native shell. The frozen saved-profile reproduction failed six assertions only in its new reconnect test (before); the final delayed-completion reproduction failed all seven intended assertions (before). The repaired cases pass in final CI. Two task-owned tests now hold the existing global-state isolation lock; assertions and deadlines are unchanged, with no production delta.

Pinned strict Swift lint/format, native strings, core production/test types, core lint, and ownership guards passed. Independent Codex review has no remaining accepted P0–P2 findings. Synthetic Chromium proof verifies a named footer, no outgoing shared credentials, actual native search, listener teardown, and zero page errors.

Deployment-stage live validation: the canonical Team deployer accepts merged main, so its new hello cannot be exercised before merge without an unsupported overlay. For this authorized fix-and-land, the acting maintainer accepts personal sign-in verification after canonical deployment and signed Mac restart in this task, before declaring completion. Synthetic proof is not represented as live SSO. The latest ClawSweeper review at 15:40 UTC covers exact head ab76 and found no correctness/security defect. Deployment validation and recovery owner: @steipete, through this authorized maintainer task. The acting maintainer accepts canonical deployment followed by Developer ID-signed Mac installation, personal-footer and native-command verification, and a redacted result before task completion. If personal browser identity fails, restore the backed-up signed Mac app and use only the canonical deployment owner's supported recovery; continue the repair before reporting completion. The +419 production lines are accepted because the reviewed ingress, credential, profile, and window-lifetime boundaries cannot be removed without losing the required isolation. The remaining optional rank-up move is the planned signed-Mac result after deployment.

Synthetic before/after (no real accounts, chats, or Gateway details):

Shared credential dashboard Personal browser identity
Before: Owner After: named operator

Scope and follow-ups

Production: +709/-290 (net +419); tests/support: +1400/-117 (net +1283); generated Swift +4; native string inventory +2/-1; docs +23. Growth establishes personal browser authentication, native document isolation, route lifetime invalidation, and independent profile observation. Existing discovery, subscription, and reconciliation owners are reused; no configuration RPC, retry loop, or separate discovery cache is introduced. Protocol and macOS docs describe the new behavior.

Unchanged CI fixtures exposed separate follow-ups: Cron mock socket event delivery, Android foreground-service observation of late HTTP arrival, Windows stalled-download diagnostics, and competing tooltip/drawer Escape handling. Those lanes passed subsequent runs; unchanged heartbeat tests also passed all 26 cases in their original order after a CI timeout. No speculative production patch or larger deadline was added. An unchanged iOS Watch receipt-recovery test initially missed its two-second polling deadline while the old canceled transfer was still draining. One focused rerun passed both cases in 0.123 seconds and completed every remaining mobile check. Buffered arrival signaling in that polling fixture remains a named follow-up; no dropped production resume was demonstrated.

The native merge guard requires the PR-attached check; a green manual branch validation does not replace it. The refreshed required run passed on the updated integration. No gate override is used. Native source verification passes after regenerating the merged inventory; full generated-locale parity still reports pending translations, including the new recovery text, and remains with the existing translation-generation workflow.

@clawsweeper

clawsweeper Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: macos App: macos app: web-ui App: web-ui gateway Gateway runtime size: XL maintainer Maintainer-authored PR labels Sep 4, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 4, 2026
@clawsweeper

clawsweeper Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 4, 2026, 11:40 AM ET / 15:40 UTC.

ClawSweeper review

What this changes

The PR makes remote macOS dashboards use a verified personal browser identity instead of shared Gateway credentials when a safe public identity ingress is available.

Regression provenance

Possible regression — probable (reproduction; reviewed change). No predecessor PR is attributed.

Merge readiness

⛔ Blocked before merge - 4 items remain

The PR remains necessary and its identity-routing and lifecycle boundaries are internally coherent; no introduced correctness or security defect was found. A release owner should explicitly accept deployment-stage signed-Mac Team sign-in verification before merge.

Priority: P1
Reviewed head: ab76a915d5dc23a963e82fa8fc3d4fad8465419a
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The implementation and boundary coverage are strong, while real signed-Mac Team identity behavior remains to be recorded after deployment.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: Automated and synthetic evidence supports the patch; the remaining signed-Mac Team observation is a deployment-stage maintainer check, not an external-contributor proof requirement.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Automated and synthetic evidence supports the patch; the remaining signed-Mac Team observation is a deployment-stage maintainer check, not an external-contributor proof requirement.
Evidence reviewed 6 items Gateway identity owner: The resolver permits trusted-proxy origins or a live Tailscale Serve claim only, and never advertises Funnel as a personal-identity ingress.
Route lifetime is enforced: Operator hello records the identity URL immediately before delivery and closes connections when the associated Serve route is withdrawn.
macOS credential separation: The dashboard selects a browser-identity authentication mode without a token or password and suppresses native TLS parameters for that route.
Findings None None.
Security None None.

How this fits together

The Gateway advertises a credential-free identity URL to authenticated operator clients. The macOS dashboard opens that URL for browser sign-in while native device operations remain on the existing Gateway connection.

flowchart LR
  A[Remote macOS dashboard] --> B[Authenticated Gateway connection]
  B --> C[Identity ingress resolution]
  C --> D[Credential-free HTTPS URL]
  D --> E[Browser personal sign-in]
  E --> F[Personal dashboard identity]
Loading

Decision needed

Question Recommendation
Is canonical-deployment signed-Mac Team personal-identity verification, with an accountable rollback owner, acceptable instead of staged pre-merge SSO proof? Accept deployment-stage verification: Merge with a named owner for a redacted signed-Mac Team sign-in observation and rollback if personal identity is not used.

Why: The source and regression coverage support the patch, but the actual Team identity ingress requires deployment-specific signed-app evidence unavailable in this read-only checkout.

Before merge

  • Resolve merge risk (P1) - The authentication path changes from shared device credentials to browser identity; real signed-Mac Team SSO behavior is planned for canonical deployment rather than independently demonstrated before merge.
  • Resolve merge risk (P1) - The bug fix adds a net 419 production lines across Gateway, protocol, macOS, and Control UI ownership boundaries; the added lifecycle enforcement is justified, but it merits explicit release-owner acceptance.
  • Complete next step (P2) - Confirm whether canonical deployment plus redacted signed-Mac Team sign-in verification is acceptable before merge.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
Agent review details

Security

None.

PR surface

Source +87, Tests +334, Docs +23, Other +1286. Total +1730 across 32 files.

View PR surface stats
Area Files Added Removed Net
Source 9 128 41 +87
Tests 5 364 30 +334
Docs 2 23 0 +23
Config 0 0 0 0
Generated 0 0 0 0
Other 16 1623 337 +1286
Total 32 2138 408 +1730

Review metrics

Metric Value Why it matters
Production and test delta production +709/-290; tests/support +1400/-117; docs +23 The production growth implements identity ingress and lifecycle isolation; its authentication-route impact requires release validation.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #137916
Summary: This PR is the candidate fix for the reported macOS remote-dashboard identity issue.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Accept deployment-stage validation (recommended)
    Merge only with explicit ownership for a redacted signed-Mac Team sign-in check and rollback if the browser identity route fails.
  2. Require staged identity proof
    Pause until a representative signed-app Team identity flow is observed before landing.

Technical review

Best possible solution:

Obtain explicit release-owner acceptance of the canonical post-deployment signed-Mac Team sign-in check and rollback ownership before merge.

Do we have a high-confidence way to reproduce the issue?

Yes—source shows the prior remote dashboard path used shared credentials, and the issue supplies an observed signed-macOS reproduction; this read-only review did not execute it locally.

Is this the best way to solve the issue?

Yes—the PR preserves native device access while using a validated credential-free public ingress for personal browser identity.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 407a8f453c0f.

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦞 diamond lobster.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.

Label justifications:

  • P1: The PR repairs personal identity and message attribution for remote team macOS dashboards.
  • merge-risk: 🚨 auth-provider: Merging switches eligible remote dashboards from shared native credentials to browser-authenticated personal identity.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Automated and synthetic evidence supports the patch; the remaining signed-Mac Team observation is a deployment-stage maintainer check, not an external-contributor proof requirement.

Evidence

Acceptance criteria:

  • [P1] After canonical deployment, open the signed macOS app against a Team Gateway with a verified browser identity and confirm personal footer and message attribution without a shared native token.

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Record the planned redacted signed-Mac Team personal-identity result after canonical deployment.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (10 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-04T06:09:02.783Z sha 2e643bd :: blocked before merge. :: [P1] Bind browser identity URLs to the actual identity ingress
  • reviewed 2026-09-04T09:30:55.556Z sha 5e8273a :: blocked before merge. :: [P1] Withdraw browser identity URLs when Serve exits
  • reviewed 2026-09-04T09:40:30.956Z sha 5e8273a :: blocked before merge. :: [P1] Withdraw cached browser identity after Serve exit
  • reviewed 2026-09-04T10:24:30.702Z sha a033926 :: blocked before merge. :: [P1] Await the profile fleet lookup
  • reviewed 2026-09-04T11:12:51.025Z sha ca9133a :: blocked before merge. :: none
  • reviewed 2026-09-04T12:08:02.148Z sha 87637cc :: blocked before merge. :: none
  • reviewed 2026-09-04T13:41:29.182Z sha 87637cc :: blocked before merge. :: none
  • reviewed 2026-09-04T14:50:59.146Z sha ab76a91 :: blocked before merge. :: none

@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 4, 2026
@steipete

steipete commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The identity URL now comes from the active identity ingress. Managed Tailscale Serve uses its lifecycle-owned published hostname; a generic public origin is no longer accepted as proof of Tailscale identity. The same route record serves MCP links, and hello samples it immediately before delivery. Five mismatch/withdrawal regressions failed before the repair; all 52 focused Gateway/lifecycle/MCP tests now pass.

Hosted native testing also exposed asynchronous dashboard recovery ordering and outdated synchronous fixtures. Recovery now retires only its captured older navigation intent when the document changes, while later notifications queue for the successor in the same window. Independent reviews found no actionable P0–P2 findings in either correction. The PR body records exact proof, scope, and the same-task signed-app validation after canonical main deployment.

@clawsweeper

clawsweeper Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@steipete
steipete force-pushed the codex/mac-team-profile-identity branch from d3f4113 to 5e8273a Compare September 4, 2026 09:10
@steipete

steipete commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Final head is 5e8273a6f73e00a3ebc605bc8c0fbff0403a7ee4. The advertised identity URL now comes from the active ingress owner, with mismatch and route-withdrawal regressions passing. Hosted before/after proof also confirms the window-close cancellation repair. The PR body records the signed-app verification after canonical deployment and the production/test LOC split.

The branch was refreshed onto current main to include the existing Browser cleanup repair; all eight task commits remained patch-identical through rebase. The exact original unmocked 14-case Gateway regression now passes with unchanged deadlines. Final exact-head CI is running at https://github.com/openclaw/openclaw/actions/runs/33857055937.

@clawsweeper

clawsweeper Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added the merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. label Sep 4, 2026
Open remote identity-authenticated dashboards at the verified public browser ingress without native shared credentials or TLS pins. Keep native bridges scoped to the dashboard and queue shortcuts until its shell listeners are ready. Fixes #137916.
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 4, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Sep 4, 2026
@steipete
steipete merged commit 0d2bc80 into main Sep 4, 2026
342 of 349 checks passed
@steipete
steipete deleted the codex/mac-team-profile-identity branch September 4, 2026 16:29
@steipete

steipete commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

@steipete

steipete commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Post-merge deployment validation: the canonical deployment owner accepted a main revision containing this fix, with exit 0, no activation journal, and unchanged approval policy. Independent serving/build, RPC, channel, and health checks passed. The live authenticated operator.read hello advertises the personal HTTPS dashboard origin while withholding admin-only auth metadata.

A Developer ID-signed Release app built from the merged commit has been installed and restarted. The real app now reaches the personal GitHub sign-in flow. Final personal-footer and authenticated native-command verification are waiting on the user's one-time sign-in in the embedded browser; they are not yet claimed as passed.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 5, 2026
* fix(macos): use personal identity for team dashboards

Open remote identity-authenticated dashboards at the verified public browser ingress without native shared credentials or TLS pins. Keep native bridges scoped to the dashboard and queue shortcuts until its shell listeners are ready. Fixes openclaw#137916.

* fix(macos): align identity bridge lint and native strings

* refactor(ui): remove native readiness type assertions

* fix(gateway): advertise the active browser identity ingress

Use the live managed Serve origin for personal browser authentication and withdraw it with its route claim. Keep trusted-proxy public origins separate, reuse the existing published-route lifecycle for MCP links, and sample identity metadata immediately before hello delivery.

* fix(macos): preserve navigation during identity recovery

* test(macos): reproduce closed identity presentation race

* fix(macos): retire identity presentation when its window closes

* fix(gateway): retire stale browser identity connections

* test(macos): reproduce saved profile identity reconnects

* fix(macos): follow saved profile identity reconnects

* test(macos): reproduce stale identity discovery completion

* fix(macos): scope identity completion to live windows

* test(macos): isolate dashboard identity connection modes

* test(macos): await driver stderr cleanup without blocking
RomneyDa pushed a commit that referenced this pull request Nov 5, 2026
* fix(macos): preload dashboard after remote gateway authentication

- Launch preload arms a one-shot remote preload when the synchronous
  local-only config is unavailable in remote mode.
- The armed preload starts when the control channel reports connected and
  resolves the primary dashboard through the hello-gated
  windowConfiguration(for: .primary), so remote identity dashboards never
  receive pre-hello native credentials (keeps the #137933 local-only guard).
- The preload is discarded once the user opens a dashboard, a presentation
  is in flight, an explicit main window open is in flight, the
  main target is not primary, or the mode leaves remote.
- New-window presentation honors present: false so the preload stays hidden
  and records the presented endpoint for reuse on the first open.
- DashboardRemotePreloadDecision is pure logic with unit tests.
- DashboardRemotePreloadTests cover reuse of the hidden document on the
  first open and both open-versus-preload orderings, through a DEBUG-only
  control channel override and arming hook.

* fix(macos): retain the hidden remote dashboard preload

- A newly created main controller presented with present: false is
  marked experience-hidden before its document loads, so
  hasRetainedWindow is true, native sign-in challenges are answered and
  endpoint changes reconcile it before the first open.
- show() and windowWillClose still end that hidden lifetime.
- preloadIfConfigured() returns its task and arms the remote preload on
  connectionMode == .remote; its only caller is the shared manager.
- The DEBUG-only _testArmRemotePreload() is removed; tests drive
  preloadIfConfigured() in remote mode after onboarding.
- New test: the hidden remote preload follows an endpoint change before
  the first open.
- The remote preload test helper creates NSApplication.shared, so each
  test runs alone without relying on test order.

* fix(macos): keep the hidden dashboard preload out of window counts

- DashboardWindow.isUnshownPreload is set by retainHidden() and cleared
  by show().
- openWindowCount(for:) skips an unshown preload, so the Gateways menu
  card does not read "1 window" while nothing is on screen.
- The flag lives on the window, so it survives an endpoint change that
  replaces the controller.
- Remote preload tests assert count 0 while hidden, 1 after show() and
  0 after an endpoint change.

* test(macos): prove native challenges on the hidden remote preload

- New DashboardRemotePreloadTests case drives a real WK native challenge
  into the hidden preloaded document: answered while current, refused
  after socket retirement, document recommit or a mid-flight browser
  identity switch, and never reaches the provider for a browser
  identity document. The preload stays hidden throughout.
- Remove DashboardRemotePreloadDecisionTests: it mirrored the decision
  enum's guards; the manager suite covers the observable behavior.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 5, 2026
)

* fix(macos): preload dashboard after remote gateway authentication

- Launch preload arms a one-shot remote preload when the synchronous
  local-only config is unavailable in remote mode.
- The armed preload starts when the control channel reports connected and
  resolves the primary dashboard through the hello-gated
  windowConfiguration(for: .primary), so remote identity dashboards never
  receive pre-hello native credentials (keeps the openclaw#137933 local-only guard).
- The preload is discarded once the user opens a dashboard, a presentation
  is in flight, an explicit main window open is in flight, the
  main target is not primary, or the mode leaves remote.
- New-window presentation honors present: false so the preload stays hidden
  and records the presented endpoint for reuse on the first open.
- DashboardRemotePreloadDecision is pure logic with unit tests.
- DashboardRemotePreloadTests cover reuse of the hidden document on the
  first open and both open-versus-preload orderings, through a DEBUG-only
  control channel override and arming hook.

* fix(macos): retain the hidden remote dashboard preload

- A newly created main controller presented with present: false is
  marked experience-hidden before its document loads, so
  hasRetainedWindow is true, native sign-in challenges are answered and
  endpoint changes reconcile it before the first open.
- show() and windowWillClose still end that hidden lifetime.
- preloadIfConfigured() returns its task and arms the remote preload on
  connectionMode == .remote; its only caller is the shared manager.
- The DEBUG-only _testArmRemotePreload() is removed; tests drive
  preloadIfConfigured() in remote mode after onboarding.
- New test: the hidden remote preload follows an endpoint change before
  the first open.
- The remote preload test helper creates NSApplication.shared, so each
  test runs alone without relying on test order.

* fix(macos): keep the hidden dashboard preload out of window counts

- DashboardWindow.isUnshownPreload is set by retainHidden() and cleared
  by show().
- openWindowCount(for:) skips an unshown preload, so the Gateways menu
  card does not read "1 window" while nothing is on screen.
- The flag lives on the window, so it survives an endpoint change that
  replaces the controller.
- Remote preload tests assert count 0 while hidden, 1 after show() and
  0 after an endpoint change.

* test(macos): prove native challenges on the hidden remote preload

- New DashboardRemotePreloadTests case drives a real WK native challenge
  into the hidden preloaded document: answered while current, refused
  after socket retirement, document recommit or a mid-flight browser
  identity switch, and never reaches the provider for a browser
  identity document. The preload stays hidden throughout.
- Remove DashboardRemotePreloadDecisionTests: it mirrored the decision
  enum's guards; the manager suite covers the observable behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: macos App: macos app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(macos): team dashboard uses shared Owner instead of personal identity

1 participant