Skip to main content

Module ops

Module ops 

Source
Expand description

High-level, transactional board operations shared by every front-end (CLI, daemon, desktop). Each function loads what it needs through Store, mutates the in-memory model, and writes it back deterministically. Keeping these here means the mutation rules live in exactly one place.

Structs§

NewTicket
Specification for a new ticket. Only title is required.
TicketPatch
A partial update to a ticket. None fields are left unchanged. For priority, an inner Some(None) clears the value.

Functions§

add_attachment
Attach a file to a ticket. If a file with identical content is already tracked in the repo, it is referenced in place (no copy); otherwise the bytes are stored under .wipe/media/. Returns the created Attachment.
add_comment
Append a comment to a ticket. Returns the new comment ID.
add_list
Add a new list to the end of the board. Returns the new list’s ID.
board_view
Load the whole board as an ordered sequence of (list_id, tickets).
create_label
Create a label. If color is None, auto-pick the first unused palette color.
create_ticket
Create a ticket, allocate its ID, place it on a list, and persist both the ticket file and the board. Returns the created ticket.
delete_identity
Remove an identity from the saved registry. Git-derived humans that aren’t in the registry can’t be removed (they’re re-discovered from history); this is meant for pruning agent identities and manual overrides.
delete_label
Delete a label definition and strip it from every ticket.
delete_ticket
Delete a ticket file and remove its card from the board.
list_identities
List identities: the saved registry merged with human authors discovered from git (so contributors show up without manual setup).
move_list
Reorder a list to a new 0-based index.
move_ticket
Move a ticket to to_list at an optional 0-based position (appended if None). Removes it from whatever list currently holds it.
remove_attachment
Detach a file from a ticket by its path. The underlying file is left in place (it may be shared or tracked in the repo).
remove_list
Remove a list. Fails if the list still holds cards, unless force is set (in which case the contained tickets are also deleted).
rename_list
Rename a list’s display name (its ID stays stable).
set_label_color
Set a label’s color. Errors if the label is not defined.
stage_media
Stage bytes as an Attachment without binding it to any ticket/post: if a file with identical content is already tracked in the repo it is referenced in place (no copy); otherwise the bytes are written under .wipe/media/. Shared by ticket and forum attachments.
update_ticket
Apply a TicketPatch and persist. Returns the updated ticket.
upsert_identity
Create or update an identity’s display name (and optionally its kind).

Type Aliases§

ListView
One list’s ID paired with the tickets currently on it, in card order.