From 57063f9ef58e4a3d61524dcb6077603b58c784a7 Mon Sep 17 00:00:00 2001 From: DGoel1602 Date: Sat, 10 Oct 2026 07:49:44 -0400 Subject: [PATCH] fixed hack event browsing and added printing availability Co-authored-by: Codex --- .forge/features/3d-printing-queue/status.md | 2 + .forge/features/hackathon-events/srd.md | 5 + .forge/features/hackathon-events/status.md | 11 +- .../features/hackathon-events/test-cases.md | 9 + .../(portal)/_components/hacker-printing.tsx | 27 +- .../_components/new-print-job-form.tsx | 20 +- .../hackathon-check-in-workspace.tsx | 1 + .../printing/printing-queue-workspace.tsx | 45 + .../src/tests/e2e/hackathon-events.spec.ts | 62 + .../tests/e2e/printing-availability.spec.ts | 98 + .../src/tests/e2e/printing-portal.spec.ts | 185 + .../hackathon-check-in-scanner.test.tsx | 29 + packages/api/src/hacker-portal/printing.ts | 47 +- packages/api/src/routers/printing.ts | 41 +- .../integration/print-job-schema.test.ts | 6 +- .../src/tests/integration/printing.test.ts | 98 +- .../__snapshots__/api-surface.test.ts.snap | 1 + packages/api/src/utils/audit/coverage.ts | 1 + packages/api/src/utils/printing/queue.ts | 4 +- packages/db/drizzle/0062_daily_arachne.sql | 1 + packages/db/drizzle/meta/0062_snapshot.json | 15061 ++++++++++++++++ packages/db/drizzle/meta/_journal.json | 7 + packages/db/src/schemas/knight-hacks.ts | 5 +- packages/hacker-sdk/src/errors.ts | 1 + packages/hacker-sdk/src/react.tsx | 1 + packages/ui/src/responsive-combo-box.tsx | 13 +- packages/validators/src/audit.ts | 6 + packages/validators/src/hacker-portal.ts | 2 + packages/validators/src/printing.ts | 4 + 29 files changed, 15768 insertions(+), 25 deletions(-) create mode 100644 apps/blade/src/tests/e2e/printing-availability.spec.ts create mode 100644 apps/blade/src/tests/e2e/printing-portal.spec.ts create mode 100644 packages/db/drizzle/0062_daily_arachne.sql create mode 100644 packages/db/drizzle/meta/0062_snapshot.json diff --git a/.forge/features/3d-printing-queue/status.md b/.forge/features/3d-printing-queue/status.md index 6aa467281..3dad740da 100644 --- a/.forge/features/3d-printing-queue/status.md +++ b/.forge/features/3d-printing-queue/status.md @@ -298,3 +298,5 @@ Database integration: 17 skipped, including quota/concurrency and organizer-coun Current branch: `blade/3d-printing-queue`, aligned with the rebased remote head `6502bc3e`. CI run 37251475322 passed all 1,048 API assertions but failed on an unhandled PostgreSQL `57P01` during printing test teardown. The installed `pg-pool` removes idle clients from its internal list before their socket-close callbacks finish, so awaiting `Pool.end()` alone can let disposable-database termination race those connections. Added a printing-test shutdown tracker before the first database query. Teardown now awaits both pool shutdown and every observed client’s `end` event, and propagates shutdown errors instead of suppressing them. Scope is API test support and printing tests; production database behavior is unchanged. A deterministic no-server regression failed under the previous `Pool.end()`-only behavior before implementing the fix. Validation: root `pnpm format`, `pnpm lint`, and `pnpm typecheck` pass (existing warnings only). Focused printing tests: 12 passed, 17 database tests skipped. Full API suite: 792 passed, 259 database-dependent tests skipped because no local PostgreSQL server is configured; no unhandled errors. The teardown regression was first observed failing with the original behavior and then passing with the fix. PostgreSQL-backed CI confirmation follows the push. + +- 2026-10-10 emergency update: user requested a manual open/closed switch only, bundled with the check-in picker fix. Blade queue controls availability per hackathon; hackers see the status and cannot upload or submit while closed. Existing jobs, cancellation, and successful idempotent replays remain available. Migration 0062 defaults printing to closed; an organizer must open it after deployment. Database-backed printing, schema, audit, SDK, validators, and portal tests pass. diff --git a/.forge/features/hackathon-events/srd.md b/.forge/features/hackathon-events/srd.md index a4aa61c80..7afdc55ef 100644 --- a/.forge/features/hackathon-events/srd.md +++ b/.forge/features/hackathon-events/srd.md @@ -537,6 +537,11 @@ Would this require a developer change next year? ## React / frontend constraints +- Hack Event Check-in passes its event count as `ResponsiveComboBox.maxResults` + so every loaded event remains reachable by scrolling or searching. The + optional prop defaults to 20 for existing consumers; popover and drawer + retain their bounded scroll areas. No API or persisted-data changes are needed. + - Add separate server-first pages `/admin/hackathon-events` and `/admin/hackathon-check-in`, each with independent auth, permission redirects, loading/error boundaries, metadata, and client roots. diff --git a/.forge/features/hackathon-events/status.md b/.forge/features/hackathon-events/status.md index 89c7cb6ea..3efc74c47 100644 --- a/.forge/features/hackathon-events/status.md +++ b/.forge/features/hackathon-events/status.md @@ -1,11 +1,20 @@ # Hackathon Events Status -Current phase: Complete / owner-approved for Reforge main +Current phase: Check-in event picker regression fixed and validated > This file is the maintained progress tracker for the feature/change. Keep it current whenever decisions, tasks, validation, or open questions change. ## Decision log +- 2026-10-10: The reported missing event is available through check-in search. + `listCheckInEvents` returns all events, but `ResponsiveComboBox` truncates + both browsing and search to 20 choices. Two regression cases with 62 events + fail when selecting the last workshop, with and without a search query. + Add an optional result limit to the shared picker and let Hack Event Check-in + display its complete event list. Preserve the default for other consumers. + Validation: 11 check-in unit tests and desktop/mobile scroll and keyboard + browser checks pass. Shared UI build, React analysis, format, lint, and types pass. + - 2026-08-05: Created `reforge/hackathon-events` from Reforge main commit `976fa0b1d`, after hacker management landed. - 2026-08-05: Historical Spec Miner method used for evidence collection only. diff --git a/.forge/features/hackathon-events/test-cases.md b/.forge/features/hackathon-events/test-cases.md index 4d041791a..6c4150788 100644 --- a/.forge/features/hackathon-events/test-cases.md +++ b/.forge/features/hackathon-events/test-cases.md @@ -877,6 +877,15 @@ Expected observations: - No hack event appears or mutates through Club code. - Existing Club Event tests and reminder cadence remain unchanged. +### TC-REG-002: Browse the complete check-in event picker + +- Load at least 60 events for one hackathon and open the check-in event picker. +- Without entering a search, scroll to and select the final event. Verify the + selected event and URL identify that event. +- Search for a term matching more than 20 events and select the final match. +- Verify desktop popover and mobile drawer scrolling, plus keyboard selection. +- Existing combo-box consumers retain their default result limit. + ## Open questions - None. Adversarial review findings are incorporated before this document is diff --git a/apps/2026/src/app/(portal)/_components/hacker-printing.tsx b/apps/2026/src/app/(portal)/_components/hacker-printing.tsx index 55bd7a344..ae3475424 100644 --- a/apps/2026/src/app/(portal)/_components/hacker-printing.tsx +++ b/apps/2026/src/app/(portal)/_components/hacker-printing.tsx @@ -143,6 +143,23 @@ function PrintingWorkshop({ timeZone }: { timeZone: string }) {