Bug: "Working Today" in Day view only shows day shift, not overnight and night shifts #84
Labels
No labels
agent:hermes
bug
chore
dependency
feature
status:blocked
status:in-progress
status:needs-info
status:needs-review
status:ready
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
owlburtoe/Shiftd#84
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug: "Working Today" in Day view only shows day shift, not overnight and night shifts
Description
Previously, there was a bug where shifts were being split by staff tags (regular, call, hot) instead of grouping staff into a single collapsible shift row. This was fixed, but a new issue has emerged: only the day shift populates in the "Working Today" section of the Day view.
Goal
The "Working Today" section should display all active shifts in chronological order, with proper grouping by shift and tag differentiation. The behavior should match the staff web app:
Acceptance Criteria
Hermes saw this issue and queued it for attention.
Labels detected:
agent:hermes+status:ready.Telegram notification sent by the Shiftd Hermes issue watchdog.
Next step: ask Hermes to
work issue #84when you want implementation to start.Hermes reviewed this issue and prepared a small, focused iOS change set.
Root cause
Working Todaywas built fromScheduleDerivation.coworkerGroups(...), but that derivation only kept shift groups containing the current user:So if the logged-in staff member was only on the day shift, the Day view only showed that day shift — even though overnight carryover and night shift groups were active that day.
Proposed / prepared changes
Files changed locally:
apps/ios/Shiftd/Features/Schedule/Models/ScheduleDerivation.swiftapps/ios/ShiftdTests/ScheduleDerivationTests.swiftBehavior changes:
Working Todaynow includes every active shift group for the selected day, not only shifts containing the current user.Key production change:
instead of filtering only for the current user.
Tests added / updated
Added regression coverage:
testCoworkerGroupsIncludeEveryActiveShiftOnSelectedDayThis verifies that a selected day containing:
renders all three groups in order:
Also updated the called-out-current-user test so an active shift still appears if other staff are working, even when the current user is called out.
Validation
Ran:
Result: clean.
Attempted focused Swift test:
But this Linux host does not have Swift installed:
So this is currently a local diff and still needs final validation on macOS/Xcode.
Current diff size:
Note: there was already an unrelated untracked
apps/mobile/path; Hermes did not touch it.