Repository navigation
Description
Item 2 under Next in docs/status.md asks for image attachments in the composer. This issue comes from the 2026-10-06 rails-canvas plan. That plan stopped after its first step, and its worktree was retired on 2026-10-09.
Already done: resizable side panels
The plan's resizable-rails step shipped separately in #154 (5071ce8, in v0.0.10):
PanelResizeHandleresizes by drag, arrow keys, Home and End, and resets on double-click or Enter.- Widths persist in
shared/layout.ts. e2e/panel-resize.spec.tsande2e/panel-layout.spec.tscover it.
This issue does not repeat that work. If the shipped panels fall short of the plan, file a separate issue. The one plan criterion not checked here is keeping at least 350px for the conversation at the 900px minimum window width.
Scope
1. Attachment storage (main process)
- Add
apps/desktop/src/main/engine/attachments.ts. It copies each picked or dropped file into the app's private attachments directory (<modex home>/attachments/…). - Keep the original bytes, give each copy a unique storage path, sanitize the filename, and enforce a size limit. Reject anything over the limit with a readable error.
- Expose it through typed IPC in both the desktop and development command sets. Main validates every input, and the renderer never chooses the storage path.
- Pass attachments to the coding CLIs as local file references, through the existing
claudeandcodexbackends only. Do not add an API path (seeAGENTS.md).
2. Composer UI (renderer)
- Add an Attach files item to the composer's menu, which opens a file picker.
- Show a drop overlay (
attachment-dropzone) while files are dragged over the composer, then accept the drop. - Show each attachment as a removable chip (
attachment-chip), and show an error state when a copy fails or a file is too large. - Block sending while a copy is still in progress.
- Allow sending a message that has attachments but no text.
- App owns the draft, so attachments survive switching threads and failed sends.
3. Composer size (from the same plan)
- Raise
.composer-inner'smax-widthfrom 736px to 960px, and the resting composer height from 98px to 109px. Keep the width responsive.
Out of scope
- Canvas (live HTML/SVG/Markdown previews in the workspace). It was the third part of the same plan and should get its own issue.
Acceptance
- An e2e test (a starting draft exists, described below) checks that:
- a file picked with Attach files shows a chip that can be removed;
- a dropped
reference.mdshows the drop overlay and then a chip; - after sending, the file exists under
<home>/attachments/…with identical bytes, and the chip clears.
- Unit tests for
attachments.tscover filename sanitizing, unique paths, the size limit and byte preservation. - A live check with each CLI that an attached image reaches the model, recorded in
docs/reviews/. npm run build && npm test,npm run typecheckandnpm run test:e2eall pass.docs/status.mdis updated: the attachments item moves out of Next.
Starting material
The retired worktree's first step was a Playwright test, e2e/workbench.spec.ts. Its attachments can be picked, removed, dropped and sent with readable file contents case defines the test IDs used above. The test and the full plan were saved outside the repository when the worktree was retired, and can be attached to the implementing PR.
Activity
BunsDev commentedon Oct 11, 2026
Delivered by #157 after protected checks and squash merge
5e80b46912a6ba2f278ece14bf18efaac55a2c8a; the signed merge tree exactly matches the reviewed candidate.The acceptance report records the full evidence and the unresolved cause of one earlier Space resize mismatch; the final full run passed its unchanged exact assertion.