Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
357 changes: 357 additions & 0 deletions .ai/plans/cross-drive-portal-projects.md

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions .ai/plans/fumadocs-portal.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ Tailwind 4 is mandatory for Fumadocs UI.
directory and `path.relative` cannot express one across drives, so the content
pages silently vanished (found on GitHub's Windows runners: workspace on D:,
temp on C:; reproduced locally with `subst`).
Superseded 2026-10-16: the fallback is gone, and every project is built in the system temp
directory (`cross-drive-portal-projects.md`).
3. Copy `portal-template/` into it.
4. Create a real `tempDir/node_modules/` directory and add one junction
(Windows) or symlink (elsewhere) per template dependency, each resolved to
Expand Down Expand Up @@ -418,6 +420,9 @@ the new-layout branch in the sample repository.
fix belongs upstream: emit an absolute path (or `/@fs/`) when `path.relative`
returns one. File an issue with fumadocs-mdx; remove the fallback once a fixed
version is pinned.
Resolved 2026-10-16 another way: the content has been copied into the project since #375, and
the template's `static-images` plugin handles the one import still left across drives, a static
image's (`cross-drive-portal-projects.md`).
- **Sidebar tree dominates at scale.** Whole-spec prerenders measured 2026-09-17:
Stripe (594 operations) 2.2 GB in 375 s, GitHub (1,511 pages) 2.4 GB in 229 s.
A GitHub page is 1,971 KB: 1,453 KB of inlined router state (almost all the
Expand Down
4 changes: 4 additions & 0 deletions .ai/plans/generated-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,9 @@ scans `generated/` as it scans `src/`, which step 1 confirmed in a plain
directory and in one whose `.gitignore` is `*`, as the cross-drive
`.apimatic-build/` fallback's is (section 16). `app.css` names the content
directory with `@source` only because that directory lies outside the project.
Corrected 2026-10-16: the `*` case was measured from outside the project. With Vite's working
directory inside it, Oxide scans nothing under that rule outside a git repository, and everything,
`node_modules` included, inside one (apimatic-io#2301, `cross-drive-portal-projects.md` section 2).

### Adding and removing pages under `portal serve`

Expand Down Expand Up @@ -881,6 +884,7 @@ the observations are in section 9. What they changed in the plan:
`.apimatic-build/` fallback is, so the template gains no line in `app.css`.
The end-to-end build on the cross-drive CI runner is where the fallback
itself is exercised.
Corrected 2026-10-16: see the correction under "Tailwind" above; the fallback itself is gone.
3. **The rest held as planned.** The relative `dir` literal publishes only the
word `generated`, no path of the build machine reaches the output, the
`.md` twins carry the page bodies through the collection split, a generated
Expand Down
32 changes: 16 additions & 16 deletions .ai/plans/portal-subpath-hosting.md
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ follow-up.
`publicDir`, an SDK page's root-relative image would fail the build once imported (measured).
- `src/types/portal/page.ts` checks those images before a build too. A missing one is then
reported by the CLI, not by a failed build. A contract test holds the two to the same images.
- Like every imported image, it now reads `<img src="__imgN" />` in the Markdown copies (section 9).
- The Markdown copies keep the reference as written, since fumadocs-core 16.17 (section 9).

### 5.11 The query on load (`lib/search-options.ts`, added 2026-10-07)

Expand Down Expand Up @@ -741,8 +741,6 @@ after each one. In all, roughly 400 lines of source and 500 of tests.
- It names `robots.txt` (and `sitemap.xml`) even where none is generated: without
`site.url`, and now under a path. `GENERATED_ROOT_FILES` lists them unconditionally.
- Pre-existing, so not fixed here.
- a ticket for the `<img src="__img0">` placeholders in the Markdown copies (section 9),
found while checking the links there;
- the optional TanStack reaction or comment of section 10, if the user wants one. The
Fumadocs issue was filed by the user as fuma-nama/fumadocs#3620 and fixed in fumadocs-ui
16.15.17 (section 10).
Expand Down Expand Up @@ -809,20 +807,22 @@ after each one. In all, roughly 400 lines of source and 500 of tests.
Markdown internals.
- The cost is that content hard-codes the portal's address.
- **Alternative: rewrite the copies' links.**
- Fumadocs' `remarkLLMs` takes mdast-to-markdown `handlers` through a collection's
`includeProcessedMarkdown` options. Handlers for `link`, `image` and `definition` would
prefix root-relative URLs in the copy alone.
- Open: how the handlers learn the base, given that `source.ts` goes through
- Since fumadocs-core 16.17, `remarkLLMs` slices the copy from the authored source and takes
no `handlers` or `stringify` (16.15.17 took both). A plugin changes the copy with
`replaceSource()` from `fumadocs-core/mdx-plugins/stringifier`.
- A remark plugin that calls `replaceSource()` on root-relative `link`, `image` and
`definition` nodes would prefix their URLs in the copy alone.
- Open: how the plugin learns the base, given that `source.ts` goes through
`fumadocs-mdx/macro`.

**Images in the Markdown copies are broken on every portal** (measured 2026-09-30, root and
path alike). `remarkImage` swaps the image for an import, and the copy and `llms-full.txt` carry
`<img alt="…" src="__img0" />`, which leads nowhere. This predates the path: `useImport` is the
default. It gets a ticket of its own. Since 5.10, reference-style images read the same way.
- It is Fumadocs' bug, filed as fuma-nama/fumadocs#3662 (section 10).
- A workaround is possible: plugins on either side of `remarkImage`, plus the `stringify` hook
that `includeProcessedMarkdown` passes on. It is held back, because it would rest on
`remarkImage`'s internal `__img${n}` names.
**Root-relative images stay unprefixed in the Markdown copies**, as links do.
- An image written `/images/diagram.png` is under the base in the page's HTML, but keeps its
spelling in the `.md` copy and in `llms-full.txt`, inline and by reference alike.
- The `replaceSource()` plugin of the alternative above would prefix them along with the links.
- Until fumadocs-core 16.17, the copies carried `<img alt="…" src="__img0" />` instead, on every
portal (measured 2026-09-30, root and path alike). That was Fumadocs' bug, fuma-nama/fumadocs#3662,
fixed by the upgrade of 2026-10-16 (section 10). The subpath e2e checks that the copies keep the
images as written.

**API reference pages' Markdown copies keep the spec's own text:** its description and the YAML.
A root-relative link inside a spec description is prefixed in the page's HTML, which renders it
Expand All @@ -837,7 +837,7 @@ with the MDX components, but not in its copy.
| TanStack/router#4888, docs PR #7882 | Docs only | None |
| TanStack/router#8448, PR #8450 | Both open (checked 2026-10-07); the PR has no review yet. The issue reports a second loader run; we saw the address rewritten too | When it ships, `searchOptions` can go (5.11) |
| fuma-nama/fumadocs#3661 | Filed 2026-10-07: an image in an operation's description crashes the page | When it ships with the base, `ApiMarkdown` can go (5.10) |
| fuma-nama/fumadocs#3662 | Filed 2026-10-07: processed Markdown prints images as `__img0` | When it ships, ticket 5 is fixed by the upgrade (section 9) |
| fuma-nama/fumadocs#3662 | Fixed 2026-10-09 in fumadocs-core 16.17.0 and fumadocs-mdx 15.4.7, installed since 2026-10-16 (core 16.17.1): the processed Markdown is sliced from the authored source, so images keep their addresses | The upgrade fixes it, so it needs no ticket; root-relative images stay unprefixed (section 9). The subpath e2e checks the copies |

**The fixes:**
- **Fumadocs:** filed by the user as fuma-nama/fumadocs#3620, from a draft made here, and fixed
Expand Down
2 changes: 1 addition & 1 deletion .ai/skills/value-object.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ These patterns exist in the current codebase and are flagged for awareness:
|---|---|
| Ideal simple wrapper — private field, `static create()`, `toString()` only | `src/types/file/urlPath.ts` |
| `static createInput()` fallback, rich join/equality methods | `src/types/file/directoryPath.ts` |
| Rich predicate (`isMarkDown`) and transform (`normalize`) returning rich type | `src/types/file/fileName.ts` |
| Rich predicate (`hasExtension`) and transform (`normalize`) returning rich type | `src/types/file/fileName.ts` |
| Composed value object — holds two rich types, `static create()` splits at boundary | `src/types/file/filePath.ts` |
| Correct boundary unwrapping — all `.toString()` calls at `fs.*` / `path.*` sites | `src/infrastructure/file-service.ts` |
| Context with flagged public getter (display use) | `src/types/sdk-context.ts` |
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,8 @@ DESCRIPTION
Preview your API Documentation Portal with live reload.

Serves the portal described by 'src/apimatic.json' from your machine, reloading the browser as you edit the Markdown
pages in 'src/content', reorder them in a 'nav.json', or change the 'portal', 'languages' or 'plugin' block of
'apimatic.json'.
pages in 'src/content', reorder them in a 'nav.json', edit the documents in 'src/spec', or change the 'portal',
'languages' or 'plugin' block of 'apimatic.json'.

Adding a language or a 'plugin' block, adding or removing a page in 'src/content', creating 'src/static', changing
which documents are in 'src/spec' or which folders its 'APIMATIC-META.json' merges, or changing the path in
Expand Down
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,13 @@
"fast-levenshtein": "^3.0.0",
"form-data": "^4.0.2",
"fs-extra": "^11.3.0",
"fumadocs-core": "16.15.17",
"fumadocs-mdx": "15.4.0",
"fumadocs-core": "16.17.1",
"fumadocs-mdx": "15.4.7",
"fumadocs-openapi": "12.1.1",
"fumadocs-ui": "16.15.17",
"fumadocs-ui": "16.17.1",
"get-port": "^7.1.0",
"is-in-ci": "^2.0.0",
"isomorphic-git": "^1.37.2",
"lucide-react": "1.47.0",
"lucide-react": "1.54.0",
"mustache": "^4.2.0",
"neverthrow": "^8.2.0",
"open": "^8.4.0",
Expand All @@ -96,7 +95,7 @@
"remark": "15.0.1",
"remark-mdx": "3.1.1",
"semver": "^7.8.0",
"shiki": "4.4.3",
"shiki": "4.5.0",
"striptags": "^3.2.0",
"tailwindcss": "4.3.3",
"tmp-promise": "^3.0.3",
Expand Down
Loading
Loading