fix(whos-off): stop showing sick colleagues as sunbathing - #41
Merged
Conversation
The who's-off timeline drew a palm tree on every absence, so an HR view of a team off sick read as a row of holidays. The palm was not coming from the leave type. Under the default "neutral" shared-calendar visibility, CoverageService withheld the type from everybody but the event's own owner, and the client — having no type to label the absence with — fell back to a generic "Absent" marker whose icon was a palm. Withholding the reason for an absence and then implying a cheerful one is worse than either revealing it or saying nothing. Both halves of that were wrong. The policy exists to keep a *colleague's* sick leave from becoming visible to the team (§8). It was never meant to apply to HR, who record sick leave in the first place, or to the line manager who approved the absence: both can open the request and read the type off it, so withholding it on the timeline protected nothing and only degraded their own view. The type is now revealed to anyone who may view that request — its owner, their line manager, or HR, the same rule as PermissionService::canView — and still withheld from plain colleagues, which is the case the policy is actually for. With no viewer it stays withheld for all. The viewer's reach is resolved once per query rather than per row: a company-wide month can hold hundreds of absences, and whether the type is visible depends only on who is asking. Under the "reveal" policy neither lookup runs at all. The generic marker, which a colleague still legitimately sees, is now a neutral bullet. It says somebody is away and nothing about why, which is all it ever meant to say. Also fixes the same mistake on My leave, where the hero greeted an ongoing absence with "Enjoy your sick leave! 🌴". That palm was a second, type-blind icon baked into the sentence — the hero already renders the leave type's own icon beside it — and sick leave is not something to enjoy, so it now reads "Get well soon." Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The who's-off timeline drew a palm tree on every absence, so an HR view of a team off sick read as a row of holidays.
The palm was not coming from the leave type. Under the default "neutral" shared-calendar visibility, CoverageService withheld the type from everybody but the event's own owner, and the client — having no type to label the absence with — fell back to a generic "Absent" marker whose icon was a palm. Withholding the reason for an absence and then implying a cheerful one is worse than either revealing it or saying nothing.
Both halves of that were wrong.
The policy exists to keep a colleague's sick leave from becoming visible to the team (§8). It was never meant to apply to HR, who record sick leave in the first place, or to the line manager who approved the absence: both can open the request and read the type off it, so withholding it on the timeline protected nothing and only degraded their own view. The type is now revealed to anyone who may view that request — its owner, their line manager, or HR, the same rule as PermissionService::canView — and still withheld from plain colleagues, which is the case the policy is actually for. With no viewer it stays withheld for all.
The viewer's reach is resolved once per query rather than per row: a company-wide month can hold hundreds of absences, and whether the type is visible depends only on who is asking. Under the "reveal" policy neither lookup runs at all.
The generic marker, which a colleague still legitimately sees, is now a neutral bullet. It says somebody is away and nothing about why, which is all it ever meant to say.
Also fixes the same mistake on My leave, where the hero greeted an ongoing absence with "Enjoy your sick leave! 🌴". That palm was a second, type-blind icon baked into the sentence — the hero already renders the leave type's own icon beside it — and sick leave is not something to enjoy, so it now reads "Get well soon."
🤖 AI (if applicable)