Web: shared entity components — kill the render forks #129

Closed
opened 2026-08-18 10:45:24 +00:00 by nalum · 0 comments
Owner

From the surface parity report (2026-08-18), section 5.1 and consolidation targets 1, 3, 4, 5, 6, 10.

No entity card/row is defined once on the web. Jobs render at 12 sites; the Today card vs Jobs card fork drops four features (repeat glyph, description, due label, take) and duplicates the "Worth N points" sentence under two message ids. The due label exists in 4 incompatible formats. deadlineLabel, isOverdue and byDeadline are byte-identical duplicates in Today.tsx and Jobs.tsx.

Targets:

  1. Extract JobCard into components/ with a variant/flag; Today and Jobs consume it. This is the component work behind #107.
  2. One deadline.ts (label, overdue, sort, timed predicate); delete the copies and the three Calendar formats.
  3. One points.ts (single formatter, single clamped ledger) — closes the negative-balance inconsistency.
  4. A MemberSelect component (mark-option grid + sentinel-label prop) — replaces 13 copies.
  5. repeatLabel unified on the Intl path.
  6. Add the rule to AGENTS.md: an entity rendered on more than one board must render through one exported component per surface.

Also from 5.1: Today bypasses timeRange() for a local eventTime() (the same event reads "14:00" vs "14:00 – 15:30"), FamilyTree.tsx:443 re-implements <Mark> as raw SVG, ProfileSwitchPanel.tsx:140 bypasses markColorVar(), the "Dinner" fallback is written 5 times, and Today's dinner strip wears the rewards .reward-strip class.

From the surface parity report (2026-08-18), section 5.1 and consolidation targets 1, 3, 4, 5, 6, 10. No entity card/row is defined once on the web. Jobs render at 12 sites; the Today card vs Jobs card fork drops four features (repeat glyph, description, due label, take) and duplicates the "Worth N points" sentence under two message ids. The due label exists in 4 incompatible formats. `deadlineLabel`, `isOverdue` and `byDeadline` are byte-identical duplicates in Today.tsx and Jobs.tsx. Targets: 1. Extract `JobCard` into `components/` with a variant/flag; Today and Jobs consume it. This is the component work behind #107. 2. One `deadline.ts` (label, overdue, sort, timed predicate); delete the copies and the three Calendar formats. 3. One `points.ts` (single formatter, single clamped ledger) — closes the negative-balance inconsistency. 4. A `MemberSelect` component (mark-option grid + sentinel-label prop) — replaces 13 copies. 5. `repeatLabel` unified on the `Intl` path. 6. Add the rule to AGENTS.md: an entity rendered on more than one board must render through one exported component per surface. Also from 5.1: Today bypasses `timeRange()` for a local `eventTime()` (the same event reads "14:00" vs "14:00 – 15:30"), `FamilyTree.tsx:443` re-implements `<Mark>` as raw SVG, `ProfileSwitchPanel.tsx:140` bypasses `markColorVar()`, the "Dinner" fallback is written 5 times, and Today's dinner strip wears the rewards `.reward-strip` class.
nalum closed this issue 2026-08-18 16:43:29 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
eagraiclainne/app#129
No description provided.