Skip to content

eng-273 feat(crm): add entity view adapter registry#384

Merged
Connorbelez merged 3 commits intomainfrom
eng-273
Apr 9, 2026
Merged

eng-273 feat(crm): add entity view adapter registry#384
Connorbelez merged 3 commits intomainfrom
eng-273

Conversation

@Connorbelez
Copy link
Copy Markdown
Owner

@Connorbelez Connorbelez commented Apr 3, 2026

feat(crm): add entity view adapter registry

responding to feedback

Summary by Sourcery

Introduce a registry-driven entity view adapter system for CRM views and admin UI, enabling dedicated adapters, field overrides, and computed fields for system objects while updating tests and audit logging components accordingly.

New Features:

  • Add a centralized CRM entity view adapter registry that derives adapter contracts, layout defaults, field overrides, and computed fields from object definitions and layouts.
  • Extend view schema generation to include adapter-computed fields and apply adapter-driven field overrides and ordering to both schema fields and columns.
  • Introduce dedicated admin record sidebar adapters that render detail fields in a configurable priority order per entity type and support consumer overrides.
  • Expose new adapter-related metadata on CRM view schemas, including variant, detail surface configuration, layout defaults, and field source tracking for fields.

Bug Fixes:

  • Adjust audit log tests to assert the correct action name when updating CRM records.
  • Ensure system object record queries surface native borrower fields consistently in unified records.

Enhancements:

  • Track field source (persisted vs adapter-computed) in normalized field definitions across CRM views.
  • Refine the entity view adapter contract model with explicit detail, layout defaults, field override, and computed field subcontracts.
  • Improve admin shell tests and helpers to validate dedicated adapter resolution and field ordering behavior in the sidebar details view.

Build:

  • Register the Convex aggregate component alongside the audit log component in tests to support aggregation-based audit views.

Tests:

  • Add comprehensive tests for system object view schemas, verifying dedicated adapter metadata, field overrides, and computed field behavior for mortgages and borrowers.
  • Extend admin shell tests to cover dedicated sidebar adapter resolution, override preservation, and prioritized detail field rendering.

@linear
Copy link
Copy Markdown

linear bot commented Apr 3, 2026

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 3, 2026

Warning

Rate limit exceeded

@Connorbelez has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 9 minutes and 50 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 9 minutes and 50 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: bf8808a8-9518-4402-801f-f28ce1c1e5e1

📥 Commits

Reviewing files that changed from the base of the PR and between c474ff8 and 59a11dc.

⛔ Files ignored due to path filters (2)
  • bun.lock is excluded by !**/*.lock
  • convex/_generated/api.d.ts is excluded by !**/_generated/**
📒 Files selected for processing (10)
  • convex/crm/__tests__/viewEngine.test.ts
  • convex/crm/entityAdapterRegistry.ts
  • convex/crm/types.ts
  • convex/crm/viewQueries.ts
  • convex/crm/viewState.ts
  • convex/test/registerAuditLogComponent.ts
  • package.json
  • src/components/admin/shell/RecordSidebar.tsx
  • src/components/admin/shell/entity-view-adapters.tsx
  • src/test/admin/admin-shell.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch eng-273

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
Owner Author

Connorbelez commented Apr 3, 2026

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai bot commented Apr 3, 2026

Reviewer's Guide

Introduces a centralized CRM entity view adapter registry and dedicated UI adapters for system objects, enriching adapter contracts with layout defaults, field overrides, and computed fields, then wires those contracts into view schema generation, admin record sidebar rendering, audit log aggregation tests, and system-object tests.

Sequence diagram for getViewSchema using entity view adapter registry

sequenceDiagram
  participant Client
  participant crm_viewQueries as crm_viewQueries_getViewSchema
  participant DB as Database
  participant AdapterRegistry as resolveEntityViewAdapterContract
  participant ViewSchemaEngine as View_schema_helpers

  Client->>crm_viewQueries: getViewSchema(viewId)
  crm_viewQueries->>DB: load viewDef, objectDef, fieldDefs, viewFields
  DB-->>crm_viewQueries: viewDef, objectDef, fieldDefs, viewFields

  crm_viewQueries->>AdapterRegistry: resolveEntityViewAdapterContract(currentLayout, fieldDefs, objectDef, objectDef._id)
  AdapterRegistry->>AdapterRegistry: resolveEntityViewDefinition(objectDef)
  AdapterRegistry->>AdapterRegistry: buildSupportedLayouts(currentLayout, fieldDefs)
  AdapterRegistry->>AdapterRegistry: buildLayoutDefaults(definition, fieldDefs)
  AdapterRegistry->>AdapterRegistry: normalizeOverrides(definition.fieldOverrides, fieldDefs)
  AdapterRegistry-->>crm_viewQueries: adapterContract

  crm_viewQueries->>ViewSchemaEngine: buildFieldOverridesByName(adapterContract)
  ViewSchemaEngine-->>crm_viewQueries: fieldOverridesByName

  crm_viewQueries->>ViewSchemaEngine: buildSchemaOrderHints(adapterContract, viewDef.isDefault)
  ViewSchemaEngine-->>crm_viewQueries: schemaOrderHints

  loop Columns
    crm_viewQueries->>ViewSchemaEngine: applyFieldOverridesToColumn(column, viewDef.viewType, schemaOrderHints, override)
    ViewSchemaEngine->>ViewSchemaEngine: resolveSchemaDisplayOrder(...)
    ViewSchemaEngine-->>crm_viewQueries: adjustedColumn
  end

  loop PersistedFields
    crm_viewQueries->>ViewSchemaEngine: applyFieldOverridesToDefinition(viewDef.viewType, field, schemaOrderHints, override)
    ViewSchemaEngine-->>crm_viewQueries: adjustedField
  end

  crm_viewQueries->>ViewSchemaEngine: toComputedNormalizedFieldDefinition(computedField, displayOrder, objectDef._id)
  ViewSchemaEngine-->>crm_viewQueries: computedFieldDefinition

  crm_viewQueries->>ViewSchemaEngine: compareSchemaItemsByDisplayOrder(left, right)
  ViewSchemaEngine-->>crm_viewQueries: sortOrder

  crm_viewQueries-->>Client: { adapterContract, columns, fields, viewType }
Loading

Sequence diagram for Admin record sidebar using dedicated detail adapters

sequenceDiagram
  actor AdminUser
  participant AdminRecordDetailSurface as AdminRecordDetailSurface
  participant AdapterResolver as resolveRecordSidebarEntityAdapter
  participant DetailsTab as DetailsTab
  participant DedicatedAdapter as RecordSidebarEntityAdapter
  participant FieldGrid as renderPrioritizedFieldGrid

  AdminUser->>AdminRecordDetailSurface: open record sidebar(reference)
  AdminRecordDetailSurface->>AdminRecordDetailSurface: load objectDef, entity, record, fieldDefs

  AdminRecordDetailSurface->>AdapterResolver: resolveRecordSidebarEntityAdapter(entityType, objectDef, overrides)
  AdapterResolver->>AdapterResolver: getAdminEntityForObjectDef(objectDef)
  AdapterResolver->>AdapterResolver: lookup dedicated adapter by entityType
  AdapterResolver->>AdapterResolver: merge dedicated adapter with overrides
  AdapterResolver-->>AdminRecordDetailSurface: adapter

  AdminRecordDetailSurface->>DetailsTab: render(adapter, entity, fieldDefs, objectDef, record, recordId)

  alt Adapter provides dedicated details view
    DetailsTab->>DedicatedAdapter: renderDetailsTab(entity, fieldDefs, objectDef, record, recordId)
    DedicatedAdapter->>FieldGrid: renderPrioritizedFieldGrid(fieldDefs, priorityFieldNames, record)
    FieldGrid-->>DedicatedAdapter: ReactNode detailsContent
    DedicatedAdapter-->>DetailsTab: detailsContent
    DetailsTab-->>AdminRecordDetailSurface: dedicated detailsContent
  else No dedicated adapter
    DetailsTab->>DetailsTab: compute visibleFields from fieldDefs and record
    DetailsTab-->>AdminRecordDetailSurface: generic details grid
  end

  AdminRecordDetailSurface-->>AdminUser: sidebar with dedicated or generic details tab
Loading

Class diagram for CRM entity view adapter contracts and registry

classDiagram
  class EntityViewComputedFieldContract {
    +string description
    +string expressionKey
    +string fieldName
    +string fieldType
    +boolean isVisibleByDefault
    +string label
    +FieldRendererHint rendererHint
    +string[] sourceFieldNames
  }

  class EntityViewDetailContract {
    +string mode
    +string surfaceKey
  }

  class EntityViewFieldOverrideContract {
    +string fieldName
    +ViewLayout[] hiddenInLayouts
    +boolean isVisibleByDefault
    +string label
    +number preferredDisplayOrder
  }

  class EntityViewLayoutDefaultsContract {
    +string calendarDateFieldName
    +string kanbanFieldName
    +string[] preferredVisibleFieldNames
  }

  class EntityViewAdapterContract {
    +EntityViewComputedFieldContract[] computedFields
    +EntityViewDetailContract detail
    +string detailSurfaceKey
    +string entityType
    +EntityViewFieldOverrideContract[] fieldOverrides
    +EntityViewLayoutDefaultsContract layoutDefaults
    +Id_objectDefs objectDefId
    +string statusFieldName
    +ViewLayout[] supportedLayouts
    +string titleFieldName
    +string variant
  }

  class EntityViewAdapterDefinition {
    +string[] aliases
    +EntityViewComputedFieldContract[] computedFields
    +EntityViewDetailContract detail
    +string entityType
    +EntityViewFieldOverrideContract[] fieldOverrides
    +EntityViewLayoutDefaultsContract layoutDefaults
    +string[] statusFieldCandidates
    +string[] titleFieldCandidates
  }

  class FieldDef {
    +string _id
    +string name
    +string label
    +string fieldType
    +boolean isVisibleByDefault
    +number displayOrder
    +LayoutEligibility layoutEligibility
  }

  class ObjectDef {
    +Id_objectDefs _id
    +string name
    +string singularLabel
    +string pluralLabel
    +string nativeTable
  }

  class NormalizedFieldDefinition {
    +AggregationMetadata aggregation
    +ComputedMetadata computed
    +string description
    +number displayOrder
    +EditabilityMetadata editability
    +Id_fieldDefs fieldDefId
    +string fieldSource
    +string fieldType
    +boolean isActive
    +boolean isRequired
    +boolean isUnique
    +boolean isVisibleByDefault
    +string label
    +LayoutEligibility layoutEligibility
    +string name
    +boolean nativeReadOnly
    +string normalizedFieldKind
    +Id_objectDefs objectDefId
    +any options
    +any relation
    +FieldRendererHint rendererHint
  }

  EntityViewAdapterContract "*" o-- "1" EntityViewDetailContract : detail
  EntityViewAdapterContract "*" o-- "*" EntityViewComputedFieldContract : computedFields
  EntityViewAdapterContract "*" o-- "*" EntityViewFieldOverrideContract : fieldOverrides
  EntityViewAdapterContract "*" o-- "1" EntityViewLayoutDefaultsContract : layoutDefaults
  EntityViewAdapterContract "1" --> "1" ObjectDef : objectDefId

  EntityViewAdapterDefinition "1" o-- "1" EntityViewDetailContract : detail
  EntityViewAdapterDefinition "*" o-- "*" EntityViewComputedFieldContract : computedFields
  EntityViewAdapterDefinition "*" o-- "*" EntityViewFieldOverrideContract : fieldOverrides
  EntityViewAdapterDefinition "1" o-- "1" EntityViewLayoutDefaultsContract : layoutDefaults

  NormalizedFieldDefinition "*" --> "1" FieldDef : fieldDefId
  NormalizedFieldDefinition "*" --> "1" ObjectDef : objectDefId

  class EntityViewAdapterRegistry {
    +Map_string_EntityViewAdapterDefinition ENTITY_VIEW_ADAPTERS_BY_ALIAS
    +EntityViewAdapterContract resolveEntityViewAdapterContract(currentLayout, fieldDefs, objectDef, objectDefId)
    +ViewLayout[] buildSupportedLayouts(currentLayout, fieldDefs)
    +EntityViewLayoutDefaultsContract buildLayoutDefaults(definition, fieldDefs)
    +EntityViewAdapterDefinition resolveEntityViewDefinition(objectDef)
    +string resolveFallbackEntityType(objectDef)
    +EntityViewFieldOverrideContract[] normalizeOverrides(overrides, fieldDefs)
  }

  EntityViewAdapterRegistry ..> EntityViewAdapterDefinition : uses
  EntityViewAdapterRegistry ..> EntityViewAdapterContract : builds
  EntityViewAdapterRegistry ..> FieldDef : reads
  EntityViewAdapterRegistry ..> ObjectDef : reads
  EntityViewAdapterRegistry ..> EntityViewLayoutDefaultsContract : builds
  EntityViewAdapterRegistry ..> EntityViewFieldOverrideContract : builds
  EntityViewAdapterRegistry ..> EntityViewComputedFieldContract : exposes

  class ViewSchemaEngine {
    +Map_string_EntityViewFieldOverrideContract buildFieldOverridesByName(adapterContract)
    +Map_string_number buildSchemaOrderHints(adapterContract, viewIsDefault)
    +number resolveSchemaDisplayOrder(baseDisplayOrder, fieldName, orderHints, override)
    +ViewSchemaColumn applyFieldOverridesToColumn(column, currentLayout, orderHints, override)
    +NormalizedFieldDefinition applyFieldOverridesToDefinition(currentLayout, field, orderHints, override)
    +NormalizedFieldDefinition toComputedNormalizedFieldDefinition(computedField, displayOrder, objectDefId)
    +number compareSchemaItemsByDisplayOrder(leftDisplayOrder, leftName, rightDisplayOrder, rightName)
  }

  ViewSchemaEngine ..> EntityViewAdapterContract : consumes
  ViewSchemaEngine ..> EntityViewFieldOverrideContract : consumes
  ViewSchemaEngine ..> EntityViewComputedFieldContract : consumes
  ViewSchemaEngine ..> NormalizedFieldDefinition : produces
Loading

File-Level Changes

Change Details Files
Create a CRM entity view adapter registry that derives adapter contracts (including layout defaults, overrides, and computed fields) from object definitions and field metadata.
  • Add EntityView* contract types (computed fields, detail, field overrides, layout defaults) and extend NormalizedFieldDefinition and EntityViewAdapterContract to include fieldSource, optional fieldDefId, layoutDefaults, fieldOverrides, computedFields, detail, and variant.
  • Implement resolveEntityViewAdapterContract that selects dedicated adapters by alias or falls back to a generic adapter, derives supported layouts, title/status fields, sanitized layout defaults, and normalized overrides/computed fields.
  • Define dedicated adapter definitions for system entities (mortgages, obligations, deals, borrowers, lenders, brokers, listings, properties) with per-entity layout defaults, field overrides, and computed fields (e.g., borrowerVerificationSummary).
convex/crm/types.ts
convex/crm/entityAdapterRegistry.ts
Wire the new adapter contract into view schema construction, including applying field overrides, injecting computed fields, and sorting by display order with tie-breaking.
  • Mark persisted normalized fields with fieldSource="persisted" and make fieldDefId optional to support non-persisted (computed) fields.
  • Introduce helper functions to compute schema order hints from layoutDefaults.preferredVisibleFieldNames, build fieldOverrides lookup, resolve display order with hints/overrides, and apply overrides to both columns and field definitions, including visibility and labels.
  • Add support for adapter-defined computed fields by converting them into NormalizedFieldDefinition instances (fieldSource="adapter_computed", normalizedFieldKind="computed") and merging them with persisted fields, then sort all schema items with a shared compareSchemaItemsByDisplayOrder helper.
  • Replace the previous buildAdapterContract with resolveEntityViewAdapterContract and use its output (including layoutDefaults, overrides, and computedFields) when assembling getViewSchema results.
convex/crm/viewQueries.ts
convex/crm/entityAdapterRegistry.ts
Introduce dedicated record sidebar entity adapters on the admin shell that can render prioritized detail layouts and respect overrides.
  • Extract RecordSidebarEntityAdapter and related tab/details render argument types into a new entity-view-adapters module and implement resolveRecordSidebarEntityAdapter to combine dedicated adapters with optional per-entity overrides.
  • Implement per-entity prioritized detail field orders (aligned with the server-side adapters) and a generic prioritized field grid renderer that respects those orders while still showing remaining fields with non-empty values.
  • Update AdminRecordDetailSurface to resolve the sidebar adapter via resolveRecordSidebarEntityAdapter and pass it to DetailsTab, which now delegates to adapter.renderDetailsTab when available before falling back to the generic details renderer.
src/components/admin/shell/RecordSidebar.tsx
src/components/admin/shell/entity-view-adapters.tsx
Enhance tests to cover the new adapter registry behavior, system-object schemas, and admin shell adapter resolution, and extend audit-log test utilities with aggregate components.
  • Expand CRM view engine tests to assert the enriched adapterContract (variant, detail, layoutDefaults, fieldOverrides, computedFields), new fieldSource semantics, computed field behavior, and correct inclusion of system-object record fields and schemas for mortgages and borrowers.
  • Adjust audit log tests to look for the updated action name (crm.record.updated) and extend the registerAuditLogComponent helper to register aggregate components and their modules for use in tests.
  • Add admin-shell tests that build borrower fixtures, resolve dedicated adapters while preserving overrides (including getRecordTitle), and verify that dedicated details rendering respects the configured field priority order.
  • Add @fast-check/vitest devDependency and update the generated Convex API typings to include the new crm/entityAdapterRegistry module.
convex/crm/__tests__/viewEngine.test.ts
src/test/admin/admin-shell.test.ts
convex/test/registerAuditLogComponent.ts
convex/_generated/api.d.ts
package.json
bun.lock

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@Connorbelez Connorbelez marked this pull request as ready for review April 3, 2026 14:17
Copilot AI review requested due to automatic review settings April 3, 2026 14:17
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

@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, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

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 registry-driven “entity view adapter” layer to CRM view schema generation and the admin record sidebar, so system/native objects can supply dedicated metadata (layout defaults, field overrides, computed fields) and dedicated detail rendering behavior.

Changes:

  • Introduces a Convex-side CRM entity adapter registry and uses it in getViewSchema to apply adapter-derived layout defaults, field overrides, and adapter-computed fields (with fieldSource tracking).
  • Adds a client-side admin record sidebar adapter resolver + dedicated detail renderers with priority-ordered fields per entity type.
  • Updates/extends tests (CRM view engine + admin shell) and adjusts Convex test component registration to include aggregate components used by audit views.

Reviewed changes

Copilot reviewed 9 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/test/admin/admin-shell.test.ts Adds tests for dedicated sidebar adapter resolution, override preservation, and priority-order field rendering.
src/components/admin/shell/RecordSidebar.tsx Switches sidebar adapter selection to registry-based resolver; supports adapter-provided Details tab rendering.
src/components/admin/shell/entity-view-adapters.tsx New dedicated sidebar adapter registry + resolver and prioritized field rendering helper.
package.json Adds @fast-check/vitest dev dependency.
bun.lock Locks new dev dependency and transitive deps.
convex/test/registerAuditLogComponent.ts Registers aggregate components alongside audit-log component for tests.
convex/crm/viewQueries.ts Integrates entity adapter contract into schema generation; applies overrides, adds computed fields, and tracks field source.
convex/crm/types.ts Extends adapter contract model; adds computed field/override/layout defaults contracts; adds fieldSource and optional fieldDefId.
convex/crm/entityAdapterRegistry.ts New Convex-side registry to derive adapter contracts from object defs/field defs.
convex/crm/tests/viewEngine.test.ts Extends schema assertions for adapter metadata, overrides, computed fields; updates audit action expectation; adds borrower native record field assertions.
convex/_generated/api.d.ts Updates generated API typings to include new module.

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

Comment thread convex/crm/viewQueries.ts Outdated
Comment thread src/components/admin/shell/RecordSidebar.tsx Outdated
@Connorbelez Connorbelez changed the title feat(crm): add entity view adapter registry eng-273 feat(crm): add entity view adapter registry Apr 3, 2026
@Connorbelez Connorbelez changed the base branch from eng-271 to graphite-base/384 April 3, 2026 15:13
@Connorbelez Connorbelez changed the base branch from graphite-base/384 to eng-272 April 3, 2026 15:14
@Connorbelez Connorbelez changed the base branch from eng-272 to graphite-base/384 April 9, 2026 18:13
@graphite-app graphite-app bot changed the base branch from graphite-base/384 to main April 9, 2026 18:16
@Connorbelez Connorbelez merged commit 686653c into main Apr 9, 2026
1 of 3 checks passed
Copy link
Copy Markdown
Owner Author

Merge activity

Connorbelez added a commit that referenced this pull request Apr 20, 2026
feat(crm): add entity view adapter registry

responding to feedback

## Summary by Sourcery

Introduce a registry-driven entity view adapter system for CRM views and admin UI, enabling dedicated adapters, field overrides, and computed fields for system objects while updating tests and audit logging components accordingly.

New Features:
- Add a centralized CRM entity view adapter registry that derives adapter contracts, layout defaults, field overrides, and computed fields from object definitions and layouts.
- Extend view schema generation to include adapter-computed fields and apply adapter-driven field overrides and ordering to both schema fields and columns.
- Introduce dedicated admin record sidebar adapters that render detail fields in a configurable priority order per entity type and support consumer overrides.
- Expose new adapter-related metadata on CRM view schemas, including variant, detail surface configuration, layout defaults, and field source tracking for fields.

Bug Fixes:
- Adjust audit log tests to assert the correct action name when updating CRM records.
- Ensure system object record queries surface native borrower fields consistently in unified records.

Enhancements:
- Track field source (persisted vs adapter-computed) in normalized field definitions across CRM views.
- Refine the entity view adapter contract model with explicit detail, layout defaults, field override, and computed field subcontracts.
- Improve admin shell tests and helpers to validate dedicated adapter resolution and field ordering behavior in the sidebar details view.

Build:
- Register the Convex aggregate component alongside the audit log component in tests to support aggregation-based audit views.

Tests:
- Add comprehensive tests for system object view schemas, verifying dedicated adapter metadata, field overrides, and computed field behavior for mortgages and borrowers.
- Extend admin shell tests to cover dedicated sidebar adapter resolution, override preservation, and prioritized detail field rendering.
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