Repository navigation
Prints: a print queue with priority, due dates and drag-and-drop order - #343
Merged
Merged
Conversation
A "Print queue" view in Prints (sidebar, ?view=queue): what's printing now, then what's up next. Each file gets a priority (urgent, high, normal, low) and an optional due date in its details; up next lines up by priority, then due date. Dragging a file (or Alt+Up/Down, or its menu's Move items) saves an order the whole workspace shares. Files nobody has placed slot in before the first placed file they beat, so an urgent new file still goes to the top. A new priority or due date, or marking a file printed, gives up its place; "Priority order" clears every place. - Migration 156: print_files.priority, due_date, queue_pos. - POST /api/prints/queue saves the order (manage_prints; only this workspace's files still to print take a place); PATCH takes priority and dueDate.
Collaborator
Author
|
@greptile review |
[Medium impact] The PR appears safe to merge; all previous findings are addressed. SummaryAdds a shared print queue with priorities, due dates, and drag-and-drop ordering.
|
… uploads show their progress in the queue view
Collaborator
Author
|
@greptile review |
…one that waits past a switch is refused
Collaborator
Author
|
@greptile review |
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.
What and why
Feature request: "Add the ability to reorder the print queue beyond the current priority level and due date. Being able to drag and drop the order of items would be helpful."
Prints (#341) was a file library: each file had a status, but there was no queue, priority or due date. This adds all three.
?view=queue): Printing now, then Up next (To print and Failed). The sidebar shows how many are queued and how many are overdue.Server:
print_files.priority(default'normal'),due_dateandqueue_pos. New columns only.POST /api/prints/queue { ids }saves the Up next order. It needsmanage_prints, and only files in this workspace that still need printing get a place. An empty list resets the order. If two people reorder at once, the later save wins, and it's written toprint_activity(queue_order/queue_reset).PATCH /api/prints/files/:idtakespriorityanddueDate(only real calendar days, years 2000–2100). Marking a file printed, one at a time or in bulk, also clears its place.Members without
manage_printscan see the queue but can't change it: no drag, no move or priority controls.Screenshots
Captured on a local dev server with seeded test data: headless Chrome, 1440×900 at 1x, plus one at phone width (390). The details sheet's backdrop blur shows up in these captures.
Prints, before and after. The sidebar now starts with Print queue (6 queued, 1 overdue). Non-normal priorities show in each file's details line.
The queue. Printing now, then Up next in priority/due order. Lift spool is overdue, high priority and failed.
Dragging. Camera mount (4th) is dragged above Claw finger. The dragged row dims and a line shows where it will land. After the drop it's 1st, and Priority order appears.
after-queue-drag.webm
File details, before and after: Priority and Due fields.
Phone width. Due dates and priorities appear as words under each name, and the ··· menu handles moving.
Tests
server/__tests__/prints.test.ts(real server), new "the print queue" block:moveInOrdermanage_prints; another workspace's ids and printed files get no place; everyone sees the same order; changing priority or marking printed (PATCH and bulk) clears the place, while other edits keep it; an empty list resets; activity rows are writtensrc/modern/__tests__/prints.test.tsx, new "Print queue" block:manage_printsnpm run lintpasses. 33/33 server and 18/18 UI tests pass.This is a new feature, not a bug fix, so there's no failing-on-main test.