refactor: web shared entity components — kill the render forks #145
No reviewers
Labels
No labels
adr
android
area/calendar
area/design-system
area/i18n
area/jobs
area/offline
area/server
area/testing
bug
ci
duplicate
enhancement
help wanted
invalid
notifications
question
reliability
security
severity/low
severity/medium
tracking
web
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
eagraiclainne/app!145
Loading…
Reference in a new issue
No description provided.
Delete branch "refactor/web-shared-components"
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?
Closes #129, #123 and the web half of #122. PR 7 of the #137 stack, based on #144 — the reference surface decides the component shapes that Android's PR 8 ports. Seven commits, one consolidation each:
deadline.ts—deadlineLabel,isOverdue,byDeadlineand the timed predicate in one module; the byte-identical Today/Jobs copies and Calendar's three incompatible due formats (including the lowercase "· due") all collapse onto it. The stale "6:00pm" doc comment dies with the copies.points.ts(#122 web) — one formatter set (pointsLabel,worthLabel,compactPoints) and one clamped ledger (balanceOf): a balance is what you can spend, and you cannot spend into the red. PointsChip, Rewards and Today now agree — no more "-5 points" on one board and "0" in the header.repeat.ts(#123) — weekday names from Intl in the active locale,NTH_NAMESonce, and both rule sentences (eventRepeatLabel,jobRepeatLabel); Jobs' hardcoded English weekday array is gone.components/JobCard.tsx— one card for Today and Jobs. Today's fork had dropped the repeat glyph, description, due label and sort, and spelled the worth sentence under its own message id; it now simply consumes the shared card (this is the component work behind #107).components/MemberSelect.tsx— the mark-option grid once, replacing thirteen hand-rolled copies across seven files (single/multi select via apressedpredicate, optional sentinel, the Me label in one place).timeRange()(all-day events finally say "All day" there), the switch panel's tile edge goes throughmarkColorVar(), onemealLabel()replaces five?? "Dinner"fallbacks, tonight's dinner strip gets its own--accentclass instead of dressing as a reward, and the family tree's SVG mark is annotated as the recorded deliberate exception (same parseMark tokens, different drawing medium).Verified against the live deploy with a headless-browser walk-through: the Today card now shows description, "Due tomorrow 17:30", the repeat glyph and "Worth 7 points" identically to the Jobs card; the job sheet reads "Every Wednesday" from the Intl path; the calendar agenda row carries the unified "Due 17:30" and the lowercase form is gone; the member filter renders through MemberSelect; the dinner strip no longer wears the rewards class.
make checkgreen.🤖 Generated with Claude Code
deadlineLabel, isOverdue and byDeadline lived as byte-identical duplicates in Today.tsx and Jobs.tsx, and Calendar carried three more incompatible due formats of its own ("Due 18:00" twice under separate ids, a lowercase "· due 18:00" in the job sheet) plus its private timed-or-not predicate — four formats for one concept (#129 target 3). One deadline.ts now owns the label, the overdue verdict, the sort and the timed predicate; every consumer imports it, and the calendar's three sites speak the one "Due HH:MM" form. The stale "6:00pm" doc comment goes with the copies.Test report
Coverage: 28.0%
Updated by the check workflow · commit
fd138d1041Android test report
Coverage: 2.4% of lines
Updated by the android workflow · commit
fd138d1041