Open shifts: fold into Roster and add more ways to find, share and fill shifts

Merged
BI
1mo ago
+2128-335

User description

Requested by Josh ยท project thread

Summary

Before: Open shifts was its own area with its own Browse, Requests and Alerts tabs and a "Shifts" slot in the desktop rail. On a phone, a tall calendar came first. The list looked 14 days ahead.

After: Open shifts is Roster's second tab (Month, Open shifts, Swaps; Team moves to More, and Month's top card still opens "Who is on"). The page opens with your requests and fortnight hours in one strip, then "Fits your roster", the next shifts with no clash and no roster flag, each with a Request button that opens the confirm sheet. Phones get a day-by-day list with the calendar one tap away. From 1024 px the list and calendar sit side by side, and tapping a day scrolls the list. The window is four weeks. The desktop rail loses its Shifts slot.

Also added, with no database change:

  • Share with a colleague on a shift's page: plain text with the shift, day, times, hours, site and team. No patient details and no pay.
  • Add to calendar on a booked shift: a calendar file made on the device.
  • A Roster Month row: "N open shifts fit your roster", loaded lazily.
  • Managers can post one shift on several dates (sequential posts with an honest partial-failure report), use Post again, and see "Who could do this": team members at or above the level with nothing on their team roster at that time. It shows names and levels only and never messages anyone.
  • The header pill on Open shifts pages shows Roster's badge, and the help text matches the new layout.

How: src/lib/work-frame/areas.ts makes the open-shifts mode draw Roster's frame with an Open shifts tab whose paths cover all doctor-facing Open shifts pages. Manager pages sit in Roster's More. The old open area stays only as an id for help, example data and AI Search. New helpers live in src/lib/open-shifts/share.ts, post-plan.ts and who-could.ts, all unit tested.

Areas touched: Personal practice, App experience, Answer engine

Not in this PR: "Take back your own request" needs a database change and is in its own draft PR, #3485.

Screenshots (example data, phone 390 and 320 px, desktop 1440 px) are in the project files under work-mode-plan-2026-10-12/open-shifts-mockup/.

Verification

  • Checks run:
    • npx tsc --noEmit -p .: clean after merging latest main
    • eslint on changed src/components/open-shifts, src/lib/open-shifts and src/lib/work-frame: clean
    • npm run test:focused over every changed file after merging main: 162 of 163 files passed first time; the one failure (a help link label reading "Open Open shifts") is fixed in the last commit and its test file passes
    • Local Chromium screenshots of every changed page against the dev server
  • Browser suite (verify:ui) is left to CI.

Risk and rollout

  • Risk: navigation change for Roster and Open shifts. Old Open shifts addresses all still open the same pages.
  • Rollback: revert this PR.
  • Provider or production effects: None. No migration, no service worker change, no pay or award figures.

Notes

  • Josh saw the screenshots and chose to send this live on 12 Oct 2026.

๐Ÿค– Generated with Claude Code

https://claude.ai/code/session_01CZwGiwt7eXkD4fwyFM83gY

Generated by Claude Code


CodeAnt-AI Description

Move Open shifts into Roster and expand shift discovery and posting

What Changed

  • Open shifts is now a Roster tab instead of a separate area. Browse covers four weeks, with a day-by-day list and a calendar view on phones, and both views side by side on larger screens.
  • The page highlights your requests and hours, then shows shifts that fit your roster with a direct Request option.
  • You can share an upcoming shift with a colleague or add an approved shift to your calendar.
  • Managers can post the same shift on several dates, copy details from a previous post, and see which team members may be available. Partial posting failures identify which dates succeeded; retries skip those dates.

Impact

โœ… Open shifts alongside Roster
โœ… Faster discovery of shifts that fit your roster
โœ… Fewer duplicate posts after an uncertain response

๐Ÿ’ก Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.