Skip to content

fix: /embed/* path prefix for sidebar-free VS Code WebView#83

Merged
avrabe merged 1 commit intomainfrom
fix/embed-path-prefix
Mar 22, 2026
Merged

fix: /embed/* path prefix for sidebar-free VS Code WebView#83
avrabe merged 1 commit intomainfrom
fix/embed-path-prefix

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented Mar 22, 2026

Strips /embed from path, uses embed_layout. Verified: 0 nav in embed, 1 in normal. 🤖

The middleware now strips /embed prefix from the URI path before routing,
so /embed/stats → embed_layout(stats_view), /embed/stpa → embed_layout(stpa_view).
No route duplication needed — same handlers, different layout wrapping.

This avoids the ?embed=1 query param which VS Code's asExternalUri
URL-encodes to ?embed%3D1, breaking the middleware detection.

Verified: /embed/stats returns 0 <nav> elements, /stats returns 1.

Also fixes CSP frame-src to use origin-only (no path+query).

Fixes: FEAT-057
@avrabe avrabe merged commit 8902362 into main Mar 22, 2026
@avrabe avrabe deleted the fix/embed-path-prefix branch March 22, 2026 08:35
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Rivet Criterion Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.

Benchmark suite Current: 94febb5 Previous: 8902362 Ratio
link_graph_build/10000 34180617 ns/iter (± 2126382) 28024491 ns/iter (± 2183624) 1.22
diff/10000 10808254 ns/iter (± 474707) 8174208 ns/iter (± 347212) 1.32

This comment was automatically generated by workflow using github-action-benchmark.

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

1 participant