feat(mobile): render generic tool details as labelled fields - #6320
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryThe incremental commits pre-bound the tool-detail JSON work before parsing, cap summary candidates before the whitespace collapse, gate the transcript Files Reviewed (8 files)
Previous Review Summaries (5 snapshots, latest commit fc74274)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit fc74274)Status: 4 Issues Found | Recommendation: Address before merge Executive SummaryResidual performance cost in the new tool-detail projection: the JSON output size cap is applied only after the full parse, scan, and pretty-print, so oversized tool outputs pay the worst case on every detail-sheet render. Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (100 files)
Fix these issues in Kilo Cloud Previous reviewStatus: 2 Issues Found | Recommendation: Address before merge Executive SummaryTwo low-severity edge cases in the new generic tool-detail projection: a blank Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (100 files)
Fix these issues in Kilo Cloud Previous review (commit 19e21dd)Status: No Issues Found | Recommendation: Merge Executive SummaryHistory was rewritten (the prior Files Reviewed (100 files)
Previous review (commit df5a0e2)Status: No Issues Found | Recommendation: Merge Executive SummaryThe follow-up commit replaces the transcript-row Files Reviewed (4 files)
Previous review (commit 82e0313)Status: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Files Reviewed (100 files)
Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0 Review guidance: REVIEW.md from base branch |
feb9e9e to
df5a0e2
Compare
|
kilo-review — independent audit of the published diff. Status: 2 Issues
|
|
bot: Accepted. Pushed 79b7eb4 (kwf What changed:
|
79b7eb4 to
19e21dd
Compare
19e21dd to
7d1a29d
Compare
eshurakov
left a comment
There was a problem hiding this comment.
Approved after a shallow triage pass. Note: also carries an unrelated web change (promoCreditCategories.ts) worth splitting out.
|
The merge bot leaves this one to a human: Jev reads it as a human's merge (confidence 0.98). |
|
The merge bot leaves this one to a human: Jev reads it as a human's merge (confidence 0.98). |
Changelog for users
argumentsfields rather than theserver_name/tool_nameenvelope.questiontool shows its header, question, and options as rows; a blank header or question is omitted, and two or more questions are numbered.JSON.stringifystays raw.No output.line; a failed call with a blank message shows a failure line instead.Changelog for maintainers
@kilocode/app-shared/tool-detailexportsbuildToolDetailandformatToolDetailOutput;ToolDetailreturns{ status, name, summary?, arguments?, fields, output?, error? }. It resolves the known image MCP tools and unwraps themcpenvelope toserver/tool; mobile's sheet body and transcript subtitle consume it. The subtitle prefers a trimmed state title, then a 60-character summary, then the projected name (the oldgetGenericToolTitleis gone).packages/app-shared/src/tool-detail/index.ts:245— accepted: an oversized output paid the fullJSON.parse, number-literal scan, andJSON.stringifybefore the cap discarded it. It now returns raw first; the post-pretty-print check still guards the parsed path.packages/app-shared/src/tool-detail/index.ts:93— accepted: the row projection collapsed whitespace across an unbounded argument on every render. Each summary candidate is now trimmed and bounded to 200 characters before the collapse. Field values still cap at 4000 characters, and a mono block defaults to a 20000-character budget when no caller cap is given.packages/app-shared/src/tool-detail/index.test.ts:356— accepted: new tests cover digits inside a string staying pretty-printed, the early oversized discard, and the 200-character summary bound.apps/mobile/src/components/agents/tool-card-display.ts:271— accepted:ToolDetailSummary.nameIsLabelmarks a known-tool labeltranslatable. The English app copy reaches the gateway, while raw ids andserver/toolidentifiers stay out; review this decision with the caps above first.packages/app-shared/src/tool-detail/index.ts:171— accepted: the per-question and barequestionrows require non-blank text, and the raw-input fallback drops blank values, so aquestion: ''part emits no empty row and does not suppress the empty state.apps/mobile/src/components/agents/tool-cards/generic-tool-card.tsx:44— accepted: the empty state keys ondetail.status !== 'error', so an errored part with a blank error message shows the localized failure line instead ofNo output..buildSelfServicePromosinpromoCreditCategories.tsskips and logs entries whose ciphertext fails to decrypt instead of throwing at module scope, which had returned 500 for sign-in and cloud-agent session creation.E2E proof
Verified on Android emulators. The multi-megabyte-output and very-large-argument captures are this run's proof for the two size caps, and they replace the repair's earlier captures for those paths. The image-tool name translation is proved from the UI tree, where the sheet header and transcript row show the German
Bild veröffentlichenforapp-builder-images/transfer_image, so it has no separate screenshot. The earlier captures for the error, empty, and question states stay valid. Limitations: the blank-question case needs a seeded fixture because the live trigger always sends non-blank question text; the literal zero-length-error part's transcript row is not tappable, so a whitespace-only error covers the blank-message failure; on web, the local-setup sign-in smoke test timed out, so the promo-decrypt change has no passing web E2E proof.Owner request
E2E proof — log excerpts
/home/igor_kilocode_ai/.local/share/kwf/sections/kwf-fix-review-b543/e2e-mobile-app/e1-capped-output.log/home/igor_kilocode_ai/.local/share/kwf/sections/kwf-fix-review-b543/e2e-mobile-app/p2-capped-argument.log