Repository navigation
feat(queue): edit queued messages with attachment badges - #201
Merged
Merged
Conversation
nixuuu
marked this pull request as ready for review
November 5, 2026 16:21
nixuuu
force-pushed
the
feat/inline-attachments-3
branch
from
November 5, 2026 16:24
6ba3aa1 to
615f32c
Compare
The queue editor uses the composer's text field, so a queued message shows its files as badges and its mentions as chips. Backspace and Delete take a badge whole, Undo brings it back, and a line under the field names the files that leave the message on save. Saving sends the editor's positions with mentions_complete (new EditQueuedTurnRequest field 5). Without the flag and without mentions, an older client's plain-text edit, the gateway finds the turn's mentions in the new text by their markers. The queue row shows chips by their names.
nixuuu
force-pushed
the
feat/inline-attachments-3
branch
from
November 5, 2026 16:26
615f32c to
990acf3
Compare
nixuuu
added a commit
that referenced
this pull request
Nov 5, 2026
…231) Stage 5 of 5, mobile UX: catch up with recent web features in the thread view. **Done** - Full access with confirmation. - The work group is open while the agent works and collapsed after the turn (the default fold behaviour from #195). - Tighter work rows in the `work` scale; commands in monospace. - The shell command card and `!` mode in the composer (#194). - "Starting" for a dispatched queued turn (#197). - File badges in the message bubble. - Finished subagents collapse into one count that opens the lineage panel (#182). - The type scale for overlays, chrome, work rows and the context row (#174/#193). - Rejected messages show their reason, instead of a generic retry note. **Deferred** - The work fold settings (per device on the web). - Badges placed inline in the text and queue editing (#200/#201); files stay as chips. - Linked computers in pickers (needs `LinkedComputerSnapshot` merging). - Worktree and ref in a new thread. - Approval countdown and expiry cards. - Connector errors. - Mentions, side threads and goal editing. **Checked** on the Android emulator, light and dark. `check:tmp`: 1425 passed, 0 failed. `expo lint` and `tsc` are clean. **Copy audit (§8):** - "Runs as a shell command when delivered." - "Starting" - "N finished subagents" - "Set and manage goals in Canopy on the web."
nixuuu
added a commit
that referenced
this pull request
Nov 6, 2026
…ges (#237) Stage 2 of 4, mobile parity round 2: the composer. **Changed** - **Inline badges:** a picked file goes into the text as a badge `[name]` at the caret (an ATTACHMENT mention, as on the web since #200). The text field renders mentions as tinted spans, so the characters stay plain text. - An edit that touches a badge removes all of it and its file; text typed inside a badge lands after it. - Removing a file removes its badge. - The field cannot show progress, so files that are uploading or failed keep a chip above the text with the state and Remove. A stored file has only its badge. - Messages send `mentions` with the stored attachment ids; new threads send `initial_mentions`. - **Sent messages** show badges at their places (`Turn.mentions`); chips remain only for files not placed in the text. - **Queued messages** (as the web queue editor, #201): a "…" next to "Queued" offers Edit message and Delete. - The editor uses the same badges; deleting one shows "‹name› leaves the message when you save." (or "N files leave …"). - Save sends `EditQueuedTurn` with the full positions and `mentions_complete`; Delete sends `DeleteQueuedTurn`. - The text and mentions model is `features/composer/message-value.ts`, shared by the composer and the queue editor. **Keyboard gap fix** (reported from a real Galaxy Z Fold, folded, gesture navigation) - **Bug:** with the keyboard open, the composer floated well above it, with an empty band under it. Seen in bot chats and threads. - **Cause, measured on the emulator** at phone width: window 841 dp, keyboard top at y = 538, status bar 24 dp, nav-bar inset 32 dp. - The app runs edge-to-edge, so the window never resizes. - `KeyboardAvoidingView` sat inside a `SafeAreaView` that kept the 32 dp bottom inset, and `keyboardVerticalOffset={insets.top}` counted the status bar again, since frames are already in window coordinates. - The composer ended 24 dp plus its padding above the keyboard here, more with a taller status bar. - **Fix,** no new dependency: `ui/KeyboardArea.tsx` measures how far the keyboard reaches up from the window's bottom edge (window height minus the keyboard's `screenY`; on Android `height` leaves out the nav bar under the keyboard). - With the keyboard open, the composer sits directly on it with its normal padding. With the keyboard closed, it keeps the bottom safe-area inset. - Applied to the thread screen, bot chat, New thread and Pair, whose `SafeAreaView` now leaves out the bottom edge. - The same gap was in `Overlay`'s bottom sheets (Rename, queue editor, goal and side-thread forms): the sheet now sits on the keyboard and drops its bottom inset while the keyboard is open. - New thread on Android had no avoidance at all (the lower pills were under the keyboard); it now shrinks and scrolls. - On iOS the area follows `keyboardWillShow`/`Hide` with the keyboard's own animation timing (instant with reduced motion). **iOS was not checked on a device:** there is no iOS dev build, and building one did not fit the Mac's disk budget. - **Checked** on Canopy_Fold with the stock keyboard: phone width (folded) and unfolded, keyboard open and closed, a four-line draft. Thread, bot chat, New thread, Pair and a bottom-sheet form all sit flush on the keyboard; with the keyboard closed, the composer keeps its inset above the gesture bar. **Not done** - Undo: React Native's text field has no undo stack. - Tapping a badge to preview the file, and moving queued messages or switching queueing from the menu. **Checked** - Gates clean, as in stage 1. - Android emulator, light and dark, unfolded and phone width: - a badge inserted after typed text, and a long file name wrapping; - Backspace into a badge removes the badge and its file; - a message with a badge in the queue, then sent and shown with the badge in place; - edit and save of a queued message; - a badge removed in the editor with the "leaves the message" line, saved without the file. **Copy audit (§8)** - "Edit message", "Delete", "Queued message actions", "Edit queued message", "Cancel", "Save": verbs first; the web's labels. - "‹name› leaves the message when you save." / "N files leave the message when you save.": the web's text, one idea, present tense.
nixuuu
added a commit
that referenced
this pull request
Nov 13, 2026
nixuuu
added a commit
that referenced
this pull request
Nov 13, 2026
Queued messages repeated inline attachment filenames in their preview
and rendered large attachment chips below the row. Web and mobile now
share a plain preview that removes attachment tokens, preserves normal
mention labels, and replaces citation tokens with `citationTokenLabel`.
Muted, pluralised counts (`2 images · 1 file · 1 citation`) sit beside
the preview. Content-only messages use those counts as the preview.
Pressing the summary opens a scrollable list of filenames and citation
labels. Rows retain their existing height and fixed actions;
model/effort/access metadata truncates before the actions.
## Validation
- With `nice -n 19`: install, generated-code check, repository typecheck
(including web/mobile), lint, formatting check and web build pass.
- Three shared-helper regression tests pass: mixed and adjacent tokens,
citation plain labels, preserved typed filenames/normal mentions,
invalid ranges, content-only drafts, pluralised counts and unchanged
source data.
- All CI checks for this head pass, including all four test shards and
the aggregate `Typecheck, tests, builds` check. The PR is ready for
review.
- Full local `nice -n 19 bun run check:tmp`: **2717 pass, 166 skip, 4
fail** across 509 files (1846.06 s); its checked temporary directory is
clean. The failures are in unchanged harness/link code: the Grok
session-recovery test in `bots-harness.test.ts` exceeded its 5 s
timeout, and runs 10/20, 11/20 and 12/20 of the thread-move scenario in
`computer-moves.test.ts` failed on a disconnected peer or missing mirror
update. The isolated Grok `check:tmp` retry passes (1 pass / 0 fail,
3.08 s, no temporary files left). The full local run is **not green**,
despite successful CI. No gateway/worker behavior is changed by this PR.
- No UI tests were added. Native UI has not been exercised on a device.
- Remote install and web builds pass. Reviewed real production queue
components in an isolated temporary fixture: 1/3/12 queued rows at
1440/700/390 px, both themes, text-only/content-only/mixed messages and
long names. All 18 configurations have no horizontal overflow or
attachment filename leak; row heights remain 32 px desktop / 48 px
phone, and action coordinates match across rows. Summaries use muted
11.5 px desktop / 13 px phone text. Checked filename/citation lists,
wrapping, Escape/focus return and the zero-gap composer seam. Chromium
screenshots also ran on the second machine. The disposable checkout,
server, browser profile and remote artifacts are removed; no database
containers were needed. This is a component fixture review, not a live
gateway delivery test.
## Copy audit — docs/copy.md §8
- Filename previews plus repeated blue chips → message text and muted `1
image` / `2 images`, `1 file` / `2 files`, `1 citation` / `2 citations`:
each part has one purpose; counts use the citation glossary and correct
plurals.
- `(only files)` / `(only quotes)` → actual content counts: useful
content replaces an implementation-oriented placeholder. `1 quote` → `1
citation` names the token consistently.
- New disclosure labels: `Show message content: {summary}`, `Message
content`, `Close message content`. Action labels start with a verb; all
use sentence case, short phrases and no terminal punctuation.
- Criteria 1–8 and 10: English copy, sentence case and glossary checked;
no new errors, empty states, missing-data warnings, internal jargon or
“soul” lines. Named controls and readable counts provide meaning without
relying on color or icons. Full filenames remain in details.
- Criterion 9: checked short (`Short.png`), typical and long
filenames/citation labels at desktop, narrow and phone widths in both
themes. Row text truncates to one line; long names wrap in details
without overflow. Counts stay compact and actions remain aligned.
Fixes: #201
Fixes: #398
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stage 3 of 3, inline attachments: editing queued messages with attachment badges.
Queue editor
SendMessage, with a new flagEditQueuedTurnRequest.mentions_complete(field 5, additive).[name]markers.[name]markers.Tests: two new gateway tests in
attachments.test.ts:Checked in a browser, light and dark, desktop and phone: remove a badge, Undo, Save. Two layout bugs in the new editor were fixed:
check:tmpon the whole stack: 1324 passed, 0 failed.Copy audit (§8): "‹name› leaves the message when you save." uses present tense and states one idea.