Skip to content

refactor(ios): move app settings into the Dashboard and keep Gateway native - #139514

Merged
steipete merged 9 commits into
mainfrom
steipete/ios-settings-into-dashboard
Sep 7, 2026
Merged

steipete merged 9 commits into
mainfrom
steipete/ios-settings-into-dashboard

Conversation

@steipete

@steipete steipete commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

iOS Settings duplicated preferences and Gateway management screens already owned by the Dashboard. This moves those surfaces into the embedded Dashboard while preserving native connection setup, offline recovery, and device authorization. The Apple apps share one public device-settings contract in OpenClawKit.

Also fixes the reported iOS Simulator test-host crash when the failed-provisional-navigation test released a directly constructed WKNavigation. The fixture now obtains a genuine navigation handle from WebKit while preserving the existing committed page and upgrade-warning assertion.

Dependency #139492 is merged at 5413688330fa0e6591c7861f4a214aa313a5c36f. Its native embed presentation and iOS device-contract support are verified on main. The macOS foundation landed in #137971 / #138092.

Why This Change Was Made

SettingsHubScreen owns the native navigation stack. Connected operators with operator.admin see the Gateway's /settings page; disconnected, limited-access, demo, and screenshot sessions retain native Gateway controls and the Device section. Dashboard presentation has one owner, while native code continues to own device preferences, OS permission prompts, and connection recovery.

The optional WebKit bridge accepts only the hosting web view's trusted Gateway main frame. It checks origin, base path, document identity, authentication inputs, and current operator-authority generation. Requests are serialized; retiring a document rejects its replies, and asynchronous work revalidates authority before effects. Sensitive enables retain native confirmation with Cancel as the default. Existing web-view consumers keep the bridge and embed mode disabled by default.

The takeover's lifecycle review also repaired two demonstrated gaps:

  • Location authorization retains independent waiters, so a replacement Dashboard request cannot overwrite and orphan a retired request's continuation.
  • HealthKit checks current authority and initiates the callback API synchronously on the main actor, retaining its store through completion. Native errors and false completion fail; the post-completion authority check remains in place.

EventKit stores similarly survive already-started prompts, while retired results cannot apply preferences, refresh registration from that result, or publish replies. Committed capability changes still refresh registration when the initiating document retires during snapshot reading.

User Impact

This iPhone / This iPad provides appearance, notifications, camera, keep-awake, available Health summaries, device permissions, and native panels. Talk exposes the device's Voice Wake, Talk mode, Talk button, background listening, and speakerphone controls. Precise Location remains read-only OS status with an Open Settings action. macOS wire fields, required nullable device.profileName, and existing explicit null values remain compatible; optional iOS metadata, statuses, and panels extend the shared contract.

The duplicate native Channels, Skills, settings chat, Voice & Talk, Permissions, Privacy, Notifications, and Appearance screens are retired, along with their exclusive presentation helpers/tests. Activity, Workboard, Skill Workshop, Usage, Automations, and Dreaming open their existing Dashboard routes with the same admin gate and connection fallback. iPad Instances opens /settings/devices, the Dashboard owner of paired nodes and connected clients; a dedicated presence page remains a Dashboard follow-up.

Gateway/pairing, pending approvals, Apple Watch, Diagnostics, Licenses, About, Chat, Sessions, Files, Overview, Desktop, Terminal, Docs, and agent selection remain native. Notification guidance opens Dashboard delivery or permissions in a dismissible sheet without replacing the underlying approvals screen. The App Store Settings capture again uses the shared native Gateway target; Watch delivery keeps its separate Settings fallback target.

Accepted upgrade behavior and review dispositions

The Gateway must serve the companion Dashboard pages. A loaded Settings document lacking actual embed support or an admitted status request after five seconds shows an upgrade warning and Open Gateway recovery. Native Gateway and offline Device controls remain reachable. Late support clears the warning, retired documents cannot affect replacements, and failed provisional navigation preserves the committed page's warning. This is the coordinated-upgrade contract accepted for the Mac transition, with #139492 now landed first.

App-local talk.providerSelection, talk.realtime.voiceSelection, and talk.speechLocale overrides no longer supersede Gateway Talk configuration. The obsolete speech-language key is cleared; the Gateway's talk.speechLocale remains supported, and explicit speech directives retain their behavior. The saved app-group share.defaultInstruction is cleared at launch and its owner removed; shares use the explicit instruction for that share. These retirements and the Dashboard upgrade requirement are documented in docs/platforms/ios.md.

No openclaw.json keys, SQLite schemas, or serialized data models change. Native source inventory is regenerated; generated locale catalogs are excluded. Obsolete shared Skills/system-agent presentation helpers were removed after caller and history review; live Skills status models, composer capabilities, Mac execution trust, web routes, and Gateway protocol types remain.

The dead-code scan also exposed main's #141003 bug: inferred nonoptional StartLiveVoiceIntent.description shadowed AppIntent's optional protocol requirement, so framework consumers received nil. An explicit IntentDescription? witness restores Siri/Shortcuts metadata without changing voice execution.

Evidence

  • The standalone same-runtime crash probe reproduces the original CFRetain / WKNavigation dealloc SIGTRAP with direct construction; ten WebKit-created handles release successfully. The formerly crashing Settings test passes.
  • Final native integration at 95eba7ec58b: 89 simulator tests in eight suites pass, including Settings navigation, permission initiation/lifetime, Location callbacks/ordering, Health, and main's retained Talk authority regressions. The crash case passed in 6.230 seconds.
  • Complete changed-file gate: 1,130 selected tooling/unit tests pass, both TypeScript lanes, native lint, and native state-schema checks. Native localization verifies 3,778 entries. A frozen install corrected stale local fs-safe 0.8.1 dependencies to the already-pinned 0.8.3; no source or dependency pin changed for that environment failure.
  • Actual LocationService and request-queue code compiled against synthetic platform APIs reproduces the original continuation leak; both waiters complete after the same callback with the fix. Real iOS SDK Swift compiler output proves the former HealthKit executor hop and the repaired synchronous main-actor initiation. These are boundary/compiler probes, not live OS permission-grant claims.
  • Permission initiation tests exercise retired documents, lost operator authority, canceled work, in-flight completion, authorized initiation, and retained native stores. The unfenced implementation failed 13 assertions in the rejection scenarios. Preference-retirement regressions failed before their repairs.
  • AppIntent metadata regression through any AppIntent.Type fails on the original source; the corrected witness passes all 11 app-delegate tests. Strict fresh-index Periphery returns no findings with unchanged scan/retention settings. Focused checks, localization, and independent review through P2 pass.
  • Earlier implementation proof covered shared-kit and iOS consumer suites, both mandatory iPhone Settings/Watch UI tests, rendering and source guards, native formatting, and shared protocol tests. The integrated crash fixture, Health owner, Web coordinator, and bridge retain their reviewed bytes. Location incorporates main's shared completion helper; retained Talk tests use the canonical API. Companion feat(ui): add native embed mode and phone-width settings pages #139492 contains the inspected phone/tablet web layout and navigation proof.
  • Full source review and the final permission and metadata deltas received independent clean reviews through P2. ClawSweeper's review of 68c3218d90b reports no actionable correctness or security finding; the accepted upgrade/preferences dispositions are recorded above.

Final candidate: 68c3218d90ba12d6419605809ac395717c08b9f9, rebased onto main e3e2953f4b9a3ef1cd0568763c74c42f33067410. All native task patches, including the crash, permission, and AppIntent fixes, are unchanged. Main's shared chat transport extraction is retained. Native localization still verifies with 3,778 entries; range-diff and whitespace checks pass. Shared web settings documentation exactly matches main's landed companion. Final CI 34113113522, attempt 2 passed on 68c3218d90ba12d6419605809ac395717c08b9f9; the required openclaw/ci-gate succeeded at 11:29:20 UTC on September 7. The iOS build/lifecycle tests, macOS Swift tests, and iOS, macOS, and both-platform shared-kit Periphery scans all passed.

The first attempt had 83 passing jobs. A failed-jobs-only retry cleared an unchanged CLI fixture startup race, the planner stress-test timeout, and Android lint reaching its 20-minute job limit after unit tests passed. The CLI child had exited but its fixture still awaited a later phase marker; this is recorded as a separate harness follow-up. The same planner source also passed locally in 55.75 seconds. No source, assertions, timeouts, or CI configuration changed for these retries.

The earlier CI run 34108411766 hit an inherited Telegram max-lines failure, a tooling-planner stress-test timeout, and Android's 20-minute job limit during lint after unit tests passed. Main independently fixed the Telegram issue in #141139 / 908e5441f456ae327f059601b87a8b78ac32a395. This rebase includes main's fix; there is no Telegram diff in this PR. No limits or assertions were weakened. The same native metadata code already passed iOS Periphery 34108411720; current-head hosted checks will supply final proof.

Earlier green runs are historical proof: 34105199307 covers 95eba7ec58b; 34020687018 covers 18160459223. The latter needed one identical-head retry for an unchanged macOS fake-server timing failure. No timeout or assertion was changed.

Inspected synthetic upgrade-banner proof

These captures show a task-owned HTML fixture and the native UI. WebKit's viewport is composited with the native view hierarchy.

Before: synthetic older Dashboard without the warning

After: native upgrade banner and Gateway recovery button

Older Gateway: native upgrade warning with Open Gateway recovery

No release or App Store upload is part of this PR.

@clawsweeper

clawsweeper Bot commented Sep 5, 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: ios App: ios app: macos App: macos size: XL maintainer Maintainer-authored PR labels Sep 5, 2026
@steipete
steipete force-pushed the steipete/ios-settings-into-dashboard branch from 4ab3279 to c125248 Compare September 5, 2026 23:36
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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. labels Sep 5, 2026
@clawsweeper

clawsweeper Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 7, 2026, 6:54 AM ET / 10:54 UTC.

ClawSweeper review

What this changes

Moves iOS settings and management screens into the embedded Dashboard, shares the Apple device-settings contract, preserves native connection recovery and authorization, and corrects Shortcuts description metadata.

Merge readiness

⛔ Blocked before merge - 3 items remain

The iOS work remains necessary, and no actionable introduced defect was found. The merged Dashboard companion satisfies the previously recorded dependency; the accepted upgrade and preference-retirement decisions do not require another decision.

Priority: P2
Reviewed head: 68c3218d90ba12d6419605809ac395717c08b9f9

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A coherent settings consolidation with focused lifecycle coverage, explicit upgrade dispositions, and no actionable correctness finding.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-authored PR is exempt from ordinary contributor proof. Source inspection found no unresolved authority violation requiring exceptional final-effect proof; reported native simulator and compiler probes remain supporting evidence, while synthetic screenshots do not establish authorization behavior.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored PR is exempt from ordinary contributor proof. Source inspection found no unresolved authority violation requiring exceptional final-effect proof; reported native simulator and compiler probes remain supporting evidence, while synthetic screenshots do not establish authorization behavior.
Evidence reviewed 10 items Pinned introduction and merge identity: The complete local merge-base-to-head file list restores the truncated supplied inventory. The test merge has the pinned main parent followed by the exact PR head; its comparison introduces no extensions, workflow, root package, or lockfile changes.
Current main still needs the native integration: Pinned main still constructs SettingsProTab directly for iOS Settings. The branch introduces SettingsHubScreen and the native device bridge, so the companion web implementation does not supersede this PR.
Companion dependency is on main: Supplied GitHub metadata verifies #139492 merged at this SHA. Local ancestry confirms inclusion in pinned main; the web contract and shared settings documentation are unchanged between main and this branch.
Findings None None.
Security None None.

How this fits together

The iOS app embeds settings pages served by the connected Gateway. A native bridge handles device preferences and permission prompts, while native screens retain connection setup and recovery.

flowchart TD
  A[iOS Settings navigation] --> B{Connected admin session}
  B -->|Yes| C[Embedded Gateway Dashboard]
  B -->|No| D[Native Gateway and Device screens]
  C --> E[Document and authority checks]
  E --> F[Native consent and permission owners]
  F --> G[Device preferences and status]
  G --> C
  C -->|Older Dashboard| D
Loading

Before merge

  • Resolve merge risk (P1) - Users connected to older Gateways cannot use the replacement app-settings editor until upgrading the Gateway; the native warning and connection recovery implement the accepted coordinated-upgrade contract.
  • Resolve merge risk (P1) - Existing app-local Talk overrides and default share instructions stop applying; these intentional preference retirements are documented and accepted in the PR body.
  • Review config compatibility - Confirm compatibility and upgrade impact for the changed config or default surface before merge.
Agent review details

Security

None.

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Preference retirement 4 app-local overrides retired; 2 stored keys cleared Provider, voice, speech-language, and share-instruction behavior changes are explicit upgrade semantics rather than incidental UI cleanup.

Stored data model

Persistent data-model change detected: unknown-truncated-pull-files. Migration or upgrade compatibility proof is recorded; maintainers should verify it before merge.

Merge-risk options

Maintainer options:

  1. Retain the accepted coordinated upgrade (recommended)
    Land with the companion Dashboard requirement, native recovery, and documented preference retirements already accepted in the PR discussion.

Technical review

Best possible solution:

Keep Dashboard presentation and native device authorization under their respective owners, retaining the documented coordinated-upgrade behavior and native connection recovery.

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

Not applicable to the primary settings consolidation; current main's native Settings path establishes the existing behavior, and no blocking introduced defect was identified.

Is this the best way to solve the issue?

Yes. Reusing the landed Dashboard pages and existing native permission owners removes competing settings implementations while preserving the accepted recovery and compatibility boundaries.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 0015b209956c.

Labels

Label justifications:

  • P2: This is a bounded native settings consolidation with documented compatibility effects and no demonstrated urgent regression.
  • merge-risk: 🚨 compatibility: The new app requires companion Dashboard support and intentionally stops honoring four existing app-local overrides.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored PR is exempt from ordinary contributor proof. Source inspection found no unresolved authority violation requiring exceptional final-effect proof; reported native simulator and compiler probes remain supporting evidence, while synthetic screenshots do not establish authorization behavior.

Evidence

What I checked:

  • Pinned introduction and merge identity: The complete local merge-base-to-head file list restores the truncated supplied inventory. The test merge has the pinned main parent followed by the exact PR head; its comparison introduces no extensions, workflow, root package, or lockfile changes. (775f227e833d)
  • Current main still needs the native integration: Pinned main still constructs SettingsProTab directly for iOS Settings. The branch introduces SettingsHubScreen and the native device bridge, so the companion web implementation does not supersede this PR. (apps/ios/Sources/RootTabs.swift:411, 0015b209956c)
  • Companion dependency is on main: Supplied GitHub metadata verifies feat(ui): add native embed mode and phone-width settings pages #139492 merged at this SHA. Local ancestry confirms inclusion in pinned main; the web contract and shared settings documentation are unchanged between main and this branch. (5413688330fa)
  • Authority follows the document through effects: Admission checks the hosting main frame, Gateway origin/base path, document availability, authentication inputs, and operator generation. Queued operations recheck authority; consent is revalidated before writes, and retired requests cannot publish replies. (apps/ios/Sources/Settings/DeviceSettings/IOSDeviceSettingsBridge.swift:177, 68c3218d90ba)
  • Permission initiation and retirement coverage: Inspected tests cover disconnected, non-admin, changed-generation, retired-document, cancelled, and authorized initiation cases, plus native-store retention until completion. These use a synthetic EventKit store and are supplemental boundary tests, not live OS permission-grant proof. (apps/ios/Tests/PermissionRequestBridgeTests.swift:45, 68c3218d90ba)
  • Shared wire compatibility: Compared the shared Swift contract with the former Mac owner and inspected the web validator. Contract version 1, required nullable profileName, and explicit Mac null values remain supported; optional iOS fields match the landed web consumer. (ui/src/app/native-device-settings.ts:271, 68c3218d90ba)

Likely related people:

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

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 (16 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-06T05:09:48.303Z sha c1b5551 :: blocked before merge. :: none
  • reviewed 2026-09-06T06:00:03.728Z sha c1b5551 :: blocked before merge. :: none
  • reviewed 2026-09-06T06:13:41.717Z sha c1b5551 :: blocked before merge. :: none
  • reviewed 2026-09-06T07:55:35.337Z sha b113e2eecdff963eed310ce7980ae19ef688d83c :: blocked before merge. :: none
  • reviewed 2026-09-06T08:07:33.506Z sha 1816045 :: blocked before merge. :: none
  • reviewed 2026-09-06T09:21:59.743Z sha 1816045 :: blocked before merge. :: none
  • reviewed 2026-09-07T09:26:10.766Z sha 95eba7e :: blocked before merge. :: none
  • reviewed 2026-09-07T10:10:03.699Z sha 4449705 :: blocked before merge. :: none

@clawsweeper clawsweeper Bot added merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 6, 2026
@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Sep 6, 2026
@steipete
steipete force-pushed the steipete/ios-settings-into-dashboard branch from c6ec6b2 to 22fc01c Compare September 6, 2026 01:30
@steipete
steipete marked this pull request as ready for review September 6, 2026 01:36
@steipete

steipete commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor Author

Fixed in a293d6a: the release Settings screenshot uses the shared Gateway target again. Watch delivery and tablet sidebar coverage retain their separate Settings fallback target. The Fastlane gate now checks the current fallback anchor instead of the retired native system-agent row.

Verified all 35 Fastlane gate tests, both mandatory iPhone 17 UI tests, the targeted changed-file checks, and Codex autoreview. The unrelated macos-node-3 argv0/process-cleanup flake was left unchanged; the new push reruns it.

Rebased onto current main to resolve changes to retired native-screen code; the reviewed iOS fix is unchanged, and the 35-test gate and both UI tests passed again.

@steipete
steipete force-pushed the steipete/ios-settings-into-dashboard branch from 033e6f3 to a293d6a Compare September 6, 2026 02:15
@clawsweeper clawsweeper Bot added 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. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 6, 2026
@steipete
steipete force-pushed the steipete/ios-settings-into-dashboard branch from a762e3a to c1b5551 Compare September 6, 2026 05:01
@steipete

steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 6, 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 steipete/ios-settings-into-dashboard branch from b113e2e to 1816045 Compare September 6, 2026 08:01
@steipete
steipete merged commit ef26537 into main Sep 7, 2026
240 of 244 checks passed
@steipete
steipete deleted the steipete/ios-settings-into-dashboard branch September 7, 2026 11:34
@steipete

steipete commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 8, 2026
…native (openclaw#139514)

* refactor(native): share the device settings wire contract

* refactor(ios): move Settings into the Dashboard and keep Gateway native

* refactor(ios): retire native Gateway data screens

* fix(ios): handle the shared Chrome extension setup action

* test(ios): restore the shared Settings screenshot target

* fix(ios): enforce settings authority and retire stale preferences

* refactor(native): remove retired settings helpers

* fix(ios): preserve permission lifetimes across settings navigation

Keep overlapping location authorization waiters independent so retiring a Dashboard document cannot orphan its pending request. Start HealthKit authorization through the callback API under current main-actor authority, retain its store until completion, and preserve native error semantics.

Validation: 30 focused iOS tests across five suites, including the former WKNavigation crash regression; changed-file checks; original-versus-fixed continuation lifecycle probe; real SDK executor proof; final independent review through P2.

* fix(ios): expose live voice intent description to Shortcuts

Match the optional AppIntent description requirement so framework consumers receive the existing description instead of the protocol default. Keep a protocol-typed regression that fails before this correction and passes afterward. This isolated CI repair fixes a witness mismatch introduced in openclaw#141003; no voice execution behavior changes.
steipete added a commit that referenced this pull request Oct 13, 2026
Remove duplicate visibility/cache/startup state and unreachable platform/encoder fallbacks in old iOS and Android files. Share outside-tap recognition and let the node invoke boundary own mirrored-notification normalization.

Keep physical-route authorization, permission checks, durable Watch admission and ACKs, FIFO sends, protocol/data shapes, and ordinary concurrency. Net production reduction: 289 LOC, excluding tests, fixtures, and generated files.

Proof: iPhone app/Share/embedded Watch builds, final 273 invoke/Watch ingress/delegate/location tests and 74 sidebar/dashboard tests; Watch scheme build and 11 media tests; Android APK and 89 distinct focused unit cases; 18 shared source-resource tests. Changed-file guards, native lint, runtime/Madge cycles (zero), lint-suppressions (3 tests), and final independent P0-P2 review pass. No hosted CI or hardware/provider-audio/battery proof is claimed.

Best-effort tradeoffs accepted:
- Observer declarations (#113634): synthetic stale-ACK fencing is replaced by FIFO sends and subscription/reconnect replay; failed or obsolete metadata heals on the next declaration.
- Dashboard refresh (#111339): the sole SwiftUI refresh task is sequential and cancellation-owned, so a second generation counter is redundant; a future concurrent direct caller must cancel prior work or accept last-completing cosmetic data until refresh. Roster event/mutation overlap still retains its own generation.
- Delayed cosmetic actions (#113062): the synthetic post-delay interleaving no longer needs generations; replacing an action does not revoke work that already started.
- Delayed gate lifetime (#113062): both real view owners cancel on disappearance, so a second weak-gate lifetime condition is redundant; a future caller omitting cancellation may still perform a harmless cosmetic completion after releasing its gate.
- Watch one-shot transport (#135808): cancelled instances cannot restart, so generations add no supported lifetime; cancellation and physical-resource checks remain.
- Command advertisements (#136192): the synthetic synchronous preference flip may briefly split a command family until reconnect; live invocation admission remains.
- Turn recaps (#112221/#113084): synthetic metadata-only mode and a duplicated pending terminal value are removed; the sole production caller always provides transcript facts, and same-timestamp metadata corrections now use the latest authoritative session row. History/terminal attribution, settlement bounds and all 21 retained tests remain.
- Realtime coordinator (#111033): direct concurrent reset/reuse is unsupported by serialized phone/Wear callers; current-session, duplicate-run, and live-submit guards remain.
- Network availability (#138732): an unexpected duplicate SDK AVAILABLE may wake offline retry early; the human battery fix (#127872), retry ladder, and current-session admission remain.
- iOS resource adapter (#148906): a captured invalidated loader may redundantly reload current metadata; the shared cache owner still cancels stale in-flight results and live authority remains checked.
- Watch startup buffer (5e9bc09): synchronous MainActor registration cannot interleave with queued inbound delivery; a future caller yielding before registration may drop ephemeral requests, never ACK uncommitted chat.
- Mirror validation (#23636): the sole caller supplies normalized bounded fields; future internal callers must preserve that precondition.
- Beacon payload UTF-8 (#73330): Foundation JSONEncoder guarantees the bytes; a framework contract violation is an internal failure, not a recoverable conversion branch.
- Beacon envelope UTF-8 (#73330): the same guarantee removes the second conversion fallback; actual encoding errors still throw.
- Watch request UTF-8 (#135808): default encoder output cannot fail UTF-8 conversion; actual encoding errors still throw.
- Location event UTF-8 (#18260): default encoder output cannot fail UTF-8 conversion; nonfinite-value encoding failures keep their existing handling.
- HealthKit identifiers (#105616): fixed supported identifiers use nonfailable SDK constructors; authorization, privacy scope, and queries remain unchanged.
- Pre-iOS26 button fallback (#168595): the existing native deployment floor is26.2, so supported rendering is unchanged.
- Pre-Android26 priority fallback (#29398): the app minimum is31; notification-channel importance remains the active owner.
- WebView task document fences (#139514): existing MainActor cancellation-at-effect already rejects retired callbacks; navigation and document authority remain.

(cherry picked from commit 3dd5a00)
steipete added a commit that referenced this pull request Oct 13, 2026
…el and native code (#170815)

* fix(signal): reserve canonical default transport during legacy cleanup

Keep the canonical root transport in managed-port reservations when a nested
default account still carries retired transport fields. Otherwise Doctor can
allocate the default port to an implicit sibling and produce a collision.

Cover synchronous and asynchronous Doctor migration, nested-field cleanup,
and resolving both accounts to distinct ports. No new configuration surface
or persisted format; existing update/Doctor ownership stays authoritative.

* fix(channels): keep message content out of transport diagnostics

Remove raw content from IRC line/NOTICE, WhatsApp mention/skip, LINE inbound
and postback, Twitch callback, iMessage echo, and Tlon settings diagnostics.
Retain metadata and the complete payload in its delivery/history owner.
LINE peer routing also consumes already prepared source facts instead of
reinspecting the same source through a one-use helper.

Extend existing owning-boundary tests, including real IRC sockets, rather
than adding a separate logging implementation. IRC, WhatsApp, and Tlon
privacy probes failed on the old path and pass with content preserved.

* refactor(channels): simplify old transport helpers and lifecycle state

Consolidate Matrix send preparation, Zalo account/error traversal onto
existing SDK seams, and Google Meet CLI dispatch. Remove pass-through
Promise wrappers, duplicate lifecycle facts, and internal clock defenses.
Keep transport validation, effect authority, FIFO and durable shutdown.

Best-effort tradeoffs accepted:
- Internal cache/follow-up clocks are ordinary Date.now plus constant TTLs;
  synthetic invalid-clock cases are not actual-use incidents. A corrupt clock
  may distort metadata expiry until repair/restart.
- FaceTime does not fence unsupported start-before-stop reentry; its runtime
  creates a new supervisor after joined shutdown. Initial feature #119291
  introduced the generation, without a human reentry incident.
- LINE uses timer cancellation and its stop Promise, not a second stopped
  flag. Synchronous stop reentry is not performed by production callers.
- Mattermost uses one stopped fact, recursive polling and native Promise
  settlement; synchronous callbacks cannot interleave with cancellation.
- Teams uses a fresh UUID without reparsing text to reject a theoretical
  authored-placeholder collision; no human collision report was identified.
- FaceTime expects the documented system_profiler JSON output; malformed
  output reports missing devices instead of parsing old plaintext fixtures.
- Feishu serialization rejects cycles before element counting; exotic
  getter/toJSON objects remain best effort rather than a second graph walk.
- Zalo shares SDK error traversal; provider errors with throwing cause
  getters remain best effort rather than a private short-circuit walker.
- ClickClack uses the timeout race winner directly; exact-deadline late
  microtasks can discard stale ephemeral details, never the durable reply.
- Raft's private FIFO settles replay commits before another claim. If that
  invariant were violated, an unexpected inflight wake is a duplicate hint
  rather than a second settlement path. #109117 gives synthetic/generic
  ownership reasoning, not a human actual-use incident.

Old-code lane o07: production files checked against the last-seven-day
origin/main inventory. No SDK exports, dependencies, schemas or protocols
changed. Standalone session memory remains untouched.

* refactor(mobile): simplify old native lifecycle bookkeeping

Remove duplicate visibility/cache/startup state and unreachable platform/encoder fallbacks in old iOS and Android files. Share outside-tap recognition and let the node invoke boundary own mirrored-notification normalization.

Keep physical-route authorization, permission checks, durable Watch admission and ACKs, FIFO sends, protocol/data shapes, and ordinary concurrency. Net production reduction: 289 LOC, excluding tests, fixtures, and generated files.

Proof: iPhone app/Share/embedded Watch builds, final 273 invoke/Watch ingress/delegate/location tests and 74 sidebar/dashboard tests; Watch scheme build and 11 media tests; Android APK and 89 distinct focused unit cases; 18 shared source-resource tests. Changed-file guards, native lint, runtime/Madge cycles (zero), lint-suppressions (3 tests), and final independent P0-P2 review pass. No hosted CI or hardware/provider-audio/battery proof is claimed.

Best-effort tradeoffs accepted:
- Observer declarations (#113634): synthetic stale-ACK fencing is replaced by FIFO sends and subscription/reconnect replay; failed or obsolete metadata heals on the next declaration.
- Dashboard refresh (#111339): the sole SwiftUI refresh task is sequential and cancellation-owned, so a second generation counter is redundant; a future concurrent direct caller must cancel prior work or accept last-completing cosmetic data until refresh. Roster event/mutation overlap still retains its own generation.
- Delayed cosmetic actions (#113062): the synthetic post-delay interleaving no longer needs generations; replacing an action does not revoke work that already started.
- Delayed gate lifetime (#113062): both real view owners cancel on disappearance, so a second weak-gate lifetime condition is redundant; a future caller omitting cancellation may still perform a harmless cosmetic completion after releasing its gate.
- Watch one-shot transport (#135808): cancelled instances cannot restart, so generations add no supported lifetime; cancellation and physical-resource checks remain.
- Command advertisements (#136192): the synthetic synchronous preference flip may briefly split a command family until reconnect; live invocation admission remains.
- Turn recaps (#112221/#113084): synthetic metadata-only mode and a duplicated pending terminal value are removed; the sole production caller always provides transcript facts, and same-timestamp metadata corrections now use the latest authoritative session row. History/terminal attribution, settlement bounds and all 21 retained tests remain.
- Realtime coordinator (#111033): direct concurrent reset/reuse is unsupported by serialized phone/Wear callers; current-session, duplicate-run, and live-submit guards remain.
- Network availability (#138732): an unexpected duplicate SDK AVAILABLE may wake offline retry early; the human battery fix (#127872), retry ladder, and current-session admission remain.
- iOS resource adapter (#148906): a captured invalidated loader may redundantly reload current metadata; the shared cache owner still cancels stale in-flight results and live authority remains checked.
- Watch startup buffer (5e9bc09): synchronous MainActor registration cannot interleave with queued inbound delivery; a future caller yielding before registration may drop ephemeral requests, never ACK uncommitted chat.
- Mirror validation (#23636): the sole caller supplies normalized bounded fields; future internal callers must preserve that precondition.
- Beacon payload UTF-8 (#73330): Foundation JSONEncoder guarantees the bytes; a framework contract violation is an internal failure, not a recoverable conversion branch.
- Beacon envelope UTF-8 (#73330): the same guarantee removes the second conversion fallback; actual encoding errors still throw.
- Watch request UTF-8 (#135808): default encoder output cannot fail UTF-8 conversion; actual encoding errors still throw.
- Location event UTF-8 (#18260): default encoder output cannot fail UTF-8 conversion; nonfinite-value encoding failures keep their existing handling.
- HealthKit identifiers (#105616): fixed supported identifiers use nonfailable SDK constructors; authorization, privacy scope, and queries remain unchanged.
- Pre-iOS26 button fallback (#168595): the existing native deployment floor is26.2, so supported rendering is unchanged.
- Pre-Android26 priority fallback (#29398): the app minimum is31; notification-channel importance remains the active owner.
- WebView task document fences (#139514): existing MainActor cancellation-at-effect already rejects retired callbacks; navigation and document authority remain.

(cherry picked from commit 3dd5a00)

* refactor(ios): keep delayed cosmetic actions synchronous

Both production callers update toast or flash state synchronously on MainActor. Remove the unused async action contract and invoke it directly after the existing sleep/cancellation boundary. Keep asynchronous sleeping, cancellation, replacement and the returned task unchanged.

Best-effort tradeoffs accepted:
- None added by this type narrowing. The helper is internal, both callers and all retained tests already supply synchronous actions. The hypothetical suspending action discussed with #113062 is not a supported caller and is no longer expressible through this API.

Earlier guard-removal provenance and campaign proof are recorded in the preceding mobile cleanup commit. This follow-up changes no production LOC total, public protocol, permission, signing, dependency, persistence or visible rendering.

Validation: iPhone app/Share/embedded Watch build and61 focused tests in2 suites pass (DelayedActionGateTests and RootTabsPresentationTests),196.654s xcodebuild/0.628s tests. Configured SwiftFormat and strict SwiftLint pass; independent P0-P2 review is scoped-clean. Earlier unchanged-input changed-file, cycle and lint-suppression gates remain valid.
(cherry picked from commit c7c9fb6)

* fix(mattermost): keep inbound message content out of diagnostics

Log conversation, post ID and length instead of a body preview. Keep the
complete agent body and attachment order unchanged, and update the existing
monitor boundary test to reject content in diagnostics.

The regression fails before the repair on the leaked synthetic body prefix
after complete-body/ordered-media assertions pass, then passes after repair.
Final owner24, sibling25 and lint-suppressions3 tests pass; runtime and Madge
cycles are zero. Fresh production/test types, syntax lint, format and line-cap
checks pass, with no baseline, suppression or timeout increase.

This minimal privacy fix is explicitly authorized outside the old-code
eligibility restriction. The combined channel/native patch received a fresh
independent review with no actionable P0-P2 findings.

* fix(ios): remove retired Watch error from i18n inventory

* fix(mattermost): normalize nullable shutdown cleanup before await
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 14, 2026
…el and native code (openclaw#170815)

* fix(signal): reserve canonical default transport during legacy cleanup

Keep the canonical root transport in managed-port reservations when a nested
default account still carries retired transport fields. Otherwise Doctor can
allocate the default port to an implicit sibling and produce a collision.

Cover synchronous and asynchronous Doctor migration, nested-field cleanup,
and resolving both accounts to distinct ports. No new configuration surface
or persisted format; existing update/Doctor ownership stays authoritative.

* fix(channels): keep message content out of transport diagnostics

Remove raw content from IRC line/NOTICE, WhatsApp mention/skip, LINE inbound
and postback, Twitch callback, iMessage echo, and Tlon settings diagnostics.
Retain metadata and the complete payload in its delivery/history owner.
LINE peer routing also consumes already prepared source facts instead of
reinspecting the same source through a one-use helper.

Extend existing owning-boundary tests, including real IRC sockets, rather
than adding a separate logging implementation. IRC, WhatsApp, and Tlon
privacy probes failed on the old path and pass with content preserved.

* refactor(channels): simplify old transport helpers and lifecycle state

Consolidate Matrix send preparation, Zalo account/error traversal onto
existing SDK seams, and Google Meet CLI dispatch. Remove pass-through
Promise wrappers, duplicate lifecycle facts, and internal clock defenses.
Keep transport validation, effect authority, FIFO and durable shutdown.

Best-effort tradeoffs accepted:
- Internal cache/follow-up clocks are ordinary Date.now plus constant TTLs;
  synthetic invalid-clock cases are not actual-use incidents. A corrupt clock
  may distort metadata expiry until repair/restart.
- FaceTime does not fence unsupported start-before-stop reentry; its runtime
  creates a new supervisor after joined shutdown. Initial feature openclaw#119291
  introduced the generation, without a human reentry incident.
- LINE uses timer cancellation and its stop Promise, not a second stopped
  flag. Synchronous stop reentry is not performed by production callers.
- Mattermost uses one stopped fact, recursive polling and native Promise
  settlement; synchronous callbacks cannot interleave with cancellation.
- Teams uses a fresh UUID without reparsing text to reject a theoretical
  authored-placeholder collision; no human collision report was identified.
- FaceTime expects the documented system_profiler JSON output; malformed
  output reports missing devices instead of parsing old plaintext fixtures.
- Feishu serialization rejects cycles before element counting; exotic
  getter/toJSON objects remain best effort rather than a second graph walk.
- Zalo shares SDK error traversal; provider errors with throwing cause
  getters remain best effort rather than a private short-circuit walker.
- ClickClack uses the timeout race winner directly; exact-deadline late
  microtasks can discard stale ephemeral details, never the durable reply.
- Raft's private FIFO settles replay commits before another claim. If that
  invariant were violated, an unexpected inflight wake is a duplicate hint
  rather than a second settlement path. openclaw#109117 gives synthetic/generic
  ownership reasoning, not a human actual-use incident.

Old-code lane o07: production files checked against the last-seven-day
origin/main inventory. No SDK exports, dependencies, schemas or protocols
changed. Standalone session memory remains untouched.

* refactor(mobile): simplify old native lifecycle bookkeeping

Remove duplicate visibility/cache/startup state and unreachable platform/encoder fallbacks in old iOS and Android files. Share outside-tap recognition and let the node invoke boundary own mirrored-notification normalization.

Keep physical-route authorization, permission checks, durable Watch admission and ACKs, FIFO sends, protocol/data shapes, and ordinary concurrency. Net production reduction: 289 LOC, excluding tests, fixtures, and generated files.

Proof: iPhone app/Share/embedded Watch builds, final 273 invoke/Watch ingress/delegate/location tests and 74 sidebar/dashboard tests; Watch scheme build and 11 media tests; Android APK and 89 distinct focused unit cases; 18 shared source-resource tests. Changed-file guards, native lint, runtime/Madge cycles (zero), lint-suppressions (3 tests), and final independent P0-P2 review pass. No hosted CI or hardware/provider-audio/battery proof is claimed.

Best-effort tradeoffs accepted:
- Observer declarations (openclaw#113634): synthetic stale-ACK fencing is replaced by FIFO sends and subscription/reconnect replay; failed or obsolete metadata heals on the next declaration.
- Dashboard refresh (openclaw#111339): the sole SwiftUI refresh task is sequential and cancellation-owned, so a second generation counter is redundant; a future concurrent direct caller must cancel prior work or accept last-completing cosmetic data until refresh. Roster event/mutation overlap still retains its own generation.
- Delayed cosmetic actions (openclaw#113062): the synthetic post-delay interleaving no longer needs generations; replacing an action does not revoke work that already started.
- Delayed gate lifetime (openclaw#113062): both real view owners cancel on disappearance, so a second weak-gate lifetime condition is redundant; a future caller omitting cancellation may still perform a harmless cosmetic completion after releasing its gate.
- Watch one-shot transport (openclaw#135808): cancelled instances cannot restart, so generations add no supported lifetime; cancellation and physical-resource checks remain.
- Command advertisements (openclaw#136192): the synthetic synchronous preference flip may briefly split a command family until reconnect; live invocation admission remains.
- Turn recaps (openclaw#112221/openclaw#113084): synthetic metadata-only mode and a duplicated pending terminal value are removed; the sole production caller always provides transcript facts, and same-timestamp metadata corrections now use the latest authoritative session row. History/terminal attribution, settlement bounds and all 21 retained tests remain.
- Realtime coordinator (openclaw#111033): direct concurrent reset/reuse is unsupported by serialized phone/Wear callers; current-session, duplicate-run, and live-submit guards remain.
- Network availability (openclaw#138732): an unexpected duplicate SDK AVAILABLE may wake offline retry early; the human battery fix (openclaw#127872), retry ladder, and current-session admission remain.
- iOS resource adapter (openclaw#148906): a captured invalidated loader may redundantly reload current metadata; the shared cache owner still cancels stale in-flight results and live authority remains checked.
- Watch startup buffer (5a652b8): synchronous MainActor registration cannot interleave with queued inbound delivery; a future caller yielding before registration may drop ephemeral requests, never ACK uncommitted chat.
- Mirror validation (openclaw#23636): the sole caller supplies normalized bounded fields; future internal callers must preserve that precondition.
- Beacon payload UTF-8 (openclaw#73330): Foundation JSONEncoder guarantees the bytes; a framework contract violation is an internal failure, not a recoverable conversion branch.
- Beacon envelope UTF-8 (openclaw#73330): the same guarantee removes the second conversion fallback; actual encoding errors still throw.
- Watch request UTF-8 (openclaw#135808): default encoder output cannot fail UTF-8 conversion; actual encoding errors still throw.
- Location event UTF-8 (openclaw#18260): default encoder output cannot fail UTF-8 conversion; nonfinite-value encoding failures keep their existing handling.
- HealthKit identifiers (openclaw#105616): fixed supported identifiers use nonfailable SDK constructors; authorization, privacy scope, and queries remain unchanged.
- Pre-iOS26 button fallback (openclaw#168595): the existing native deployment floor is26.2, so supported rendering is unchanged.
- Pre-Android26 priority fallback (openclaw#29398): the app minimum is31; notification-channel importance remains the active owner.
- WebView task document fences (openclaw#139514): existing MainActor cancellation-at-effect already rejects retired callbacks; navigation and document authority remain.

(cherry picked from commit 3dd5a00)

* refactor(ios): keep delayed cosmetic actions synchronous

Both production callers update toast or flash state synchronously on MainActor. Remove the unused async action contract and invoke it directly after the existing sleep/cancellation boundary. Keep asynchronous sleeping, cancellation, replacement and the returned task unchanged.

Best-effort tradeoffs accepted:
- None added by this type narrowing. The helper is internal, both callers and all retained tests already supply synchronous actions. The hypothetical suspending action discussed with openclaw#113062 is not a supported caller and is no longer expressible through this API.

Earlier guard-removal provenance and campaign proof are recorded in the preceding mobile cleanup commit. This follow-up changes no production LOC total, public protocol, permission, signing, dependency, persistence or visible rendering.

Validation: iPhone app/Share/embedded Watch build and61 focused tests in2 suites pass (DelayedActionGateTests and RootTabsPresentationTests),196.654s xcodebuild/0.628s tests. Configured SwiftFormat and strict SwiftLint pass; independent P0-P2 review is scoped-clean. Earlier unchanged-input changed-file, cycle and lint-suppression gates remain valid.
(cherry picked from commit c7c9fb6)

* fix(mattermost): keep inbound message content out of diagnostics

Log conversation, post ID and length instead of a body preview. Keep the
complete agent body and attachment order unchanged, and update the existing
monitor boundary test to reject content in diagnostics.

The regression fails before the repair on the leaked synthetic body prefix
after complete-body/ordered-media assertions pass, then passes after repair.
Final owner24, sibling25 and lint-suppressions3 tests pass; runtime and Madge
cycles are zero. Fresh production/test types, syntax lint, format and line-cap
checks pass, with no baseline, suppression or timeout increase.

This minimal privacy fix is explicitly authorized outside the old-code
eligibility restriction. The combined channel/native patch received a fresh
independent review with no actionable P0-P2 findings.

* fix(ios): remove retired Watch error from i18n inventory

* fix(mattermost): normalize nullable shutdown cleanup before await
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: ios App: ios app: macos App: macos docs Improvements or additions to documentation maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts 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.

1 participant