Skip to content

improve(android): keep chat photos outside text bubbles - #155338

Merged
roboclaw-bot merged 1 commit into
mainfrom
fix/android-chat-media-parity-20260922
Sep 22, 2026
Merged

roboclaw-bot merged 1 commit into
mainfrom
fix/android-chat-media-parity-20260922

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Photos stretch Android chat bubbles into tall columns, and attachments beyond the fourth image cannot be opened.

User Impact

Chat photos sit outside the text surface, adjacent photos form compact rows, and every image remains reachable. Short messages fit their text; long user messages keep their existing width limit.

Why This Change Was Made

The message renderer separates passive attachments from text without moving audio/video players out of their existing owner. Your attachments appear above your text; assistant content keeps its authored text/image order. Both roles use the same text inset. The existing image viewer, download/decode limits, source cards, disclosures, and message actions remain in place.

Only four attachment image previews are composed at once. Next images / Previous images replace that window instead of decoding an unbounded gallery; the existing bitmap cache is not treated as a bound on Compose-held references. Single previews fit both dimensions, including extremely tall or wide images.

Native adaptation of the Web design reference by @vyctorbrzezowski—not a desktop CSS port or a claim that the Web galleries both roles. No camera/composer production changes, new dependencies, configuration, or schema changes.

Evidence

Camera-first integration — 163787f

Camera landed first as 6005e26243da4e720fb8495f43cae6971e38050f. This candidate reapplies the previously reviewed final nine-file source-only gallery delta onto that base, without replaying intermediate generated-locale changes.

  • The single shared-helper conflict preserves both source and compact: the composer retains its Composer decoding policy; gallery attachment calls retain Inline admission and compact layout. Both arguments reach their existing owners.
  • Production/test/inventory/doc deltas are unchanged from the previous final gallery candidate. No translated/platform-generated files, dependencies, permissions or schemas were added.
  • Fresh full-candidate P0–P2 autoreview: scoped-clean, all three passes complete, exit 0. The earlier reviewer execution failure produced no accepted report; a bounded same-engine recovery completed on identical source bytes. Commit hooks passed and the committed delta hash matches the reviewed staged delta.
  • Exact-head verification: CI 35738690348 completed SUCCESS on 163787f. Play, ThirdParty, Wear and Kotlin lint all pass, together with the selected repository checks. Full phone suites include the retained admitted-large-photo composer regression and gallery paging/layout/transcript cases. Historical runs below are supplementary, not substitutes for this integrated-head proof.
  • Prior inspected Before/After and native-state screenshots remain applicable to unchanged gallery geometry; no new image generation or physical-device acceptance is claimed. A separate Before landing comment will record final exact-head gates before merging.

Historical source-only CI correction (240e9b6db61b6518ccd79edd4c61ede62087784b): The first hosted preflight failed on mixed source/generated locale output before Android tests ran. The 23 generated Android locale/platform files are now restored to the PR base and absent from the PR diff; source, tests and apps/.i18n/native-source.json remain. The serialized locale refresh workflow owns those artifacts. The same whole-PR scope classifier fails before and passes after this correction, without changing its guards.

After removal, all 22 native layout/navigation cases across Play and ThirdParty, app Kotlin lint and native i18n source verification pass through the existing untranslated-source fallback (36s wall; Gradle 34s). Fresh independent P0–P2 review of the correction is scoped-clean. Layout source and the matched screenshot evidence are unchanged. This is not a full generated-locale parity claim.

Matched production Android Compose, synthetic content, 360×800 mdpi, Claw dark theme. Isolated Robolectric native graphics—not an emulator, physical-device, or live-Gateway claim.

Before

Native Android chat before

After

Native Android chat after

Additional native states

Light/dark appearance, both roles, single and grouped images, portrait/panorama, media-only and captioned turns, five-image navigation, long-text gutters, and tablet wrapping. Gallery tiles are scaled copies of native captures, not UI mocks.

Native Android media state gallery

  • Red proof: eight target layout/navigation assertions fail on the original production modules at 473d38b; the matched full-chat capture uses the same fixture and content.
  • Additional boundary proof reproduced a crash from Compose's aspect-ratio fallback on a 1×1600 image; explicit fitting now preserves both limits and an operable preview target.
  • Retained full-candidate proof: 98 focused Play tests and 11 ThirdParty tests pass; all four Kotlin lint tasks, Play Android lint, native i18n source verification, documentation formatting, and the native schema guard pass. Coverage includes viewer gestures, image decoding, playback, code blocks, reader anchors, outbox/streaming transitions, metadata/disclosures, real gutter hit-testing, and cancellation of the old image page.
  • Fresh independent P0–P2 autoreview: scoped-clean. The UI commit was rebased patch-identically onto repaired main 4311a4e; the only incorporated Android changes are the already-tested NSD overrides and one unrelated Gateway method enum value.
  • Repaired-main verification: both native UI fixtures pass again in Play and ThirdParty (22 cases total), plus app Kotlin lint and native i18n source verification; 35.44 s, exit 0, without the temporary fixture overlay.
  • Cost: full native validation took 94.85 s including both variants and lint. The new media fixture took 1.01 s and the full-chat fixture 0.74 s in that run (4.70 s / 0.77 s in the earlier cold focused run); changed delivery/geometry helpers took 3.98 s, 1.41 s, and 0.03 s. Native layout and physical hit-region assertions cannot be proved by cheaper string/helper tests. The historical source-only head completed hosted CI 35677748762; integrated-head CI is tracked separately above.
  • Runtime Kotlin delta: +234/−111 (net +123), for separate text/media geometry, a reachable four-image window, and strict two-axis fitting. Tests: net +583. The source-inventory delta is separate from runtime code; translated and platform-generated artifacts are excluded.
  • Local commands exclude only :app:generateMermaidAssets; these fixtures contain no diagrams. This is focused native proof, not a full packaging/release build. The original baseline used the same test-only Robolectric NSD compatibility correction now shipped in fix: review provider precautions before continuing chat #155214. That prerequisite is on main and is not part of this feature’s commit.

Integration note: the camera change has landed. This PR now builds on it, retaining both source-specific decoding and explicitly named compact layout; gallery and composer coverage coexist on the integrated candidate.

Worked on by: @IWhatsskill

Work sessions


View the OpenClaw team session

@clawsweeper

clawsweeper Bot commented Sep 22, 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: XL maintainer Maintainer-authored PR labels Sep 22, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review September 22, 2026 01:40
@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 22, 2026
@clawsweeper

clawsweeper Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 22, 2026, 10:47 AM ET / 14:47 UTC (Revision 5).

ClawSweeper review

What this changes

Android chat separates photos from text bubbles, groups adjacent attachments, and adds four-image paging while preserving the existing image viewer.

Merge readiness

✅ Ready for maintainer review

Keep open: the Android improvement remains necessary, and the reviewed head has no blocking correctness findings. Inspected native screenshots and successful exact-head CI support the change; the merged camera work does not supersede it.

Priority: P2
Reviewed head: 163787f45c2ce50abbda4a05e366f7fbea5cdd0c

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused implementation with strong native visual evidence, meaningful regression coverage, and no blocking findings.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected production Compose screenshots show the changed message layout and fifth-image page under Robolectric native graphics; boundary tests supplement paging, cancellation, and viewer behavior, and integrated-head CI passes. Evidence does not claim device or live-Gateway execution. No stored-data contract changes require migration proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): Inspected production Compose screenshots show the changed message layout and fifth-image page under Robolectric native graphics; boundary tests supplement paging, cancellation, and viewer behavior, and integrated-head CI passes. Evidence does not claim device or live-Gateway execution. No stored-data contract changes require migration proof.
Evidence reviewed 8 items Pinned change and merge ownership: Reviewed the merge-base-to-head production, test, inventory, and documentation hunks. Raw test-merge parents match the pinned base followed by the exact PR head; the merged Android chat sources match the reviewed head.
Current main still needs the change: Current main retains visibleImageCount < 4 and the additional-images-hidden notice. Its two affected production modules are unchanged from the pinned PR merge base.
Latest release comparison: The v2026.9.5 source also limits rendering to four images and reports omitted images. The GitHub contents API supplied this source after the local historical-blob read failed.
Findings None None.
Security None None.

How this fits together

Android chat renders transcript content and attachment references received through the Gateway. Its message renderer arranges text and previews, delegates image loading to existing decoders, and opens the existing full-screen viewer.

flowchart LR
  A[Chat transcript] --> B[Android message renderer]
  B --> C[Role and content ordering]
  C --> D[Separate text surfaces]
  C --> E[Four-image page]
  E --> F[Existing image loaders]
  F --> G[Photo previews]
  G --> H[Full-screen viewer]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +583, Docs 0, Other +125. Total +708 across 9 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 5 596 13 +583
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 3 238 113 +125
Total 9 835 127 +708

Review metrics

Metric Value Why it matters
Production versus test growth Production Kotlin net +123; tests net +583 Production growth implements bounded paging and separate native geometry; tests cover layout, navigation, and integration through existing owners.

Technical review

Best possible solution:

Keep attachment layout and bounded paging in the existing Android renderer, with shared decoding, playback, and viewer ownership preserved.

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

Yes, from source: a message containing five images still renders only four on current main and v2026.9.5. The supplied native captures demonstrate the layout difference; this review did not execute the application.

Is this the best way to solve the issue?

Yes. Extending the existing renderer with a bounded page preserves loader and viewer ownership and avoids retaining an unbounded gallery.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 50ea1795fc80.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This improves Android media-heavy conversations and restores access to later images with a limited presentation-layer scope.
  • 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 production Compose screenshots show the changed message layout and fifth-image page under Robolectric native graphics; boundary tests supplement paging, cancellation, and viewer behavior, and integrated-head CI passes. Evidence does not claim device or live-Gateway execution. No stored-data contract changes require migration proof.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected production Compose screenshots show the changed message layout and fifth-image page under Robolectric native graphics; boundary tests supplement paging, cancellation, and viewer behavior, and integrated-head CI passes. Evidence does not claim device or live-Gateway execution. No stored-data contract changes require migration proof.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected production Compose screenshots show the changed message layout and fifth-image page under Robolectric native graphics; boundary tests supplement paging, cancellation, and viewer behavior, and integrated-head CI passes. Evidence does not claim device or live-Gateway execution. No stored-data contract changes require migration proof.

Evidence

What I checked:

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; 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 (4 earlier review cycles)
  • reviewed 2026-09-22T01:47:09.439Z sha fef6fff :: needs maintainer review before merge. :: none
  • reviewed 2026-09-22T02:07:54.933Z sha 240e9b6 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-22T14:20:52.250Z sha 163787f :: needs maintainer review before merge. :: none
  • reviewed 2026-09-22T14:28:23.792Z sha 163787f :: needs maintainer review before merge. :: none

Reapply the reviewed source-only gallery delta onto the landed camera change. Preserve both the camera source-specific decoding policy and the compact gallery layout argument. Keep bounded four-image navigation, original assistant ordering, native regression coverage and existing viewer/auth owners. Generated locale output remains owned by the refresh workflow.

Co-authored-by: IWhatsskill <[email protected]>
@roboclaw-bot
roboclaw-bot force-pushed the fix/android-chat-media-parity-20260922 branch from 240e9b6 to 163787f Compare September 22, 2026 14:12
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

The previous completed review is now over 12 hours old. Camera landed first as 6005e26. Integrated gallery head: 163787f. The final nine-file source-only gallery delta preserves both source-specific decoding and compact layout; generated locale outputs remain excluded. Fresh full-candidate P0–P2 autoreview completed all three passes without findings. Updated PR evidence distinguishes historical proof from the running exact-head CI: https://github.com/openclaw/openclaw/actions/runs/35738690348.

@clawsweeper

clawsweeper Bot commented Sep 22, 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 exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Before landing

Integrated head: 163787f, based on the already-landed camera commit 6005e26. Camera was landed first, as requested.

  • Problem / owner: Android photos shared text-bubble geometry and images beyond the fourth were unreachable. The existing renderer now owns separate text/media layout and a message-wide four-image page, preserving authored assistant order and user attachment-first alignment. Decoder, viewer, authorization, media and widget ownership are unchanged.
  • Integration: reapplied the reviewed final nine-file source-only delta, not intermediate generated locale output. The actual shared-helper conflict is resolved with both source and compact retained and forwarded: composer images keep their Composer decoding policy; gallery calls keep Inline admission plus compact layout. The committed diff exactly matches the freshly reviewed staged bytes; normal hooks passed.
  • Exact-head proof: CI 35738690348 completed SUCCESS on this head, including Play, ThirdParty, Wear, Kotlin lint and the selected repository checks. The phone suites contain both the admitted-large-photo composer regression and gallery paging/layout/transcript cases. Prior baseline red/native visual proofs remain documented in the body; they are not substituted for this integration run.
  • Review: fresh full-candidate P0–P2 autoreview completed all three passes without findings. The initial unavailable reviewer attempt was not accepted as proof; bounded same-engine recovery reviewed identical source. Current ClawSweeper review, 14:28 UTC, is ready on this exact head, with Before merge: None and no Rank-up moves.
  • Scope / cost: production Kotlin +234/−111 (net +123); tests +596/−13 (net +583); source inventory +4/−2; documentation +1/−1. No generated locale, dependency, permission or schema changes. Growth implements bounded navigation and native geometry rather than a second loader/viewer. Existing inspected Before/After and native-state images remain embedded and were already delivered; no new physical-device/live-Gateway acceptance is claimed.
  • Credit: preserve @IWhatsskill and the exact human co-author trailer. Existing contributor credit, original work-session links and canonical footer remain; the actual integration/verification session was added.

Native review artifacts and OPENCLAW_TESTBOX=1 scripts/pr prepare-run 155338 have passed on this exact head, reusing completed hosted evidence without another push. Final pinned-head merge gates remain authoritative. This note is published before merge, not a claim that landing has happened.

@roboclaw-bot
roboclaw-bot merged commit fbc540f into main Sep 22, 2026
134 checks passed
@roboclaw-bot
roboclaw-bot deleted the fix/android-chat-media-parity-20260922 branch September 22, 2026 14:48
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 22, 2026
* commit '739e2410702e0b1ad1d17a6dac07ddc0ab6dbebb': (140 commits)
  fix(ui): pause passive polling in hidden tabs (#155617)
  improve(android): keep chat photos outside text bubbles (#155338)
  fix(ui): preserve saved project after discovery failure (#155619)
  feat: compare Kitchen Sink Gateway resource costs (#155734)
  test(gateway): arm clock-jump claim after readiness (#155748)
  chore(ui): refresh control ui locales (#155700)
  fix(ci): join archive placement fixtures before teardown (#155751)
  fix(matrix): keep bot discovery off the Gateway thread (#152122)
  fix(agents): reconcile late requester recovery receipts (#155357)
  test(gateway): guard embeddings HTTP fixture lifetimes
  fix: isolate triage fixture acquisition and cleanup (#155736)
  refactor(sessions): hydrate saved transcripts off thread (#153325)
  fix: Claude MCP turns abort before tool timeout (#155663)
  fix(goals): pause terminal failures and clarify goal states (#155694)
  fix(test): preserve watcher errors when diagnostic capture fails (#155383)
  ci: move native runtime proofs to release validation (#155606)
  fix(auth): decouple compaction from profile rotation (#155204)
  fix(agents): admit compaction outside retired plugin generations (#151232)
  perf(ui): reduce automatic session list refetches (#155705)
  test: avoid unused source repos in release input fixtures (#155733)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 23, 2026
)

Reapply the reviewed source-only gallery delta onto the landed camera change. Preserve both the camera source-specific decoding policy and the compact gallery layout argument. Keep bounded four-image navigation, original assistant ordering, native regression coverage and existing viewer/auth owners. Generated locale output remains owned by the refresh workflow.

Co-authored-by: IWhatsskill <[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 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: L 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