Repository navigation
feat(portal): redesign the API reference pages and show the OAuth redirect URI in the playground - #441
Open
mehnoorsiddiqui wants to merge 4 commits into
Open
feat(portal): redesign the API reference pages and show the OAuth redirect URI in the playground#441mehnoorsiddiqui wants to merge 4 commits into
mehnoorsiddiqui wants to merge 4 commits into
Conversation
…irect URI in the playground Upgrades fumadocs-openapi from 12.1.1 to 12.4.1, which carries the fixes for fuma-nama/fumadocs#3661 and #3663, and the API page redesign of 12.2 to 12.4. shiki and lucide-react move to the versions it requires, so each keeps a single copy. - The playground's OAuth panel shows the redirect URI it sends, base path included, with a copy button. - An image in an operation's description no longer crashes Fumadocs' own renderer. ApiMarkdown stays, because that image still gets no base path. - The playground opens in a dialog from a "Try in Playground" button, and the schemas, responses and parameters are shown in cards. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
mehnoorsiddiqui
added a commit
that referenced
this pull request
Oct 19, 2026
fumadocs-openapi goes back to 12.1.1, with the request-examples types, the ApiMarkdown comment and the plan rows for fuma-nama/fumadocs#3661 and #3663, which #441 carries. This PR keeps the image fix alone: fumadocs-core and fumadocs-ui 16.17.1 and fumadocs-mdx 15.4.7, for fuma-nama/fumadocs#3662. The plan no longer calls #3662 open: section 9 records that root-relative images stay unprefixed in the Markdown copies instead, and the follow-up ticket for the placeholders is gone. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
mehnoorsiddiqui
marked this pull request as ready for review
October 19, 2026 11:48
mehnoorsiddiqui
requested review from
Shield-Jaguar and
saeedjamshaid
as code owners
October 19, 2026 11:48
|
mehnoorsiddiqui
added a commit
that referenced
this pull request
Oct 20, 2026
…images included (#437) ## Summary Upgrades `fumadocs-core`, `fumadocs-ui` and `fumadocs-mdx` for the fix to [fuma-nama/fumadocs#3662](fuma-nama/fumadocs#3662), which we reported upstream. It changes no portal code. | Issue | Fixed in | What changes in a portal | |---|---|---| | [fuma-nama/fumadocs#3662](fuma-nama/fumadocs#3662) | fumadocs-core 16.17.0, fumadocs-mdx 15.4.7 | "View as Markdown", Copy Markdown, the AI page actions and `llms-full.txt` keep each page as its author wrote it. Images keep their address instead of `<img src="__img0" />` | The `fumadocs-openapi` upgrade, with the fixes for #3661 and #3663 and the API page redesign, moved to #441. This PR keeps `fumadocs-openapi` at 12.1.1, which accepts core and ui `^16.15.0`. ## What else changes in a portal - **The Markdown copies are the authored source.** Fumadocs 16.17 slices each page's copy from its MDX instead of re-serializing the parsed tree. So a copy keeps the author's text exactly as written: - bare autolinks stay bare instead of becoming `[url](url)`; - `- [X]` keeps its capital X; - entities such as `©` stay as written; - code inside `<Tab>` keeps its indentation; - JSX props such as `items={[…]}` keep their braces, where the old copy printed `items="[…]"`. Comparing the old and new `llms-full.txt` of the test petstore portal found no lost content. Every difference was formatting or the image fix. - **No drop shadow on callouts and code blocks.** fumadocs-ui 16.17 removed `shadow-md` from callouts and `shadow-sm` from code blocks. That is visible in light mode only. Pixel diffs against `dev` found no other visual change, in light, dark or at phone width. ## Before merge `portal_tests.yml` [run on this branch](https://github.com/apimatic/apimatic-cli/actions/runs/39219964368): - **Visual:** passes. - **Functional:** passes. - **Artifacts:** fails only `llms-full.txt matches the baseline`, because of the copy change above. 11 of its 12 tests pass. The `portal-snapshots/artifacts/petstore/llms-full.txt` baseline in `apimatic/v4-test-automation` needs updating alongside this PR, so dev's run stays green. ## Changes - `fumadocs-core` and `fumadocs-ui` 16.15.17 → 16.17.1, and `fumadocs-mdx` 15.4.0 → 15.4.7. - `shiki` 4.4.3 → 4.5.0 and `lucide-react` 1.47.0 → 1.54.0: the versions core and ui 16.17 require (`^4.5.0`, `^1.50.0`), so each has a single copy. #441 makes the same change. - `pnpm dedupe` also merged a few other duplicate copies: - `@semantic-release/github`'s `undici` goes from 7.27.0 to 7.29.1. The next release run will use it. - `micromark-util-types` goes from 2.0.2 to 2.0.3. - `zod` goes from 4.5.4 to 4.6.5. - New subpath e2e test: the Markdown copies and `llms-full.txt` keep `` and the reference-style `![…][flow]`, and contain no `__img`. - `.ai/plans/portal-subpath-hosting.md` records #3662 as fixed and drops the follow-up ticket it needed. Section 9 now records the limitation that remains: root-relative images in the copies don't carry the base path, the same as links. **Release age:** these versions were published on 2026-10-09, 11 days ago. That clears the 7-day `minimumReleaseAge`. ## Test results **Unit and integration suite** (`pnpm test`, merged with `dev` at 0e9052c, after #427): 1852 passing, 69 pending, 0 failing. Build and lint pass. **Full suite with e2e builds** (`APIMATIC_E2E=1 pnpm test`, before #427 was merged in): 1922 passing, 0 failing. **In the browser.** fumadocs-openapi 12.1.1 with core and ui 16.17.1 is a new combination. I built the `default` fixture at the root and the `subpath` fixture under `/api/`, both with an OAuth2 scheme added, on this branch and on `dev`. I drove each with headless Chrome. Every check below gave the same result on both branches, except for the image fix. | Check | Root | `/api/` | `portal serve` | |---|---|---|---| | Content components from #439: Tabs, code tabs, composed tabs, Accordions (single and multiple), Files, TypeTable, InlineTOC, the code copy button | All open, switch and copy as expected | – | Same | | Playground OAuth: Authorize sends `redirect_uri`, then the callback page | `/oauth/callback`, then the token request | `/api/oauth/callback`, then the token request | Same | | Playground Send (`GET /SUM`) | `200`, body `0.2` | `200`, body `0.2` | Same | | Copy Markdown and View as Markdown | Copy as written | Keeps `![…][flow]`; `dev` copies `<img … src="__img…">` | Same | | The Open menu's AI links | Page URL | Page URL under `/api/` | – | | Search, opened with Enter | Right page | Right page under `/api/` | – | | Hot reload of an edited page | – | – | Reloads | | Console errors | None | None | None | ## Follow-ups - The search dialog still uses `useDocsSearch`, which 16.17 deprecates in favour of `useStaticSearch`. - Root-relative image paths in the Markdown copies don't carry the base path (plan, section 9). - #441 and this PR both change `package.json`, the lockfile and the plan. Whichever merges second needs a rebase. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 (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
Upgrades
fumadocs-openapifrom 12.1.1 to 12.4.1 for two fixes we reported upstream. The upgrade also brings Fumadocs' redesign of the API reference pages.redirect_uriit sends, with a copy button. It includes the portal's base pathApiMarkdownalready kept a description image from crashing the page. It stays, because Fumadocs still doesn't add the base path to the imageThis PR leaves out the image fix for the Markdown copies (#3662), which comes from
fumadocs-coreandfumadocs-mdx. Those stay at 16.15.17 and 15.4.0 here. fumadocs-openapi 12.4.1 accepts core and ui^16.15.0.The API page redesign (fumadocs-openapi 12.2 to 12.4)
<form>. The dialog is rendered in a portal, outside the page's article.'.QA: portal automation tests need updating before merge
cc @WasifIsrar @razazarif
The portal tests in
apimatic/v4-test-automationwere written against the old inline playground. Most of the auth functional tests and one visual baseline will fail against this build.portal_tests.ymlruns only on pushes todev, so this PR's checks don't show the failures. They would first appear after the merge.What changed in the markup (fumadocs-openapi 12.4.1)
Dialog, rendered in a portal outside#nd-page. Its title is the operation's title.<form>now holds only the URL bar (method, path, Send). The request sections and the response are separate panels beside it, both still inside the dialog:mdbreakpoint, a Request / Response switch shows one panel at a time.What needs updating
pages/ApiReferencePage.tsopen(), or add a step that does.playgroundto the dialog (page.getByRole("dialog")) instead ofpageContent.locator("form"). Then re-checksendButton,responseStatus,responseBody,authorizationToggle,authSchemeSelect,parameterField(),authField()andopenSection().oauthDialog,oauthSubmitButtonandauthorizeWithOAuth()for the inline OAuth panel.tests/functional/auth/auth.functional.test.ts: check each test still passes, and decide whether to assert on the new Redirect URI field. It should include the portal's base path.portal-snapshots/functional/auth/. They show the playground's layout, which has changed.portal-snapshots/visual/petstore/api-add-pet.png.gh workflow run portal_tests.yml --ref fix/portal-fumadocs-openapi-12.4. Itsplaywright-reportand the diff PNGs show what moved.The other visual tests and the artifact tests shouldn't change, because this PR only touches the API reference pages.
This PR stays a draft until the test changes are ready to merge alongside it.
Changes
fumadocs-openapi12.1.1 → 12.4.1.shiki4.4.3 → 4.5.0 andlucide-react1.47.0 → 1.54.0: the versions fumadocs-openapi 12.4 requires (^4.5.0,^1.50.0), so each has a single copy.pnpm dedupealso merged two other duplicate copies:@semantic-release/github'sundicigoes from 7.27.0 to 7.29.1. The next release run will use it.micromark-util-typesgoes from 2.0.2 to 2.0.3.request-examples.tsand its test type a parameter asOperationParameter, which Fumadocs passes.ParameterObject.nameis now optional.ApiMarkdown's doc comment and the e2e comment now say why it stays: for the base path, not the crash..ai/plans/portal-subpath-hosting.mdrecords #3661 and #3663 as fixed (5.10 and the upstream table).Release age: fumadocs-openapi 12.4.1 was published on 2026-10-09, 10 days ago. That clears the 7-day
minimumReleaseAge.Test results
Full suite with e2e builds (
APIMATIC_E2E=1 pnpm test): 1921 passing, 0 failing. ESLint clean.In the browser: I built a portal from the
subpathfixture plus an OAuth2 authorization-code scheme, served it under/api/, and drove it with headless Chrome./api/images/diagram.png. No console errorsredirect_uri: http://127.0.0.1:4719/api/oauth/callbackwith a copy button. Authorize sent the same value (redirect_uri=http%3A%2F%2F127.0.0.1%3A4719%2Fapi%2Foauth%2Fcallback)Related
#437 upgrades all four Fumadocs packages. Once this PR merges, #437 can drop
fumadocs-openapiand keep the image fix alone (core and ui 16.17, mdx 15.4.7).🤖 Generated with Claude Code