Skip to content

feat(build): inject PropertyDefinition per app and purge on uninstall - #270

Merged
buke merged 10 commits into
mainfrom
feat/orm-properties-pp2
Aug 11, 2026
Merged

feat(build): inject PropertyDefinition per app and purge on uninstall#270
buke merged 10 commits into
mainfrom
feat/orm-properties-pp2

Conversation

@buke

@buke buke commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

User description

Summary

  • Register {app}.PropertyDefinition as a C2 inject Spec (EnsureServiceEntry: false), matching FieldDefault / AppSetting force-delivery for non-core apps with a service entry.
  • Wire pickPropertyDefinitionOwnerModule into multi-app / per-app bundle C2 virtual imports so each eligible app gets exactly one definition store.
  • On uninstall, purge definition rows when a logical model has no remaining effective meta_model (TargetModel or ContainerModel match); missing per-app tables are a no-op; probe/delete failures fail uninstall (PP5 / SF7 rigor).

Test plan

  • go test ./internal/module/artifact/build/injectappmodel/... -count=1
  • go test ./internal/module/lifecycle/... -count=1
  • ./choysum test unit core --be
  • CI green on this PR

Made with Cursor


PR Type

Enhancement, Tests


Description

  • Add PropertyDefinition to C2 inject specs (mirrors FieldDefault/AppSetting, EnsureServiceEntry: false)

  • Wire pickPropertyDefinitionOwnerModule into multi-app and per-app bundle builds

  • Purge PropertyDefinition rows on uninstall when no live meta_model remains

  • Extend tests for inject, bundles, and uninstall behavior


File Walkthrough

Relevant files
Tests
5 files
coverage_test.go
Update spec count assertions to include PropertyDefinition
+2/-2     
injectappmodel_test.go
Extend test for PropertyDefinition spec and injection validation
+54/-26 
bundles_app_setting_test.go
Update existing test to pass propertyDefinitionOwners       
+4/-4     
bundles_property_definition_test.go
New tests for PropertyDefinition bundle owner selection and error
paths
+87/-0   
uninstaller_property_definition_test.go
Add comprehensive tests for PropertyDefinition uninstall purge
+347/-0 
Documentation
4 files
doc.go
Update package doc comment to mention PropertyDefinition 
+5/-4     
inject.go
Update comment to include PropertyDefinition                         
+1/-1     
session.go
Update comments for PropertyDefinition                                     
+2/-2     
spec.go
Update Spec doc to include PropertyDefinition                       
+5/-4     
Enhancement
4 files
registry.go
Register PropertyDefinition as a built-in inject spec       
+9/-2     
bundles.go
Add pickPropertyDefinitionOwnerModule and wire into bundle builds
+18/-6   
modulemanager.go
Pass nil propertyDefinitionOwners in single-app bundle build
+1/-1     
uninstaller.go
Implement PropertyDefinition purge on uninstall when models gone
+90/-1   

Summary by CodeRabbit

  • New Features

    • Added support for property definitions in application model generation, backend bundles, and virtual sources.
    • Property definitions now follow existing application and module eligibility rules.
    • Search views now accept either a single default filter or multiple filters.
  • Bug Fixes

    • Uninstallation removes property definitions for models without effective metadata while preserving valid entries.
    • Cleanup safely handles missing tables, duplicates, and database errors.
    • Improved dynamic search and icon rendering to prevent Vue reactivity warnings.
    • Improved view-mode handling outside component contexts.

- Register PropertyDefinition as a C2 Spec alongside FieldDefault/AppSetting.

- Wire per-app bundle owners and uninstall purge for gone TargetModel/ContainerModel rows.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 46 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 15402f76-ef09-4877-a0bc-03ffe3665f14

📥 Commits

Reviewing files that changed from the base of the PR and between 566c14f and 38568d2.

📒 Files selected for processing (9)
  • internal/module/lifecycle/bundles_property_definition_test.go
  • modules/web/web/components/field/relationTypeahead.NameSearch.test.ts
  • modules/web/web/components/view/OChartView.resolvedSearchView.test.ts
  • modules/web/web/components/view/OKanbanView.firstframe.test.ts
  • modules/web/web/components/view/OKanbanView.readonly.test.ts
  • modules/web/web/components/view/OKanbanView.vue
  • modules/web/web/components/view/OListView.firstframe.test.ts
  • modules/web/web/components/view/OListView.vue
  • modules/web/web/composables/useOnchange.rebind.test.ts
📝 Walkthrough

Walkthrough

The PR adds PropertyDefinition to app-model injection, backend bundle generation, virtual-source resolution, and module-uninstall cleanup. It also normalizes dynamic Vue components, guards injection outside component setup, and broadens default filter input.

Changes

PropertyDefinition integration

Layer / File(s) Summary
Register PropertyDefinition injection
internal/module/artifact/build/injectappmodel/*
Adds the builtin specification and tests registration, eligibility, duplicate validation, generated sources, and bundle placement.
Inject PropertyDefinition into backend bundles
internal/module/lifecycle/bundles.go, internal/module/lifecycle/modulemanager.go, internal/module/artifact/build/injectappmodel/bundle.go, internal/module/lifecycle/*test.go
Selects eligible owner modules and includes PropertyDefinition in bundle virtual-import and injection flows.
Resolve PropertyDefinition virtual sources
internal/esbplugins/backendplugin/plugin.go, internal/esbplugins/backendplugin/*test.go
Adds property_definition.ts to virtual-source filtering and resolution tests.

PropertyDefinition uninstall cleanup

Layer / File(s) Summary
Purge obsolete PropertyDefinition rows
internal/module/lifecycle/uninstaller.go, internal/module/lifecycle/uninstaller_property_definition_test.go, internal/module/lifecycle/uninstaller_user_filter_test.go
Adds table discovery, missing-table handling, survivor checks, row deletion, and database error propagation during cleanup.

Vue component handling

Layer / File(s) Summary
Normalize dynamic components and guard injection
modules/web/web/components/view/*, modules/web/web/composables/useOnchange.ts, modules/web/web/pages/TerminologyEditor.test.ts
Marks dynamic search and icon components raw, uses renderable test mocks, guards view-mode injection, and accepts singleton or array default filters.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant buildBackendAppToDir
  participant ensureBundleC2VirtualImports
  participant injectappmodel
  participant BackendPlugin
  buildBackendAppToDir->>ensureBundleC2VirtualImports: pass PropertyDefinition owner modules
  ensureBundleC2VirtualImports->>injectappmodel: inject PropertyDefinition sources
  injectappmodel-->>ensureBundleC2VirtualImports: generate virtual model imports
  ensureBundleC2VirtualImports->>BackendPlugin: resolve property_definition.ts
  BackendPlugin-->>buildBackendAppToDir: return virtual source resolution
Loading
sequenceDiagram
  participant ModuleUninstaller
  participant applyPropertyDefinitionPurge
  participant PropertyDefinitionTable
  ModuleUninstaller->>applyPropertyDefinitionPurge: purge removed model definitions
  applyPropertyDefinitionPurge->>PropertyDefinitionTable: probe table and count surviving models
  PropertyDefinitionTable-->>applyPropertyDefinitionPurge: return table and model state
  applyPropertyDefinitionPurge->>PropertyDefinitionTable: delete obsolete target or container rows
  PropertyDefinitionTable-->>ModuleUninstaller: return purge result
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 24.56% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main changes: per-app PropertyDefinition injection and uninstall cleanup.
Description check ✅ Passed The description clearly states the changes, objectives, test plan, and relevant implementation details.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/orm-properties-pp2

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

@github-actions

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 PR contains tests
🔒 Security concerns

Possible SQL injection:
table name derived from application name and concatenated into raw SQL queries. If application names can contain special characters, an attacker with control over module metadata could execute arbitrary SQL. See the key issue above for specifics.

⚡ Recommended focus areas for review

Possible SQL Injection

The propertyDefinitionTableName function constructs a table name from an application name (via strcase.ToSnake) and then both propertyDefinitionTableExists and the DELETE in purgePropertyDefinitionsForGoneModels concatenate that name directly into raw SQL queries without any quoting or escaping.
If an application name can contain special characters (e.g., semicolons, backticks) and is controlled by an attacker (for example, through a maliciously crafted module manifest), this could lead to SQL injection, allowing unintended data deletion or schema manipulation.
While the system currently trusts installed module metadata, the pattern introduces a latent injection vector that would be dangerous if application-name validation is insufficient.

func propertyDefinitionTableExists(db *gorm.DB, table string) (bool, error) {
	if db == nil || strings.TrimSpace(table) == "" {
		return false, nil
	}
	var n int64
	err := db.Raw("SELECT COUNT(1) FROM "+table+" WHERE 1 = 0").Scan(&n).Error
	if err == nil {
		return true, nil
	}
	msg := strings.ToLower(err.Error())
	if strings.Contains(msg, "no such table") ||
		strings.Contains(msg, "doesn't exist") ||
		strings.Contains(msg, "does not exist") ||
		strings.Contains(msg, "unknown table") {
		return false, nil
	}
	return false, xfmt.Errorf("error checking %s existence: %w", table, err)
}

// purgePropertyDefinitionsForGoneModels deletes PropertyDefinition rows whose
// TargetModel or ContainerModel matches a logical model that no longer has any
// live effective meta_model row. Missing per-app tables are a no-op. Never wipes
// a whole application table and never scrubs business properties JSON.
func purgePropertyDefinitionsForGoneModels(db *gorm.DB, keys []modmeta.LogicalKey) error {
	if db == nil || len(keys) == 0 {
		return nil
	}
	seen := map[string]struct{}{}
	for _, key := range keys {
		k := key.Normalized()
		if !k.Valid() {
			continue
		}
		id := k.Application + "\x00" + k.Name
		if _, ok := seen[id]; ok {
			continue
		}
		seen[id] = struct{}{}

		table := propertyDefinitionTableName(k.Application)
		// Probe the concrete app table: missing table is a no-op; other DB errors must
		// fail uninstall (HasTable alone discards lookup failures and would leave orphans).
		exists, err := propertyDefinitionTableExists(db, table)
		if err != nil {
			return err
		}
		if !exists {
			continue
		}

		var remaining int64
		if err := db.Model(&meta.Model{}).
			Where("application = ? AND name = ?", k.Application, k.Name).
			Count(&remaining).Error; err != nil {
			return xfmt.Errorf("error counting surviving meta models for property definition purge: %w", err)
		}
		if remaining > 0 {
			continue
		}
		if err := db.Exec(
			"DELETE FROM "+table+" WHERE target_model = ? OR container_model = ?",
			k.Name, k.Name,
		).Error; err != nil {

@github-actions

Copy link
Copy Markdown

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Security
Quote table name to prevent SQL injection

The table name table is constructed from
strcase.ToSnake(strings.TrimSpace(application)) and interpolated directly into the
SQL string. This is vulnerable to SQL injection if the application name were to
contain malicious characters. Quote the identifier using GORM's
db.Statement.Quote(table) to safely embed the table name.

internal/module/lifecycle/uninstaller.go [273-278]

+quoted := db.Statement.Quote(table)
 if err := db.Exec(
-    "DELETE FROM "+table+" WHERE target_model = ? OR container_model = ?",
+    "DELETE FROM " + quoted + " WHERE target_model = ? OR container_model = ?",
     k.Name, k.Name,
 ).Error; err != nil {
Suggestion importance[1-10]: 6

__

Why: The suggestion correctly identifies that interpolating table into SQL without quoting could be problematic, and using db.Statement.Quote improves safety. However, the application name is internal metadata and unlikely to contain malicious characters, so the security impact is low. The change is a good defensive measure but does not address a high-risk vulnerability.

Low

@codecov

codecov Bot commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@internal/module/lifecycle/modulemanager.go`:
- Line 208: Update BundleInjectAppModels to use the last eligible module,
matching pickPropertyDefinitionOwnerModule, when injecting PropertyDefinition
imports through ensureBundleC2VirtualImports. Add a test with two eligible
modules and assert that the generated PropertyDefinition source path belongs to
the last eligible module.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1069d6fe-6496-47f3-ac33-14b330c5e45e

📥 Commits

Reviewing files that changed from the base of the PR and between 4860848 and 14dd05f.

📒 Files selected for processing (13)
  • internal/module/artifact/build/injectappmodel/coverage_test.go
  • internal/module/artifact/build/injectappmodel/doc.go
  • internal/module/artifact/build/injectappmodel/inject.go
  • internal/module/artifact/build/injectappmodel/injectappmodel_test.go
  • internal/module/artifact/build/injectappmodel/registry.go
  • internal/module/artifact/build/injectappmodel/session.go
  • internal/module/artifact/build/injectappmodel/spec.go
  • internal/module/lifecycle/bundles.go
  • internal/module/lifecycle/bundles_app_setting_test.go
  • internal/module/lifecycle/bundles_property_definition_test.go
  • internal/module/lifecycle/modulemanager.go
  • internal/module/lifecycle/uninstaller.go
  • internal/module/lifecycle/uninstaller_property_definition_test.go

Comment thread internal/module/lifecycle/modulemanager.go Outdated
- Extend the backend OnResolve filter so property_definition.ts virtual injects load like FieldDefault/AppSetting.

Co-authored-by: Cursor <cursoragent@cursor.com>

@coderabbitai coderabbitai 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.

🧹 Nitpick comments (1)
internal/esbplugins/backendplugin/virtual_source_test.go (1)

119-138: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Exercise PropertyDefinition through the virtual-source loader.

TestVirtualC2SourceOnResolveFilter checks only the filter. TestBackendPluginDefinePluginsOnLoad_ServesVirtualSource exercises the shared resolver and loader with field_default.ts, but not property_definition.ts. Add a table-driven property_definition.ts case that checks the resolved path and loaded contents.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@internal/esbplugins/backendplugin/virtual_source_test.go` around lines 119 -
138, Extend TestBackendPluginDefinePluginsOnLoad_ServesVirtualSource with a
table-driven property_definition.ts case, alongside the existing
field_default.ts case. Assert that the virtual-source resolver returns the
expected property_definition.ts path and that the loader serves its expected
contents, covering both path resolution and loading behavior.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@internal/esbplugins/backendplugin/virtual_source_test.go`:
- Around line 119-138: Extend
TestBackendPluginDefinePluginsOnLoad_ServesVirtualSource with a table-driven
property_definition.ts case, alongside the existing field_default.ts case.
Assert that the virtual-source resolver returns the expected
property_definition.ts path and that the loader serves its expected contents,
covering both path resolution and loading behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 22920e7c-518f-4ef2-94ae-2bcfa31d046c

📥 Commits

Reviewing files that changed from the base of the PR and between 14dd05f and 286aeda.

📒 Files selected for processing (2)
  • internal/esbplugins/backendplugin/plugin.go
  • internal/esbplugins/backendplugin/virtual_source_test.go

buke and others added 5 commits August 11, 2026 15:39
- Make BundleInjectAppModels last-wins per app and pass pick* owners from per-app bundles.

- Cover property_definition through the backend virtual OnResolve/OnLoad path.

Co-authored-by: Cursor <cursoragent@cursor.com>
- Exercise cleanModels failure when UserFilter or PropertyDefinition purge fails.

- Extract and unit-test dialect missing-table error matching.

Co-authored-by: Cursor <cursoragent@cursor.com>
- Drive buildBackendAppToDir with Path-backed modules so FieldDefault/AppSetting/PropertyDefinition owners are appended.

Co-authored-by: Cursor <cursoragent@cursor.com>
- markRaw searchView before dynamic component render to avoid reactive Component warns.

- Replace boolean component mocks with no-op stubs so slot children are valid VNodes.

Co-authored-by: Cursor <cursoragent@cursor.com>
- Unwrap and markRaw dynamic searchView/icon Components so prop proxies are not treated as reactive.

- Accept singleton defaultFilters, give firstframe search sentinels a render function, and skip inject outside setup.

Co-authored-by: Cursor <cursoragent@cursor.com>

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🧹 Nitpick comments (1)
modules/web/web/composables/useOnchange.ts (1)

513-516: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add regression coverage for both controller contexts.

The new branch has two observable paths. A setup caller must still receive the injected 'view-mode'. A non-component caller must avoid inject and use the fallback controller path. Add or update tests in modules/web/web/composables/useOnchange.test.ts for both paths.

As per coding guidelines, build the CLI and generate ignored embedded assets before installing modules or running the application, install required local modules, and run the applicable formatting, build, typecheck, unit-test, and E2E-test checks.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@modules/web/web/composables/useOnchange.ts` around lines 513 - 516, Add
regression tests in useOnchange.test.ts covering both getOnchangeController
contexts: verify setup callers receive the injected 'view-mode' Ref, and
non-component callers skip inject and use the fallback controller path. Follow
the repository workflow by generating required embedded assets and building the
CLI before installing modules, then run applicable formatting, build, typecheck,
unit, and E2E checks.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@internal/module/lifecycle/bundles_property_definition_test.go`:
- Around line 126-143: Update the test around buildBackendAppToDir to capture
the registered virtual imports before dropping meta_raw_model and forcing
injection failure. Assert that the PropertyDefinition import is supplied only by
crm_last, rather than inferring ownership from the generated entry file, while
preserving the existing failure and entry-generation assertions.

In `@modules/web/web/components/view/OListView.vue`:
- Around line 270-274: Use the normalized resolvedSearchView identity for
first-frame deferral: update shouldDeferViewFirstFrame calls in
modules/web/web/components/view/OListView.vue (lines 270-274) and
modules/web/web/components/view/OKanbanView.vue (lines 214-218) to pass
resolvedSearchView.value instead of props.searchView. Update the tests asserting
these calls to expect the normalized value.

---

Nitpick comments:
In `@modules/web/web/composables/useOnchange.ts`:
- Around line 513-516: Add regression tests in useOnchange.test.ts covering both
getOnchangeController contexts: verify setup callers receive the injected
'view-mode' Ref, and non-component callers skip inject and use the fallback
controller path. Follow the repository workflow by generating required embedded
assets and building the CLI before installing modules, then run applicable
formatting, build, typecheck, unit, and E2E checks.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4bb8567b-7bac-42ce-9389-d67bdf0684ee

📥 Commits

Reviewing files that changed from the base of the PR and between 286aeda and 0cb6425.

📒 Files selected for processing (19)
  • internal/esbplugins/backendplugin/plugin_test.go
  • internal/module/artifact/build/injectappmodel/bundle.go
  • internal/module/artifact/build/injectappmodel/injectappmodel_test.go
  • internal/module/lifecycle/bundles_property_definition_test.go
  • internal/module/lifecycle/modulemanager.go
  • internal/module/lifecycle/uninstaller.go
  • internal/module/lifecycle/uninstaller_property_definition_test.go
  • internal/module/lifecycle/uninstaller_user_filter_test.go
  • modules/web/web/components/view/OChartView.vue
  • modules/web/web/components/view/OKanbanView.firstframe.test.ts
  • modules/web/web/components/view/OKanbanView.vue
  • modules/web/web/components/view/OListView.firstframe.test.ts
  • modules/web/web/components/view/OListView.test.ts
  • modules/web/web/components/view/OListView.vue
  • modules/web/web/components/view/OSearchView.vue
  • modules/web/web/components/view/OStatInfo.test.ts
  • modules/web/web/components/view/OStatInfo.vue
  • modules/web/web/composables/useOnchange.ts
  • modules/web/web/pages/TerminologyEditor.test.ts
🚧 Files skipped from review as they are similar to previous changes (4)
  • internal/module/lifecycle/modulemanager.go
  • internal/module/lifecycle/uninstaller.go
  • internal/module/artifact/build/injectappmodel/injectappmodel_test.go
  • internal/module/lifecycle/uninstaller_property_definition_test.go

Comment thread internal/module/lifecycle/bundles_property_definition_test.go
Comment thread modules/web/web/components/view/OListView.vue
- Spy console.warn when exercising the missing relationStore fallback so CI logs stay clean.

Co-authored-by: Cursor <cursoragent@cursor.com>

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@modules/web/web/components/field/relationTypeahead.NameSearch.test.ts`:
- Around line 248-252: Update the test workflow around the withStore and
withoutStore wrappers to declare both wrapper variables before an outer
try/finally, then unmount every defined wrapper in finally. Ensure cleanup still
runs when clickRemote or any assertion throws, and avoid duplicate unmounts from
the existing inner cleanup.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: cd3ecb3c-f335-4bf7-b5f6-95f9bc161267

📥 Commits

Reviewing files that changed from the base of the PR and between 0cb6425 and 566c14f.

📒 Files selected for processing (1)
  • modules/web/web/components/field/relationTypeahead.NameSearch.test.ts

Comment thread modules/web/web/components/field/relationTypeahead.NameSearch.test.ts Outdated
buke and others added 2 commits August 11, 2026 16:54
- Assert C2 PropertyDefinition/FieldDefault last-owner on the app-build fixture; virtual import capture is impossible when inject fails in dbLoadModels.

- Defer first-frame load using resolvedSearchView identity so reactive prop proxies cannot skip OSearchView wait.

- Make OManyToOneRefField typeahead wrapper cleanup exception-safe, and cover view-mode inject gating for getOnchangeController.

Co-authored-by: Cursor <cursoragent@cursor.com>
- Add OChartView mount coverage for truthy and falsy searchView resolution.

- Mount OKanbanView without searchView to cover the null resolvedSearchView branch.

Co-authored-by: Cursor <cursoragent@cursor.com>
@buke
buke merged commit 876acbb into main Aug 11, 2026
43 checks passed
@buke
buke deleted the feat/orm-properties-pp2 branch August 11, 2026 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant