Skip to content

chat: preserve conversation drafts and attachments when returning Home - #1431

Merged
AbirAbbas merged 11 commits into
devfrom
codex/todo-attachment-tray
Sep 28, 2026
Merged

AbirAbbas merged 11 commits into
devfrom
codex/todo-attachment-tray

Conversation

@ZeroPoint95

@ZeroPoint95 ZeroPoint95 commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

The Issue

User is stuck in a search screen if returning to home with an attachment in the tray.
1431-broken

The fix

User gets a clean slate in home regardless of attachment. The tray remains filled for the user to return.
1431-fixed

Opening Home with a conversation attachment could trap navigation in the search view. Home now has its own empty attachment tray, while the conversation retains its unsent prompt, cursor position, and attachments. Reopening that conversation restores the draft.

Starting another conversation from Home carries only the text and attachments added on Home. This also preserves drafts in conversations that have not sent their first message yet. Creation failures leave both drafts intact. Home starts clean on every visit.

Conversation attachment chips show a clickable remove mark. The manual and change entry describe the updated behavior.

Validation: focused navigation, attachment, creation, and draft regressions; make pr-ready (all eight TUI shards); make build. The gate used TMPDIR=/private/tmp to avoid three existing macOS temp-path alias failures, reproduced separately on clean dev.

@santoshkumarradha santoshkumarradha added bug Something the code does that it should not area:chat The v3 surface a person sits in front of (internal/tui3) labels Sep 27, 2026
@santoshkumarradha santoshkumarradha added this to the Chat & connections milestone Sep 27, 2026
@santoshkumarradha santoshkumarradha added the sev:papercut A wording, a hint, a small wrongness that costs a moment label Sep 27, 2026
@ZeroPoint95
ZeroPoint95 marked this pull request as ready for review September 28, 2026 15:07
@ZeroPoint95
ZeroPoint95 marked this pull request as draft September 28, 2026 15:18
@ZeroPoint95 ZeroPoint95 changed the title chat: detach unsent attachments on returning Home chat: preserve conversation drafts and attachments when returning Home Sep 28, 2026
@ZeroPoint95
ZeroPoint95 marked this pull request as ready for review September 28, 2026 15:44
@AbirAbbas

Copy link
Copy Markdown
Collaborator

Taking this over to land it (Abir asked in the Slack thread). I checked every claim in the description against the real binary, on the engine road and on --no-host:

  • Home opens with an empty tray and composer from every door (alt+1, /home, space space, mouse), and its list still navigates. On dev it opened holding the conversation's data.csv.
  • Reopening the conversation brings back the exact text, caret and chips.
  • A conversation started from Home receives only Home's cargo, and the model answered from it.
  • A conversation that hasn't sent its first message keeps its draft.
  • When creation fails, both drafts survive.
  • The × remove mark works on the plain, ASCII and rich tiers.
  • make pr-ready is green.

One fix pushed: home.md still said Home's tray "survives walking into a conversation and back out to home". The manual now says what the code does.

Notes, not blocking:

  • Pressing alt+1 / /home while already on Home now clears files attached there. On dev the typed text was already cleared on a re-press and the chips survived. It's consistent with "Home starts clean", but you may want to decide whether a re-press counts as a new visit.
  • Pre-existing, also on dev: clicking the … of a clipped chip removes that chip even though its × is hidden. attach.go hit-tests the full labels but draws truncated ones.

#1431 gave home a tray of its own that is emptied every time home closes,
and left the conversation's draft and attachments with the conversation.
home.md still said the tray "survives walking into a conversation and back
out to home" and that a chip comes off "where the `x` is", and
attaching-files.md still justified carrying pictures into the new
conversation by the tray belonging to the person rather than the screen.

Both now say what the code does: home's tray belongs to the conversation
home starts next, nothing from another conversation's draft rides along,
home opens clean on every visit, and the remove mark is `×` (`x` in ASCII
mode).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

@AbirAbbas AbirAbbas left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified in the real binary and merged by the takeover; see the comment above.

@AbirAbbas
AbirAbbas merged commit f8fbbbc into dev Sep 28, 2026
4 checks passed
@AbirAbbas
AbirAbbas deleted the codex/todo-attachment-tray branch September 28, 2026 19:27
AbirAbbas added a commit that referenced this pull request Sep 28, 2026
#1431 gave home a tray of its own, so the bash refusal and the
update-stops-turn check in homeStartWithProject read a.home.chips; a.chips
is now the conversation behind home.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
AbirAbbas pushed a commit that referenced this pull request Sep 28, 2026
Typing `!` at the start of the composer enters bash mode: an amber `$` prompt, and enter runs the command non-interactively in the conversation's project, streaming literal output live and keeping it in history. The model waits for the person's next message, which carries the command and its output. Only the person's explicit door can run it (a new SubmitBash method, wire version 20); explicit approval denies still refuse.

Takeover fixes: a critical-floor command (disk wipes, mkfs, reboot, the fork bomb) typed with `!` now asks the same question a model call does, in every posture including --yolo; a `!` row counts down against the runner's 10-minute timeout; the manual says ctrl+g cannot background a `!` command. Merged with dev so a `!` typed on Home reads Home's own tray (#1431).

Co-authored-by: ZeroPoint95 <329227198+ZeroPoint95@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:chat The v3 surface a person sits in front of (internal/tui3) bug Something the code does that it should not sev:papercut A wording, a hint, a small wrongness that costs a moment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants