Repository navigation
fix(Lane): stacked rows were a column of orphaned values - #21
Merged
Merged
Conversation
The doc comment promised columns "collapse to a stacked key–value list below
stackBelow". They collapsed, but there were no keys — `columns` was
`ReactNode[]`, so the phone form of a pipeline row was:
17d / IN STAGE
Jackson Cefalo
Full Stack Developer
score 0
Scaffald
—
Unassigned
A wide row gets its meaning from position. Stacking destroys position, and
three of those four values had nothing left saying what they were — one of
them a lone em dash carrying no information at all. Only "score 0" read,
because that caller had written the label into the cell by hand, which is
the workaround this commit makes unnecessary.
`columns` now also accepts `{ label, value, empty? }`:
- the label renders at EVERY width, not just when stacked. A Lane row has
no column headings, so "0 Scaffald — Unassigned" was ambiguous across
the page too; only the arrangement changes, inline when wide and
label-left/value-right when stacked.
- `empty` cells are dropped from the stacked form. Wide they stay as
spacers holding the grid, so they keep their placeholder and lose their
label — labelling a spacer printed "Outcome" followed by blank, which is
worse than the bare placeholder it replaced.
- a bare ReactNode still works, for callers that bake their own label in.
Also: stacked rows now lead with the title. The wide row leads with age on
purpose — it is the "act on this" number and it wants the left edge — but
stacked, that same order put a bare "17d / IN STAGE" on the left and pushed
the candidate's name to the right, ragged and second. On a phone the row IS
the candidate.
Verified at 390 and 1440 against real seeded applications, both before and
after, plus seven tests covering the label-at-both-widths rule, the
drop-when-stacked rule, the keep-when-wide rule, and the unlabelled form.
Co-Authored-By: Claude Opus 5 <[email protected]>
This was referenced Aug 25, 2026
Open
thinkclay
added a commit
that referenced
this pull request
Sep 1, 2026
…st (#27) #21 gave `columns` a union of `ReactNode | { label, value }` so Lane could add the label itself. The app rendered correctly at both widths, and I verified it on screen — but every row-rendering test in ApplicationsLanes.test.tsx crashed: Objects are not valid as a React child (found: object with keys {label, value}) The guard returned false under vitest and true under the app. Three explanations were checked and eliminated: a stale dist (the build had the change), a stale Vite cache (cleared, no change), and `isValidElement` being the fragile clause (swapped for own-property checks, no change). Rendering Lane alone with one labelled column reproduced it, so it was not the caller. I stopped looking for the specific cause. A render path guessing what a value is has no business being load-bearing, whatever makes it disagree. So `columns` is `ReactNode[]` again and the caller composes its own cells. There is nothing to discriminate and nothing to get wrong. The tests that pinned the union now pin its absence — including one that asserts a raw descriptor still throws, so a caller that hands Lane an object by mistake fails loudly rather than silently.
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.
The doc comment on
columnspromised they "collapse to a stacked key–value list belowstackBelow". They collapsed, but there were no keys — the type wasReactNode[].What a phone actually showed
A wide row gets its meaning from position. Stacking destroys position, and three of those four values had nothing left saying what they were — one of them a lone em dash carrying no information at all. Only
score 0read, because that caller had written the label into the cell by hand. That workaround is what this makes unnecessary.The change
columnsnow also accepts{ label, value, empty? }:0 Scaffald — Unassignedwas ambiguous across the page too. Only the arrangement changes: inline when wide, label-left / value-right when stacked.emptycells drop out of the stacked form. Wide they stay as spacers holding the grid, so they keep their placeholder and lose their label.ReactNodestill works, for callers that bake their own label in.Also: stacked rows lead with the title. The wide row leads with age on purpose — it's the "act on this" number and it wants the left edge — but stacked, that order put a bare
17d / IN STAGEon the left and pushed the candidate's name right, ragged and second. On a phone the row is the candidate.Two things I got wrong on the way, both caught by looking
score 0to a bare0. Fixed by labelling at both widths.Outcomefollowed by nothing on wide rows, because an empty cell survives there as a spacer. Fixed by never labelling anemptycell.Both were invisible to the mobile screenshot I was iterating on and only showed up on the desktop capture.
Verification
Rendered at 390 and 1440 against real seeded applications, before and after.
390 after:
Score 0/Source Scaffald/Assignee Unassigned— labelled, and the meaningless Union dash dropped.1440 after:
Score 0 | Source Scaffald | — | Assignee Unassigned— labels back, spacer unlabelled, grid intact.Seven tests cover the label-at-both-widths rule, drop-when-stacked, keep-when-wide, no-label-on-empty, and the unlabelled form.
🤖 Generated with Claude Code