From e6734e99c3ed64b543364c4393fce779f979e864 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 12 Oct 2026 13:43:59 +0000 Subject: [PATCH 1/3] Open shifts: mark urgent shifts with the shared amber dot The calendar, its key and the shift rows used a warning triangle, which in Work mode now means a date has passed. Urgent shifts take the amber dot, the shared shape for needing attention soon, beside the word or spoken label. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01CZwGiwt7eXkD4fwyFM83gY --- .../open-shifts/open-shifts-browse-page.tsx | 5 ++-- .../open-shifts/open-shifts-calendar.tsx | 16 ++++++------- src/components/open-shifts/open-shifts-ui.tsx | 23 +++++++++++++------ src/components/open-shifts/urgent-dot.tsx | 14 +++++++++++ tests/open-shifts-calendar.dom.test.tsx | 4 ++++ 5 files changed, 44 insertions(+), 18 deletions(-) create mode 100644 src/components/open-shifts/urgent-dot.tsx diff --git a/src/components/open-shifts/open-shifts-browse-page.tsx b/src/components/open-shifts/open-shifts-browse-page.tsx index 38219a61c8..c00c69d5ba 100644 --- a/src/components/open-shifts/open-shifts-browse-page.tsx +++ b/src/components/open-shifts/open-shifts-browse-page.tsx @@ -20,6 +20,7 @@ import { rosterCoveredUntil } from "@/lib/open-shifts/roster-check"; import { perthDateOf, perthTimeOf } from "@/lib/roster/shifts/perth-time"; import { OpenShiftsCalendar } from "./open-shifts-calendar"; +import { UrgentDot } from "./urgent-dot"; import { OpenShiftsFitsYou, OpenShiftsRequestsStrip, fitsYou } from "./open-shifts-for-you"; import { clearSavedFilters, readSavedFilters, saveFilters } from "./open-shifts-saved-filters"; import { useSignedOut } from "@/components/mode-kit/use-signed-out-sample"; @@ -315,9 +316,9 @@ export function OpenShiftsBrowsePage() {
  • Includes an urgent shift
  • diff --git a/src/components/open-shifts/open-shifts-calendar.tsx b/src/components/open-shifts/open-shifts-calendar.tsx index fa80baf1e3..83d59a969b 100644 --- a/src/components/open-shifts/open-shifts-calendar.tsx +++ b/src/components/open-shifts/open-shifts-calendar.tsx @@ -1,21 +1,22 @@ "use client"; -import { ChevronLeft, ChevronRight, TriangleAlert } from "lucide-react"; +import { ChevronLeft, ChevronRight } from "lucide-react"; import { useState } from "react"; +import { UrgentDot } from "./urgent-dot"; import { cn } from "@/components/ui-primitives"; import { addDaysToDate } from "@/lib/roster/shifts/perth-time"; /** * The month on Browse. Each date in the 14-day window carries the number of * shifts that match the filters (the same rows as the list below it); a date - * with an urgent one carries a small warning mark, and a ring on the date + * with an urgent one carries a small amber dot, and a ring on the date * means the reader is rostered that day. Past dates and dates outside the * window carry no number. * * Drawn like the Roster month (mockup `.rost-mc rost-oc`, work-mode redesign - * 6 Oct 2026): a filled tile for the chosen day, a count pill per day (amber, - * with the warning mark, when it includes an urgent shift) and a ring on the + * 6 Oct 2026): a filled tile for the chosen day, a count pill per day (with an + * amber dot, the shared "needs attention" shape, when it includes an urgent shift) and a ring on the * date when you're rostered. The meanings never rest on colour alone: the * mark, the number and each day's spoken label carry them too. */ @@ -173,13 +174,10 @@ export function OpenShiftsCalendar({ ) : ( diff --git a/src/components/open-shifts/open-shifts-ui.tsx b/src/components/open-shifts/open-shifts-ui.tsx index ccaa004660..7bccfb3cbb 100644 --- a/src/components/open-shifts/open-shifts-ui.tsx +++ b/src/components/open-shifts/open-shifts-ui.tsx @@ -1,6 +1,7 @@ "use client"; import { ChevronRight, CircleHelp, CircleX, Info, TriangleAlert } from "lucide-react"; + import Link from "next/link"; import type { ReactNode } from "react"; @@ -17,6 +18,8 @@ import { import type { RosterCheck } from "@/lib/open-shifts/roster-check"; import { MONTHS, WEEKDAYS, perthDateOf, perthTimeOf } from "@/lib/roster/shifts/perth-time"; import { zonedDateOf } from "@/lib/work-time/format"; + +import { UrgentDot } from "./urgent-dot"; import { currentWorkTimeZone } from "@/lib/work-time/current-zone"; import { WorkPageBack } from "@/components/work-frame/work-page-back"; @@ -181,12 +184,7 @@ export function ShiftRow({ status?: ReactNode; }) { const hours = hoursBetween(listing.startsAt, listing.endsAt); - const meta = [ - endsNextDay(listing.startsAt, listing.endsAt) ? "Ends next day" : null, - listing.urgent ? "Urgent" : null, - ] - .filter(Boolean) - .join(" · "); + const meta = endsNextDay(listing.startsAt, listing.endsAt) ? "Ends next day" : null; return (
  • {shiftPlace(listing)} - {meta ? {meta} : null} + {meta || listing.urgent ? ( + + {listing.urgent ? ( + <> + + Urgent + + ) : null} + {meta && listing.urgent ? " · " : null} + {meta} + + ) : null} {status ?? (check ? {} : null)}