Skip to content

chore: address refinement items for epic #2190 - #2387

Merged
steilerDev merged 2 commits into
betafrom
chore/2190-refinement
Dec 1, 2026
Merged

steilerDev merged 2 commits into
betafrom
chore/2190-refinement

Conversation

@steilerDev

Copy link
Copy Markdown
Owner

Summary

This PR fixes the reviewer notes from merged EPIC-21 story PRs that were never acted on (fix-or-block).

# Source review Item Status
1 #2362 The company Trade field declares testId: 'company-trade-input', but the id never reached EntityPicker Already fixed by 0fee4a6 (EntityPicker inputTestId); no change
2 #2362 Funding source amount: the client rule was > 0, the server rule is >= 0.01 Already fixed by 0fee4a6 (AMOUNT_MIN = 0.01, dialog and details card). The grant amount rules already match the server's > 0; no change
3 #2285 (ux-designer) aria-busy on the list container during a silent reload Fixed in this PR

Item 3 sets aria-busy on each list during a silent reload. It changes no CSS or markup structure, and the attribute is absent while the list is idle:

  • Areas tree: useAreasIndex exposes refreshing, and AreasPage passes it as TreeTable busy.
  • Project setup reference lists (cost categories, purchase categories, photo orientations): useReferenceListData exposes refreshing around the re-fetch after a reorder mismatch, and ManagePage passes it to ReferenceList.
  • Trades sheet: TradesManager marks its list while isLoading && !isInitialLoading.

Capability ids: PLT-094, PLT-098–PLT-100, HHI-094, PLT-111. Placement is unchanged:

  • Areas › Areas index › tree
  • Companies › Companies list › Trades sheet
  • Settings › Project setup › reference lists

No capmap.json or routemap.json change. npm run plan:check passes, and the pattern baseline does not rise.

Test plan

  • Unit tests: the hook refreshing states (first load, retry, pending, after success or failure, overlapping reloads); aria-busy on TreeTable, ReferenceList, TradesManager, AreasPage and the ManagePage wiring
  • Quality Gates and E2E Gates green (bash scripts/ci-wait.sh <pr> main)

Refs #2190

Co-Authored-By: Claude frontend-developer noreply@anthropic.com
Co-Authored-By: Claude qa-integration-tester noreply@anthropic.com
Co-Authored-By: Claude dev-team-lead noreply@anthropic.com

🤖 Generated with Claude Code

- Item 3 (PR #2285 review): aria-busy on the list container during silent
  reloads, with no visual change: Areas tree (useAreasIndex refreshing ->
  TreeTable busy), the Project setup reference lists (useReferenceListData
  refreshing -> ReferenceList) and the Trades sheet (TradesManager).
- Items 1 and 2 (PR #2362 review: company Trade picker test id, funding
  source amount minimum 0.01) were already fixed by 0fee4a6; no change.

Refs #2190

Co-Authored-By: Claude frontend-developer <noreply@anthropic.com>
Co-Authored-By: Claude qa-integration-tester <noreply@anthropic.com>
Co-Authored-By: Claude dev-team-lead <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@steilerDev

Copy link
Copy Markdown
Owner Author

VERDICT: APPROVE

[ux-designer] Zero findings. This completes my optional aria-busy note from the #2285 review.

  • Semantics: aria-busy is set only as value || undefined, so it is absent when idle and never "false". It sits on the Areas tree root div, the ReferenceList ul (used by the 3 Project setup lists) and the Trades ul.
  • Live regions: every role=status is a sibling outside the busy containers (AreasPage areas-status, TradesManager status and merge status, page-level announcers for ReferenceList). aria-busy cannot suppress or compete with the Added/Saved/Deleted/reorder announcements.
  • Skeleton: the loading branches (status==='loading', isInitialLoading) return before the lists render. The Skeleton keeps its own aria-busy on first load. Areas refreshing is gated on status==='ready', and the Trades flag on isLoading && !isInitialLoading. Retry is never marked busy, so there is no double signal.
  • Hook state: the in-flight counter in useAreasIndex is balanced in finally and covers overlapping refetches. The reference-list refreshing is cleared in finally on success and failure.
  • Visual: only attributes change. The diff has no CSS, token, markup-structure or dark-mode change. The new props are optional, so other consumers are unaffected.

@steilerDev

Copy link
Copy Markdown
Owner Author

VERDICT: REQUEST_CHANGES

[product-architect] Request changes: 2 findings, both labeled fix-in-session. The code itself is correct.

Finding 1 (Low, fix-in-session): ManagePage tests cover only 1 of the 3 refreshing wirings

client/src/pages/ManagePage/ManagePage.tsx passes refreshing to 3 ReferenceLists: cost categories (line 108), purchase categories (line 145) and photo orientations (line 181). The new ManagePage.test.tsx case checks only the cost list. The 3 lines are copy-paste siblings. If the purchase or orientation list got the wrong hook's refreshing (or none), no test would fail. The PR body claims "the ManagePage wiring" is tested.
Fix: make the test a table-driven it.each over the 3 lists. Each row needs the list's test id, its reorder API mock (rejected with REORDER_SET_MISMATCH) and its held re-fetch. Each row asserts that its own list gets aria-busy="true" and the other 2 lists do not, then that the attribute clears after release.

Finding 2 (Low, fix-in-session): the wiki does not document the new convention or the new props

This PR adds a cross-cutting a11y convention: aria-busy on a list only during a silent reload, absent while idle, never during the first load or a retry (the skeleton or loading state covers those). It also adds public API:

  • TreeTable busy
  • ReferenceList refreshing
  • refreshing on the results of useReferenceListData and useAreasIndex
  • the Trades sheet's isLoading && !isInitialLoading rule

wiki/Architecture.md documents aria-busy for other components (around lines 1804, 1886 and 2016) and documents ReferenceList, but it has none of this. Three implementations with three different mechanisms (an in-flight counter gated on ready, a flag around the mismatch re-fetch, and a hook-flag expression) will drift unless one written rule exists. Schema, contract and architecture changes go into the wiki in the same PR.
Fix: add a short Frontend Conventions bullet ("Silent reload: aria-busy") with the rule and the 3 hosts, and name the new props and hook fields. Push the wiki, then bump the submodule ref on this branch.

Checked, no findings

  • useAreasIndex: the counter goes up before the fetch and down in finally, also for superseded sequences. refreshing = status === 'ready' && inFlight > 0, so the first load and retry() never count. The test for 2 overlapping refetches covers the counter.
  • useReferenceListData: the only silent re-fetch is the REORDER_SET_MISMATCH one. finally clears the flag on both success and failure. The first load and retry use status.
  • TradesManager: useTrades clears error when a fetch starts, so a retry after an error renders the <ul> with aria-busy. The skeleton covers the first load.
  • Attribute usage: aria-busy={x || undefined} leaves the attribute out while idle. No CSS or markup structure changes.
  • Tests: hook tests cover first load, retry, pending, success, failure and overlapping reloads. Component tests check both the present and the absent attribute. The AreasPage test holds the reload after a delete.
  • EPIC-21 rules:
    • npm run plan:check passes at e99cbda: capability map, pattern baseline, defects and privacy are all ok.
    • The PR has no plan/ diff, so no capability or route entry is removed and no baseline count rises.
    • The PR names capability ids PLT-094, PLT-098 to PLT-100, HHI-094 and PLT-111, with placements. They match the surfaces.
    • scan-privacy --profile full reports the PR text clean, and the commit trailers are complete.

…d document the convention

- ManagePage test: the aria-busy wiring case runs over all three reference
  lists (cost categories, purchase categories, photo orientations) and checks
  that only the reordered list is marked.
- wiki pointer to 0aa4c59f: Architecture > Frontend Conventions >
  Accessibility documents the silent-reload aria-busy convention.

Refs #2190

Co-Authored-By: Claude qa-integration-tester <noreply@anthropic.com>
Co-Authored-By: Claude product-architect <noreply@anthropic.com>
Co-Authored-By: Claude dev-team-lead <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@steilerDev

Copy link
Copy Markdown
Owner Author

VERDICT: APPROVE

[product-architect] Round 2: approve, zero findings.

  • Finding 1 resolved (918130a). The ManagePage test is now an it.each over cost categories, purchase categories and photo orientations. Each row does 4 things:

    1. It makes that list's reorder API reject with REORDER_SET_MISMATCH.
    2. It holds that list's re-fetch.
    3. It asserts that only the reordered list has aria-busy="true" and the other 2 lists do not.
    4. It asserts that the attribute clears after release.

    So a mis-wired refreshing on any of the 3 lists now fails a test. I ran the file locally at 918130a: Tests: 3 passed for the aria-busy cases.

  • Finding 2 resolved. The wiki pointer on the branch is 0aa4c59f, and git ls-remote origin master returns the same SHA, so the commit is published. The new Accessibility bullet "Silent reload: aria-busy" documents the rule and the 3 hosts.

  • Trailers: the commit carries qa-integration-tester, product-architect and dev-team-lead. Round 2 changes no production file. The round-1 EPIC-21 checks still hold: plan:check passes, there is no plan/ diff and the PR names the capability ids.

@steilerDev
steilerDev merged commit e6c8823 into beta Dec 1, 2026
34 checks passed
@steilerDev
steilerDev deleted the chore/2190-refinement branch December 1, 2026 00:13
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 2.19.0-beta.97 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant