Repository navigation
feat(web): compact two-line History rows on phones - #983
Merged
Merged
Conversation
Below the 900px switch History renders one two-line button per entry instead of the ten-column ledger: twelve rows fit a 390x844 screen where five did, and the row's actions moved into a Details dialog behind a tap rather than sitting off the right edge. Desktop is unchanged. Closes #980
Owner
Author
ScreenshotsBefore frames from History list at 390x844, scrolled to the end of the page
The Details dialog at 390x844 (after only — this is what the change adds)
Desktop at 1280x800, light — unchanged
The two stacks were seeded independently, so the Graded column lists the same grades in a different order between these two frames. Nothing else differs. After frames captured at 9bbdc95. |
This was referenced Sep 28, 2026
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.










Below the 900px switch, History drops its ten-column ledger for one two-line button per entry. Fifteen rows fit a 390x844 screen where six did, and the row's actions moved into a Details dialog behind a tap instead of sitting off the right edge. Desktop keeps the full table unchanged.
Closes #980
What changed
Phone (below md/900px). One
<ul>of two-line rows, each aButtonBasewitharia-haspopup="dialog", a 44px floor and the row's own text as its accessible name. Line 1 is date, flock and the app's dot-plus-label status. Line 2 is total, the cracked/dirty/discarded triple and deaths, with the figures in<strong>. Voided rows stay muted. Filters, summary and "load more" are untouched.The Details dialog. The app's own
Dialog, carrying Cracked, Dirty, Discarded, Condition, Graded and the record-history line, with the row's actions at the bottom: Audit history (admins), edit (editable drafts), adjust and void (admins, correctable rows). The close X is the header's. Tap, Enter and Space all open it; Escape closes it and focus returns to the row.DialoggainedcompactTitle.h4instead ofh2, still an<h2>element and still the dialog's accessible name. At 390px theh2scale wraps "09/24/2026 · Sim House B" onto two lines and pushes the record's own values off the first screenful.ProvenanceCellsplit intoProvenanceCell+ProvenanceSummary. The dialog's History line is the same fact as the desktop column's, so it reuses the component rather than re-deriving #494/#653's created-vs-changed rule. The cell'swhite-space: nowrapstays conditional on the sameprovenanceFacts(...).emptythe summary reads, so nothing moves on desktop.docs/designs/822-mui-revamp.mdrow: "Ledger (#831: Sales, Stock, Inventory, History, Expenses, plus Feed, Water, Reports)" (line 234). Everything here is a reuse ofDialog,FieldConsole'sCONSOLE_LINK_SX,statusCell's dot-plus-label treatment,FarmDate,ProvenanceSummaryandMD_UP_QUERY— no new component.Decisions taken
rowActions(e)helper drives both surfaces' gates. The desktop Actions cell and the phone dialog render different layouts from the same three booleans, so a role gate cannot drift between them. Mutating any of the three turns both test files red.busystill makes every mutating control inert, so a double-submit is impossible.rowSummaryis one<Trans>key per locale, so word choice and order stay the translator's;<strong>marks only the figures.countis the mortality number and drives the plural, so a single death reads "1 death" (same shape asdashboard:trendDayTip).<ul aria-label={t("title")}>. It gives assistive tech a row count and the harness a catalog-keyed locator, instead of a class the feat(web): convert the Dashboard and app shell to MUI (#829) #883 selector guard would have to police.mistakesRow*Fixstrings say "History → adjust"; they name a screen and a control, not a layout, and both still exist under those labels at both widths. No new domain concept appeared, sospecs/product/GLOSSARY.mdhas nothing to gain.GlossaryLinkis desktop-only. The phone list has no header row to hang it on, and adding one would cost the vertical space this issue exists to reclaim.Tests
Measured on this machine, not recalled.
a5f159c19bbdc95fwebvitestNew:
web/src/routes/HistoryPage.phone.test.tsx(13 cases), one case inDialog.test.tsx, one@phonecase inphone.spec.ts.HistoryPage.test.tsxgainedstubMatchMedia(true)in itsbeforeEach— every case in that file is about the desktop ledger, and jsdom's missingmatchMediawould otherwise resolve them to the phone branch. Its 81 cases are otherwise untouched and green.Mutation checks
Each mutation was applied to the source, the named spec run, and the source restored.
isDesktop = true(phone branch never taken)isDesktop = false(desktop branch never taken)viewHistory: isAdmin→truecorrect: isAdmin && correctable(e)→isAdminedit: status === "Draft" && flockEditable(e)→truearia-haspopup="dialog"deathsreadsdiscardedEggsonClosebecomes a no-opDialog'sreturnFocusTo.current = nullcompactTitleignored (variant="h2")count={2}(plural never selected)py: 1→py: 2.5, rebuilt imageisDesktopforced true, rebuilt image@phonespecsThe first attempt at "adjust stacks on Details" survived: MUI marks a lower dialog
aria-hidden, soqueryByRole("dialog", { name })could not see a stacked one and passed either way. The assertion now countsgetAllByRole("dialog", { hidden: true }).Deletions and harness
No CSS class, component or i18n key was deleted, so no deletion grep was needed. Two harness edits follow from the change:
phone.spec.ts's overflow walk measuresrole=list[name="Daily entry history"]at/historyinstead ofrole=table— that route renders no table at 390 any more.mutation-check.sh'sphone-mui-table-overflow-unclippedexpectation lost its/historyline for the same reason;/customersstill carries the kill.Verification
Isolated sim stacks on port 8180, never the shared
cluckwork-simproject:cw980bbuilt ata5f159c1for the before frames,cw980aat this head for the after frames and the Playwright run. Both torn down withdown -v.Desktop pixel-identity is argued from the diff plus the suites rather than a byte comparison: the two stacks seed independently, so their Graded column lists grades in a different order and a pixel diff would be noise. The desktop branch's JSX is unchanged except two pure extractions (
lossList(e),gradeList(e)) and the gate expressions routed throughrowActions(e); the 81 existing desktop cases,ledger-theme.spec.ts,table-cell-first-column-inset.spec.tsandmanager.spec.tsall pass untouched, and the 1280 frames are attached for eyes.