feat(mobile): reorder composer attachments with drag and a11y moves - #5540
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryIncremental i18n of attachment reorder Move Left/Right strings across 86 locales; interpolation and keys match English, no defects. Files Reviewed (86 files)
Previous Review Summaries (3 snapshots, latest commit c2a110c)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit c2a110c)Status: No Issues Found | Recommendation: Merge Executive SummaryMechanical extract of the new-session profile row from the configure form; no defects in the changed code. Files Reviewed (2 files)
Previous review (commit 11f8e44)Status: No Issues Found | Recommendation: Merge Executive SummaryIncremental wiring of Files Reviewed (12 files)
Previous review (commit 522f3df)Status: 1 Issue Found | Recommendation: Address before merge Overview
Fix these issues in Kilo Cloud Issue Details (click to expand)WARNING
Files Reviewed (5 files)
Reviewed by grok-4.6 · Input: 161.4K · Output: 8.8K · Cached: 160K Review guidance: REVIEW.md from base branch |
Summary
AttachmentPreviewStripnow requiresonMoveandonReorder;AttachmentChipPropscarries each attachment's position and measured-width callbacks.dragTargetIndexuses measured widths and 8-point spacing for a 300-millisecond long-press drag, leaving ordinary swipes available for scrolling. Moves restore focus;moveLeftandmoveRightappear only where valid, and Remove targets 44 points on iOS or 48 density-independent pixels on Android.Files
apps/mobile/src/components/agents/attachment-preview-strip.tsx— Source; modified; 376 changed lines. Adds gesture-aware scrolling, width-aware dragging, movement actions, focus restoration, platform touch targets, and a distinct menu index.apps/mobile/src/components/agents/attachment-preview-strip.mounted.test.tsx— Test; modified; 298 changed lines. Updates the mounted attachment-strip tests.UseAgentAttachmentUploadReturnaddsmoveAttachmentandreorderAttachments, withAttachmentMoveDirectionrestricting one-step movement toleftorright. Both callbacks preserve attachment objects and update state plus its live reference; missing identifiers, edge moves, and invalid index ranges leave the list unchanged.uploadPendingcontinues to buildAgentAttachmentWireandAgentAttachmentSubmissionPayloadin attachment order, so sending follows the reordered list without changing either payload contract.Files
apps/mobile/src/lib/agent-attachments/use-agent-attachment-upload.ts— Source; modified; 61 changed lines. Adds movement callbacks through the shared commit path and returns them with stable references.apps/mobile/src/lib/agent-attachments/use-agent-attachment-upload.test.ts— Test; modified; 130 changed lines. Updates the attachment upload-hook tests.apps/mobile/src/components/agents/use-new-session-creator.test.ts— Test; modified; 2 changed lines. Updates the session-creation tests.Both agent composers now connect attachment movement to their existing upload state, including the full new-session form chain.
NewSessionPromptPropsandNewSessionConfigureFormPropsrequireonMoveAttachmentandonReorderAttachments, so existing callers and test doubles must provide both. Clone-only entries still omit the prompt and attachment strip.Files
apps/mobile/src/components/agents/chat-composer.tsx— Source; modified; 5 changed lines. Connects the strip's movement callbacks to the upload hook.apps/mobile/src/components/agents/new-session-screen-body.tsx— Source; modified; 5 changed lines. Passes the upload hook's movement callbacks into the form.apps/mobile/src/components/agents/new-session-configure-form.tsx— Source; modified; 66 changed lines. Requires and forwards movement callbacks; delegates the profile display to the extracted helper.apps/mobile/src/components/agents/new-session-prompt-types.ts— Source; modified; 3 changed lines. Adds the required movement callbacks and imports their direction type.apps/mobile/src/components/agents/new-session-prompt.tsx— Source; modified; 4 changed lines. Forwards both movement callbacks to the attachment strip.apps/mobile/src/components/agents/chat-composer.test.ts— Test; modified; 42 changed lines. Updates the chat-composer tests.apps/mobile/src/components/agents/new-session-configure-form.test.ts— Test; modified; 23 changed lines. Updates the configuration-form tests.apps/mobile/src/components/agents/new-session-prompt-initial-prompt.test.ts— Test; modified; 2 changed lines. Updates the initial-prompt tests.The extracted
renderProfileRowusesRenderProfileRowArgsandRenderProfileBodyArgsto keep the configure form within its file-size limit. It still hides during loading, preserves retry and summary content, and shows the default environment only after loading completes without a profile. The form still hides the row for remote sessions and clone entries.Files
apps/mobile/src/components/agents/new-session-profile-row.tsx— Source; added; 82 changed lines. Extracts the row and body helpers with explicit translation, profile, loading, error, and retry inputs.agentChat.attachmentPreview.moveLeftandagentChat.attachmentPreview.moveRightadd filename-aware movement labels in English and all 86 translated catalogs. The prepared translations preserve{{filename}}, existing entries, and key order; each translated catalog receives exactly two labels. The non-English files are tool-applied locale assets, accounted for from the supplied statistics and translation evidence.Files
apps/mobile/src/i18n/locales/en.json— Source; modified; 2 changed lines. Adds the English movement labels.apps/mobile/src/i18n/locales/af.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/am.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/ar.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/az.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/be.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/bg.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/bn.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/bs.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/ca.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/ckb.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/cs.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/cy.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/da.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/de.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/el.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/es.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/et.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/eu.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/fa.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/fi.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/fil.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/fr.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/ga.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/gl.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/gu.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/ha.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/he.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/hi.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/hr.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/ht.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/hu.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/hy.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/id.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/ig.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/is.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/it.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/ja.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/ka.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/kk.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/km.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/kn.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/ko.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/lo.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/lt.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/lv.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/mg.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/mi.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/mk.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/ml.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/mn.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/mr.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/ms.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/mt.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/my.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/nb.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/ne.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/nl.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/om.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/or.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/pa.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/pl.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/ps.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/pt-BR.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/pt.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/ro.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/ru.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/si.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/sk.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/sl.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/so.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/sq.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/sr.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/sv.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/sw.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/ta.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/te.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/th.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/tr.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/uk.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/ur.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/uz.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/vi.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/yo.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/zh-Hans.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/zh-Hant.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.apps/mobile/src/i18n/locales/zu.json— Generated; modified; 4 changed lines. Adds both prepared movement labels.Tests: 6 files modified —
attachment-preview-strip.mounted.test.tsx,chat-composer.test.ts,new-session-configure-form.test.ts,new-session-prompt-initial-prompt.test.ts,use-new-session-creator.test.ts, anduse-agent-attachment-upload.test.ts(497 changed lines).Generated: 86 translated locale catalogs modified, 344 changed lines (+258/−86), containing 172 added movement labels.
Visual Changes
Visual Changes: N/A
Verification
Verification: no E2E report attached; runtime verification runs on the tip PR over every level.
Reviewer Notes
Human steps
Scope and evidence
Kilo-Org/cloud; worktree:/Users/igor/Projects/.worktrees/agent-composers-c07a.79a18adec0c0a2a51d0bc780902c61b63dd8b1b0, head5e90f69c285d563dc1907aee019281e6af579895.agent-composers-c07a-s6; its tip is not this description's source./Users/igor/Projects/.worktrees/agent-composers-c07a-kilocode, branchagent-composers-c07a; reference only, with no sibling changes described.The handoff supplies the continuous integration (CI) and bot status:
Current-head CI and Kilobot approve this PR.
Notes
Cumulative runtime verification and its limits are recorded in #5617.
Notes: This is level 3 of a 6-level stacked set of PRs. Merge bottom to top. Runtime verification (E2E, user advocacy, simplify) runs on the tip PR over every level.
Stacked PRs — merge bottom to top. Each level shows only its own diff.
Runtime verification (E2E, user advocacy, simplify) runs on the tip PR over every level.
Every level keeps its own checks, its own bot review, and its own threads; each one is answered on its own PR.
Each level is its own deliverable: it builds and passes its own checks alone.
A finding on a level is repaired on that level, then carried upward with stack.sh forward.
agent-composers-c07a— feat(agent-composer): add message identity and queue cancel APIs #5537agent-composers-c07a-s2— feat(mobile): pre-upload attachments and release abandoned files #5538agent-composers-c07a-s3— feat(mobile): reorder composer attachments with drag and a11y moves #5540agent-composers-c07a-s4— feat(agent-composer): render sent messages immediately and cancel queued ones #5589agent-composers-c07a-s5— feat(mobile): keep agent composers editable during live dictation #5607agent-composers-c07a-s6— feat(mobile): adapt agent composers for keyboard, height, and preferences #5617 (tip)