Repository navigation
refactor(web): move the week card to the Time app - #152
Merged
Merged
Conversation
The Time page will show the Home's "This week" card, so the card becomes a component of its own, WeekCard, and moves with its formatting and the Week type to src/time. Nothing changes on screen. Decision 183.
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.
Goal
The Time page (
time-page) will show this week's hours against the target on the same card as the Home's "This week". That card sat inside the Home'sThisWeek, under the section head whose "Day report" link leads to the Time page, and its formatting and theWeektype lived in the Home's folder. This step moves the card into a component of its own,WeekCard, and moves it,week.tsand theWeektype to the Time app's folder,src/time, so the Time page can show it without importing the Home. Nothing changes on screen or in behaviour. A pure refactor, likeshell-section(#85) andtodos-draft(#98); the seventh oftime-tracking's thirteen steps (decision 183).Scope
src/home/week.tsmoves tosrc/time/week.tsand now declares theWeekinterface itself;src/home/week.test.tsmoves beside it, unchanged.src/time/WeekCard.svelte:ThisWeek's card markup and CSS, moved as they were.src/home/ThisWeek.svelte: the section head with its "Day report" link, around aWeekCard.src/home/api.ts: theWeekinterface goes; it imports the type from../time/week.Home.weekis unchanged.src/time/WeekCard.test.ts(the hours, the "Logged on Jira" unit, the bar hidden from assistive tech, its width);src/home/ThisWeek.test.tschecks the head, the link and that the card shows.docs/plan.md: the §0 row, §8.2'sweek-cardbullet (thirteen steps), decision 183.Out of scope
time-page).Acceptance criteria
WeekCardshows aWeekas the Home's card did: "30h / 40h", "Logged on Jira", and a bar hidden from assistive tech, filled 75% of the way.ThisWeekis the "This week" section head with the "Day report" link to/time, around aWeekCard.week.ts, its test and theWeektype live insrc/time; nothing undersrc/timeimports fromsrc/home.main's once Svelte's path-derived class hash is mapped:render-Bv5fr4tV.cssis byte-identical, andindex-*.cssdiffers only insvelte-ed4ug3→svelte-mc9jn3, the hash of the card's new file. The JS differs inThisWeekmountingWeekCardand in minified names; the render chunk only in the index chunk's name.mise run checkpasses, and the PR's CI is green.QA
mise run check: Go build, fmt, lint, tests, coverage (95.9%) and govulncheck; jactionlint and the compose lint; Biome, svelte-check (0 errors, 0 warnings), Vitest (1,083 tests), knip,pnpm audit, and Playwright (319 tests in desktop Chromium and phone WebKit, 7 skipped by design).ThisWeekwithout its card, with another link, another link label or another accent;WeekCardwithoutaria-hidden, with half the width, another unit or the raw hours; andapi.tswithout theWeekimport, killed by svelte-check.Review
No blocking finding. Non-blocking:
WeekCardhas one user untiltime-page, the next step, gives it its second; the same order asshell-sectionbeforetodos-groups.main; the build comparison shows the move left it as it was.Merged under the user's standing OK (2026-10-26) to merge green PRs; the user reviews it with the rest at the end.