Skip to content

refactor(android): deslop Android app third pass - #159589

Merged
steipete merged 2 commits into
mainfrom
deslop/l117-android-third-pass
Sep 27, 2026
Merged

steipete merged 2 commits into
mainfrom
deslop/l117-android-third-pass

Conversation

@steipete

@steipete steipete commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Maintainer-requested third Android cleanup pass removes duplicated parsers, projections, and forwarding layers left after the earlier passes. Related: #158539, #159154.

User Impact

No user-visible behavior change. Gateway payloads, localized strings, authorization and ownership checks, lifecycle ordering, Wear integration, and the 4 KB / 16 KB page-size checks stay unchanged.

Why This Change Was Made

  • Route System Agent calls directly from the view model to the existing controller, removing an intermediate runtime forwarding layer.
  • Share SMS result/message models across phone flavors and reuse the canonical Wear agent model and stream result instead of mirror wrappers.
  • Reuse established JSON readers and parsers in chat, voice, setup, and device handlers; share chat event payload admission and cached session-search fallback.
  • Let one Talk directive alias set drive parsing and unknown-key reporting; use the library's nested JSON builders for device and accessibility payloads.
  • Share calendar lookup execution, preference string publication, certificate fingerprints, VPN selection, cron labels, and Gateway update metadata while retaining each caller's selection policy.
  • Reuse one Unicode/UTF-8 truncation owner for widget filenames and bounded Wear projections. Share code-token/string scanning, model choice ordering, pending-send decoding, and stance weights/durations without changing their results.
  • Reuse existing UI predicates, badge/divider rendering, and image-fetch execution; remove duplicate Wear retry/result bookkeeping and impossible branches.
  • Inline release-tool forwarding helpers while preserving validation, shell quoting, and artifact-copy failures.

The measured candidate removes 683 net native production lines and 9 tooling lines (692 total production/tooling lines). Tests are 2 lines smaller; existing behavioral assertions are preserved. This is below the 1,000-line target after the full source sweep, so the required coverage log is included below.

Evidence

Blacksmith Testbox proof completed on tbx_01m3gzhqhw2w9mcncxvt6pa22v (run); the lease was stopped after proof.

  • Gradle: 7,531 unit tests passed, zero failures/errors/skips (Play 3,527; third-party 3,660; Wear 331; Wear shared 13). Phone/Wear debug builds, benchmark build, Android lint for both flavors/Wear, and all four Kotlin lint projects passed. Final combined Gradle gate: 637.03 s wall.
  • pnpm native:i18n:verify: passed after regenerating the source-site inventory on Testbox tbx_01m3h6g98kax108qhfkwjc3evf. A strict comparison proved all 4,050 IDs/texts/platforms unchanged, with only four obsolete NodeRuntime.kt sites removed; separate Codex review of this generated diff was scoped-clean through P2. The first hosted CI stopped at this stale inventory and cancelled downstream Android jobs; the corrected head passed fresh CI.
  • pnpm android:i18n:check: passed (1,857 phone keys, 4 third-party keys, 137 Wear keys; all configured locales).
  • Import-boundary suites (src/infra/fs-safe-import-boundary.test.ts plus plugin, Control UI, test-helper, and boundary-checker siblings) and Android release-artifact/Fastlane gate tests: passed; 17.30 s wall for the selected Vitest invocation.
  • node scripts/check-changed.mjs: passed; 34.26 s wall. Ruby syntax: passed.
  • The first native gate found Android lint cannot follow extracted location permission checks. Those checks were restored inline. Formatter findings were fixed with pinned ktlint 1.8.0, then the complete native gate was rerun successfully. No lint baseline or test assertion was weakened.
  • Independent Codex autoreview on Blacksmith Testbox tbx_01m3h3ygd71ngj9g7awc0qmh72: scoped-clean through P2, no accepted/actionable findings. The reviewed candidate exactly matched the native proof tree; the clean rebase preserved its stable patch ID. Exact-head CI run 36313916413 passed for 10611dfbe0f7a58c8a4c165946877befb739e73e, including all Android jobs, 4 KB and 16 KB native Access tests, and openclaw/ci-gate.

Changed tests only migrate callers/assertions to canonical result types and owners. Their measured JUnit suite times on Testbox were 1.506–1.777 s for model-selection flow, 3.773–6.269 s for settings insets, 0.004–0.008 s for model ordering, 0.005–0.009 s for stance timing, 0.018 s for SMS, 0.088 s for Wear history, and 3.299 s for the Wear context picker. No new test cases or added test work. Hosted Android job wall times: Play 456 s, third-party 424 s, Wear 390 s, Kotlin lint 368 s, and each native page-size job 639 s.

Remote execution and lease closeout

Provider: Blacksmith Testbox. Every test, lint/check, and build ran remotely; local execution was limited to repository operations, reads, edits, and formatting.

Lease Purpose and command Result
tbx_01m3gvqk7re2kea0vhasyyjh2d (run) Frozen dependency install and toolchain preflight Passed; lease later expired before native validation; confirmed stopped.
tbx_01m3gzhqhw2w9mcncxvt6pa22v (run) Gradle unit/lint/build/ktlint tasks; localization; selected import-boundary and release-helper tests; check-changed All application gates passed after the documented lint repair; stopped.
tbx_01m3h3ygd71ngj9g7awc0qmh72 (run) Isolated Codex autoreview, branch scope, P2 Scoped-clean; stopped.
tbx_01m3h6g98kax108qhfkwjc3evf (run) Native inventory generation, strict unchanged-string comparison, native:i18n:verify, and isolated diff review Passed / scoped-clean; stopped.

Native Gradle task set:

./gradlew --no-daemon --build-cache --continue \
  :app:testPlayDebugUnitTest :app:testThirdPartyDebugUnitTest \
  :wear:testDebugUnitTest :wear-shared:testDebugUnitTest \
  :app:lintPlayDebug :app:lintThirdPartyDebug :wear:lintDebug :wear-shared:lintDebug \
  :app:assemblePlayDebug :app:assembleThirdPartyDebug :wear:assembleDebug :benchmark:assembleDebug \
  :app:ktlintCheck :benchmark:ktlintCheck :wear:ktlintCheck :wear-shared:ktlintCheck

Fixes Found Along the Way

No separately established product bug or flaky test so far.

Coverage log: every original first-party production source/build/script file over 200 lines (135 files)

Read largest-first, starting with files untouched by Android commits since 2026-09-20. Generated first-party Kotlin is included and preserved; tests, vendored assets, translation resources, and generated build outputs are outside this production-source census.

Original lines File Status Change or reason retained
10255 apps/android/app/src/main/java/ai/openclaw/app/NodeRuntime.kt READ Shared cron labels and update metadata projection; removed SystemAgent forwarding layer and temporary channel-account model; remaining leases/generations/auth/voice/Wear coordinators retain distinct contracts.
9366 apps/android/app/src/main/java/ai/openclaw/app/chat/ChatController.kt READ reused exact JSON helper owners; centralized payload admission and search fallback; removed queue-error forwarding; simplified parser control flow; preserved lifecycle and ownership state machines
4990 apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatScreen.kt READ Removed the partition wrapper from the model picker caller; remaining wiring preserves current-owner admission and distinct Compose layout/state lifetimes.
3448 apps/android/app/src/main/java/ai/openclaw/app/ui/SettingsScreens.kt READ Reused canonical badgeInitials with preserved dot delimiter behavior; remaining settings flows have distinct permission, form, and display contracts.
3441 apps/android/app/src/main/java/ai/openclaw/app/ui/OnboardingFlow.kt READ Pairing, QR camera, approval navigation, permission launchers, and recovery retain distinct lifecycle and localization contracts; earlier pass already consolidated closed access/error states.
3401 apps/android/app/src/main/java/ai/openclaw/app/voice/TalkModeManager.kt READ Reused canonical object parsing and object projection; retained PTT/realtime ownership, cancellation, transcript, and playback state machines.
2753 apps/android/app/src/main/java/ai/openclaw/app/gateway/GatewaySession.kt READ Shared update-available parser with runtime event route; remaining transport admission, bootstrap token settlement, reconnect, invokes, and media leases preserve distinct lifecycle contracts.
2502 apps/android/wear/src/main/java/ai/openclaw/wear/WearScreens.kt READ Replaced redundant WearAgentSummary references with canonical WearAgent; retained layout, accessibility, scroll-follow, and lifecycle behavior.
2211 apps/android/wear/src/main/java/ai/openclaw/wear/WearViewModel.kt READ Removed the result wrapper around WearLiveStreamSnapshot and duplicate strict JSON accessors; retained all route generations, reply ownership, and cancellation checks.
2169 apps/android/app/src/main/java/ai/openclaw/app/MainViewModel.kt READ Calls existing SystemAgent owner directly; remaining facade owns lazy runtime startup, stable flows, composer identity, and Activity-surviving admission.
1847 apps/android/app/src/main/java/ai/openclaw/app/i18n/NativeStringResources.kt READ Generated file read in full; scripts/android-app-i18n.ts owns exact source-string/resource mapping; generated localization preserved.
1799 apps/android/app/src/main/java/ai/openclaw/app/ui/ShellScreen.kt READ Reused ClawSeparatedColumn, skillReady, and nodeCapabilityApprovalNeedsUserAction; preserved ordering, colors, navigation and authority checks.
1629 apps/android/app/src/main/java/ai/openclaw/app/chat/ChatCommandOutbox.kt READ retained transactional admission, receipt and attachment bounds, attempt fencing, branch reconciliation and shipped recovery contracts; no sound large simplification without changing protected durability or ownership
1424 apps/android/app/src/main/java/ai/openclaw/app/ui/SessionsScreen.kt READ Search debounce, archive gates, tree aggregation, action identity, and per-row menus own distinct behavior; no redundant owner remaining.
1375 apps/android/app/src/main/java/ai/openclaw/app/ui/SidebarContent.kt READ Catalog projections, grouping and filtering retain different inputs and lifecycle gates; recent pass already shares search and row surfaces.
1187 apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatMarkdown.kt READ CommonMark block rendering, disclosures, inline spans, and images have distinct parsing/layout contracts; previous pass already owns shared sibling traversal.
1184 apps/android/app/src/main/java/ai/openclaw/app/SecurePrefs.kt READ Four string setters share persistence-before-publication helper; existing migrations, appearance revisions, secure credential replacement and durable handoff behavior preserved.
1097 apps/android/app/src/thirdParty/java/ai/openclaw/app/node/SmsManager.kt READ Moved duplicate flavor result/message models to shared SmsModels.kt; retained provider pagination, MMS hydration, permission and send semantics.
1051 apps/android/app/src/main/java/ai/openclaw/app/gateway/GatewayProtocol.kt READ Generated file read in full; scripts/protocol-gen-kotlin.ts owns protocol schemas, DTOs, methods and events; generated protocol preserved.
1003 apps/android/app/src/main/java/ai/openclaw/app/AndroidScreenshotFixture.kt READ Synthetic scene records intentionally exercise distinct rendering and protocol flows; earlier passes already share request/session/message owners; no sound further consolidation without changing fixture coverage.
973 apps/android/app/src/main/java/ai/openclaw/app/wear/WearRealtimeTalkController.kt READ Remaining structure owns distinct relay, transcript, bounded audio queues, playback, and teardown responsibilities; collapsing them would obscure independent owner checks.
936 apps/android/app/src/main/java/ai/openclaw/app/voice/MicCaptureManager.kt READ Reused canonical object parsing; retained transcription admission, queue correlation, capture retirement and TTS pause ownership.
878 apps/android/wear/src/main/java/ai/openclaw/wear/WearGatewayRepository.kt READ Made existing strict string/boolean accessors the Watch owner shared with ViewModel; per-RPC capability and preferred-phone checks remain explicit.
842 apps/android/app/src/main/java/ai/openclaw/app/ui/chat/SessionDiffSheet.kt READ Viewport-only native diff drawing, gesture arbitration, selection geometry and stale snapshot authority are substantive and noninterchangeable.
813 apps/android/app/src/main/java/ai/openclaw/app/ui/SkillsSettingsScreen.kt READ Exposed existing skillReady to the shell to remove its duplicate readiness predicate; rest is distinct install, review, authorization and presentation state.
809 apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatMediaPlayer.kt READ Playback claims, audio focus, media sessions and asynchronous source preparation own distinct resource lifetimes; previous pass already shared audio/video status.
775 apps/android/app/src/main/java/ai/openclaw/app/chat/ClientDatabases.kt READ deferred facades enforce initialization and closed-state checks; explicit legacy migrations and crash-resumable gateway removal remain required contracts
761 apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatMessageViews.kt READ Text, images, attachments and link previews require distinct bounded layout and source-loading contracts; prior canonical bubble/image owners retained.
756 apps/android/app/src/main/java/ai/openclaw/app/wear/WearProxyController.kt READ Unified equivalent gateway-toggle dispatch and removed shadowed duplicate limits; shared text-limit consolidation handed to lead.
755 apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatTimeline.kt READ Turn/run tool attribution, retained history versioning, outbox placement and projection ordering are supported contracts; no safe dead or parallel owner found.
715 apps/android/wear/src/main/java/ai/openclaw/wear/MainActivity.kt READ Launch identity, permission recovery, speech completion, and lifecycle observers own different contracts; earlier pass already consolidated text-input launchers.
703 apps/android/app/src/main/java/ai/openclaw/app/ui/design/ClawComponents.kt READ Existing helpers already own shared controls and geometry; apparent unused navigation callers are intentional developer previews and retained.
702 apps/android/app/src/main/java/ai/openclaw/app/GatewayExecApprovals.kt READ Closed-schema admission and terminal attribution are intentional protocol/auth contracts; legacy path explicitly serves shipped Gateway v4 peers.
701 apps/android/app/src/main/java/ai/openclaw/app/ui/CronJobManagementPanel.kt READ Schedule and payload editors preserve separate typed variants, unsaved draft rules and unsupported-write contracts; no sound further consolidation.
694 apps/android/app/src/main/java/ai/openclaw/app/CronJobManagement.kt READ Typed schedule/payload edits have distinct patch/null/error semantics; shared request guards and run registry already own mutations.
673 apps/android/app/src/main/java/ai/openclaw/app/ConversationNotifications.kt READ Target digests, one-shot launch tokens, notification publication generations and reply-recovery paths have distinct security/lifecycle contracts.
672 apps/android/app/src/main/java/ai/openclaw/app/ui/SkillWorkshopSettingsScreen.kt READ Proposal identity, agent scope, confirmation and action authorization remain explicit; existing descriptors already consolidate control presentation.
651 apps/android/app/src/main/java/ai/openclaw/app/ui/SidebarComponents.kt READ Shared drag detection and decoration already consolidate duplicated mechanics; continuous reorder and release-only pinning need separate state policies.
650 apps/android/fastlane/Fastfile READ Removed no-invariant shell_join forwarding function; release preflight, atomic upload, abort and saved-plan contracts retained.
646 apps/android/app/build.gradle.kts READ Pinned native extraction, checksums, ABIs, signing and variant task dependencies enforce distinct build contracts; retained.
642 apps/android/app/src/main/java/ai/openclaw/app/gateway/GatewayDiscovery.kt READ System and direct DNS paths share VPN preference selector; platform NSD and DNS-source adapters retain different callbacks and cleanup contracts.
639 apps/android/app/src/main/java/ai/openclaw/app/wear/WearProxyBridge.kt READ Removed redundant failed-peer set/result wrapper and duplicate overflow assignment; delivered IDs already determine retries without losing registration ownership.
635 apps/android/app/src/main/java/ai/openclaw/app/gateway/GatewayTls.kt READ Five certificate fingerprint projections share one helper; trust selection, platform hostname handling, probe budgets and cancellation remain unchanged.
631 apps/android/app/src/main/java/ai/openclaw/app/chat/ChatModels.kt READ shared object and legacy-string plan-step text extraction; retained strict status validation and single in-progress-step rule
617 apps/android/wear/src/main/java/ai/openclaw/wear/WearTalkAvatar.kt READ Distinct platform motion-scale subscriptions and canonical geometry/animation equations remain necessary; no sound behavior-preserving structural cut found.
606 apps/android/wear/src/main/java/ai/openclaw/wear/WearRealtimeTalkClient.kt READ Watch-specific capture/playback focus and generation-bound channel cleanup differ materially from phone relay; no safely redundant lifecycle path found.
606 apps/android/wear/src/main/java/ai/openclaw/wear/WearProxyClient.kt READ Unified duplicate epoch/gap rejection branches and removed null checks implied by unequal stream IDs; retained all request authority and transport cancellation semantics.
606 apps/android/app/src/main/java/ai/openclaw/app/ui/NodesDevicesSettingsScreen.kt READ Approval, reject, remove and identity disclosure have distinct security/display contracts; shared row/section owners already present.
599 apps/android/app/src/main/java/ai/openclaw/app/wear/WearRealtimeChannelRegistry.kt READ Opening, pending, promoting, active, and retiring connections have distinct resource ownership; prior pass already consolidated teardown owner.
594 apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatInlineWidgetView.kt READ Pinned TLS, isolated profiles, document/CSP admission and renderer-gone teardown are independent named security/lifecycle responsibilities.
591 apps/android/app/src/main/java/ai/openclaw/app/chat/ChatTranscriptCache.kt READ cache-specific serialized projection deliberately excludes live-only IDs and attachment bytes; legacy row decoding and owner-scoped eviction are required contracts
559 apps/android/app/src/main/java/ai/openclaw/app/ui/GatewayConfigResolver.kt READ Removed local JSON field reader in favor of nonBlankString, redundant path alias and narrating comments; all transport/auth validation unchanged.
551 apps/android/app/src/main/java/ai/openclaw/app/voice/VoiceWakeManager.kt READ No sound structural reduction remaining without disturbing recognizer generations, Main-thread release and suppression ordering.
551 apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatDictation.kt READ Recognition generation fencing, microphone ownership and terminal completion ordering are substantive; uniform settlement would obscure differing cancellation contracts.
548 apps/android/app/src/main/java/ai/openclaw/app/voice/RealtimeAgentCoordinator.kt READ Retained separate pending/ACK/final correlation states and retired-run bounds; they protect late callback and replacement ownership.
544 apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatComposer.kt READ Merged duplicate pending-send checkpoint decode branches while preserving absent-input markers; draft and attachment admission bounds retained.
540 apps/android/app/src/main/java/ai/openclaw/app/node/CameraCaptureManager.kt READ Retained camera lease, scoped use-case/file ownership and image/video-specific resource cleanup; previous passes already centralized shared capture admission.
534 apps/android/wear/src/main/java/ai/openclaw/wear/WearVoiceControls.kt READ Compact and scrolling layouts share gesture owners already; measurement, accessibility, and font-scale fit are independent contracts.
529 apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatWorkingIndicator.kt READ Stance enum now owns selection weights and cycle durations; removed parallel lookup table/constants/switch and redundant localized duration argument aliases.
515 apps/android/app/src/main/java/ai/openclaw/app/node/DeviceNotificationListenerService.kt READ Retained notification trust filters, forwarding policy, listener/store lifetime and migration; prior pass already centralized action execution.
512 apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatCodeHighlight.kt READ Unified token cursor advancement/emission and ordinary/triple-quoted string scanning while retaining language-specific escape/newline/comment contracts.
509 apps/android/app/src/main/java/ai/openclaw/app/ui/design/MascotAnimator.kt READ Deterministic mood, blink, gaze and gesture formulas preserve platform parity and exact RNG order; no sound removal.
508 apps/android/app/src/main/java/ai/openclaw/app/node/DeviceHandler.kt READ Replaced nested object construction with kotlinx putJsonObject while preserving field order, omissions, permission projection and diagnostics.
505 apps/android/app/src/main/java/ai/openclaw/app/voice/AndroidAudioInputSession.kt READ Unified Bluetooth null/rejected route cleanup; retained current-owner checks, platform callbacks, AEC and preferred-route verification.
500 apps/android/app/src/thirdParty/java/ai/openclaw/app/accessibility/AccessibilityDevActivity.kt READ UI controls and immediate/delayed observation have distinct state/cancellation behavior; no sound restructuring without visual or lifecycle scope.
496 apps/android/app/src/main/java/ai/openclaw/app/ui/FoldAwareDropdownMenu.kt READ Native window admission, terminal cancellation, measured row geometry and click revalidation enforce distinct ownership boundaries.
485 apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatRichBlockRenderer.kt READ Shared bounded renderer/cache/backend already consolidates math and Mermaid; WebView host, bridge identity and visual-state completion checks remain necessary.
478 apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatReaderScrollController.kt READ Reader state transitions and asynchronous navigation ownership are already canonical; saved-state and viewport restoration behavior require existing distinctions.
475 apps/android/app/src/thirdParty/java/ai/openclaw/app/accessibility/AccessibilityActionExecutor.kt READ Retained action-specific preflight and live snapshot/service guards; node refresh and blind-coordinate epoch checks are intentionally different.
466 apps/android/scripts/build-release-artifacts.ts READ Inlined one-use artifact-copy wrapper while retaining missing-artifact error and exact signed artifact verification.
456 apps/android/app/src/main/java/ai/openclaw/app/ui/WorkspaceFilesScreen.kt READ Folder and preview requests have distinct pagination/keying/sharing behavior; callbacks recheck current request state intentionally.
454 apps/android/app/src/main/java/ai/openclaw/app/PermissionRequester.kt READ Rationale/settings dialogs already share their lifecycle owner; host generations, request-code reservations and permission settlement remain necessary.
451 apps/android/app/src/main/java/ai/openclaw/app/systemagent/SystemAgentChatController.kt READ Existing controller remains sole settings-conversation owner; request generation, lease admission, sensitive reply redaction and question retirement are distinct contracts.
438 apps/android/app/src/main/java/ai/openclaw/app/ui/ProvidersModelsScreen.kt READ Provider/model availability, sorting and badge presentation are already shared; tri-state readiness preserves unknown versus unavailable.
436 apps/android/app/src/main/java/ai/openclaw/app/ui/design/ClawTheme.kt READ Theme palette declarations and dark/light token derivation have distinct values; prior pass already consolidated material conversion.
429 apps/android/scripts/perf-online-benchmark.sh READ Device navigation, sampling and output formats serve distinct benchmark stages; retained without changing timing or measured workload.
420 apps/android/app/src/main/java/ai/openclaw/app/ui/design/OpenClawMascot.kt READ Drawing paths and pose channels preserve exact geometry, animation and tint contracts; no sound structural removal.
414 apps/android/app/src/main/java/ai/openclaw/app/node/ContactsHandler.kt READ Existing helper owns repeated contact values; structured names, organization and aggregate-ID queries have distinct provider contracts.
413 apps/android/app/src/main/java/ai/openclaw/app/ui/image/SafeRemoteImage.kt READ Inlined one-use forwarding method and bounded redirects directly; preserved dispatcher, cancellation, close, content limits and host checks.
412 apps/android/app/src/main/java/ai/openclaw/app/NodeForegroundService.kt READ Connection/capture projections intentionally differ and service intent admission prevents stale starts; localized notification lifecycle already has one owner.
404 apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatCameraActivity.kt READ CameraX capture and callbacks own pending output and camera leases through Activity stop; photo/video completion is already shared.
401 apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatComposerStateStore.kt READ Unified per-owner state store already owns send/media/import alias migration and synchronization; no independent redundant state owner remains.
396 apps/android/app/src/main/java/ai/openclaw/app/node/CalendarHandler.kt READ Unified calendar selection query owner and default request path; preserved SQL selection/order, event projection, bounds and error classification.
392 apps/android/app/src/main/java/ai/openclaw/app/SessionCatalog.kt READ Host progress/page merging and refresh preservation differ by cursor and failure contract; parser empty-string semantics and continuation ownership retained.
386 apps/android/wear-shared/src/main/java/ai/openclaw/wear/shared/WearProtocol.kt READ Envelope, depth, UTF-8, and byte bounds guard separate serialization boundaries; retained shipped protocol and legacy audio-path contracts.
383 apps/android/app/src/main/java/ai/openclaw/app/ui/chat/BackgroundTasksSheet.kt READ Replaced complementary active/inactive filters with one partition; list/detail jobs keep independent cancellation and stale-read tokens.
382 apps/android/app/src/main/java/ai/openclaw/app/voice/RealtimePlayout.kt READ One actor already owns AudioTrack, media budgets, mark/clear ordering and presentation tracking; no safe simplification of retained device timing contracts.
378 apps/android/app/src/main/java/ai/openclaw/app/MainActivity.kt READ Collectors deliberately own independent lifecycle jobs; intent routing, permission top-resumed ownership and one-shot startup guards retained.
377 apps/android/app/src/main/java/ai/openclaw/app/ui/CommandPalette.kt READ Routes, search, accessibility labels and session row variants retain different contracts; current shared lists already remove duplicate divider ownership.
376 apps/android/app/src/main/java/ai/openclaw/app/ui/SystemAgentSettingsScreen.kt READ Sensitive input cleanup, stable message keys, question retirement and scroll anchoring are lifecycle and ownership contracts.
355 apps/android/app/src/main/java/ai/openclaw/app/i18n/NativeStrings.kt READ Locale-aware retained text, Compose resolution and cold-service AppCompat locale recovery serve separate Android lifecycle contracts.
354 apps/android/app/src/main/java/ai/openclaw/app/ProviderAuthController.kt READ One physical-connection/agent owner already controls wizard progress, cancellation, credential settlement and publication; no redundant policy owner remains.
347 apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatWorkedSummary.kt READ Completed-work partitioning preserves run continuations, unanswered failures and media answers; duration formatting intentionally retains subsecond web parity.
337 apps/android/app/src/main/java/ai/openclaw/app/node/MotionHandler.kt READ Shared invokeMotion already centralizes command mapping; sensor-specific sampling and callback registration cleanup remain distinct.
334 apps/android/app/src/main/java/ai/openclaw/app/CronJobDetail.kt READ Canonical schedule-label owner now serves runtime list and detail view while preserving their raw-versus-normalized kind boundaries.
328 apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatImageCodec.kt READ Different picked/provider and admitted inline image paths preserve MIME grant, decode budget, orientation and bitmap configuration contracts.
327 apps/android/app/src/main/java/ai/openclaw/app/ui/SidebarGatewayControl.kt READ Terminal sheet opening, geometry revocation and focus-safe search/list layout remain intentional; no sound further simplification.
321 apps/android/app/src/main/java/ai/openclaw/app/ui/ControlUiWebView.kt READ Replaced hand-written SHA-256/hex with existing Okio primitive; preserved exact certificate/origin pin checks and WebView lifecycle.
316 apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatQuestionCard.kt READ Pending, terminal, secret-store consent and answer controls have distinct security/display behavior; no safe shared abstraction reduces complexity.
311 apps/android/app/src/main/java/ai/openclaw/app/ui/GatewayAdditionDialog.kt READ Heap-only credentials, request identity and late callback guards preserve staging and admission ownership.
309 apps/android/app/src/main/java/ai/openclaw/app/chat/VoiceNoteRecorderController.kt READ prior pass already unified cleanup; capture acquisition, preparation ownership, cancellation and recorder resource lifetime remain distinct required contracts
299 apps/android/app/src/main/java/ai/openclaw/app/GatewayNodeApproval.kt READ Current request identity, required scopes, requested surface and readback confirmation are necessary authorization checks.
294 apps/android/app/src/main/java/ai/openclaw/app/chat/ChatSwarmProgress.kt READ prior passes own bounded grouping; pagination, retained phase ownership and rendered-dot limits are distinct contracts; strict JSON-string parser differs from permissive NodeUtils helper
291 apps/android/app/src/main/java/ai/openclaw/app/node/PhotosHandler.kt READ Removed duplicate blank-request branch and local primitive decoding; preserved MediaStore ordering, EXIF, JPEG budget and recycling.
287 apps/android/app/src/thirdParty/java/ai/openclaw/app/accessibility/AccessibilitySnapshotter.kt READ Unified empty/populated snapshot assembly and removed unreachable over-depth branch; child admission already prevents depth beyond MAX_DEPTH.
283 apps/android/wear/src/main/java/ai/openclaw/wear/WearReplyNotifier.kt READ Existing builder owns shared notification setup; separate permission recheck, correlation, and preferred-phone recovery preserve platform races.
277 apps/android/app/src/main/java/ai/openclaw/app/voice/TalkAudioPlayer.kt READ PCM AudioTrack and compressed MediaPlayer paths require different threading, completion and resource cleanup; shared playback claim already centralizes ownership.
273 apps/android/app/src/main/java/ai/openclaw/app/GatewayTalkSetupReadiness.kt READ Readiness distinguishes authoritative setup failure from unavailable catalog; legacy missing hints and provider aliases retain shipped Gateway contracts.
272 apps/android/app/src/main/java/ai/openclaw/app/SkillManagement.kt READ Reviewable versus install-only references and owner/version matching are separate install contracts; existing helpers already canonicalize references.
268 apps/android/app/src/main/java/ai/openclaw/app/ui/design/TalkWaveform.kt READ Wave formulas and constants mirror Swift; frame throttling, animation accessibility and compositing each own required behavior.
265 apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatTurnRecap.kt READ Delayed terminal attribution, watched baselines and transcript settlement are substantive; duration/token formatting keeps exact locale and rounding behavior.
264 apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatWidgetExport.kt READ Export destinations have different publication/cleanup contracts; lead owns inspected shared code-point/UTF-8 truncation cutover with Wear.
264 apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatReaderAnchors.kt READ Pinned measured glyph anchors and placement revisions protect reflow/scroll ordering; no redundant wrapper can be removed without altering lifecycle.
264 apps/android/app/src/main/java/ai/openclaw/app/ui/HealthLogsSettingsScreen.kt READ Already consumes summary/refresh/status helpers; log truncation and formatting serve distinct raw and preview displays.
262 apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatLinkPreview.kt READ Previous pass already uses canonical SafeWebFetcher and markdown siblings; metadata HTML parsing has specific quoted-tag/entity and truncation semantics.
258 apps/android/app/src/main/java/ai/openclaw/app/ui/AboutBuildIdentity.kt READ Responsive layout, localized dates, hash validation and copy/accessibility labels are distinct observable contracts.
248 apps/android/app/src/main/java/ai/openclaw/app/ui/FoldAwareSheet.kt READ Terminal native geometry and lifecycle revocation checks intentionally repeat at observation, draw and action boundaries.
242 apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatAttachmentMenu.kt READ Location permission and precise-disclosure admission remain separate from camera/gallery/document callbacks; preserved exact menu and popover geometry.
242 apps/android/app/src/debug/java/ai/openclaw/app/VoiceE2eReceiver.kt READ Debug Service, Gateway wait and result publication have distinct lifecycle and diagnostics; earlier pass already removed redundant dispatch.
240 apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatMessageActions.kt READ Action callbacks intentionally differ in dismissal order; native text paging and copy/share output are user-facing contracts.
240 apps/android/app/src/main/java/ai/openclaw/app/gateway/GatewayRegistry.kt READ Version admission, durable removal-before-publication and connection/active pointer validation prevent rewriting unsupported state.
239 apps/android/app/src/main/java/ai/openclaw/app/gateway/CloudflareAccessClient.kt READ Discovery, signed metadata, exact-origin identity read and bounded no-redirect transport intentionally enforce different auth contracts.
238 apps/android/app/src/main/java/ai/openclaw/app/ui/chat/PendingAttachment.kt READ Attachment/import store is canonical for aggregate bounds and migration; base64 encoding and voice-file cleanup belong to separate source boundaries.
233 apps/android/app/src/main/java/ai/openclaw/app/AssistantLaunch.kt READ Assistant and Sharesheet parsing preserve intent authority, opaque content grants, bounded attachments and MIME admission; existing entry-point owners are narrow.
232 apps/android/scripts/voice-e2e.sh READ Explicit device/Gateway integration orchestration and capture own distinct stages; retained without changing lifecycle or credential routing.
231 apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatComposerPopover.kt READ Anchor validity, live window geometry and pointer admission are authority checks; removing repeated reads would weaken stale-window fencing.
228 apps/android/app/src/main/java/ai/openclaw/app/gateway/CloudflareAccessSessionStore.kt READ Origin sessions, sign-in attempts and ordered transport retirements are distinct live-authority records; no safe merged state owner.
226 apps/android/app/src/main/java/ai/openclaw/app/ui/ProviderSignInDialog.kt READ Wizard and API-key UI paths have distinct sensitive input and controller lifecycle contracts; prior pass already simplified state.
218 apps/android/app/src/thirdParty/java/ai/openclaw/app/node/MobileUiHandler.kt READ Used kotlinx nested JSON builders and canonical integer reader; retained exact payload fields/nulls/order and action-specific parsing.
218 apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatImageViewer.kt READ Pinch/pan/tap classification and fitted-image bounds are substantive viewport behavior; no safe dead or duplicate rendering owner found.
214 apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatSourcePreviews.kt READ Run-scoped recorded evidence matching, redirect resolution and Markdown excerpt skip policies differ intentionally from generic link previews.
211 apps/android/app/src/main/java/ai/openclaw/app/gateway/DeviceIdentityStore.kt READ Encrypted identity migration verifies durable import before plaintext deletion; signatures and platform-safe key handling retained.
210 apps/android/app/src/thirdParty/java/ai/openclaw/app/node/CallLogHandler.kt READ Previous pass already simplified records/projection; date range precedence, provider cursor pagination and literal LIKE filters have named behavior.
208 apps/android/app/src/main/java/ai/openclaw/app/ui/chat/VoiceNoteComposer.kt READ Recorder lifetime, current-owner preparation and lifecycle cancellation are necessary; preparing and recording surfaces have distinct semantics/style.
206 apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatMermaidBlock.kt READ Uses shared rich-block renderer; source/retry/vector-preview controls require their distinct state and fallback behavior.

@clawsweeper

clawsweeper Bot commented Sep 27, 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.

@steipete
steipete marked this pull request as ready for review September 27, 2026 10:16
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 27, 2026
@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components. This comment is informational because the PR author has repository Maintain or Admin access.

  • Current SHA: 10611dfbe0f7a58c8a4c165946877befb739e73e
  • Maintainer: @steipete
  • Repository role: admin

These security sensitive changes were made:

  • apps/android/app/src/main/java/ai/openclaw/app/SecurePrefs.kt: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.

Carefully review these changes before merging.

@clawsweeper

clawsweeper Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 27, 2026, 7:24 AM ET / 11:24 UTC (Revision 4).

ClawSweeper review

What this changes

The branch consolidates duplicate parsing, models, UI projections, and forwarding code across the Android phone and Wear apps, and simplifies Android release helpers.

Merge readiness

✅ Ready for maintainer review

Keep this PR open. It contains distinct Android cleanup beyond the two merged earlier passes, and current main still has the older forwarding path. Exact-head CI passed, and this review found no concrete introduced defect.

Priority: P3
Reviewed head: 10611dfbe0f7a58c8a4c165946877befb739e73e

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The cleanup is coherent and broadly validated at the exact head, with no concrete correctness or security finding.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The maintainer-authored Android controller, Gateway, node, and Wear refactors have Testbox build, unit, lint, and exact-head CI validation. No phone/watch interaction or live Gateway trace is claimed; the external-contributor proof gate does not apply. Preference keys and stored encoding are unchanged.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored Android controller, Gateway, node, and Wear refactors have Testbox build, unit, lint, and exact-head CI validation. No phone/watch interaction or live Gateway trace is claimed; the external-contributor proof gate does not apply. Preference keys and stored encoding are unchanged.
Evidence reviewed 8 items Distinct branch behavior: The PR head routes System Agent actions directly to the existing controller; fetched main still calls the runtime forwarding methods.
Current-main comparison: Fetched main retains ensureRuntime().refreshSystemAgentChat() and the related forwarding calls, confirming that this branch's central cleanup is not already there.
Preference compatibility: The shared setter retains the existing keys and persists the string before publishing it to the state flow; comparison with the introduced diff found no stored-format change.
Findings None None.
Security None None.

How this fits together

The Android phone and Wear clients turn user actions and Gateway events into chat, voice, device, and screen state. The changed helpers sit between those inputs and the Gateway requests, device operations, and rendered results.

flowchart LR
  A[Phone and Wear input] --> B[Android view model]
  B --> C[Chat and voice controllers]
  C --> D[Gateway session]
  D --> E[Gateway messages]
  D --> F[Node handlers]
  F --> G[Android device APIs]
  B --> H[Phone and Wear screens]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests -2, Other -692. Total -694 across 57 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 6 40 42 -2
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 51 651 1343 -692
Total 57 691 1385 -694

Review metrics

None.

Technical review

Best possible solution:

Keep Android phone and Wear on the shared parser and state owners established by this branch while preserving their existing Gateway, preference, and trust contracts.

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

Not applicable: this PR proposes internal cleanup rather than reporting a defect to reproduce.

Is this the best way to solve the issue?

Yes. Reusing the existing owners removes duplicate code while retaining the observed preference, TLS, and Gateway boundaries.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This is a behavior-preserving Android cleanup with no reported user-facing regression.
  • 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. Not applicable: The maintainer-authored Android controller, Gateway, node, and Wear refactors have Testbox build, unit, lint, and exact-head CI validation. No phone/watch interaction or live Gateway trace is claimed; the external-contributor proof gate does not apply. Preference keys and stored encoding are unchanged.

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)
  • RoboClaw: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • WhatsSkiLL: 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 (3 earlier review cycles)
  • reviewed 2026-09-27T10:16:16.405Z sha 82dc8e2 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-27T10:24:00.224Z sha 82dc8e2 :: blocked before merge. :: [P2] Refresh the native localization inventory after moving cron labels
  • reviewed 2026-09-27T11:00:06.019Z sha 10611df :: needs maintainer review before merge. :: none

@steipete
steipete merged commit 624b66f into main Sep 27, 2026
100 checks passed
@steipete
steipete deleted the deslop/l117-android-third-pass branch September 27, 2026 11:26
vincentkoc added a commit that referenced this pull request Sep 27, 2026
* commit '69809d7a94277d01be964bd1cbbb7aa0ebc58c9b': (219 commits)
  perf(agents): serialize large model requests once (#159574)
  refactor(cli): share capability agent-selection test cases (#159616)
  fix(workers): restore installation type checks (#159629)
  test(channels,qa,providers): remove low-value tests (batch d065) (#159627)
  test(doctor): run isolated migration cases concurrently (#159609)
  feat(apple): show agent identities in native chat (#159528)
  chore(i18n): refresh native locales (#159635)
  fix(gateway): keep node provisioning's installation contract after overlapped preparation
  fix(models): keep shared catalog requests alive for remaining callers (#157191)
  feat: let agents query online people and device activity (#159117)
  perf(gateway): first cloud dispatch prepares worker artifacts one after another (#159520)
  refactor(android): deslop Android app third pass (#159589)
  test(qa-lab,openshell,slack,reef,team-reports): remove low-value tests (batch d064) (#159607)
  fix: align process liveness checks (#151107) thanks @ekinnee
  fix: sessions model default does not clear the override (#159587)
  fix(ios): preserve typing during reentrant SwiftUI updates
  fix(ci): frozen 2026.8.33 validation fails on inherited test clock (#159594)
  perf(gateway): avoid duplicate recipient row lookup (#159595)
  refactor(gateway): deslop gateway fourth pass (#158786)
  test(agents): split subagent task-settlement test support under the line cap (#159584)
  ...
vincentkoc added a commit that referenced this pull request Sep 27, 2026
* commit '69809d7a94277d01be964bd1cbbb7aa0ebc58c9b': (219 commits)
  perf(agents): serialize large model requests once (#159574)
  refactor(cli): share capability agent-selection test cases (#159616)
  fix(workers): restore installation type checks (#159629)
  test(channels,qa,providers): remove low-value tests (batch d065) (#159627)
  test(doctor): run isolated migration cases concurrently (#159609)
  feat(apple): show agent identities in native chat (#159528)
  chore(i18n): refresh native locales (#159635)
  fix(gateway): keep node provisioning's installation contract after overlapped preparation
  fix(models): keep shared catalog requests alive for remaining callers (#157191)
  feat: let agents query online people and device activity (#159117)
  perf(gateway): first cloud dispatch prepares worker artifacts one after another (#159520)
  refactor(android): deslop Android app third pass (#159589)
  test(qa-lab,openshell,slack,reef,team-reports): remove low-value tests (batch d064) (#159607)
  fix: align process liveness checks (#151107) thanks @ekinnee
  fix: sessions model default does not clear the override (#159587)
  fix(ios): preserve typing during reentrant SwiftUI updates
  fix(ci): frozen 2026.8.33 validation fails on inherited test clock (#159594)
  perf(gateway): avoid duplicate recipient row lookup (#159595)
  refactor(gateway): deslop gateway fourth pass (#158786)
  test(agents): split subagent task-settlement test support under the line cap (#159584)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 28, 2026
* refactor(android): deslop Android app third pass

* chore(android): refresh native string source sites
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 P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. security-sensitive-changed size: XL 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