Skip to content

Ops Review and Awaiting CSC request statuses (#128) - #135

Merged
pataniaeli merged 1 commit into
devfrom
feat/issue-128-request-statuses
Sep 17, 2026
Merged

pataniaeli merged 1 commit into
devfrom
feat/issue-128-request-statuses

Conversation

@pataniaeli

Copy link
Copy Markdown
Collaborator

Closes #128

Statuses

Room requests and revision requests no longer sit in a single Pending state. An open request is either:

Status Meaning
Ops Review Operational Affairs has it. Every new request starts here.
Awaiting CSC Operational Affairs has passed it to CSC Operations.

It then closes the way it did before: a room request as Fulfilled or Denied, a revision request as Done (granted by editing the booking) or Denied.

Admin Requests tab

  • Each card shows its status. The suggested next step is the highlighted button: Mark Sent to CSC from Ops Review; Fulfill / Deny from Awaiting CSC.
  • Admins can still move freely: Fulfill or Deny from either open status, Back to Ops Review from Awaiting CSC, and Reopen a denied room request. A fulfilled request stays final, because a booking is linked to it.
  • Revision requests get the same Ops Review ⇄ Awaiting CSC moves plus Deny. They are still granted by editing the booking.
  • Status changes are guarded on the status the server just read, so two admins can't both change the same request. The second one gets a 409 and the list refreshes.

Pending Actions

Only Ops Review requests count. Awaiting CSC ones drop off, since the wait is on CSC, not on an admin.

Requesters

  • Bell notification when a room request or revision request is sent to CSC.
  • Request page: new status colors, plus a line saying what the open status means.
  • My Rooms booking detail: a booking's leaders see its open revision request and status, and Request Revision is hidden while one is open. This goes through a new GET /api/revision-requests?booking_id=, guarded like the POST, because RLS only lets the person who filed a revision read it.

Migration: apply at deploy time

supabase/migrations/20260916000000_request_review_statuses.sql, with a rollback script.

  • Renames 'Pending''Ops Review' on room_requests and revision_requests, updates the column defaults, and replaces both status CHECK constraints. Production currently has 2 revision requests in Pending and none on room requests.
  • This is a rename, not a widening, so it must ship with this code. Code from before this PR inserts 'Pending', which the new constraint rejects. Code from this PR inserts 'Ops Review', which the old constraint rejects. Apply the migration right when this deploys.
  • I checked that no DB function, policy or index references 'Pending' on these tables, and user_alerts has no booking_type constraint, so the new notification types need no schema change.
  • Not dry-run: the rollback-transaction dry run against production was blocked by tool permissions in this session.

Testing

  • tsc --noEmit clean. eslint on changed files is clean apart from one warning that was already there.
  • Not exercised in a browser: the app requires a signed-in session, and the migration isn't applied.

🤖 Generated with Claude Code

Pending hid where a request was waiting. Room and revision requests now
start in Ops Review, and an admin can mark one Sent to CSC (Awaiting CSC)
when Operational Affairs passes it on. The Requests tab leads with the
suggested next step from each status but lets admins move freely: back to
Ops Review, Fulfill or Deny from either open status, and Reopen a denial.
A fulfilled request stays final, since a booking is linked to it.

Only Ops Review counts as an admin Pending Action; Awaiting CSC is waiting
on CSC. Requesters get a bell notification when their request goes to CSC,
see what each open status means on the Request page, and a booking's
leaders see its open revision request, and its status, in the booking
detail.

The migration renames 'Pending' to 'Ops Review' on both tables and must
ship with this code: the old code inserts 'Pending'.

Co-Authored-By: Claude Opus 5 <[email protected]>
@pataniaeli pataniaeli added the enhancement New feature or request label Sep 17, 2026
@vercel

vercel Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
chambers Ready Ready Preview Sep 17, 2026 12:13am UTC

@pataniaeli
pataniaeli merged commit d2454b8 into dev Sep 17, 2026
4 checks passed
@pataniaeli
pataniaeli deleted the feat/issue-128-request-statuses branch September 17, 2026 15:09
@pataniaeli pataniaeli linked an issue Sep 17, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provide more updates on revision/booking requests

1 participant