Skip to content

.gitnexus#425

Open
Connorbelez wants to merge 5 commits intographite-base/425from
codex/mortgage-payment-snapshots-and-table-controls
Open

.gitnexus#425
Connorbelez wants to merge 5 commits intographite-base/425from
codex/mortgage-payment-snapshots-and-table-controls

Conversation

@Connorbelez
Copy link
Copy Markdown
Owner

.gitnexus

.gitnexus

feat: add mortgage payment snapshots to admin tables

Optimize mortgage payment snapshot loading

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 20, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8eca521f-ef7c-47ad-b407-61d6c72f52ce

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/mortgage-payment-snapshots-and-table-controls

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Sorry @Connorbelez, your pull request is larger than the review limit of 150000 diff characters

@Connorbelez Connorbelez marked this pull request as ready for review April 20, 2026 02:52
Copilot AI review requested due to automatic review settings April 20, 2026 02:52
Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Copy link
Copy Markdown
Owner Author

Connorbelez commented Apr 20, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a canonical “mortgage payment snapshot” read-model and wires it through the CRM view engine + admin UI so mortgage payment status/date fields can appear in admin tables (with reusable table controls) and on the mortgage detail page.

Changes:

  • Introduces mortgagePaymentSnapshot backend module + tests, and enriches native mortgage records with snapshot-backed fields.
  • Extends CRM view state/querying to persist saved-view sort state and return table footer aggregates.
  • Adds reusable admin table header/footer components (search, column visibility, per-column filter/sort) and renders the payment snapshot section on mortgage details.

Reviewed changes

Copilot reviewed 35 out of 37 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
convex/payments/mortgagePaymentSnapshot.ts Canonical snapshot contract + loader (bulk/per-mortgage) + derivation helpers.
convex/payments/__tests__/mortgagePaymentSnapshot.test.ts Unit coverage for snapshot precedence + bulk loader behavior.
convex/crm/systemAdapters/bootstrap.ts Registers snapshot-backed mortgage fields as system object fields/default columns.
convex/crm/systemAdapters/queryAdapter.ts Enriches native mortgage docs with __snapshot__ before field projection.
convex/crm/detailContextQueries.ts Reuses snapshot logic to expose paymentSnapshot in mortgage detail context.
convex/crm/viewQueries.ts Applies saved-view sort in table queries + returns footerAggregates.
convex/crm/viewState.ts Threads saved-view sort into effective view state + column visibility overlay tweaks.
convex/crm/types.ts, convex/crm/validators.ts, convex/schema.ts Adds RecordSort, TableFooterAggregateResult, and saved-view sort persistence.
convex/crm/metadataCompiler.ts, convex/crm/tableFooterAggregates.ts Aggregate eligibility + backend footer summary builder.
src/components/admin/shell/AdminEntityViewPage.tsx Persists filters/sort/visibility changes to saved views and wires new table props.
src/components/admin/shell/AdminEntityTableView.tsx Renders new header controls, per-column controls, local page search, and footer row.
src/components/admin/shell/AdminTable*.* New reusable table header/column/footer components.
src/components/admin/shell/dedicated-detail-panels.tsx Adds “Payment Snapshot” detail section rendering snapshot fields.
src/test/admin/*.test.* + convex/crm/__tests__/* Updates/extends tests for new snapshot fields, saved-view sort, footer aggregates.
docs/superpowers/specs/*, docs/superpowers/plans/* Design + implementation plan docs for the feature set.
.gitignore, CLAUDE.md, AGENTS.md GitNexus housekeeping + ignore rule change.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread convex/payments/mortgagePaymentSnapshot.ts Outdated
Comment thread src/components/admin/shell/AdminEntityViewPage.tsx Outdated
Comment thread convex/crm/viewQueries.ts
Comment thread src/components/admin/shell/AdminEntityTableView.tsx Outdated
Comment thread src/test/admin/admin-shell.test.ts Outdated
Copy link
Copy Markdown
Owner Author

@coderabbitai please review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 20, 2026

@Connorbelez: Sure! I'll kick off a review of PR #425 now.


🧠 Learnings used
Learnt from: Connorbelez
Repo: Connorbelez/tanstackTemplate PR: 5
File: specs/governed-transitions/chunks/chunk-01-schema-machine/context.md:209-213
Timestamp: 2026-03-13T03:17:28.559Z
Learning: In the Connorbelez/tanstackTemplate repository, do not flag .md files for markdown formatting/linting issues (e.g., MD040 fenced code block language). Only reference .md files (specs, PRDs, design docs) when they reveal architectural drift or implementation inconsistencies against actual code.

Learnt from: Connorbelez
Repo: Connorbelez/tanstackTemplate PR: 115
File: convex/engine/effects/dealClosingPayments.ts:37-47
Timestamp: 2026-03-18T03:33:54.456Z
Learning: In Connorbelez/tanstackTemplate, `internalAction` handlers in Convex cannot atomically combine `ctx.runQuery` + `ctx.runMutation` — they are always separate transactions. The read-then-write idempotency pattern in effect handlers (e.g., `updatePaymentSchedule` in `convex/engine/effects/dealClosingPayments.ts`, `prorateAccrualBetweenOwners` in `convex/engine/effects/dealClosingProrate.ts`) is intentionally acceptable because the Transition Engine's OCC serializes concurrent transitions for the same entity upstream, preventing duplicate effect scheduling. Do NOT flag the split read-then-write pattern in `internalAction` effect handlers as a race condition requiring atomic fix — the upstream OCC is the primary guard. A defense-in-depth improvement (atomic `createIfNotExists` mutation) is tracked as a follow-up but is not a blocking issue.

Learnt from: Connorbelez
Repo: Connorbelez/tanstackTemplate PR: 241
File: convex/crons.ts:30-34
Timestamp: 2026-03-21T20:15:34.305Z
Learning: In Connorbelez/tanstackTemplate, the `convex-dev-crons` component (referenced in CLAUDE.md) is reserved exclusively for *dynamic*, runtime-registered cron jobs — e.g., per-tenant or per-entity schedules that are created/destroyed at runtime. Fixed-interval infrastructure crons (e.g., daily reconciliation, daily obligation transitions, dispersal self-healing) all use static `cronJobs()` registration in `convex/crons.ts` and are deployed with the code. Do NOT flag static `crons.interval(...)` or `crons.daily(...)` registrations for fixed system-level jobs as needing `convex-dev-crons`.

Learnt from: CR
Repo: Connorbelez/tanstackTemplate PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-14T21:32:44.198Z
Learning: After completing major units of work, run `coderabbit review --plain` to get a code review summary and check for potential issues or improvements

Learnt from: CR
Repo: Connorbelez/tanstackTemplate PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-11T22:25:51.320Z
Learning: After completing a major unit of work, run `coderabbit review --plain` to get a code review summary and check for potential issues or improvements

Learnt from: CR
Repo: Connorbelez/tanstackTemplate PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-14T21:32:25.594Z
Learning: Run `coderabbit review --plain` after completing major units of work for code review summaries
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@Connorbelez Connorbelez changed the base branch from create-mortgage-cleanup to graphite-base/425 April 20, 2026 20:06
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.

2 participants