Repository navigation
feat(native): composer menus, attachments, drafts, queued messages, stash - #37
Merged
Merged
Conversation
rynfar
force-pushed
the
nw/w2-triggers
branch
from
November 2, 2026 12:08
9119884 to
27318b5
Compare
rynfar
force-pushed
the
nw/w2-triggers
branch
from
November 2, 2026 12:25
27318b5 to
8eac59b
Compare
Images and files attach by paste, drop and the paperclip, upload through attachments.createUploadUrl, and ride the turn with their context records. Large pastes fold into pasted-text files. Go-to-file mentions now land in the prompt instead of the clipboard.
Each thread and new-thread draft keeps its prompt, model, permission and mode choices, mentioned threads and uploaded attachments across thread switches, written atomically under T3_NATIVE_HOME after a 300ms debounce.
Messages waiting behind the active turn show above the composer as dashed rows. Send now starts or steers, edit opens the text in the composer and saves it with queued-run.edit, and remove cancels the run.
Mod+S parks the prompt with its mentions and uploaded attachments (twenty deep, saved under T3_NATIVE_HOME); the Stash tab lists them to restore or delete. Up and Down at the prompt's edges recall what was sent in the thread.
… the composer --new-thread, --attach and --prompt put the composer into the states worth a screenshot: an open @, / or $ menu and the attachment strip.
rynfar
force-pushed
the
nw/w2-triggers
branch
from
November 2, 2026 12:35
8eac59b to
b8cb08f
Compare
Owner
Author
|
Rebased onto
Gates: |
This was referenced Nov 2, 2026
Open
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.
Problem
The native composer had no
@,/or$menus, could not attach anything, lost its text on every thread switch, and had no queued-message controls, stash or prompt history.Approach
CO-TRIGGERS (
crates/core/src/composer/menu.rs,crates/app/src/composer/menu.rs)detectComposerTrigger(path words, currency amounts,#boundaries), Escape dismissal fromuseComposerTriggerState, highlight rules fromcomposerMenuHighlight.tsandnudgeComposerMenuHighlight.@: threads ranked like the palette (matchComposerThreadItems) andprojects.searchEntriesresults (80, 120ms debounce). Picking a file inserts[name](path)(serializeComposerFileLink); picking a thread inserts itst3-context://link and sends aThreadContextRecordwhile the link stays in the text./:/model,/plan,/default, provider commands (/compactonly when it could run), and/skill:*, ranked bysearchSlashCommandItems. Per-cwd skills and commands come fromserver.refreshProviders(workspaceSnapshotsOnDemand), one scan per TTL./planor/defaultsent alone switches the mode.$:searchProviderSkills, with the source badge.capture_actiononly while the menu is open, the prompt is focused and no IME composition is marked.Ask anything. @ files, $ skills, / commands.composer_mentions; the clipboard fallback is gone.CO-ATTACH (
crates/core/src/composer/attachments.rs,crates/app/src/composer/attachments.rs,crates/client/src/upload.rs)icon-smghost, shown when the server advertisesfileAttachments).attachments.createUploadUrl, then POST to the signed URL on the network runtime. Strip with 64px thumbnails, file rows, Uploading/failed states, retry and remove (removal deletes an unsent upload).pasted-text.txt; Cmd+Shift+V keeps them inline.ChatAttachments plus their image/file context records, the attachment-only prompt when there is no text, and the web's title seed (deriveThreadTitleSeed). A failed send puts text and attachments back.CO-DRAFTS (
crates/core/src/composer/drafts.rs,crates/app/src/composer/drafts.rs)composer-drafts.jsonunderT3_NATIVE_HOME, atomic, 300ms debounce, empty drafts dropped, 200 max). A launched draft is discarded; an open question's answer or a queued edit never overwrites the draft.CO-QUEUE (
crates/core/src/composer/queue.rs,crates/app/src/composer/queue.rs)deriveThreadQueueWorkflowStateport (queue position order, notices skipped, guest messages read-only, steer only when the provider can). Dashed rows above the composer: Send now (queued-run.startorqueued-message.promote-to-steer), Edit in the composer (saves with a text-onlyqueued-run.edit, which keeps attachments; send reads "Update queued message"), Remove (queued-run.cancel), Show all after three.RungainsqueuePosition(conformance builder + fixtures regenerated).CO-STASH (
crates/core/src/composer/stash.rs,crates/app/src/composer/stash.rs)composer.stash) stashes prompt + mentions + uploaded attachments (20 max, oldest evicted with the web's toast); an empty composer restores the only entry or opens the list. Stash shoulder tab and attached list with keyboard navigation, restore (joins after a blank line) and delete.recallableComposerPrompt,stepComposerPromptHistory).Not yet:
#pull-request menu and machine mentions, HEIC conversion and image compression (refused with the web's copy), upload progress percentages, the image preview dialog, inline image chips, queued-row image thumbnails and the steer/edit-latest shortcuts, image previews for drafts and stash entries after a restart (they restore as name tiles), visual-line edges for history (logical lines here).Ledger
CO-TRIGGERS, CO-ATTACH, CO-DRAFTS, CO-QUEUE, CO-STASH →
partial.Evidence
Headless against the smoke server (
T3_NATIVE_HOME=.t3-smoke/native, freedevReplay), via the newcomposer_probeexample:The server persisted the upload and remapped the context record to the stored attachment.
Queue (
composer_probe --queue <thread>on the smoke server):Offscreen screenshots (snapshot tool against the smoke server; this PR adds
--new-thread,--attachand--promptto it so the composer can be put into these states):@menu, threads then files, dark:/Volumes/DevSSD/t3code-native-w2-composer/.t3/w2c-snapshots/w2c-menu-at.png/menu with Codex commands and/skill:*rows, dark:/Volumes/DevSSD/t3code-native-w2-composer/.t3/w2c-snapshots/w2c-menu-slash.png/Volumes/DevSSD/t3code-native-w2-composer/.t3/w2c-snapshots/w2c-attachments.png@thread rows, light:/Volumes/DevSSD/t3code-native-w2-composer/.t3/w2c-snapshots/w2c-draft-light.pngNot captured: queued rows (devReplay drains the queue instantly) and the stash list (the snapshot's throwaway home has no stash).
Gates (after rebasing on
nativeat #41):cargo test --workspace,cargo clippy --workspace --all-targets -- -D warnings,gen-theme --check,parity/sync.test.ts, conformance--check.Worker W2c, Claude Opus 5.5 in Claude Code.