Skip to content

fix(android): make offline chat actionable - #94566

Merged
steipete merged 3 commits into
openclaw:mainfrom
Tosko4:fix/android-actionable-offline-chat
Jul 2, 2026
Merged

steipete merged 3 commits into
openclaw:mainfrom
Tosko4:fix/android-actionable-offline-chat

Conversation

@Tosko4

@Tosko4 Tosko4 commented Jun 18, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Android Chat disabled its composer while the Gateway was offline, but the screen offered no direct recovery action. Users had to leave Chat and discover Gateway Settings themselves.

Why This Change Was Made

This adds one shared offline recovery panel below the conversation. Fix connection opens the existing Gateway Settings surface, and Copy diagnostics copies the current structured Gateway problem/status. The implementation consumes GatewayConnectionProblem directly instead of reclassifying freeform status text, so Android has one owner for connection diagnosis and one recovery path for empty and existing conversations.

User Impact

Disconnected Chat is no longer a dead end. Users can open the canonical connection settings or copy concise diagnostics from the blocked composer state. Connected Gateway/chat-health bootstrap behavior is unchanged.

Evidence

Prepared against current main at 71ccc9a487d8778ab015ced2789350e7dc2015fa.

Before After
Offline Chat only reported the block. Before: offline Chat without recovery actions One recovery panel provides Fix connection and Copy diagnostics. After: actionable offline Chat

Emulator interaction proof: tapping Fix connection opened Gateway Settings.

Commands run:

ANDROID_HOME="$HOME/Library/Android/sdk" ANDROID_SDK_ROOT="$HOME/Library/Android/sdk" ./gradlew :app:testPlayDebugUnitTest --tests ai.openclaw.app.ui.GatewayDiagnosticsTest --tests ai.openclaw.app.ui.chat.ChatErrorTextTest :app:ktlintCheck :app:assemblePlayDebug
node --import tsx scripts/native-app-i18n.ts check
git diff --check
.agents/skills/autoreview/scripts/autoreview --mode uncommitted

Results: focused Android tests, formatting, Play debug assembly, native i18n inventory, diff validation, and fresh autoreview passed. Exact-head GitHub CI passed 48/48 jobs: https://github.com/openclaw/openclaw/actions/runs/28575663612.

Known proof boundary: emulator proof covers the recovery panel and settings navigation. Clipboard contents are covered by focused unit tests rather than shell readback.

@Tosko4
Tosko4 marked this pull request as ready for review June 18, 2026 11:51
@openclaw-barnacle openclaw-barnacle Bot added the proof: supplied External PR includes structured after-fix real behavior proof. label Jun 18, 2026
@clawsweeper

clawsweeper Bot commented Jun 18, 2026 •

Copy link
Copy Markdown
Contributor

Thanks for the contribution. ClawSweeper proposes closing this for now: the implementation may be reasonable, but passing review and proof does not establish that OpenClaw should add this product surface.

Close as unconfirmed product direction: the patch is focused and proof-backed, but it adds a new Android Chat recovery surface without a linked issue, maintainer request, or maintainer-confirmed product direction.

This is a proposal only until the separate default-off apply policy is enabled and all live maintainer-signal checks pass. A maintainer can sponsor the direction, request a narrower version, or apply clawsweeper:human-review to keep it open.

Review details

Best possible solution:

Close this branch for now; an Android owner can sponsor or reopen a narrower Chat recovery direction if they want this product surface in core.

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

Not applicable as a bug reproduction: this PR proposes a new Android Chat recovery affordance. Current-main source and before/after emulator screenshots establish the baseline and changed behavior.

Is this the best way to solve the issue?

No for conservative cleanup: the implementation is a plausible focused solution, but adding a new Chat recovery surface should wait for maintainer sponsorship or a narrower approved direction.

Security review:

Security review cleared: Security review cleared: the diff is limited to Android Compose UI, app-side diagnostics helper logic, and unit tests, with no dependency, workflow, permission, secret, package, or host-command change.

AGENTS.md: found and applied where relevant.

What I checked:

Likely related people:

  • obviyus: Recent GitHub path history shows repeated work on ChatScreen, GatewayDiagnostics, and Android shell cleanup around the surfaces this PR extends. (role: recent Android Gateway/Chat contributor; confidence: high; commits: 4f8740029a0d, 63a2f69601ea, 608b9a9af258; files: apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatScreen.kt, apps/android/app/src/main/java/ai/openclaw/app/ui/GatewayDiagnostics.kt, apps/android/app/src/main/java/ai/openclaw/app/ui/ShellScreen.kt)
  • joshavant: Recent history includes ShellScreen, gateway reconnect/readiness, runtime startup, and Chat history work adjacent to connection-state UX. (role: recent Android shell/gateway contributor; confidence: medium; commits: 72b387ad488c, 9413a5aba5d9, 485446af8c95; files: apps/android/app/src/main/java/ai/openclaw/app/ui/ShellScreen.kt, apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatScreen.kt, apps/android/app/src/main/java/ai/openclaw/app/NodeRuntime.kt)
  • Tosko4: Beyond authoring this PR, this contributor has prior merged Android Chat and shell UX work on current main. (role: recent adjacent Android Chat contributor; confidence: medium; commits: 826ea2bf8513, 9159b3bf8e47, 3c73ff7689f0; files: apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatScreen.kt, apps/android/app/src/main/java/ai/openclaw/app/ui/ShellScreen.kt)

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

@clawsweeper clawsweeper Bot added 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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Jun 18, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 18, 2026
@Tosko4

Tosko4 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 18, 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 repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 18, 2026
@Tosko4

Tosko4 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

@obviyus could you advise whether this offline Chat recovery UX is something you want in core? ClawSweeper did not find a concrete patch defect and marked the proof sufficient, but flagged that the product direction needs maintainer sponsorship. Happy to narrow this if you prefer a smaller surface.

@steipete steipete self-assigned this Jul 2, 2026
@steipete

steipete commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Android offline recovery — before / after

Current main before: offline Chat stops at “Reconnect from Settings” with no recovery control.

Android Chat before — offline dead end

Prepared head 48744fd4e8: one recovery card shows the structured gateway failure and offers direct Gateway Settings plus diagnostics copy.

Android Chat after — actionable offline recovery

Emulator proof: Medium Phone API 36.1, Play debug. Fix connection opened the Gateway settings surface directly.

@steipete

steipete commented Jul 2, 2026 •

Copy link
Copy Markdown
Contributor

Prepared and validated on exact head 71ccc9a487d8778ab015ced2789350e7dc2015fa.

What changed during maintainer preparation:

  • Rebased onto current main.
  • Replaced freeform Gateway status classification with the existing structured GatewayConnectionProblem owner state.
  • Kept one shared recovery panel for empty and existing conversations.
  • Routed Fix connection to the canonical Gateway Settings screen.
  • Synced the native i18n inventory.

Local proof:

ANDROID_HOME="$HOME/Library/Android/sdk" ANDROID_SDK_ROOT="$HOME/Library/Android/sdk" ./gradlew :app:testPlayDebugUnitTest --tests ai.openclaw.app.ui.GatewayDiagnosticsTest --tests ai.openclaw.app.ui.chat.ChatErrorTextTest :app:ktlintCheck :app:assemblePlayDebug
node --import tsx scripts/native-app-i18n.ts check
git diff --check
.agents/skills/autoreview/scripts/autoreview --mode uncommitted

All passed. After the final clean rebase, exact-head CI passed 48/48 jobs: https://github.com/openclaw/openclaw/actions/runs/28575663612. An earlier run's sole first-attempt failure was an unrelated 120-second timeout in src/gateway/server-startup.test.ts; the failed-only rerun passed unchanged.

Emulator before/after proof and the Gateway Settings navigation result are attached here: #94566 (comment).

Known proof boundary: clipboard content is covered by focused unit tests rather than emulator shell readback.

Thanks @Tosko4 for identifying and implementing the recovery UX.

@steipete
steipete merged commit f2abf57 into openclaw:main Jul 2, 2026
80 checks passed
@steipete

steipete commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Merged via squash.

@clawsweeper

clawsweeper Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper could not autoclose this item.

Reason: structured ClawSweeper close marker: close-required (sha=9745afc1f52d08c82e1ad514bf30abc9e2a8be50)

Usage: /autoclose <maintainer close reason>. I will close this item and any open same-repo items explicitly referenced in the command text.

LeonidasLux pushed a commit to LeonidasLux/openclaw that referenced this pull request Jul 3, 2026
* fix(android): make offline chat actionable

* fix(android): use structured offline recovery state

* chore(i18n): sync native string inventory

---------

Co-authored-by: Peter Steinberger <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 3, 2026
* fix(android): make offline chat actionable

* fix(android): use structured offline recovery state

* chore(i18n): sync native string inventory

---------

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

Labels

app: android App: android P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: supplied External PR includes structured after-fix real behavior proof. 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.

2 participants