fix: restore static embed relationship popup#2969
Conversation
🦋 Changeset detectedLatest commit: 81d3bdd The changes in this PR will be included in the next version bump. This PR includes changesets to release 22 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR enables relationship popovers in static-built embedded views by adding ChangesStatic Embed Relationship UI and Test Coverage
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add 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 |
There was a problem hiding this comment.
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 `@e2e/serve-static-build.mjs`:
- Around line 31-33: In resolveRequest(pathname) wrap the
decodeURIComponent(pathname) call in a try/catch and return a 400 response on
failure; likewise wrap any use of new URL(...) (and remove reliance on
request.headers.host) by using a fixed base like "http://127.0.0.1" and catching
URL parsing errors to return 400. Update the logic around the variables relative
and candidate (resolve(root, relative)) so that candidate is only computed when
decoding/parsing succeeds. Ensure errors are caught locally in resolveRequest to
prevent server crashes.
🪄 Autofix (Beta)
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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: e8b1516b-4bdd-4403-82f4-d73661c1dd22
📒 Files selected for processing (6)
.changeset/fix-static-embed-relationship-popover.mde2e/.gitignoree2e/playwright.static-build.config.tse2e/serve-static-build.mjse2e/tests/static-build-relationship-popover.spec.tspackages/likec4-spa/src/pages/EmbedPage.tsx
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Fixes #2962.
Summary
likec4 build.ExportPagestill explicitly disables relationship details and relationship browser.Root Cause
Relationship popover support was introduced in #2145 /
48ad2c741(feat: Relationship popover). Normal view pages enabledenableRelationshipDetails, but static embed pages still rendered throughStaticLikeC4Diagram, whose default remainedenableRelationshipDetails = false.So this was not an export regression from a previously working popup. The new relationship popover feature was added without being wired into the static embed route.
Screenshots
Verification
DIRECT RELATIONSHIPSwas not visible.npx -y pnpm@10.33.3 --filter @likec4/spa typechecknpx -y pnpm@10.33.3 --dir e2e exec playwright test -c playwright.static-build.config.tsfindings: 0.Note: broad
e2e tsc --noEmitstill fails on existing unrelated generated model/view type assertions formultiple-*IDs.