Repository navigation
feat(home): say when the week's hours are unavailable - #156
Merged
Merged
Conversation
Since #155, home's answer says how asking the time service for the week went. When home couldn't get the week, the Home left "This week" out, as if Jira weren't set up. It now keeps the section's head and link, and the week card says "Hours unavailable" in the hours' type, muted, without the label and the bar (decision 187).
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.
Brief
Goal. When home couldn't get the week from the time service, the Home's "This week" says so, rather than leaving the section out as if Jira weren't set up. Since #155, home's answer carries
weekState,okorunavailable, besideweek(decision 186); the app now reads it (decision 187).Scope.
home/api.ts: theHometype gainsweekState, of the sources' state type, now named.HomePage: "This week" shows with a week, as before, or whenweekStateisunavailable.ThisWeekandWeekCard: the week becomes optional; without one, the card says "Hours unavailable" in place of the hours, in their type and in--ink-muted, without the "Logged on Jira" label and the bar.Out of scope.
time-attention).Acceptance criteria.
weekState: 'unavailable'and no week ends with "This week", after "Your apps", with its "Day report" link to/time, and a card that says "Hours unavailable" in the hours' type (28 px, 24 px on phones, weight 500) and in--ink-muted, with no "Logged on Jira" label and no bar.weekState.weekState: 'ok'and no week, as without Jira, or with neither member, as from a home without a time peer or one older than the field, leaves "This week" out (decision 161).mise run checkpasses.QA
mutate.py; 11 by Vitest, 4 by the end-to-end tests, 3 by svelte-check):HomePage:okin place ofunavailable; the new branch removed; the card for any Home; the state winning over a week; a zero week given forunavailable;WeekCard: no card without a week; other wording; an empty card; the text out of the hours' type, not muted, in--ink, lighter, or smaller; the label or an empty bar kept; a zero target read as unavailable;api.ts: noweekStatemember; other state names.shots.spec.ts, 12 checks on desktop Chromium and phone WebKit, all passed):--ink-muted, not--ink; the card is one line of text plus its padding and border, at the week card's place under the head and its width.unavailableshows the hours.mainand of this branch differ by one rule, the new.unavailable{color:var(--ink-muted)}.Review
One blocking finding, fixed:
Non-blocking:
HomePagekeeps when the section shows as a template branch: one comparison, which a.tshelper would only move.State, is generic; it's private tohome/api.tsand mirrors home's Go type,screen.State.Shots
The demo Home, with
"weekState":"unavailable"and no week.Gates
mise run checkpassed locally after the review's fix:gen:check; govulncheck (none that the code calls);-race, Go coverage 96.0% total;tsc, knip,pnpm audit(none);SonarQube Cloud runs on demand (decision 132).
Merged under the user's standing OK (2026-10-26): merge once CI's
checkis green, and review everything at the end.