Skip to content

PR8 — optional client group labels, no grand total - #145

Open
lamemustafa wants to merge 10 commits into
feat/bulk-party-statementsfrom
feat/client-grouping
Open

PR8 — optional client group labels, no grand total#145
lamemustafa wants to merge 10 commits into
feat/bulk-party-statementsfrom
feat/client-grouping

Conversation

@lamemustafa

Copy link
Copy Markdown
Owner

Stacked on feat/bulk-party-statements — review only this PR's own diff.

Local gate green at this level: workspace tests and clippy in both feature configurations, fmt, tools tests, live-read boundary, fixture byte integrity, licence inventory, tsc, production build, and the workflow-consistency gate.

CI is NOT proven: the GitHub-hosted Windows and bundle-smoke jobs have never run, and one read-transport harness test fails deterministically on macOS with an unknown ubuntu outcome.

@lamemustafa
lamemustafa force-pushed the feat/client-grouping branch 2 times, most recently from 807bf7c to 7fa57a7 Compare August 14, 2026 07:21
@lamemustafa
lamemustafa marked this pull request as ready for review August 14, 2026 09:47

@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: 7fa57a79fd

ℹ️ 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".

Comment thread src-tauri/src/client_groups.rs
Comment thread src-tauri/src/client_groups.rs Outdated
Comment thread src-tauri/src/client_groups.rs Outdated
Comment thread src-tauri/src/client_groups.rs

@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: 59ddd04e1f

ℹ️ 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".

Comment thread src/OutstandingsScreen.tsx

@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: 401b643d2a

ℹ️ 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".

Comment thread src/AllClientsScreen.tsx Outdated
@lamemustafa
lamemustafa force-pushed the feat/client-grouping branch 2 times, most recently from 4bce415 to 52cb2c3 Compare August 17, 2026 23:52
@lamemustafa
lamemustafa force-pushed the feat/client-grouping branch from 52cb2c3 to 3bfbf8d Compare August 18, 2026 04:21
Persist each operator-owned label in versioned JSON under Tauri's ordinary app-config directory, keyed only by the selected company GUID. This keeps the filing decision outside the SQLCipher mirror: loading labels receives no LazyTallyMirror state and cannot resolve a keychain key. Missing, blank, corrupt, unsupported-version, or unreadable config degrades to no labels; blank labels remove their entry. On Unix the file is mode 0600.

All Clients now renders a subtotal only for each explicit label and leaves ungrouped companies as individual rows. The cross-company grand-total reduce, its markup, aria label, and styles are removed.

Mutation proof: changing the grouped overdue expectation from 120400.5 to 120400.51 made client-grouping.test.mjs fail with actual 120400.5; restored code passes. The test also compares the complete grouped company row as JSON bytes to prove labels do not alter any company figure.

Migration: the optional client-group-labels-v1.json file is created on first save; no mirror schema or migration changes. Security: group-label commands use only app_config_dir and filesystem I/O, with no keychain or Tally access.
Mutation proof: disabling exact aggregation, rendering a dash for an invalid amount, resolving company GUID from a name, and replacing atomic rename with deletion each made focused Node or Rust checks fail (RC 1/101). Each guard is restored.
Signed-off-by: Tapish Khandelwal <tapishkhandelwal13@gmail.com>
Keep display reads resilient, but make update reads typed and fallible: only an absent file becomes an empty label map. Empty, unreadable, corrupt, and unsupported-version files now reject save before any write.

Red before fix: corrupt and future-schema raw-byte tests both overwrote the source and exited 101. Mutation proof routing save back through the lossy display loader exited 101 for both cases. Restored client_groups suite: 6 passed, exit 0; cargo fmt check exit 0.
Carry the PR8 client-grouping surface over the F4X BILLREF presentation disclosure. Claims, evidence, and trusted-evidence keys remain byte-identical to the preserved PR8 head.

Compatibility gate: exit 0, unknown_claims=11, evidenced_claims=0. Claims/evidence/trusted identity checks: exit 0.
Track the last persisted label set and revert only the optimistic value whose save failed. A later edit is left intact, while a failed first save returns the company to ungrouped.Red before fix: the focused test failed to import the missing rollback contract (exit 1). Mutation proof: returning the optimistic state unchanged failed with North vs Original (5 passed, 1 failed; exit 1).Verified: client grouping suite 6/6, Impeccable deterministic detector clean, and pnpm build 48/48 plus TypeScript and Vite, exit 0. Node 26.3.0 emitted the repository's expected unsupported-engine warning against >=22.12 <25.
@lamemustafa
lamemustafa force-pushed the feat/client-grouping branch from 3bfbf8d to a48b9cb Compare August 18, 2026 09:10

@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: a48b9cb444

ℹ️ 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".

Comment thread src/AllClientsScreen.tsx
Comment thread scripts/client-grouping.test.mjs
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