Skip to content

Prints: a print queue with priority, due dates and drag-and-drop order - #343

Merged
sushilm20 merged 3 commits into
mainfrom
claude/3d-print-queue-reorder-7179df
Oct 30, 2026
Merged

sushilm20 merged 3 commits into
mainfrom
claude/3d-print-queue-reorder-7179df

Conversation

@sushilm20

Copy link
Copy Markdown
Collaborator

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.

  • Print queue at the top of the Prints sidebar (?view=queue): Printing now, then Up next (To print and Failed). The sidebar shows how many are queued and how many are overdue.
  • Priority (Urgent, High, Normal, Low) and an optional due date in each file's details. Up next starts in priority order, then by due date, then oldest first.
  • Drag and drop a file into the order you'll print it. The order is saved for the whole workspace. Keyboard: Alt+↑/↓ (Alt+Home/End for top and bottom). On phones and touch screens, each row's ··· menu has To the top, Up one, Down one and To the bottom.
  • Files nobody has placed slot in before the first placed file they beat, so a new urgent file still goes to the top. A file loses its place (and slots back in by priority) when someone changes its priority or due date, or marks it printed. Priority order clears everyone's placements after a confirmation.
  • The ··· menu also sets priority and marks a file Printing, Printed or Failed. In the explorer, a file's details line shows a non-normal priority.

Server:

  • Migration 156 adds print_files.priority (default 'normal'), due_date and queue_pos. New columns only.
  • POST /api/prints/queue { ids } saves the Up next order. It needs manage_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 to print_activity (queue_order / queue_reset).
  • PATCH /api/prints/files/:id takes priority and dueDate (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_prints can 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.

Prints before
Prints after

The queue. Printing now, then Up next in priority/due order. Lift spool is overdue, high priority and failed.

Print queue

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

Mid-drag
After the drop

File details, before and after: Priority and Due fields.

Details before
Details after

Phone width. Due dates and priorities appear as words under each name, and the ··· menu handles moving.

Queue on a phone

Tests

  • server/__tests__/prints.test.ts (real server), new "the print queue" block:
    • priority, then due date, then age ordering; printing and printed files stay out
    • mixing placed and unplaced files
    • moveInOrder
    • due dates must be real days
    • saving the order: 403 without manage_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 written
  • src/modern/__tests__/prints.test.tsx, new "Print queue" block:
    • opening from the sidebar with the overdue count
    • a drag-and-drop saves the whole order, and the new order shows before the save finishes
    • Alt+↑ and the menu's "To the bottom"
    • Priority order asks before resetting
    • view-only for members without manage_prints
    • priority and due date saved from the details sheet
  • npm run lint passes. 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.

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.
@sushilm20

Copy link
Copy Markdown
Collaborator Author

@greptile review

@greptile-apps

greptile-apps Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; all previous findings are addressed.

Summary

Adds a shared print queue with priorities, due dates, and drag-and-drop ordering.

  • Prints gives teammates a shared queue they can reorder.
  • Print files show priority and due dates that editors can change.

Diagram

sequenceDiagram
  participant Queue as Print queue
  participant API as Request helper
  participant Server as Server
  Queue->>Queue: Capture workspace when move is made
  Queue->>API: Send order after earlier saves
  API->>Server: Order and captured workspace
  alt Workspace still matches
    Server-->>API: Save order
  else Workspace changed
    Server-->>API: Reject with 409 before writing
  end
Loading

Reviews (3) · Last reviewed commit: "Greptile: a queued queue save names the ..." · Reviewed by Greptile

Comment thread src/modern/pages/prints/PrintQueue.tsx Resolved
Comment thread src/modern/pages/prints/PrintsPage.tsx Resolved
… uploads show their progress in the queue view
@sushilm20

Copy link
Copy Markdown
Collaborator Author

@greptile review

Comment thread src/modern/pages/prints/PrintQueue.tsx Resolved
@sushilm20

Copy link
Copy Markdown
Collaborator Author

@greptile review

@sushilm20
sushilm20 merged commit 53144d5 into main Oct 30, 2026
1 check passed
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