feat: [AI-0000] ERD overlay — getRelationships extension command + source-pointing#1905
Draft
ralphstodomingo wants to merge 3 commits intomasterfrom
Draft
feat: [AI-0000] ERD overlay — getRelationships extension command + source-pointing#1905ralphstodomingo wants to merge 3 commits intomasterfrom
ralphstodomingo wants to merge 3 commits intomasterfrom
Conversation
…erlay dev Temporary dev-loop setup for the ERD overlay feature (see `worktrees/lineage-erd-overlay/PLAN.md`): - Vite aliases for `@altimateai/ui-components/lineage` and `@altimateai/lego` → altimate-frontend worktree sources, so UI changes in altimate-frontend show up in the power-user webview without a publish. - Tailwind content paths extended to scan the altimate-frontend sources, so new `al-`-prefixed classes used in lineage/lego during this work get generated into the webview bundle. Both reverted before this feature ships — final flow is one ui-components publish that includes the overlay, then a dep bump in this repo.
Wires the webview lineage canvas to dbt-integration's `RelationshipParser`
so the ERD overlay can render PK/FK edges.
- `newLineagePanel.ts`: new `getRelationships` handler that instantiates
`RelationshipParser` against the current project's `testMetaMap` and
returns `{ refs: Ref[] }`. Extends the existing `handleCommand` switch.
- `LineageView.tsx`: registers `getRelationships` in the `ApiHelper.get`
command list so the webview's call round-trips through
`executeRequestInSync` to the handler above.
- `package.json`: points `@altimateai/dbt-integration` at the sibling
worktree via `file:../altimate-dbt-integration`. Temporary dev-loop
setup — reverted before this feature ships, when the parser has been
published as part of a dbt-integration release.
Phase 1 only: refs derive exclusively from dbt `relationships` data
tests. Contracts (Phase 2) and naming-convention inference (Phase 3) are
additive — the UI will pick them up automatically via the `source`
discriminator once the parser gains those methods.
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
…ggle Mount point for the `RefsToggleButton` added in altimate-frontend. Placed between `#export-container` and `#settings-container` so the toolbar order reads Expand / Export / Relationships / Settings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Power-user side of the lineage ERD overlay feature (see companion PRs in
altimate-dbt-integrationandaltimate-frontend).getRelationshipscommand to the lineage webview panel. The handler runs dbt-integration'sRelationshipParseragainst the current project'stestMetaMapand returns{ refs: Ref[] }.getRelationshipsin the webviewApiHelper.getswitch so the frontend's call round-trips throughexecuteRequestInSyncto the extension host.@altimateai/dbt-integrationat the sibling parser worktree viafile:../altimate-dbt-integration. Temporary — reverted once the parser is published.No behavior change for projects without
relationshipsdata tests: handler returns an emptyrefs[], UI renders no overlay edges.Companion PRs (must land together)
RelationshipParser+ReftypesBuild / verify locally
Both bundles contain the ERD code:
Test plan
ordersmodel → confirm the purple FK edge tocustomersappears, labeledcustomer_id → customer_id.relationshipstests → confirm no overlay edges render and no console errors.Before marking ready
file:../altimate-dbt-integrationback to^0.2.xonce the parser is on npm.webview_panels/vite.config.ts+tailwind.config.tssource-pointing aliases once@altimateai/ui-componentspublishes a version containing the overlay.showRefs(currently hard-on).