UX2: put report evidence in a side drawer - #192
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ebe3db7764
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| <p className="outstandings-evidence-caveat" role="note"> | ||
| These figures are tied to this read, not a complete-books guarantee or an atomic Tally snapshot. | ||
| <button className="outstandings-evidence-link" type="button" onClick={onOpenEvidence}>Review evidence and limits</button> |
There was a problem hiding this comment.
Show evidence for the actual outstandings read
When an operator opens this link after loading outstandings, OutstandingsScreen retains the fetch_tally_outstandings result locally and onOpenEvidence passes none of it to the drawer; the drawer instead renders MirrorProofScreen using unrelated Core Accounting syncEvidence and snapshot history. Consequently, an older Core Accounting proof can appear as the evidence attached to the current as-of/ageing report, while partial-state details from the actual outstandings read cannot appear there. Pass the current report result and its read metadata into the drawer, or label this as separate Core Accounting evidence rather than evidence for these figures.
Useful? React with 👍 / 👎.
| const focusable = Array.from( | ||
| event.currentTarget.querySelectorAll<HTMLElement>(EVIDENCE_DRAWER_FOCUSABLE), | ||
| ).filter((element) => element.getAttribute("aria-hidden") !== "true"); |
There was a problem hiding this comment.
Exclude collapsed Advanced controls from the focus trap
With the Advanced <details> collapsed—the default state—this selector still collects its hidden buttons because they lack aria-hidden; the unconditional runtime Refresh button therefore becomes last. Calling last.focus() from Shift+Tab on Close does nothing because that element is not rendered, and Tab from the actual last visible control is not intercepted, allowing keyboard focus to escape the modal into the obscured page. Filter for rendered/tabbable elements (including closed-details visibility) before choosing the focus boundaries.
Useful? React with 👍 / 👎.
| canonical_origin: selectedCompanyRecord.canonical_endpoint, | ||
| } : undefined} | ||
| onChangeSetup={() => setView("companies")} | ||
| onOpenEvidence={openEvidenceDrawer} |
There was a problem hiding this comment.
Keep offline mirror evidence reachable
For a persisted company that is not part of the current verified endpoint probe, the sidebar deliberately routes Outstandings to Manage Tally because selectedCompanyReadable is false. Since the removed Mirror & Proof destination is not replaced anywhere else and this prop is the repository's only call to openEvidenceDrawer, such an operator can no longer open the local proof ledger, recent durable runs, or redacted proof exports that were explicitly available offline before this commit. Add a drawer entry point that does not require entering the live Outstandings workflow.
Useful? React with 👍 / 👎.
Summary
Verification
pnpm test(94 passed)pnpm buildcd src-tauri && cargo test --workspacecd src-tauri && cargo clippy --workspace --all-targets -- -D warningscd src-tauri && cargo fmt --all -- --checkpnpm license:allcd src-tauri && cargo test --workspace --all-features(401 passed; 3 owner-authorized live tests remain ignored)Migration and rollback
No data or sync migration. Roll back by reverting this PR; the previous standalone evidence route returns intact.
Security impact
Frontend-only evidence navigation. No DSC, credential, endpoint, database, or Tally write path changed.
Review checklist
Errors are actionable without exposing sensitive values: complete; no new error payload or sensitive-data surface is introduced.