feat(mobile): add tap-to-copy action to session code blocks - #6098
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryThe incremental change resolves both prior findings: the Kilo Chat code-fence long-press is now forwarded through Files Reviewed (7 files)
Previous Review Summary (commit 4d96809)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 4d96809)Status: 2 Issues Found | Recommendation: Address before merge Executive Summary
Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (13 files)
No memory leaks were found: the new state is bounded ( Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0 Review guidance: REVIEW.md from base branch |
4d96809 to
cf09867
Compare
Changelog for users
Changelog for maintainers
MarkdownTextandMarkdownRenderertake optionalonCopyCodeandonLongPressCodehandlers; omitting them keeps fences static, as tool cards do.CodeBlockreserves a right gutter from the rendered copy label width, so the pill never covers source glyphs in any locale.chat-markdown-textroutes copies throughperformCopy, so haptic and toast feedback matches every other copy action.message-bubble,part-renderer, andtext-part-rendererforward the details long-press into code fences.code-block.tsx; companion test files cover reveal, dismissal, empty fences, and long-press forwarding.E2E proof
[p3] Session page: long-press a code block inside a tool card (e.g. — Android emulator-5606, live re-run on head 0d86de5f (clean tree): on the 'Mobile sheet fixtures' session page that renders the read/task tool cards, long-press on the console.log("Hello World"); fenced code block opened the message-details sheet — p3-live2.log line 1 'SCENE p3 OK' and line 4 'android.view.View Message details tappable [37,183][858,248]'; same-commit reviewed artifacts p3-verify.log and p3-lp-inline.log carry the identical digest (collection 2026-09-12), captures for the visual reviewer are p3.png and p3.mp4. Gap: the New-session model picker lists no 'Fake Deterministic'…
p3.mp4.trim.mp4
[p1] Session page: tap a code block in an assistant message -> an inline 'Copy' pill appears; tapping it copies the full source (including text past the display cap) and shows 'Copied to clipboard'. — Re-ran live on android emulator-5554 (HEAD 0d86de5; identical to prior pass): session.sh enter ses_000000000001RootFixture001 (Mobile sheet fixtures, 50000 display cap), tap at (541,1045) on the assistant-message fence [69,360][1013,1730] -> p1-reveal-run.log 'SCENE p1-reveal OK' + 'android.widget.Button Copy tappable [907,1045][1013,1106]' (no reflow: fence bounds unchanged); tap Copy -> p1-copyrun.log 'SCENE p1 OK' (absent Copy) and p1-clipboard-proof-run.log '{"clipboardLength":61253,"displayCap":50000,"beyondDisplayCap":true,"endsWithFullSourceMarker":true,...}', written onto an empty…
p1-run.mp4.trim.mp4
[p1] Session page: tap a code block in an assistant message -> an inline 'Copy' pill appears; tapping it copies the full source (including text past the display cap) and shows 'Copied to clipboard'. — android emulator-5554, session ses_000000000001RootFixture001: one scripted run 'SCENE p1 OK' (p1-run.log:1) asserted 'Content truncated', tapped the fence and tapped 'Copy'; independently p1-tap.log:10 shows 'android.widget.Button Copy tappable [907,1045][1013,1106]' (pill anchored to the real tap at (541,1045)); copy proof p1-clipboard-fullsource.log quotes '{"clipboardLength":61253,"displayCap":50000,"beyondDisplayCap":true,"endsWithFullSourceMarker":true}', i.e. the full source past the 50k display cap; p1-lp.log confirms the fence is in an assistant message (long-press -> 'Message…
p1-copy-flow.mp4.trim.mp4
[p1] Session page: tap a code block in an assistant message -> an inline 'Copy' pill appears; tapping it copies the full source (including text past the display cap) and shows 'Copied to clipboard'. — android emulator-5604, worktree head d86532b0e9e499ffda025fb232074460141ddc14; setup was the read-only fixture session via
session.sh enter emulator-5604 ses_000000000001RootFixture001(the CLI fixture session is not listed on Home/Agents, so the deep link is the only path), then one scripted call. p1-behavior.log:1 'SCENE p1-reveal OK' with :11 'android.widget.Button Copy tappable [907,1215][1013,1276]' (single tap reveals the inline pill; fence bounds :10 'code-block-copy-trigger tappable [69,360][1013,1730]' unchanged, and :13 'Content truncated' marks the 50000 display cap) and :45…p1-toast.mp4.trim.mp4
E2E proof — log excerpts
/home/igor_kilocode_ai/.local/share/kwf/sections/surface-the-mobile-app-apps-mobile-65e8/e2e-mobile-app/e1-scene.log/home/igor_kilocode_ai/.local/share/kwf/sections/surface-the-mobile-app-apps-mobile-65e8/e2e-mobile-app/e1-clipboard-fresh.log/home/igor_kilocode_ai/.local/share/kwf/sections/surface-the-mobile-app-apps-mobile-65e8/e2e-mobile-app/e1-toast.log/home/igor_kilocode_ai/.local/share/kwf/sections/surface-the-mobile-app-apps-mobile-65e8/e2e-mobile-app/e1-role.log/home/igor_kilocode_ai/.local/share/kwf/sections/surface-the-mobile-app-apps-mobile-65e8/e2e-mobile-app/scripted-e2.log/home/igor_kilocode_ai/.local/share/kwf/sections/surface-the-mobile-app-apps-mobile-65e8/e2e-mobile-app/e2-tap2.log/home/igor_kilocode_ai/.local/share/kwf/sections/surface-the-mobile-app-apps-mobile-65e8/e2e-mobile-app/e3-longpress.log/home/igor_kilocode_ai/.local/share/kwf/sections/surface-the-mobile-app-apps-mobile-65e8/e2e-mobile-app/scripted-e3.logOwner request
Owner manual verification
The workflow skipped these checks. Owner verification is pending; these checks did not pass automatically.