Skip to content

chore(tools, ticket): Preview the ticket a call will write - #992

Merged
JeanMertz merged 4 commits into
mainfrom
ticket-preview
Aug 18, 2026
Merged

chore(tools, ticket): Preview the ticket a call will write#992
JeanMertz merged 4 commits into
mainfrom
ticket-preview

Conversation

@JeanMertz

@JeanMertz JeanMertz commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Approving a ticket_create or ticket_comment call meant reading its arguments
as a function signature and imagining the file. Both now answer the
format-arguments action by rendering the document in the shape it takes on disk,
quoted as a blockquote so the marker runs down the whole preview and the reader
can see where the ticket ends and the conversation resumes.

style.parameters points at the tool's own command so JP shells out to render
the call, and format = "unattended" lets that run before the approval prompt
rather than after it. That mode carries a contract: the formatter must be
side-effect-free. A create preview keeps it by rendering the document and
nothing else — no file, and no id drawn. Since RFD 102 the id lives only in the
filename, so the previewed document is complete without one, and the result line
names the id the ticket ends up with.

render::comment renders one comment block standalone, which appending never
needed. A comment preview shows it under the heading of the ticket it lands on,
and says so when that ticket does not exist rather than previewing a call that
is going to fail.

Approving a `ticket_create` or `ticket_comment` call meant reading its
arguments as a function signature and imagining the file. Both now
answer the format-arguments action by rendering the document in the
shape it takes on disk, quoted as a blockquote so the marker runs down
the whole preview and the reader can see where the ticket ends and the
conversation resumes.

`style.parameters` points at the tool's own command so JP shells out to
render the call, and `format = "unattended"` lets that run before the
approval prompt rather than after it. That mode carries a contract: the
formatter must be side-effect-free. `store::peek_next_id` is what keeps
it, reading the counter without advancing it, so a preview names the id
`create` would hand out without burning it. Allocating during a preview
would leave a gap in the board for every rejected call.

`render::comment` renders one comment block standalone, which appending
never needed. A comment preview shows it under the heading of the
ticket it lands on, and says so when that ticket does not exist rather
than previewing a call that is going to fail.

Signed-off-by: Jean Mertz <git@jeanmertz.com>
Signed-off-by: Jean Mertz <git@jeanmertz.com>
Signed-off-by: Jean Mertz <git@jeanmertz.com>
@JeanMertz
JeanMertz merged commit d3962a2 into main Aug 18, 2026
16 checks passed
@JeanMertz
JeanMertz deleted the ticket-preview branch August 18, 2026 15:03
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