Skip to content

fix(android): avoid false Gateway offline labels in empty chats - #142182

Merged
steipete merged 2 commits into
mainfrom
codex/android-chat-readiness-labels
Sep 8, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/android-chat-readiness-labels

Conversation

@steipete

@steipete steipete commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where Android users opening an empty chat could see Gateway offline even though the Gateway connection was open. Chat health had not been confirmed, or its health check had failed. The accompanying text could also claim a check was running after it had already failed.

Related: #142131; continued Android app audit.

Why This Change Was Made

The empty state now uses the connection and chat-health facts it already receives. Connected but unhealthy chat shows Chat not ready, with Refresh chat guidance. Healthy chat keeps its existing ready state; a genuinely disconnected Gateway keeps its offline recovery controls.

This changes two presentation expressions, not health polling, connection policy, sending, or storage. The header's existing chat-readiness status is unchanged. Documentation and the native source inventory are updated. Translated catalogs and generated platform resources belong to the separate Native App Locale Refresh workflow; until that refresh, these two new labels use the existing English-source fallback.

Production: +13/−2 (net +11, mostly formatter expansion of the two expressions). Tests: +188. Only the source inventory is included; no new state owner, configuration, dependency, or protocol change.

User Impact

Users can distinguish an unavailable chat from a lost Gateway connection and know which existing action to try. Messages can still queue while chat health is unavailable and send after recovery.

Evidence

  • Two rendered regressions failed on the original code after proving the Gateway was connected, empty history had completed, and health was pending or failed. Both pass after the change. The original full composer and adjacent screen/error suites passed 80 tests. After removing generated artifacts from the PR, these same suites plus the native-string fallback suite passed 87 tests, zero failures/errors/skips, against the existing committed resource map. Controls cover healthy empty chat, real disconnect, and queued input followed by one send after normal recovery.
  • The original fully generated candidate passed app ktlint, 14 changed checks, strict translation coverage, Play APK build, ThirdParty compilation, and both Android lint variants. The corrected source-only candidate has a fresh independent Codex review with no actionable findings; native source verification, all 14 changed checks, ktlint, and Play/ThirdParty Kotlin compilation passed on the corrected tree. PR-only screenshot-writing helpers were removed from the tests; behavioral assertions remain.
  • Installed before/after comparison uses ordinary onboarding and a synthetic loopback Gateway, not screenshot mode. The prior generated-resource candidate APK is signed and its installed hash is verified against commit 422e4c077d03d1717ff82894d363c19860720cdc. The baseline is the actual 4ab02076931423dfd3700ee02cc76e24cbda0d41 APK: its Android/resource/icon source trees match this patch's parent, and all 199 packaged assets match that prior candidate. The screenshots and installed comparison remain evidence for that exact binary, not an APK built from the later source-only correction.
  • The first pending Refresh preserves prior healthy state by design. After a protocol-level health failure, and while the next real Refresh waits for recovery, the baseline incorrectly says Gateway offline while the candidate says Chat not ready. Successful recovery restores the ready state; pressing the app's actual Disconnect restores the existing offline guidance and closes both connections.

The fixture supplies empty history and normal health responses only; no provider execution or message sending is claimed by the installed comparison. The queue/send behavior is covered separately by the controller/UI tests. The screenshots contain inspected synthetic app content only; app data was reset between phases, so generated device identifiers differ. Both fixtures and the owned emulator exited normally, private fixture material was removed, routing was cleared, and font scale restored.

The corrected source-only head is 04225b4ca49214986d985f82518e06bd41ca60a1. Its four source/test/docs/inventory files are byte-identical to the original reviewed candidate; the 44 generated/translated files exactly match its original parent.

The first hosted run stopped before app tests because I incorrectly mixed generated locale artifacts with source. The correction removes exactly those 44 artifact changes while preserving all four source/test/docs/inventory afterimages. No CI rule, translation check, application policy, or assertion was weakened. Exact-head CI passed on attempt 2. All four Android jobs passed on the corrected run's first attempt; 16 broader work jobs reported self-hosted runner disconnections. One failed-job-only retry passed without source, check, or timeout changes. Native landing validation follows.

Before — connected Gateway after health failure

After — connected Gateway after health failure

Keep the actual offline recovery state while explaining connected but
health-unready empty chats accurately. Preserve health policy and durable
sending; update the existing native localization catalogs.
@clawsweeper

clawsweeper Bot commented Sep 8, 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: android App: android size: M maintainer Maintainer-authored PR labels Sep 8, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot 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. labels Sep 8, 2026
@clawsweeper

clawsweeper Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 8, 2026, 9:39 AM ET / 13:39 UTC.

ClawSweeper review

What this changes

Android empty chats distinguish unavailable chat health from a disconnected Gateway, with matching recovery guidance, regression tests, documentation, and localization source inventory.

Merge readiness

✅ Ready for maintainer review

The fix remains useful: current main still mislabels connected, unhealthy empty chats. No actionable defects were found, and the locale correction preserves the previously reviewed behavior.

Priority: P2
Reviewed head: 04225b4ca49214986d985f82518e06bd41ca60a1

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, maintainable correction with directly relevant visual proof and regression coverage; no actionable blockers remain.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after screenshots and the captured installed-app account demonstrate the changed empty-chat labels after a health failure through ordinary onboarding and a loopback Gateway. The APK evidence belongs to 422e4c0; the corrected head preserves its UI source and uses the verified English fallback. Queue/send coverage is supplemental fixture testing, not claimed live proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): Inspected before/after screenshots and the captured installed-app account demonstrate the changed empty-chat labels after a health failure through ordinary onboarding and a loopback Gateway. The APK evidence belongs to 422e4c0; the corrected head preserves its UI source and uses the verified English fallback. Queue/send coverage is supplemental fixture testing, not claimed live proof.
Evidence reviewed 9 items Current main still contains the defect: The empty-state title chooses Gateway offline whenever healthOk is false, although its subtitle already distinguishes gatewayOffline. The PR uses that existing connection fact in the title too.
Existing state and recovery owners: ChatScreen derives gatewayOffline from connection status and passes it separately from healthOk. Refresh chat invokes the existing refresh action; the controller can mark health false after a failed health request without disconnecting the Gateway.
Re-review continuity: The four remaining changed files are identical to the earlier reviewed candidate. The new commit removes generated locale changes; those resources now match the merge base. The previous completed review recorded no findings.
Findings None None.
Security None None.

How this fits together

Android chat combines Gateway connection status, chat health, and loaded history to choose its empty-state message. Its existing Refresh chat action reloads history and checks health again.

flowchart TD
  A[Gateway connection status] --> D[Empty chat presentation]
  B[Chat health] --> D
  C[Loaded empty history] --> D
  D --> E[Ready or chat not ready or offline]
  E --> F[Refresh chat or connection recovery]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +188, Docs 0, Other +12. Total +200 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 188 0 +188
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 15 3 +12
Total 4 204 4 +200

Review metrics

None.

Technical review

Best possible solution:

Use the existing connection and health facts to present accurate readiness guidance while preserving Refresh chat and offline recovery behavior.

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

Yes: current main selects Gateway offline when empty history has loaded and health is false despite an open connection; the supplied installed-app comparison demonstrates that state. This review did not execute a reproduction.

Is this the best way to solve the issue?

Yes: correcting the two presentation expressions reuses authoritative state already supplied to the component and avoids altering health, sending, or persistence.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 865f1bbdbf44.

Labels

Label justifications:

  • P2: Incorrect Android empty-chat status causes recoverable confusion without changing connection or message-delivery behavior.
  • 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 (screenshot): Inspected before/after screenshots and the captured installed-app account demonstrate the changed empty-chat labels after a health failure through ordinary onboarding and a loopback Gateway. The APK evidence belongs to 422e4c0; the corrected head preserves its UI source and uses the verified English fallback. Queue/send coverage is supplemental fixture testing, not claimed live proof.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected before/after screenshots and the captured installed-app account demonstrate the changed empty-chat labels after a health failure through ordinary onboarding and a loopback Gateway. The APK evidence belongs to 422e4c0; the corrected head preserves its UI source and uses the verified English fallback. Queue/send coverage is supplemental fixture testing, not claimed live proof.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected before/after screenshots and the captured installed-app account demonstrate the changed empty-chat labels after a health failure through ordinary onboarding and a loopback Gateway. The APK evidence belongs to 422e4c0; the corrected head preserves its UI source and uses the verified English fallback. Queue/send coverage is supplemental fixture testing, not claimed live proof.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vincentkoc: 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 (1 earlier review cycle)
  • reviewed 2026-09-08T13:29:04.787Z sha 422e4c0 :: needs maintainer review before merge. :: none

@steipete steipete self-assigned this Sep 8, 2026
@steipete
steipete merged commit e76b086 into main Sep 8, 2026
213 of 231 checks passed
@steipete
steipete deleted the codex/android-chat-readiness-labels branch September 8, 2026 14:44
@steipete

steipete commented Sep 8, 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 9, 2026
…claw#142182)

* fix(android): distinguish chat readiness from connection state

Keep the actual offline recovery state while explaining connected but
health-unready empty chats accurately. Preserve health policy and durable
sending; update the existing native localization catalogs.

* chore(android): leave generated locales to the refresh workflow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: android App: android docs Improvements or additions to documentation maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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