Repository navigation
Conversation
…t on the card A ticket with several images showed only the first one: on its card and as the header of the ticket view. The others sat in the attachment list at the bottom of the ticket and were easy to miss; on the board nothing said they were there. - Card: when a ticket holds more than one image, its cover carries a small badge with the number of images. - Ticket view: with more than one image the header is a small gallery. Previous / next buttons on the image, or the left and right arrow keys, step through the images and wrap around; a counter shows the position and the first image is marked "Cover" (the one the card shows). - The arrow keys are left alone while typing in a field, while the full-screen preview is open and when a modifier is held. Frontend only; tickets with one image or none look as before. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The cover - the image a ticket's card shows on the board - was always the
first image attached. To show another one you had to detach and re-attach
files in the right order.
The cover stays "the first image among the attachments", so choosing one
moves that attachment to the front of the list; the others keep their
order and the ticket file gets no new field.
- core: ops::set_cover (logs a `cover` activity; a no-op when the
attachment is already first), with a test.
- daemon: POST /api/tickets/{id}/attachments/cover { path }.
- cli: wipe media cover <ticket> <name>.
- board UI: stepping to another image in the ticket header shows a
"Make cover" button in place of the "Cover" mark; the activity feed
says "made <name> the cover".
Builds on the header gallery (feat/ticket-image-gallery).
NOT COMPILED: written without a Rust toolchain. The Rust part is
unbuilt and untested; the UI part is type-checked (svelte-check).
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Problem. The cover - the image a ticket's card shows on the board - is always the first image attached. To show a different one you have to detach and re-attach files in the right order.
Change. Any of a ticket's images can be made the cover.
Covermark. Clicking it saves the choice; the image stays in view, now as number one, and the card on the board shows it. Hidden in read-only mode.ops::set_cover(store, ticket_id, path, actor, now). The cover stays what it is today - the first image among the attachments - so this moves the chosen attachment to the front of the list and keeps the others in order. No new field in the ticket file, older clients keep working, and the write goes throughStore::save_ticketlike every other. It logs acoveractivity and is a no-op when the attachment is already first. One unit test.POST /api/tickets/{id}/attachments/coverwith{ "path": ... }(same body as detaching).wipe media cover <ticket> <name>, so agents can do it too; added to the docs data.<name>the cover".Design question for you. I chose reordering over an explicit
coverfield because it needs no schema change. The cost: the attachment list's order changes, and a non-image attachment can be moved to the front through the CLI (harmless - the cover is still the first image). If you prefer acover: Option<String>field on the ticket, I'll rework it.How I tested
svelte-check0 errors, 0 warnings. In the browser againstwipe serve1.1.4: the button appears on images 2 and 3 only, and a click sendsPOST .../attachments/cover- which that daemon does not know yet, so nothing was saved.Checklist
set_cover_moves_an_attachment_to_the_front; not runcargo fmtpasses with no diff - not runcargo clippy --workspace --all-targets -- -D warningspasses - not runcargo test --workspacepasses - not run.wipewrites still go throughwipe-core's deterministicserializer (no ad-hoc JSON serialization added)
(e.g.
feat(cli): add wipe ticket archive command)🤖 Generated with Claude Code