feat(ui): open API Reference in a new tab#26
Merged
Conversation
The sidebar "API Reference" link replaced the portal with the Scalar docs page. Open it in a new tab instead (target=_blank + rel=noopener noreferrer), so the docs load alongside the portal and the admin keeps their place. Still a native anchor (not Inertia) to avoid the sandboxed error-modal iframe. - nav-main: external nav items render target=_blank rel=noopener noreferrer. - Vitest: assert the external anchor carries target/rel. - Playwright: assert the link attributes and that clicking opens a new tab on /scalar (Scalar CDN script present, no iframe) while the original tab stays on /dashboard. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
Clicking API Reference in the sidebar replaced the portal tab with the Scalar docs page. Per user request, it now opens the docs in a new tab (
target="_blank"+rel="noopener noreferrer"), so the docs load alongside the portal and the admin keeps their place.It remains a native
<a>(not an Inertia<Link>) —/scalaris served outside Inertia, and an Inertia visit would render it inside the sandboxed error-modal iframe (the v1.0.1 fix).Changes
nav-main.tsx— external nav items rendertarget="_blank" rel="noopener noreferrer".nav-main.test.tsx) — asserts the external anchor carriestarget/rel.openapi-proxy.spec.ts) — asserts the link attributes, and that clicking opens a new tab on/scalar(Scalar CDN script present, noiframe[srcdoc]) while the original tab stays on/dashboard.Gates (all green, local)
vitest 15 · tsc 0 · lint:check · format:check · build ·
npx playwright test17 passed.🤖 Generated with Claude Code