Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
4f19fae to
2c32d7b
Compare
) Pairs 7/9/10/11/15 across the title row, both order-detail tables (the line-items table keeps the discount tint and the below-list chip's surface lift, now DISCOUNTED_ROW_SX/DISCOUNTED_BADGE_SX inline sx on the same --tint-warn/--surface tokens instead of tr.discounted CSS), the new-order/payment dialogs, the add-line form, the order-detail ruled region (pair 15, replacing the retired .order-panel div with a named role="region" landmark), the orders filter row (status + customer + unpaid — no FilterBar, since Sales carries no date range), and the orders table. Sales was the last consumer of `.order-panel` and `tr.discounted .badge-warn`; both CSS rules retire in this commit. styles.discount.test.ts's cross-brand/mode contrast guard now asserts directly against the --tint-warn/--surface token names instead of the deleted selectors. tools/simulation/ui/specs/phone.spec.ts's draft-panel phone-stacking walk moves from `.order-panel .actions` to the new region landmark. 21 of SalesPage.test.tsx's `.order-panel` presence checks rewritten to role="region" queries (17 were silently vacuous after the markup change, not just the 4 that surfaced as failures); .form-grid/td.num/ tr.discounted class assertions rewritten to structural (.MuiStack-root) or style-based (textAlign, backgroundColor) equivalents. Full Sales suite (3 files, 237 tests) green; full web suite 3121/3122 (the 1 failure a pre-existing DailyEntryPage flake, confirmed standalone-green, unrelated to this branch).
Records six divergences from row 9: both halves of tr.discounted retired (not just .badge-warn), the EntryRow extraction ahead of History, the #150 scroll-shadow gradient added to MuiTableContainer, the confirmed 6+1 FilterBar caller count, the two-PR split, and that .panel-actions/.actions stay declared.
…831) TextField select whose value can be "" with a placeholder option needs slotProps.inputLabel.shrink=true or the label rests on top of the placeholder text (the owner caught this on #897's Grade select; #833 hit it again on Audit's filters). Sales' Status filter has the same shape. Adds the unit assertion #897 established (label carries MuiInputLabel-shrink).
Mirrors PR899's fix for /stock and /history: /sales now renders MUI's <Table>, so its phone-overflow-walk entry switches from content: "table.data" to content: "role=table". This is the last of the six walked routes to convert; phone-table-overflow-unclipped's own comment (mutants.ts) already anticipated this state — the mutant now reaches zero of the six routes and is due for retirement or a new CSS target, flagged as a follow-up rather than done here.
2c32d7b to
62a3581
Compare
Before/after captures — Sales, 1280×800 + 390×844, light + darkIsolated-stack captures at head Both frames show the same drill-down state: an open Draft order (Sim Customer 1's seeded order) with the below-list discount chip visible on its Large Eggs line ($0.35 vs $0.45 list, "Below list" tag) — this is 1280×800Before: 390×844 |
Runtime verification (isolated stack, not
|








Summary
Closes #831. Stacked on #899 (merge that first) — converts the last ledger screen, Sales, and deletes the two CSS rules whose last consumer it was.
DISCOUNTED_ROW_SX/DISCOUNTED_BADGE_SXinlinesxon the same--tint-warn/--surfacetokens instead oftr.discountedCSS) and payments — the new-order/payment dialogs, the add-line form, the order-detail drill-down (pair 15, a namedrole="region"landmark replacing.order-panel), the orders filter row (status + customer + unpaid — noFilterBar, since Sales carries no date range), and the orders table..order-panelandtr.discounted/tr.discounted .badge-warnretire fromstyles.css— Sales was the last consumer of both (Flocks feat(web): convert the CRUD lists to MUI #897, Inventory and Expenses in feat(web): convert Reports, Feed, Water, Stock, History, Expenses and Inventory to MUI, add FilterBar #899 already converted away).styles.discount.test.ts's cross-brand/mode contrast guard rewritten to assert directly against the--tint-warn/--surfacetoken names instead of the deleted selectors — same invariant, same rigor.tools/simulation/ui/specs/phone.spec.ts's Sales draft-panel phone-stacking walk moves from.order-panel .actionsto the new region landmark.docs/designs/822-mui-revamp.mdamended in feat(web): convert Reports, Feed, Water, Stock, History, Expenses and Inventory to MUI, add FilterBar #899 already covers this PR's divergences (both halves oftr.discounted, the FilterBar caller count, the two-PR split).Test rewrite table
SalesPage.test.tsx(237 tests, 3 files):document.querySelector(".order-panel")(21 sites)screen.queryByRole("region")/getByRole("region").order-panelretired; a named landmark is the accessible, role-based replacement. 17 of the 21 were silently VACUOUS after the markup changed (querying a nonexistent class returns null whether the panel is absent or just renamed) — found by grepping the whole file for the selector, not by trusting the 4 that surfaced as visible failures.closest(".form-grid")on the add-line row.closest(".MuiStack-root")toHaveClass("num")toHaveStyle({textAlign:"right"})toHaveClass("discounted")(8 sites)toHaveStyle({backgroundColor:"var(--tint-warn)"})tr.discountedretired; the tint is now an inlinesxconstant on the same tokentoHaveStyle({backgroundColor:"var(--surface)"})on the below-list chiptr.discounted .badge-warnCSS rule's surface-lift had no direct test before (only the class name was asserted); added since the lift is now an inlinesxconstant a JSX edit could silently drop with no CSS guard left to catch itMutation/defect checks
Ran the full Sales suite red-then-green at each rewrite step rather than trusting the diff; confirmed the 17 silently-vacuous
.order-panelassertions by temporarily reverting the region-role addition and observing all 21 (not just 4) go genuinely red.CSS deletion counts
.order-panel: 0 remaining consumers (git grep -n "order-panel" -- ':!web/src/styles.css' web/src tools/simulationreturns none — the string matches insideSalesPage.tsxare an unrelated dialog-scope identifier, not a className).tr.discounted/tr.discounted .badge-warn: 0 remaining consumers. Both confirmed via whole-repogit grepbefore deleting.Test plan
npm run typecheckcleannpm test(vitest) — full Sales suite 237/237; full web suite 3121/3122 (1 pre-existing flake, confirmed unrelated and green standalone)styles.elevation.test.ts,styles.discount.test.ts,styles.declared-tokens.test.ts,styles.harness-selectors.test.ts,farmTheme.policy.test.tsdotnet test tests/Cluckwork.Application.Tests --filter "FullyQualifiedName~ImagePin|FullyQualifiedName~RealTree"— 14/14 (before the docs commit)