Skip to content

Clear pending images with the first idle Ctrl+C - #786

Merged
TheGreatAxios merged 4 commits into
mainfrom
cl-5738-first-ctrlc-should-clear-attached-images-along-with-the
Sep 5, 2026
Merged

Clear pending images with the first idle Ctrl+C#786
TheGreatAxios merged 4 commits into
mainfrom
cl-5738-first-ctrlc-should-clear-attached-images-along-with-the

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • First idle Ctrl+C clears pending image attachments along with prompt text.
  • Attachments-only clear does not arm the quit window; empty prompt with no attachments still does.
  • Corbits-owned ephemeral files are unlinked; operator path-mention files are not.

Verification

  • bun run check passes (lint, typecheck, build, 6164 tests)
  • bun test ./src/tui/prompt-slash-exit.test.ts covers attachments surviving a clear and busy interrupt keeping them

Fixes CL-5738

@linear-code

linear-code Bot commented Sep 4, 2026

Copy link
Copy Markdown

CL-5738

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

critic

Meets CL-5738. Idle first Ctrl+C clears prompt text and pending attachments; attachments-only does not arm the quit window; empty prompt with no attachments still arms; busy interrupt does not drop attachments. clearPendingAttachments unlinks ephemeralPath only.

No blocking defects on 61c04f56.

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

critic · Comment

Idle first Ctrl+C clears prompt and pending images; busy interrupt keeps attachments; operator path is never unlinked.

No findings.

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Review · Comment

Idle Ctrl+C clears prompt text and pending attachments; attachments-only does not arm quit; clearPendingAttachments unlinks ephemeralPath only.

No findings. Cannot --approve as the PR author.

RoR: git log --oneline 5a722735..61c04f56 is one commit; git diff 5a722735...61c04f56 --stat is 5 files, no Bin; subject and body under 72 with no prefix or ticket ID.

@TheGreatAxios
TheGreatAxios force-pushed the cl-5738-first-ctrlc-should-clear-attached-images-along-with-the branch from 61c04f5 to 168d538 Compare September 4, 2026 19:13

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

critic · Comment

Follow-up tests close prompt-text arming (prompt-slash-exit.test.ts:279), ENOENT swallow (:357), both-fields unlink (:366), and the idle attachment-clear keybindings probe (keybindings.test.ts:522).

No findings.

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Review · Comment

Idle Ctrl+C clears prompt text and pending attachments; attachments-only does not arm quit; only ephemeralPath is unlinked.

No findings. Prior arming, ENOENT, keybindings probe, and both-fields unlink notes are closed. Cannot --approve as the PR author.

RoR: git log --oneline cl-5740..cl-5738 is two commits; git diff --stat is 6 files, no Bin; subjects and bodies under 72 with no prefix or ticket ID.

@TheGreatAxios
TheGreatAxios force-pushed the cl-5738-first-ctrlc-should-clear-attached-images-along-with-the branch from 168d538 to 28baead Compare September 5, 2026 05:15
Base automatically changed from cl-5740-apply-image-dedupe-to-the-path-mention-route-not-just to main September 5, 2026 05:47
@TheGreatAxios
TheGreatAxios force-pushed the cl-5738-first-ctrlc-should-clear-attached-images-along-with-the branch from 018257e to 947426d Compare September 5, 2026 05:50
Idle Ctrl+C used to wipe prompt text but leave pending attachments on
the notice row. Clear both, and unlink only files Corbits created
(ephemeralPath) so operator path-mention files stay on disk.
Idle Ctrl+C already unlinks Corbits-created ephemeralPath files. Quit via dispose or a second Ctrl+C skipped that path, so clipboard temp files stayed on disk. Operator-owned path mentions stay untouched.
@TheGreatAxios
TheGreatAxios force-pushed the cl-5738-first-ctrlc-should-clear-attached-images-along-with-the branch from 947426d to 072bcd9 Compare September 5, 2026 05:51
@TheGreatAxios
TheGreatAxios merged commit 8f7cd1b into main Sep 5, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant