Skip to content

feat(ui): open API Reference in a new tab#26

Merged
lopadova merged 1 commit into
mainfrom
feat/api-reference-new-tab
Jun 16, 2026
Merged

feat(ui): open API Reference in a new tab#26
lopadova merged 1 commit into
mainfrom
feat/api-reference-new-tab

Conversation

@lopadova

Copy link
Copy Markdown
Contributor

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>) — /scalar is 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 render target="_blank" rel="noopener noreferrer".
  • Vitest (nav-main.test.tsx) — asserts the external anchor carries target/rel.
  • Playwright (openapi-proxy.spec.ts) — asserts the link attributes, and that clicking opens a new tab on /scalar (Scalar CDN script present, no iframe[srcdoc]) while the original tab stays on /dashboard.

Gates (all green, local)

vitest 15 · tsc 0 · lint:check · format:check · build · npx playwright test 17 passed.

🤖 Generated with Claude Code

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>
@lopadova lopadova merged commit 43a633c into main Jun 16, 2026
5 checks passed
@lopadova lopadova deleted the feat/api-reference-new-tab branch June 16, 2026 08:10
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