§4d's plain-panel ladder can never reach its third rung on an owned job #236

Open
opened 2026-08-25 02:20:52 +00:00 by nalum · 0 comments
Owner

JobCard.tsx's plain panel (a job with no sub-jobs) documents a three-rung
fallback ladder — description → owner → repeat rule — and delivers two.

} else if (job.description !== "") {   // rung 1
} else if (ownerUid !== "") {          // rung 2 — always true here
} else if (repeatText !== null) {      // rung 3 — unreachable

The chain is only entered when the job is not up-for-grabs, which means
ownerUid !== "" — precisely rung 2's own condition. Rung 3 can never be tried.

What a household sees: a repeating chore with no description, on your own
board, shows Who it's for: <you> — telling you something the board already
told you — where the repeat cadence would be the more useful thing to say when
there is nothing else.

The repeat-rule fallback does render, but only in the up-for-grabs branch, as the
second rung of a different two-rung ladder (description → repeat).

The decision

Either the comment is wrong and should describe the real ladders, or the owner
rung should defer to the repeat text when the reader already knows whose job it
is. That is a design call rather than a tidy-up, which is why the code was left
alone.

Worth noting the ladder was pinned by fixtures and goldens throughout the card
work and neither caught this: no case exercises an owned, repeating, undescribed
job with no sub-jobs, because the unreachable branch meant no expected output
ever differed.

`JobCard.tsx`'s plain panel (a job with no sub-jobs) documents a three-rung fallback ladder — **description → owner → repeat rule** — and delivers two. ``` } else if (job.description !== "") { // rung 1 } else if (ownerUid !== "") { // rung 2 — always true here } else if (repeatText !== null) { // rung 3 — unreachable ``` The chain is only entered when the job is not up-for-grabs, which means `ownerUid !== ""` — precisely rung 2's own condition. Rung 3 can never be tried. **What a household sees**: a repeating chore with no description, on your own board, shows `Who it's for: <you>` — telling you something the board already told you — where the repeat cadence would be the more useful thing to say when there is nothing else. The repeat-rule fallback does render, but only in the up-for-grabs branch, as the second rung of a different two-rung ladder (description → repeat). ## The decision Either the comment is wrong and should describe the real ladders, or the owner rung should defer to the repeat text when the reader already knows whose job it is. That is a design call rather than a tidy-up, which is why the code was left alone. Worth noting the ladder was pinned by fixtures and goldens throughout the card work and neither caught this: no case exercises an owned, repeating, undescribed job with no sub-jobs, because the unreachable branch meant no expected output ever differed.
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#236
No description provided.