feat(android): surface shift tags on schedule and dashboard #332

Merged
owlburtoe merged 1 commit from android-shift-tags into main 2026-06-08 10:44:51 -04:00
Owner

Summary

Android counterpart to #330. Renders shift tags (call, hot, preceptor, …) at a glance on the staff member's own shift display so they can see what type of shift they're working. A shift with no tags is a regular shift (nothing rendered).

Tags were already deserialized into ShiftSummary.tags from the schedule-detail endpoint and were already rendered on coworker rows ("Working Today"). This PR closes the remaining gap: the staff member's own shifts on the Schedule screen and the Dashboard next-shift hero.

No backend dependency

Unlike web (whose dashboard reads /staff/:id/upcoming-assignments), the Android dashboard and schedule both source shifts from the schedule-detail endpoint, which already carries tags on every shift. So this is a self-contained, Android-only change off main — it does not depend on #330's backend change.

Changes

File Change
schedule/ScheduleCalendarModels.kt Add tags: List<ShiftTagSummary> to ScheduleAssignmentDisplayRow
schedule/ScheduleCalendarDeriver.kt Populate tags = shift.tags when building the own-shift row
schedule/ScheduleScreen.kt Render tag pills (reusing existing RolePill) on AssignmentRow — covers day detail, timeline, and selected-day surfaces, which all delegate to it
dashboard/DashboardModels.kt Add tags: List<ShiftTagSummary> to NextShiftSummary
dashboard/DashboardDeriver.kt Map tags = shift.tags in toNextShift
dashboard/DashboardScreen.kt Render tag pills (reusing existing ShiftTypePill) on the next-shift hero

Reuses the existing colored-pill components and the same shift.tags source already used for coworker tags — no new tag model, no new networking, no DTO changes.

Test plan

  • ./gradlew :app:compileDebugKotlin — clean
  • ./gradlew :app:testDebugUnitTest — full unit suite passes (incl. ScheduleCalendarDeriverTest, ScheduleScreenPresentationTest, DashboardViewModelTest)
  • ./gradlew :app:lintDebug — BUILD SUCCESSFUL, no new lint errors
  • Manual: verify colored tag pills render on own shifts (schedule day view + dashboard next-shift) for tagged shifts, and nothing renders for untagged (regular) shifts; confirm coworker tags still render as before
## Summary Android counterpart to #330. Renders shift tags (`call`, `hot`, `preceptor`, …) at a glance on the staff member's **own** shift display so they can see what type of shift they're working. A shift with **no tags is a regular shift** (nothing rendered). Tags were already deserialized into `ShiftSummary.tags` from the schedule-detail endpoint and were already rendered on **coworker** rows ("Working Today"). This PR closes the remaining gap: the staff member's own shifts on the Schedule screen and the Dashboard next-shift hero. ## No backend dependency Unlike web (whose dashboard reads `/staff/:id/upcoming-assignments`), the Android dashboard and schedule both source shifts from the **schedule-detail** endpoint, which already carries `tags` on every shift. So this is a self-contained, Android-only change off `main` — it does **not** depend on #330's backend change. ## Changes | File | Change | |---|---| | `schedule/ScheduleCalendarModels.kt` | Add `tags: List<ShiftTagSummary>` to `ScheduleAssignmentDisplayRow` | | `schedule/ScheduleCalendarDeriver.kt` | Populate `tags = shift.tags` when building the own-shift row | | `schedule/ScheduleScreen.kt` | Render tag pills (reusing existing `RolePill`) on `AssignmentRow` — covers day detail, timeline, and selected-day surfaces, which all delegate to it | | `dashboard/DashboardModels.kt` | Add `tags: List<ShiftTagSummary>` to `NextShiftSummary` | | `dashboard/DashboardDeriver.kt` | Map `tags = shift.tags` in `toNextShift` | | `dashboard/DashboardScreen.kt` | Render tag pills (reusing existing `ShiftTypePill`) on the next-shift hero | Reuses the existing colored-pill components and the same `shift.tags` source already used for coworker tags — no new tag model, no new networking, no DTO changes. ## Test plan - [x] `./gradlew :app:compileDebugKotlin` — clean - [x] `./gradlew :app:testDebugUnitTest` — full unit suite passes (incl. `ScheduleCalendarDeriverTest`, `ScheduleScreenPresentationTest`, `DashboardViewModelTest`) - [x] `./gradlew :app:lintDebug` — BUILD SUCCESSFUL, no new lint errors - [x] Manual: verify colored tag pills render on own shifts (schedule day view + dashboard next-shift) for tagged shifts, and nothing renders for untagged (regular) shifts; confirm coworker tags still render as before
feat(android): surface shift tags on schedule and dashboard
All checks were successful
Code Scanning / Gitleaks secret scan (pull_request) Successful in 6s
Code Scanning / Semgrep OSS source scan (pull_request) Successful in 42s
Android / Android Validation (pull_request) Successful in 5m43s
Security, Type Check & Runtime / Dependency Audit (pull_request) Successful in 9m47s
Security, Type Check & Runtime / Migration Guardrails (pull_request) Successful in 9m44s
Security, Type Check & Runtime / Type Check (pull_request) Successful in 10m24s
Security, Type Check & Runtime / Backend Runtime Smoke (pull_request) Successful in 10m23s
c8180d5416
Mirror the web change: render shift tags (call, hot, preceptor, …) at a
glance so any staff member can see what type of shift they're working. No
tags means a regular shift.

Tags were already deserialized into ShiftSummary.tags from the
schedule-detail endpoint and rendered on coworker rows; this propagates
them to the staff member's own shift display:

- Add tags to ScheduleAssignmentDisplayRow and NextShiftSummary, populated
  from shift.tags in the schedule and dashboard derivers.
- Render tag pills (reusing RolePill / ShiftTypePill) on the schedule
  AssignmentRow (covers day detail + timeline + selected-day) and the
  dashboard next-shift hero.

No backend dependency: Android sources shifts from schedule-detail, which
already carries tags.
owlburtoe deleted branch android-shift-tags 2026-06-08 10:44:51 -04:00
Sign in to join this conversation.
No description provided.