Skip to content

fix(apple): surface rejected chat session settings - #128737

Merged
steipete merged 1 commit into
mainfrom
codex/apple-chat-surface-session-setting-errors
Aug 24, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/apple-chat-surface-session-setting-errors

Conversation

@steipete

@steipete steipete commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Addresses the silent-failure/accessibility portion of #126520. That issue must remain open for its separate request to change gateway authorization policy.

The shared Apple chat model already exposes rejected model-picker changes through its existing visible error banner, but thinking-level, verbosity, and fast-mode changes silently rolled back when the gateway rejected them. This was particularly difficult for VoiceOver users because the picker closed without an applied change or an explanation.

  • Surface rejection errors through the existing shared chat error banner for all three session-setting controls.
  • Clear a stale rejection when a fresh setting change begins.
  • Keep failures from background/inactive sessions out of the currently displayed conversation.
  • Preserve the existing operator.admin authorization boundary; no gateway permission, security, protocol, schema, or configuration changes.
  • Production: +6/-0 across the three owner paths; tests: +10/-2 including existing baseline SwiftFormat cleanup.

Verification

  • Before the fix: three independent failing assertions reproduce silent thinking-level, verbosity, and fast-mode rejections; the inactive-session isolation test already passes.
  • After the fix: all three rejection assertions and inactive-session isolation pass.
  • Full shared Apple chat suite: 289 tests across two suites pass.
  • Repository changed-files gate: all seven macOS/tooling Vitest shards pass (485 tests), Swift lint passes, and native schema validation passes.
  • Independent structured code review: clean, with no P0/P1 findings.
  • One pre-existing optimistic-message timing test failed only while the 485-test tooling lane was competing for resources; it passed immediately in isolation and the entire 289-test suite passed afterward.

Native accessibility proof boundary

ClawSweeper's optional rank-up request for a redacted Apple-client rejection recording is skipped because this task has no paired physical iPhone/iPad with an enabled VoiceOver session and a bounded operator token available for capture. The changed path is instead proven by three real shared Apple view-model fail-before/pass-after regressions, inactive-session isolation, the inspected existing ChatView error-banner consumer, the full 289-test Apple chat suite, and exact-head hosted iOS/macOS/Android CI. No claim is made that VoiceOver announcement behavior was physically exercised.

@clawsweeper

clawsweeper Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Aug 24, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P2 Normal backlog priority with limited blast radius. 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 Aug 24, 2026
@clawsweeper

clawsweeper Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 24, 2026, 9:28 AM ET / 13:28 UTC.

ClawSweeper review

What this changes

This PR surfaces rejected thinking-level, verbosity, and fast-mode session changes in the shared Apple chat error banner and clears a prior banner when a new setting change begins.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep this maintainer-labeled PR open for explicit landing review. The patch correctly routes current-session setting rejections to the existing shared error banner without changing Gateway authorization; no code-level blocking finding was found.

Priority: P2
Reviewed head: 26723cd887727579aa553612c973a7a33fba4b34
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, owner-local patch with relevant rollback and isolation coverage; native Apple UI evidence would remove the remaining landing uncertainty.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its body reports focused after-fix tests, while native UI evidence remains a maintainer-facing merge risk.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its body reports focused after-fix tests, while native UI evidence remains a maintainer-facing merge risk.
Evidence reviewed 5 items Current-main gap: Current main rolls back rejected verbosity and fast-mode patches but does not assign an error message; the PR adds the missing error-state writes, so the requested behavior is not already on main.
Owner-boundary implementation: The PR clears errorText on each valid selection and sets it only after rollback for the current target; inactive targets remain excluded by exactMatchOnly.
UI consumer and caller coverage: ChatView renders nonempty errorText through its notice banner, while iOS, shared-composer, and desktop picker callers disable controls while a session patch is in flight; this prevents overlapping picker submissions.
Findings None None.
Security None None.

Live Verification

Command: swift test --package-path apps/shared/OpenClawKit --filter ChatViewModelTests

Result: FAIL (failed) — step 1 run swift test --package-path apps/shared/OpenClawKit --filter ChatViewModelTests: terminal command did not produce output within 20 seconds: "swift test --package-path apps/shared/OpenClawKit --filter ChatViewModelTests"

swift test --package-path apps/shared/OpenClawKit --filter ChatViewModelTestsrunner@runnervm76f27:/tmp/clawsweeper-live-proof-128737-m6zJWu/target$ swift test -
-package-path apps/shared/OpenClawKit --filter ChatViewModelTests
swift test --package-path apps/shared/OpenClawKit --filter ChatViewModelTests
















































Assertions:

  • FAIL expect_output: Test run with

How this fits together

Apple chat pickers call the shared chat view model, which sends an optimistic session-settings patch to the Gateway and rolls back on rejection. The view model’s error text feeds the existing chat notice banner for the active conversation.

flowchart LR
A[Apple chat picker] --> B[Shared chat view model]
B --> C[Serialized session patch]
C --> D{Gateway accepts?}
D -->|Yes| E[Keep selected setting]
D -->|No| F[Restore accepted state]
F --> G[Current chat error banner]
Loading

Decision needed

Question Recommendation
Should this maintainer-labeled Apple UI fix land after an Apple-client rejection walkthrough and the current-head checks complete? Require native confirmation: Keep the PR open until a redacted Apple-client run shows a rejected current-session setting produces the shared error banner without affecting another session.

Why: The patch is source-correct, but the intended accessibility-visible outcome is a native UI behavior and the protected maintainer label requires explicit maintainer handling.

Before merge

  • Resolve merge risk (P1) - The focused ViewModel tests prove rollback and error state, but the PR does not include a redacted native Apple-client run showing the banner and accessibility outcome after a real Gateway rejection.
  • Complete next step (P2) - A maintainer should make the final landing call after native Apple proof and current-head validation; no mechanical repair is identified.
Agent review details

Security

None.

PR surface

Other +14. Total +14 across 3 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 3 16 2 +14
Total 3 16 2 +14

Review metrics

Metric Value Why it matters
Production versus test delta production +6; behavioral tests +4; test formatting +6/-2 The six production lines are direct current-owner error-state assignments; the behavioral assertions cover three rejection paths and inactive-session isolation.

Merge-risk options

Maintainer options:

  1. Verify the native rejection path (recommended)
    Pause landing until an Apple client demonstrates that a real rejected setting mutation produces the existing banner for the active chat only.
  2. Accept owner-test-only evidence
    Land with the focused model tests as sufficient evidence, accepting that they do not render the native banner or VoiceOver result.

Technical review

Best possible solution:

Land the owner-local error propagation after current-head checks and a native Apple rejection walkthrough confirm that the active conversation announces the existing banner while inactive-session failures remain silent.

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

Yes—source establishes that current main rolls back these rejected patches without writing the banner’s error state, while the PR’s focused tests inject the same rejection path. This read-only review did not execute the Swift suite.

Is this the best way to solve the issue?

Yes. Reusing the existing shared error banner at the rollback owners is narrower and safer than changing Gateway permissions or adding a parallel Apple-only error mechanism.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: This fixes a bounded but user-visible Apple chat feedback failure while preserving the existing authorization boundary.
  • add merge-risk: 🚨 other: The shared error state is covered by owner tests, but native banner and accessibility presentation after a real Gateway rejection remain unobserved.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its body reports focused after-fix tests, while native UI evidence remains a maintainer-facing merge risk.

Label justifications:

  • P2: This fixes a bounded but user-visible Apple chat feedback failure while preserving the existing authorization boundary.
  • merge-risk: 🚨 other: The shared error state is covered by owner tests, but native banner and accessibility presentation after a real Gateway rejection remain unobserved.
  • 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: This maintainer-authored PR is exempt from the external-contributor proof gate; its body reports focused after-fix tests, while native UI evidence remains a maintainer-facing merge risk.

Evidence

What I checked:

Likely related people:

  • steipete: Introduced the shared provider-grouped model controls and recently maintained their serialized session-patch lifecycle. (role: feature owner and recent area contributor; confidence: high; commits: 8ae1581798b8, 5e253f4f42b7; files: apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatViewModel+ModelControls.swift, apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatViewModel.swift)

Rank-up moves

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

  • Capture a redacted Apple-client rejection run that visibly shows the active chat banner and preserves an unrelated session.

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.

@steipete
steipete merged commit 2b8fe12 into main Aug 24, 2026
80 checks passed
@steipete
steipete deleted the codex/apple-chat-surface-session-setting-errors branch August 24, 2026 13:49
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

@VACInc

VACInc commented Sep 12, 2026

Copy link
Copy Markdown
Member

Follow-up to #126520: merged #146343 resolves that issue's remaining Gateway authorization request for write-scoped session thinking and Fast Mode updates.

This PR already supplied the native error feedback for rejected settings. The two fixes address different parts of the report; #146343 does not replace or remove this error handling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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.

2 participants