Skip to content

feat(mobile): add chat link actions#4576

Open
iscekic wants to merge 3 commits into
mainfrom
feature/mobile-chat-link-actions
Open

feat(mobile): add chat link actions#4576
iscekic wants to merge 3 commits into
mainfrom
feature/mobile-chat-link-actions

Conversation

@iscekic

@iscekic iscekic commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a native Link actions sheet when long-pressing a rendered markdown link in both mobile chat experiences (agent-session messages and Kilo Chat), without changing normal tap behavior or the enclosing message's long-press behavior.

  • Open link, Copy link, Share link, Cancel, with the exact destination URL (including query/fragment) shown and acted upon.
  • Long-press on a link stops propagation so the parent message's long-press (copy / message-actions sheet) does not also fire.
  • MarkdownText stays generic and opt-in via a new onLongPressLink callback; only the three chat call sites use the new ChatMarkdownText wrapper. security-agent/finding-analysis-panel.tsx is unchanged.
  • Each platform operation (open/copy/share) has its own retryable error toast with Try again, isolated per-operation. Share dismissal is not treated as a failure.
  • Links keep accessibilityRole="link", get an Opens in browser hint, and expose a Show link actions custom accessibility action when link actions are enabled.

Design & Plan

  • Design: chat link actions design doc (approved prior to implementation)
  • Plan: chat link actions implementation plan (approved prior to implementation)

Feature-state matrix

State Coverage
Happy Action-sheet identity/order, exact URL routing, and copy/open/share tests.
Unhappy, retryable Rejected-dependency tests prove each operation's retry action reruns only that operation.
Unhappy, non-retryable Not applicable — no known terminal failure classification for these local platform actions; established in tests.
Empty Not applicable — the trigger only exists once react-native-marked emits a link with an href.

Checks

apps/mobile: pnpm test      -> 120 files / 780 tests passed
apps/mobile: pnpm typecheck -> pass
apps/mobile: pnpm lint      -> pass
apps/mobile: pnpm check:unused -> pass
apps/mobile: pnpm format:check -> pass
git diff --check origin/main...HEAD -> clean

A fresh, independent code review of the full diff reported no valid actionable findings.

Device E2E

Device E2E for this feature was blocked by two reproducible, pre-existing environment issues unrelated to this diff (no auth or networking files are touched here):

  • iOS: the app reliably signs itself back out within ~1 second of reaching Home after a successful login, reproduced across 8 separate login attempts against 2 different test accounts, before any feature interaction was possible.
  • Android: the emulator's guest network could not reach the host LAN IP the worktree's dev stack is configured with, so the app never got past a connectivity error.

This was investigated at length (see session evidence: nextjs request logs, screenshots, accessibility-tree dumps) and accepted as an environment blocker by the requesting human rather than a product regression. The automated suite above is the primary verification for this PR; device acceptance should be re-run once the local iOS/Android E2E environment issue is resolved.

Non-goals

  • Non-chat markdown link actions (e.g. security findings).
  • URL detection in plain text not rendered as a link by markdown.
  • Browser chooser, link preview, download action, or a separate Copy text action.
  • Backend, schema, dependency, native-config, or sibling-repository changes.

@iscekic iscekic self-assigned this Jul 16, 2026
@kilo-code-bot

kilo-code-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Reviewed the full diff (11 files, ~630 lines) adding a chat link-actions sheet and retryable external-link opening; no high-confidence security, correctness, or breaking-API issues were found in the changed lines.

Files Reviewed (11 files)
  • apps/mobile/src/lib/external-link.ts
  • apps/mobile/src/lib/external-link.test.ts
  • apps/mobile/src/components/agents/chat-link-actions.ts
  • apps/mobile/src/components/agents/chat-link-actions.test.ts
  • apps/mobile/src/components/agents/chat-markdown-text.tsx
  • apps/mobile/src/components/agents/markdown-link.ts
  • apps/mobile/src/components/agents/markdown-link.test.ts
  • apps/mobile/src/components/agents/markdown-text.tsx
  • apps/mobile/src/components/agents/message-bubble.tsx
  • apps/mobile/src/components/agents/text-part-renderer.tsx
  • apps/mobile/src/components/kilo-chat/message-markdown.tsx

Reviewed by claude-sonnet-5 · Input: 24 · Output: 17.8K · Cached: 625.6K

Review guidance: REVIEW.md from base branch main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants