Skip to content

Delete a message, in Messages and with jun tool message delete - #100

Open
bencode wants to merge 1 commit into
mainfrom
feat/message-delete
Open

bencode wants to merge 1 commit into
mainfrom
feat/message-delete

Conversation

@bencode

@bencode bencode commented Nov 26, 2026

Copy link
Copy Markdown
Owner

A message sent by mistake could only go when Jun quit, such as the seven unlinked notices now taking up Messages.

What changes

  • Messages: Delete in a message's context menu, or ⌫ / Delete on the row chosen, takes it out at once, with no question: messages last only until Jun quits anyway.
  • CLI: jun tool message delete <id>, for any Jun terminal, whoever sent the message. Prints nothing; no such message is status 1. message delete alone is still a message whose text is "delete", as message update alone is.
  • Docs: docs/agent-tools.md (command table, a "Deleting a message" section), docs/agents-view.md (Messages), and the jun-tools skill (Commands table, "Follow a message up").

Behaviour

Case Result
The M number Not given again: the next message gets the next number; update or delete of a deleted id is no message <id>, status 1
A link Only the message goes: its terminal, Diff, file or project, and its task, stay
The row chosen Deleting it moves the choice to the message below, or above for the last one; any other choice stays with its message
Done matters Stay as done, for the user to read; the docs say to delete only what was sent by mistake

"Delete all done messages" is left out: the case at hand is info notices, and ⌫ deletes them one by one quickly.

Checks

  • gofmt -l internal, go vet ./internal/... ./cmd/..., go test ./internal/...: all pass.
  • New tests drive the real view headless: a right-click → Delete, ⌫, Delete, and a CLI delete above the chosen row, checking the rows and the choice; plus the tool's refusals and that the number is not reused. They fail without the delete keys or without the choice moving.
  • Not run in a dev Jun by hand: the CLI's caller must be one of that Jun's own terminals.

A message sent by mistake could only go when Jun quit. The user now deletes
one from its context menu, or with Backspace or Delete on the row chosen;
agents with `jun tool message delete <id>`. Its number is not given again,
and what it links to stays. The choice goes to the message below, or above
for the last one.
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