Repository navigation
Clarify printing queues and add duration timers #617
Copy link
Copy link
Closed
Labels
APIChange modifies code in the global API/tRPC packageChange modifies code in the global API/tRPC packageBladeChange modifies code in Blade appChange modifies code in Blade appBugSomething isn't workingSomething isn't workingFeatureNew Feature or RequestNew Feature or RequestHack SitesChange modifies code in a Hackathon app (ex. 2025)Change modifies code in a Hackathon app (ex. 2025)MajorBig change - 2+ reviewers requiredBig change - 2+ reviewers requiredUIChanges modifies code in the global UI packageChanges modifies code in the global UI package
Description
Clarify the current Knight Hacks IX printing workflow and replace the organizer timestamp picker with a duration timer.
- List Shinies filaments: black PLA, black PETG, white PLA, transparent PETG, pink PLA, brown PLA, silver silk PLA, and gold silk PLA.
- Explain the one-hour session limit for fairness and that oversized requests may be cancelled. Actual duration varies by model.
- Show active hackathon-project and personal counts, overall queue position, and held requests outside the queue. Projects have priority; running prints finish first.
- Let organizers enter hours/minutes (including 1h30m with a session-policy warning). Persist the calculated finish from the server start; keep that start on edits/replays and display countdowns on both dashboards. Expiry must not automatically change status.
- Keep existing branded email notifications for actual status, note, and timer changes.
- Register the existing
printing.updateCategoryendpoint in the API surface snapshot and hybrid audit-coverage declaration, correcting the original CI failure.
Work remains on codex/printing-category-ci in PR #618. No main push, merge, new production migration, or reminder resend is part of this follow-up.
Validation: disposable-database integration tests, validator/SDK/KHIX/email regressions, desktop and 320px browser checks with screenshot inspection, root formatting/lint/types, React analysis, and builds for Blade/KHIX.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
APIChange modifies code in the global API/tRPC packageChange modifies code in the global API/tRPC packageBladeChange modifies code in Blade appChange modifies code in Blade appBugSomething isn't workingSomething isn't workingFeatureNew Feature or RequestNew Feature or RequestHack SitesChange modifies code in a Hackathon app (ex. 2025)Change modifies code in a Hackathon app (ex. 2025)MajorBig change - 2+ reviewers requiredBig change - 2+ reviewers requiredUIChanges modifies code in the global UI packageChanges modifies code in the global UI package
Activity
coderabbitai commentedon Oct 10, 2026
Coding Plan
Summary
printing.updateStatusprecedent. Only actual category changes are audited.Design Choices
Design Choice 1: Scope of integration tests for the admin `updateCategory` branches
Options Considered:
tests/integration/printing.test.ts.Chosen Option: 1
Rationale: The ticket scope and
AGENTS.mdrequire the smallest correct change. Missing branch tests are a separate issue.💡 User Tips
Regenerate the plan with different choices with
@coderabbitai <feedback>.Implementation Steps
Phase 1: Register the Endpoint in Contract Metadata
Add
printing.updateCategoryto the two contract checks that fail in CI. Do not change runtime code.The current tests do not cover the audited-change branch or the no-op branch for the admin endpoint. The ticket asks only for contract-check registration.
Task 1: Add the Endpoint to the API Surface Snapshot
Make the snapshot match the procedure paths that are already registered.
AGENTS.mdrequires.packages/api/src/tests/root/__snapshots__/api-surface.test.ts.snap. Insert"printing.updateCategory",between"printing.setEstimatedReadyAt",and"printing.updateStatus",.pnpm --filter=@forge/api test src/tests/root/api-surface.test.ts --updatefrom the repository root.root.tsorrouters/printing.ts.Task 2: Declare Hybrid Audit Coverage
Classify the endpoint as conditionally audited.
packages/api/src/utils/audit/coverage.ts. Add"printing.updateCategory"toHYBRID_ADMIN_PROCEDURESnext toprinting.updateStatus.printing.job.category_updated. Saving the same category is a no-op with no audit event.🤖 Prompt for AI agents
Phase 2: Validate
Run the contract suites and the mandatory root checks. Report the results accurately.
Task 1: Run the Contract Suites
pnpm --filter=@forge/api test src/tests/root/api-surface.test.ts src/tests/audit/coverage.test.ts.Task 2: Run the Root Checks and Review the Diff
pnpm format,pnpm lint, andpnpm typecheck.pnpm formatonly checks formatting.pnpm formatreports a problem in a touched file, run Prettier write on that file only.git diff --name-only.🤖 Prompt for AI agents
Research
Ticket Summary
CI run 38060417381 fails because
printing.updateCategoryis missing from the API surface snapshot and the audit coverage declaration. Add the endpoint to the snapshot. Classify the endpoint as hybrid in audit coverage. Do not change runtime behavior or permission checks.Codebase Summary
printing.updateCategoryis defined inpackages/api/src/routers/printing.tsat lines 364–412.packages/api/src/root.tsalready registers the endpoint underprinting.PRINTING_QUEUEorIS_OFFICER.receivedorneeds_clarificationstatus.changed: falseand writes no audit event.printing.job.category_updatedin the same transaction.api-surface.test.tssnapshots the sorted keys ofappRouter._def.procedures.coverage.test.tsrequires eachpermProcedureto have exactly one policy inutils/audit/coverage.ts.printing.updateStatusis the hybrid precedent at lines 186–187.AGENTS.mdrequires a task branch, the smallest correct change, and rootpnpm format,pnpm lint, andpnpm typecheck.File-Level Changes and Follow-Up Instructions
packages/api/src/tests/root/__snapshots__/api-surface.test.ts.snap"printing.updateCategory"in sorted position.packages/api/src/utils/audit/coverage.ts"printing.updateCategory"toHYBRID_ADMIN_PROCEDURESwith a no-op comment.requirePrintingQueue, the status precondition, the transaction, the audit event, or notification logic.🚀 Next Steps
🤖 All AI agent prompts combined
💡 Iterate on the plan with:
@coderabbitai <feedback>Start Coding →
[-]Register printing category endpoint in API contract checks[/-][+]Clarify printing queues and add duration timers[/+][#617] Clarify printing queues and add duration timers (#618)