Skip to content

fix(android): keep Wear chat on the latest reply - #120307

Merged
Solvely-Colin merged 1 commit into
openclaw:mainfrom
IWhatsskill:fix/android-wear-chat-follow-latest
Aug 7, 2026
Merged

Solvely-Colin merged 1 commit into
openclaw:mainfrom
IWhatsskill:fix/android-wear-chat-follow-latest

Conversation

@IWhatsskill

@IWhatsskill IWhatsskill commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

[AI-assisted]

What Problem This Solves

Wear OS chat could open at the top of a conversation while the newest assistant reply was already below the viewport.

Failure mode

Longer conversations made users scroll past the identity and status content before they could read the latest reply.

Why This Change Was Made

The Wear chat now owns its list state, follows a trailing anchor as replies arrive or stream, and pauses that behavior when the user deliberately scrolls backward.

Root Cause

The shared Wear page previously kept its list state private, so ChatPage could not react when message content changed.

User Impact

The latest reply is visible when chat opens and continues to follow while it grows. Users who browse older messages keep their position and get the existing New messages action to return to the tail.

Evidence

Validated at exact head 1e7cbf4527cf82df2558fc16c6a7b5c8d2a24ad9: 18/18 focused tests passed and the newest reply was measured inside the Wear viewport.

Inspect exact-head proof ledger

Provenance

  • Base: b738e2578087a5fb292abf333dbc5c7e92c853d6
  • Proof head: 1e7cbf4527cf82df2558fc16c6a7b5c8d2a24ad9
  • Revalidated: on the bound base

Direct behavior

Wear chat runtime command

powershell.exe -NoProfile -ExecutionPolicy Bypass -File <proof-workspace>\verify-after-ui.ps1 ai.openclaw.wear.MainActivity
  • Wear chat runtime (PRODUCTION_RUNTIME; boundary: Wear MainActivity on a local Wear OS emulator) — Observed: The exact-head Wear APK opened the production ChatPage with conversation content taller than the viewport; the newest reply node was reported at [72,184][350,252] inside the 454x454 display. Result: the newest reply was visible without manual scrolling. Proves the patched production ChatPage initially follows its rendered trailing anchor. Preserves the existing Wear MainActivity and ChatPage rendering path.

Redacted exact-head Wear UI output

exact_head=1e7cbf4527cf82df2558fc16c6a7b5c8d2a24ad9
serial=emulator-5556
component=ai.openclaw.app/ai.openclaw.wear.MainActivity
target_text=Ready after the final store checks.
bounds=[72,184][350,252]
viewport=454x454
test_runner=none
result=visible

Automated verification

Focused Wear behavior

./gradlew --no-daemon :wear:testDebugUnitTest --tests ai.openclaw.wear.MainActivityTest --tests ai.openclaw.wear.WearScreenshotModeTest --rerun-tasks --console=plain
  • ./gradlew --no-daemon :wear:testDebugUnitTest --tests ai.openclaw.wear.MainActivityTest --tests ai.openclaw.wear.WearScreenshotModeTest --rerun-tasks --console=plain — [TEST] 18/18 tests passed with 0 failures, 0 errors, and 0 skips. Proves stream growth follows the tail, manual backscroll is retained, explicit return resumes following, and the rendered anchor index is correct. Preserves the existing Voice Thread follow behavior and deterministic chat fixture contract.

Wear static analysis

./gradlew --no-daemon :wear:ktlintCheck :wear:lintDebug --console=plain --stacktrace
  • ./gradlew --no-daemon :wear:ktlintCheck :wear:lintDebug --console=plain --stacktrace — [STATIC] completed successfully with exit code 0. Proves the affected Wear sources satisfy Kotlin formatting and Android lint checks. Preserves the existing Wear module build conventions.

Native localization

corepack [email protected] native:i18n:check && corepack [email protected] android:i18n:check && corepack [email protected] apple:i18n:check
  • corepack [email protected] native:i18n:check && corepack [email protected] android:i18n:check && corepack [email protected] apple:i18n:check — [STATIC] all three checks completed successfully; the required sync reported changed=false. Proves the reused New messages strings introduce no localization drift. Preserves the Android and Apple localization catalogs.

Android packaging

corepack [email protected] android:assemble
  • corepack [email protected] android:assemble — [BUILD] 109 Gradle tasks completed with BUILD SUCCESSFUL. Proves the phone, Wear, and shared Android modules still assemble together. Preserves the existing phone and Wear packaging boundary.

Patch hygiene

git diff --check HEAD^..HEAD
  • git diff --check HEAD^..HEAD — [STATIC] completed with exit code 0 across exactly two changed Wear files. Proves the committed patch is whitespace-clean and bounded. Preserves Gateway, pairing, authentication, Data Layer, session, and model owners outside the Wear UI.

Preserved boundaries

  • Gateway, authentication, pairing, Wear Data Layer, session selection, and model selection are unchanged.
  • The existing Voice Thread follow state and New messages affordance are reused rather than duplicated.
  • Only WearScreens.kt and MainActivityTest.kt changed.

Proof gap

None

Artifacts

  • None attached.

@IWhatsskill
IWhatsskill marked this pull request as ready for review August 7, 2026 17:33
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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 Aug 7, 2026
@clawsweeper

clawsweeper Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 7, 2026, 1:40 PM ET / 17:40 UTC.

ClawSweeper review

What this changes

The PR makes Wear OS chat initially show and follow the newest reply, while preserving deliberate backward scrolling and the existing return-to-latest action.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep this PR open: current main still leaves Wear ChatPage’s list state inside the shared page, while the branch moves that ownership to ChatPage and reuses the established Voice-thread follow model. No patch-introduced correctness or security finding was identified.

Priority: P2
Reviewed head: 1e7cbf4527cf82df2558fc16c6a7b5c8d2a24ad9

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, owner-aligned Wear fix with credible exact-head emulator proof and targeted regression coverage.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (terminal): The PR records an exact-head production Wear-emulator run showing the newest reply inside the 454×454 viewport without manual scrolling.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The PR records an exact-head production Wear-emulator run showing the newest reply inside the 454×454 viewport without manual scrolling.
Evidence reviewed 5 items Current-main gap: Current main constructs ChatPage through WearPage without exposing the list state, so ChatPage cannot react to content changes; Voice already owns the generic follow controller separately.
Owner-bound repair: The branch creates ChatPage’s list state, derives a rendered trailing anchor, and applies the same shared follow-state lifecycle used by Voice; the optional-item arithmetic matches the rendered items.
Regression coverage: Added focused tests cover streaming growth, manual backscroll retention, return-to-latest, and the trailing-anchor index.
Findings None None.
Security None None.

How this fits together

Wear ChatPage turns the active-session message snapshot and streaming text into a small scrollable conversation on a watch. Its follow-state controller decides whether new content moves the viewport or leaves the reader’s position intact.

flowchart LR
A[Active session snapshot] --> B[Wear ChatPage]
B --> C[Messages and streaming reply]
C --> D[Follow-state controller]
D --> E[Wear conversation viewport]
E --> F[Newest reply visible]
E --> G[New messages action]
Loading

Before merge

  • Resolve merge risk (P1) - AndroidX Wear Compose source was unavailable locally and remote source access failed during review; pending Android compilation remains the independent API-contract check.
  • Complete next step (P2) - No mechanical repair is identified; this needs normal exact-head Android CI completion and maintainer merge review.
Agent review details

Security

None.

PR surface

Other +195. Total +195 across 2 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 2 286 91 +195
Total 2 286 91 +195

Review metrics

Metric Value Why it matters
Production versus test LOC production +126, tests +69 The production growth is justified by moving scroll ownership to ChatPage and adding the matching trailing-anchor state, while the tests cover reader-intent transitions.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Land one ChatPage-owned scroll controller that reuses the existing follow-state contract, with exact-head Android checks confirming the branch remains compatible with the current base.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Land one ChatPage-owned scroll controller that reuses the existing follow-state contract, with exact-head Android checks confirming the branch remains compatible with the current base.

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

Yes, source inspection gives a high-confidence path: current main keeps the chat list state private, preventing content-driven follow behavior; the PR’s exact-head emulator record also reports the newest reply inside the Wear viewport.

Is this the best way to solve the issue?

Yes. ChatPage owns the content revision and reader intent, so owning its list state there and reusing the Voice follow helpers is cleaner than adding callbacks or separate scroll policy to the shared page.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: The PR repairs a bounded Wear OS chat readability regression without evidence of broader delivery, session, or availability impact.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR records an exact-head production Wear-emulator run showing the newest reply inside the 454×454 viewport without manual scrolling.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR records an exact-head production Wear-emulator run showing the newest reply inside the 454×454 viewport without manual scrolling.

Label justifications:

  • P2: The PR repairs a bounded Wear OS chat readability regression without evidence of broader delivery, session, or availability impact.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR records an exact-head production Wear-emulator run showing the newest reply inside the 454×454 viewport without manual scrolling.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR records an exact-head production Wear-emulator run showing the newest reply inside the 454×454 viewport without manual scrolling.

Evidence

What I checked:

Likely related people:

  • steipete: Recent Wear reply-routing work and the current shared follow-state area connect this owner to the session-to-Wear conversation path. (role: recent adjacent Wear-session contributor; confidence: medium; commits: 935ee7fedfb0; files: apps/android/wear/src/main/java/ai/openclaw/wear/WearScreens.kt, apps/android/wear/src/main/java/ai/openclaw/wear/WearCompanionUiModels.kt)
  • WhatsSkiLL: Introduced the prior Wear thread-follow implementation that the branch reuses for ChatPage. (role: introduced existing Wear follow behavior; confidence: high; commits: 50ce5dedeaff; files: apps/android/wear/src/main/java/ai/openclaw/wear/WearScreens.kt, apps/android/wear/src/test/java/ai/openclaw/wear/MainActivityTest.kt)

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.

@Solvely-Colin
Solvely-Colin merged commit 62937ea into openclaw:main Aug 7, 2026
114 checks passed
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: android App: android app: wearos App: wearos P2 Normal backlog priority with limited blast radius. 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.

2 participants