Skip to content

feat(mobile): add Fix with Kilo action to PR comments - #6253

Merged
iscekic merged 1 commit into
mainfrom
kwf/owner-fix-with-kilo-on-pr-comments-de65
Sep 17, 2026
Merged

iscekic merged 1 commit into
mainfrom
kwf/owner-fix-with-kilo-on-pr-comments-de65

Conversation

@iscekic

@iscekic iscekic commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Changelog for users

  • Every PR/MR comment row now shows a Fix with Kilo pill beside its overflow menu, on diff-line review threads and on PR conversation comments.
  • Tapping it opens the New session screen with the composer prefilled with Please address the following PR comment: <that comment's link>.
  • The link targets the exact comment: #discussion_r<id> for a GitHub review thread, #issuecomment-<id> for a GitHub conversation comment, #note_<id> for GitLab and #comment-<id> for Bitbucket.
  • A comment with no addressable provider URL shows no button at all instead of a dead one.
  • Long author names truncate so the pill and the overflow menu stay fully visible.
  • The label and the prefilled message ship translated in every supported app language.

Changelog for maintainers

  • Read apps/mobile/src/lib/pr-review/fix-with-kilo.ts first: pure helpers for the per-provider anchor, the anchored web URL, the GitHub-only repo prefill, the message and the new-session href.
  • apps/mobile/src/components/pr-review/discussion/pr-comment-fix-with-kilo.tsx renders the pill from the live provider scope and returns null when the comment has no addressable URL.
  • The press stages the message through the existing share-payload channel (putSharePayload) and pushes /(app)/agent-chat/new?shareId=…; there is no network call, no mutation and no disabled state.
  • CommentRow now requires owner, repo, number and commentKind; both call sites (review thread and conversation list) pass them, so one control covers both surfaces.
  • Repo prefill is GitHub-only: GitLab and Bitbucket pass no prefillRepo, because the new-session picker cannot select those repositories.
  • apps/mobile/src/lib/pr-review/comment-trailing-controls.ts holds the pill slop (10pt vertical, 2pt horizontal), the overflow slop (8pt) and the 12pt gap, so the two tap areas never overlap.
  • Review hint: the row hard-codes the gap-3 class while the geometry module declares COMMENT_TRAILING_CONTROLS_GAP_DP = 12; the clearance test reads the constant, not the class, so a class drift would not fail it.
  • New catalog keys prReview.discussion.fixWithKilo and prReview.discussion.fixWithKiloPrompt were added to English and every locale; {{link}} must survive translation.

E2E proof

Android emulator-5554, live run against the hermetic GitHub fixture — the Fix with Kilo tap opened the New session composer with the comment link staged:

SCENE e1 OK
android.view.View New session tappable [111,167][1044,232]
android.widget.EditText Please address the following PR comment: https://github.com/kilo-stub/discussion-mixed/pull/1#discussion_r1001 tappable [58,336][1024,567]
android.widget.Button Repository: Select repository tappable [37,1240][1043,1356]

New session composer prefilled from the PR comment

Owner request

Surface: the mobile app (apps/mobile).

(user report)

Tip from someone who frequently reviews PRs on-the-go: I wish that when I make a comment on a diff line that it automatically became an agent task for me to do. The biggest delay in my current phone-based process is that round-trip of copying and pasting.

I like this idea - every PR comment should have a "Fix with Kilo" button (can be an icon logo only button too - whatever is best UX) which takes the user to the new session screen with the composer prefilled with a message (eg "Please address the following PR comment {link}")

Open findings (not fixed here)

  • [e1] GitLab MR with a known instance host prefills '//-/merge_requests/#note_' with no repo-picker error; without a host the row keeps its overflow and shows no CTA: reported skip, so nothing proves it (The saved with-host flow passed live at 20:17-20:20Z (CASE PASS / FLOW OK
  • [e2] ux-check: GitLab MR prefilled link '//-/merge_requests/#note_' with no repo picker error; no-host MR row shows no CTA but keeps its overflow control: reported skip, so nothing proves it (GitLab states are unreachable on this hermetic stack (fixture/plan defect): there is
  • [e4] ux-check: On a phone (light and dark), each discussion comment and each comment inside an expanded review thread shows a 'Fix with Kilo' pill beside the overflow control; both are fully visible, the pill's label is not truncated, and neither control's tap area overlaps so that a tap on the pill
  • [e4] ux-check: On a phone (light and dark), each discussion comment and each comment inside an expanded review thread shows a 'Fix with Kilo' pill beside the overflow control; both are fully visible, the pill's label is not truncated, and neither control's tap area overlaps so that a tap on the pill
  • [01-open-app-FAIL] spot check: no verdict: spot: no verdict — the frame got no usable verdict after one solo re-judge (evidence: /home/igor_kilocode_ai/.local/share/kwf/sections/owner-fix-with-kilo-on-pr-comments-de65/e2e-mobile-app/01-open-app-FAIL.png)

@iscekic
iscekic marked this pull request as draft September 17, 2026 00:37
Comment thread apps/mobile/src/components/pr-review/discussion/pr-comment-fix-with-kilo.test.tsx Outdated
@kilo-code-bot

kilo-code-bot Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

The incremental test-only change narrows the platform-parity comment and adds a source scan that pins the pill and its helper against any Platform token; the previously reported suggestion is resolved and no new issues were found.

Files Reviewed (1 file)
  • apps/mobile/src/components/pr-review/discussion/pr-comment-fix-with-kilo.test.tsx
Previous Review Summaries (2 snapshots, latest commit 9c0c30b)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 9c0c30b)

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 1
Issue Details (click to expand)

SUGGESTION

File Line Issue
apps/mobile/src/components/pr-review/discussion/pr-comment-fix-with-kilo.test.tsx 236 The platform-parity comment overstates the guard: a module-scope Platform.OS fork is captured once on import and stays invisible to both snapshot runs.
Files Reviewed (2 files)
  • apps/mobile/src/components/pr-review/discussion/pr-comment-fix-with-kilo.test.tsx - 1 issue
  • .kwf-keep-device - removed (empty scratch file no longer part of the PR diff)

Fix these issues in Kilo Cloud

Previous review (commit 46640f5)

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 1
Issue Details (click to expand)

SUGGESTION

File Line Issue
apps/mobile/src/components/pr-review/discussion/pr-comment-fix-with-kilo.test.tsx 204 Comment describes a 4pt gap-1 between the pill and overflow; the row actually uses gap-3 (12pt), so the comment is misleading about the geometry the tap-area guard depends on.
Files Reviewed (100 files)
  • apps/mobile/src/components/pr-review/discussion/comment-row.tsx - 0 issues
  • apps/mobile/src/components/pr-review/discussion/comment-row.test.tsx - 0 issues
  • apps/mobile/src/components/pr-review/discussion/discussion-thread.tsx - 0 issues
  • apps/mobile/src/components/pr-review/discussion/discussion-thread.test.tsx - 0 issues
  • apps/mobile/src/components/pr-review/discussion/pr-comment-fix-with-kilo.tsx - 0 issues
  • apps/mobile/src/components/pr-review/discussion/pr-comment-fix-with-kilo.test.tsx - 1 issue
  • apps/mobile/src/components/pr-review/discussion/pr-review-discussion-list.tsx - 0 issues
  • apps/mobile/src/components/pr-review/discussion/pr-review-discussion-list.mounted.test.tsx - 0 issues
  • apps/mobile/src/lib/pr-review/fix-with-kilo.ts - 0 issues
  • apps/mobile/src/lib/pr-review/fix-with-kilo.test.ts - 0 issues
  • apps/mobile/src/lib/pr-review/comment-trailing-controls.ts - 0 issues
  • apps/mobile/src/lib/pr-review/comment-trailing-controls.test.ts - 0 issues
  • apps/mobile/src/i18n/label-reference.test.ts - 0 issues
  • apps/mobile/src/i18n/locales/*.json (87 catalogs) - 0 issues; every catalog carries both new keys and keeps {{link}}

Fix these issues in Kilo Cloud


Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0

Review guidance: REVIEW.md from base branch main

@iscekic
iscekic force-pushed the kwf/owner-fix-with-kilo-on-pr-comments-de65 branch from 1a21f24 to 338c7dc Compare September 17, 2026 01:01
@iscekic
iscekic force-pushed the kwf/owner-fix-with-kilo-on-pr-comments-de65 branch from 338c7dc to 9c0c30b Compare September 17, 2026 01:34
@iscekic

iscekic commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator Author

bot: Cross-platform fix. Pushed 9c0c30b (kwf kwf-fix-platform-5b30).

What changed:

  • Read apps/mobile/src/lib/pr-review/fix-with-kilo.ts first: pure helpers for the provider anchor, the anchored web URL, the GitHub-only repo prefill, the message and the new-session href.
  • apps/mobile/src/components/pr-review/discussion/pr-comment-fix-with-kilo.tsx renders the pill from the live provider scope and returns null when the comment has no addressable URL.
  • The press stages the message through putSharePayload and pushes the new-session route; there is no network call, mutation or disabled state.
  • CommentRow now requires owner, repo, number and commentKind; the review thread and the conversation list both pass them, so one control covers both surfaces.
  • apps/mobile/src/lib/pr-review/comment-trailing-controls.ts holds the pill slop (10pt vertical, 2pt horizontal), the overflow slop (8pt) and the 12pt gap; the row hard-codes gap-3 while the clearance test reads the constant.
  • New catalog keys prReview.discussion.fixWithKilo and prReview.discussion.fixWithKiloPrompt were added to English and every locale; {{link}} must survive translation.
  • The platform-parity test drives all provider surfaces and the no-CTA GitLab case on both platforms, asserting identical CTA count, payload, href, label and hit slop.
  • The flagged expo-router imports are platform-neutral; the parity test fails if a Platform.OS branch enters the pill, href builder or payload staging.

@iscekic
iscekic marked this pull request as ready for review September 17, 2026 01:46
Comment thread apps/mobile/src/components/pr-review/discussion/pr-comment-fix-with-kilo.test.tsx Outdated
@iscekic
iscekic marked this pull request as draft September 17, 2026 01:52
@iscekic
iscekic force-pushed the kwf/owner-fix-with-kilo-on-pr-comments-de65 branch from 9c0c30b to 96bd152 Compare September 17, 2026 02:21
@iscekic
iscekic marked this pull request as ready for review September 17, 2026 02:29
@iscekic
iscekic requested a review from eshurakov September 17, 2026 11:29
@iscekic iscekic added the human-ready The PR is ready for human review. label Sep 17, 2026
@iscekic
iscekic requested a review from pandemicsyn September 17, 2026 11:29
@iscekic iscekic self-assigned this Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

human-ready The PR is ready for human review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants