Skip to content

Shift notices by tag (#882) - #883

Open
mbhewitt wants to merge 2 commits into
mainfrom
feat/shift-notices
Open

mbhewitt wants to merge 2 commits into
mainfrom
feat/shift-notices

Conversation

@mbhewitt

Copy link
Copy Markdown
Owner

Closes nothing yet: #882 stays open until Mew says so.

Mew's decisions (2026-11-29): tag instead of date; tags at any level but mainly individual shift times; notices included in emails; SuperAdmin only; also tag the pre-opening shift that was missing the notice.

What

  • Migration 026 adds op_notice_tags (kind, target_id, tag), system-versioned with changed_by (Roadmap: replace boolean add/remove/update/delete flags with timestamps + an SCD change log #620). A notice's text is op_content slug notice.<tag>, so it gets the same Edit, History and conflict check as the help text.
  • Data migration: the Early Arrival / SAP notice becomes notice.early-arrival. It is tagged on all 24 active pre-opening on-playa shift times: 23 had it pasted into notes, and Gate Sampling PreThur didn't. Only the exact pasted text is removed from notes; each shift's own text stays. Prod has no near-variants; I checked by dry run.
  • /api/notices (SuperAdmin): GET lists notices and where each is tagged; PUT sets one target's tags, stamping changed_by, including before deletes.
  • Display:
    • Shift Detail shows notices under Notes, editable in place by SuperAdmins.
    • The sign-up dialog shows the shift's notices plus the chosen position's.
    • Assignment, removal and restore emails get a Notices: section.
    • A shift shows notices tagged on its time, type or category. Position tags show for that position.
  • UI:
    • A Notices picker on the shift type form (for the type and for each saved time), the position form and the category dialog. It saves on change.
    • A new Shifts → Notices page to add a notice and see where it's tagged.

Tests

  • New spec 34: 403/400 checks, dedupe between time and type tags, position notices, email body, who removed a tag, UI.
  • Full suite: 127 passed, 4 skipped. Lint: 0 errors.

Deploy

Apply migrations/026_notice_tags.sql on prod after the deploy. #806/#808 migrations now need 027+.

🤖 Generated with Claude Code

mbhewitt and others added 2 commits November 28, 2026 19:06
Mew 2026-11-29: notices go by tag rather than date; tags on any level
but mainly shift times; include them in emails; SuperAdmin only; tag
the pre-opening shift that was missing the SAP notice.

- migration 026: op_notice_tags (kind, target_id, tag), system-versioned
  with changed_by. Text = op_content notice.<tag> (Edit + History).
  Data: Early Arrival notice becomes notice.early-arrival, tagged on the
  24 pre-opening times (23 had it pasted, Gate Sampling PreThur didn't);
  the exact pasted copy is cut from notes, their own text stays.
- /api/notices (SuperAdmin): GET notices + where tagged; PUT a target's
  tags (stamps changed_by, incl. before delete).
- Shift Detail: notices under Notes, editable in place for SuperAdmins.
  Sign-up dialog: the shift's notices + the chosen position's.
  Assignment emails: "Notices:" section.
- Notices picker on shift type (type + each time), position and
  category forms; new Shifts > Notices page.
- e2e spec 34; actor guard covers op_notice_tags.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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