Skip to content

fix(ios): return chat to originating control detail#99245

Merged
steipete merged 2 commits into
mainfrom
codex/pr-98023-repaired
Jul 2, 2026
Merged

fix(ios): return chat to originating control detail#99245
steipete merged 2 commits into
mainfrom
codex/pr-98023-repaired

Conversation

@steipete

@steipete steipete commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Repairs and supersedes #98023. On iPhone, opening Chat from a Control detail could leave no visible route back to the originating Overview, Activity, Workboard, or Sessions screen. The contributor branch could not be updated because maintainer edits are disabled.

Why This Change Was Made

The phone shell now carries two closed navigation values: a typed Control navigation request and a contextual Chat return that records both the source detail and the exact global Chat request it already handled. This keeps internal detail-return routing distinct from direct bottom-tab selection, prevents the later global request observation from erasing the contextual back action, and removes the original parallel nullable destination/request/reset-suppression state.

The maintainer rewrite also clears stale return state on programmatic Settings routing, resets Chat's retained embedded Settings stack before contextual routing, and dismisses a Workboard card sheet before switching tabs. A direct Control-tab tap always resets the child stack to the Control hub; the Chat header action returns to the exact source detail.

Contributor credit is preserved in the maintainer commit via Co-authored-by: Colin <[email protected]>.

User Impact

On iPhone, users can open Chat from Overview, Activity, Workboard, or Sessions and use a visible Back to … action to return to that detail. Tapping the bottom Control tab instead returns to the main Control hub. iPad/sidebar behavior is unchanged.

Evidence

  • Before/after proof from the contributor: hosted bundle, corrected flow GIF, and contact sheet.
  • Exact head e42dc9728a3d19fa7907bfaf9af0483c987d630c: iPhone 17 Pro / iOS 26.5 simulator UI E2E passed in 25.459s. It first retained Chat's Gateway Settings route, then proved Activity → Chat → Back to Activity → Activity; direct Control tab → hub; and Overview agent-session row → Chat through the real NodeAppModel.openChat request path → Back to Overview → Overview.
  • Exact-head RootTabsSourceGuardTests passed 35/35, including Workboard card-sheet dismissal ordering. Earlier focused presentation/sidebar/render coverage passed 65/65.
  • Native i18n is synchronized; git diff --check passes; hosted CI run 28624771490 passed for the exact head, including ios-build, macos-swift, lint, guards, and all required shards.
  • Fresh Codex autoreview found and drove fixes for the duplicate production Chat request, stale programmatic Settings return, retained Chat Settings stack, and Workboard sheet, then passed on the exact head with no accepted/actionable findings.

No changelog entry: release generation owns CHANGELOG.md.

@steipete steipete self-assigned this Jul 2, 2026
@openclaw-barnacle openclaw-barnacle Bot added app: ios App: ios size: M maintainer Maintainer-authored PR labels Jul 2, 2026
@clawsweeper

clawsweeper Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 2, 2026, 6:15 PM ET / 22:15 UTC.

Summary
The branch adds iPhone Control-detail Chat return state, routes Control detail Chat actions through it, resets retained Chat/workboard presentation state, updates native i18n metadata, and adds focused iOS UI/source-guard coverage.

PR surface: Other +214. Total +214 across 9 files.

Reproducibility: yes. Current main routes Control-detail Chat actions through a path that clears the phone Control stack and provides no contextual Chat leading action; the linked recording/contact-sheet proof and PR UI test cover the after-fix flow.

Review metrics: none identified.

Root-cause cluster
Relationship: canonical
Canonical: #99245
Summary: This PR is the maintainer replacement for the same iPhone Control-detail Chat return behavior originally proposed in the older contributor PR.

Members:

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

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster ✨ media proof bonus
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • none.

Risk before merge

  • [P1] The protected maintainer label requires explicit maintainer handling before merge or closure, even though no concrete code/security blocker was found.

Maintainer options:

  1. Decide the mitigation before merge
    Let maintainers review and, if they agree, land this replacement as the canonical iPhone navigation fix and close the older contributor branch it supersedes.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P2] Protected maintainer labeling and the replacement/supersession decision make this a human review and landing item, with no narrow automated repair target found.

Security
Cleared: The patch only changes iOS Swift navigation, generated native i18n metadata, and iOS tests, with no concrete security or supply-chain concern found.

Review details

Best possible solution:

Let maintainers review and, if they agree, land this replacement as the canonical iPhone navigation fix and close the older contributor branch it supersedes.

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

Yes. Current main routes Control-detail Chat actions through a path that clears the phone Control stack and provides no contextual Chat leading action; the linked recording/contact-sheet proof and PR UI test cover the after-fix flow.

Is this the best way to solve the issue?

Yes. The PR keeps cross-tab Chat request and return state in RootTabs while leaving the phone child stack in RootTabsPhoneControlHub, which is the narrow owner boundary for this navigation bug.

AGENTS.md: found and applied where relevant.

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

Label changes

Label justifications:

  • P2: This is a normal-priority iPhone navigation bug fix with a narrow app surface and no evidence of data loss, security, or crash-loop impact.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (recording): Linked recording/contact-sheet proof plus copied simulator UI E2E output show the after-fix iPhone Control-detail Chat return and Control-tab root reset behavior.
  • proof: sufficient: Contributor real behavior proof is sufficient. Linked recording/contact-sheet proof plus copied simulator UI E2E output show the after-fix iPhone Control-detail Chat return and Control-tab root reset behavior.
  • proof: 🎥 video: Contributor real behavior proof includes video or recording evidence. Linked recording/contact-sheet proof plus copied simulator UI E2E output show the after-fix iPhone Control-detail Chat return and Control-tab root reset behavior.
Evidence reviewed

PR surface:

Other +214. Total +214 across 9 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 9 303 89 +214
Total 9 303 89 +214

What I checked:

  • Root and scoped repository policy read: Root AGENTS.md and apps/ios/AGENTS.md were read fully; the protected-label, deep PR review, proof, and iOS scoped-policy guidance affected the keep-open maintainer-review decision. (AGENTS.md:19, cc0d7e1dd4c6)
  • Current main lacks contextual phone Chat return: On current main, the phone Chat tab is built without a headerLeadingAction and the phone Control hub routes Overview/Activity/Workboard/Sessions Chat actions through openPhoneRootDestination(.chat), which clears the Control stack before selecting Chat. (apps/ios/Sources/Design/RootTabsPhoneControlHub.swift:127, cc0d7e1dd4c6)
  • PR head wires contextual Chat return in the owner shell: The PR passes phoneChatReturnAction into the phone Chat tab, stores the originating Control destination with the handled Chat request id, resets the embedded Chat Settings path, and suppresses only the matching later openChat observation. (apps/ios/Sources/RootTabs.swift:589, e42dc9728a3d)
  • PR head keeps phone Control stack ownership in the phone hub: RootTabsPhoneControlHub now receives typed navigation requests and routes Overview, Activity, Workboard, and Sessions Chat actions through openChatFromControlDetail instead of clearing the child stack directly. (apps/ios/Sources/Design/RootTabsPhoneControlHub.swift:134, e42dc9728a3d)
  • Regression UI test covers the visible phone flow: The added UI test opens Chat from Activity, asserts the Back to Activity accessibility label, returns to Activity, verifies a bottom Control tab tap lands on the Control hub, and checks an Overview session return. (apps/ios/UITests/OpenClawSnapshotUITests.swift:283, e42dc9728a3d)
  • Real behavior proof inspected: The prepared manifest showed ffprobe was unavailable, but the linked contact sheets were downloaded to the scratch area and inspected; together with the PR body's copied UI E2E output they support the Activity to Chat return and Control-tab hub reset flow.

Likely related people:

  • Solvely-Colin: Recent merged iPad/iPhone control-surface and sidebar navigation stack reset commits touch RootTabs, RootTabsPhoneControlHub, and adjacent tests; the current PR also preserves this contributor's source work from the superseded branch. (role: recent area contributor and source PR author; confidence: high; commits: bf89552e6783, 54b09580f61b; files: apps/ios/Sources/RootTabs.swift, apps/ios/Sources/Design/RootTabsPhoneControlHub.swift, apps/ios/Tests/RootTabsSidebarRegressionTests.swift)
  • steipete: Recent merged iOS navigation, settings, Liquid Glass, and Chat refinement commits touch the same RootTabs, phone Control hub, and Chat boundary, and the live PR is assigned to this handle. (role: recent adjacent owner and current replacement author; confidence: high; commits: 313560d5b98e, 8502ef6c598b, c4102f5d67b6; files: apps/ios/Sources/RootTabs.swift, apps/ios/Sources/Design/RootTabsPhoneControlHub.swift, apps/ios/Sources/Design/ChatProTab.swift)
  • Lokimorty: A recent settings-detail back-navigation fix changed the same RootTabs and phone Control hub navigation ownership model that this PR extends for Chat returns. (role: recent adjacent contributor; confidence: medium; commits: 9d3e2633658c; files: apps/ios/Sources/RootTabs.swift, apps/ios/Sources/Design/RootTabsPhoneControlHub.swift)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 🎥 video Contributor real behavior proof includes video or recording evidence. 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. P2 Normal backlog priority with limited blast radius. labels Jul 2, 2026
@steipete
steipete force-pushed the codex/pr-98023-repaired branch from 799ea36 to e42dc97 Compare July 2, 2026 22:10
@steipete

steipete commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Maintainer repair complete and land-ready at exact head e42dc9728a3d19fa7907bfaf9af0483c987d630c.

  • Replaced parallel phone navigation state with typed root/detail requests and one correlated contextual Chat return.
  • Fixed the production NodeAppModel.openChat observation race, stale programmatic Settings return, retained Chat Settings stack, and Workboard card-sheet handoff.
  • Preserved Colin's contribution with Co-authored-by credit and retained the contributor's before/after proof bundle.
  • iPhone 17 Pro / iOS 26.5 simulator E2E passed in 25.459s: retained Gateway Settings → Activity → Chat → Back to Activity; direct Control tab → root; Overview real session row → Chat → Back to Overview.
  • Exact-head RootTabsSourceGuardTests: 35/35 passed. Native i18n and git diff --check passed.
  • Hosted CI run 28624771490 passed for the exact head, including ios-build, macos-swift, lint, guards, and all required shards.
  • Fresh exact-head Codex autoreview: no accepted/actionable findings.

No known proof gaps for the repaired phone navigation behavior.

@steipete
steipete merged commit 32762da into main Jul 2, 2026
79 checks passed
@steipete
steipete deleted the codex/pr-98023-repaired branch July 2, 2026 22:20
@steipete

steipete commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 3, 2026
* fix(ios): return chat to originating control detail

Co-authored-by: Colin <[email protected]>

* fix(ios): reset retained state before control chat handoff

Co-authored-by: Colin <[email protected]>

---------

Co-authored-by: Colin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: ios App: ios maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 🎥 video Contributor real behavior proof includes video or recording evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M 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