feat: Add global issues checkers that check across definition#801
Conversation
Deploying baseplate-storybook with
|
| Latest commit: |
2115730
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a7e11222.baseplate-storybook.pages.dev |
| Branch Preview URL: | https://kingston-eng-1052-add-global.baseplate-storybook.pages.dev |
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
Disabled knowledge base sources:
📝 WalkthroughWalkthroughIntroduces entity-scoped definition issues and warning support: propagates entity context through schema walking and ref visitors, adds built-in checkers (mutation-roles, relation-type-mismatch), refactors the issue collection pipeline to accept a ProjectDefinitionContainer, and surfaces non-blocking warnings in the web UI with a new dialog and hooks. Changes
Sequence DiagramsequenceDiagram
participant User
participant Provider as ProjectDefinitionProvider
participant Validator as collectDefinitionIssues
participant Dialog as DefinitionWarningDialog
participant Server as Server
User->>Provider: saveDefinition()
Provider->>Validator: collectDefinitionIssues(container)
Validator->>Validator: Run built-in checkers<br/>(mutation-roles, relation-type-mismatch)
Validator->>Validator: Partition issues<br/>(errors vs warnings)
Validator-->>Provider: { errors[], warnings[] }
alt Errors exist
Provider->>User: Throw error<br/>(block save)
else No errors
Provider->>Server: Sync definition
Server-->>Provider: Success
Provider->>Provider: Update definitionWarnings
alt Warnings exist
Provider->>User: Show warning toast<br/>with "View" action
User->>Dialog: Click "View"
Dialog->>Dialog: Resolve entity paths<br/>from warnings
Dialog->>User: Display warnings table<br/>(Entity, Path, Message)
else No warnings
Provider->>User: Show success toast
end
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
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. Comment |
Summary by CodeRabbit
New Features
Bug Fixes
Improvements