Skip to content

UX2: put report evidence in a side drawer - #192

Open
lamemustafa wants to merge 1 commit into
masterfrom
tapish-codex/ux2-evidence-drawer-refresh
Open

UX2: put report evidence in a side drawer#192
lamemustafa wants to merge 1 commit into
masterfrom
tapish-codex/ux2-evidence-drawer-refresh

Conversation

@lamemustafa

Copy link
Copy Markdown
Owner

Summary

  • Removes the global Mirror & Proof navigation destination.
  • Adds an evidence-and-limits caveat to the outstandings report and opens its read history in an accessible side drawer.
  • Keeps report context visible, moves operator tooling behind Advanced, removes the untestable Verified checklist, and reseals the compatibility surface.

Verification

  • pnpm test (94 passed)
  • pnpm build
  • cd src-tauri && cargo test --workspace
  • cd src-tauri && cargo clippy --workspace --all-targets -- -D warnings
  • cd src-tauri && cargo fmt --all -- --check
  • pnpm license:all
  • cd src-tauri && cargo test --workspace --all-features (401 passed; 3 owner-authorized live tests remain ignored)
  • 122 pinned files rehashed; compatibility gate passed.

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment thread src/main.tsx
Comment on lines +1949 to +1951
const focusable = Array.from(
event.currentTarget.querySelectorAll<HTMLElement>(EVIDENCE_DRAWER_FOCUSABLE),
).filter((element) => element.getAttribute("aria-hidden") !== "true");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment thread src/main.tsx
canonical_origin: selectedCompanyRecord.canonical_endpoint,
} : undefined}
onChangeSetup={() => setView("companies")}
onOpenEvidence={openEvidenceDrawer}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant