Repository navigation
refactor: remove dead code and the isomorphic-git dependency - #427
Merged
Merged
Conversation
…t setup Nothing writes APIMATIC-BUILD.json back to disk since the portal moved to apimatic.json, so toJSON, the pass-through index signature and the from() factory went unused. The plugin generate tests no longer create the file, which plugin generation has not needed since #333. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
GitService was left behind when sdk save-changes was retired (#359), along with Directory.createFromRelativePaths, which only it called. Also removes unused methods on FileService, LauncherService, ActionResult, ServiceError, FileName, UrlPath and the SDK publish prompts. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
mehnoorsiddiqui
requested review from
Shield-Jaguar and
saeedjamshaid
as code owners
October 6, 2026 11:58
sohail2721
approved these changes
Oct 12, 2026
saeedjamshaid
left a comment
Collaborator
There was a problem hiding this comment.
The description says versioned builds wait on a decision, but 2.0 dropped versioned projects; could it say so, leaving their removal to its own PR?
Optional, outside this PR's files: CodegenOption.codeGenerationVersion() (src/types/sdk/generate.ts:67) has no callers either.
…nst a spec - Remove `ActionResult.getValueOr` (back after the dev merge), `FileService.copyDirectoryExcluding`, `Directory.mapFilesInDirectory` and `Directory.isEmpty` (only `mapFilesInDirectory` called it), and `CodegenOption.codeGenerationVersion`; none has a caller. - The plugin upload test seeds a spec under `src/` and checks it goes up beside `apimatic.json`, so a test still shows the whole of `src/` is sent. - Drop the "generates without an APIMATIC-BUILD.json" test: every test now runs without the build file. - The value-object skill names `hasExtension` as `FileName`'s predicate. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Contributor
Author
|
@saeedjamshaid Thanks. The description now says 2.0 dropped versioned projects and leaves removing the |
saeedjamshaid
approved these changes
Oct 19, 2026
saeedjamshaid
added a commit
that referenced
this pull request
Oct 20, 2026
…ec-errors Brings in #439 (Fumadocs components on content pages), #427 (dead code and isomorphic-git removed) and #440 (a portal built from another drive keeps its styling). - src/actions/action-result.ts: dev's version, without the methods #427 removed, formatted as the commit hook formats it. - test/e2e/portal-serve.test.ts: #440 removed the helpers that put a project on the fixture's drive, so each project is now built in the temp directory, as #440 does. The main preview serves the checkout's fixture, as #440's test does, which keeps a CI runner's cross-drive case. The tests that edit the specification each preview a copy of the fixture reached through a link. #440's static image test runs against both, and a test of a static file asked for by its real path through the link keeps the allow-list fix of this branch covered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.



Removes code that nothing in the CLI calls, mostly left behind when
sdk save-changeswas retired (#359) and when the portal stopped readingAPIMATIC-BUILD.json. Nothing behaves differently.Review it commit by commit.
1.
BuildConfigand the plugin generate testsBuildConfig.toJSON(), the[key: string]: unknownindex signature andBuildConfig.from()existed so the build file could be written back to disk. The code that wrote it was removed in feat(portal): build the documentation portal locally with Fumadocs #343.APIMATIC-BUILD.json, which plugin generation has not needed since fix: stop requiring APIMATIC-BUILD.json for plugin generate #333. The upload test no longer checks that the file was uploaded.2. Unused code and
isomorphic-gitsrc/infrastructure/git-service.ts: the whole file. Nothing has imported it sincesdk save-changeswas retired.Directory.createFromRelativePathsgoes with it, because only this file called it.isomorphic-git: onlygit-service.tsused it. The lockfile loses it and the 22 packages only it depended on.src/ortest/:FileService:fileExistsSync,pollDeleteDirectory,copyToDirLauncherService:isIdeAvailable,openFolderInIdeWithWait,openInEditor,openFileActionResult:matchServiceError:invalidResponse(),valuesSdkPublishInteractivePrompts:sdkDirectoryCannotBeSameAsSourceDirectoryFileName.isMarkDown,UrlPath.isLocalhostKnip found the candidates, and each one was checked with grep, because knip also flagged methods that are called.
3. What review found
ActionResult.getValueOr(it came back with the merge fromdev)FileService.copyDirectoryExcludingDirectory.mapFilesInDirectory, andDirectory.isEmpty, which only it calledCodegenOption.codeGenerationVersionsrc/and checks it goes up besideapimatic.json, so a test still shows the whole ofsrc/is sent..ai/skills/value-object.mdnameshasExtensioninstead ofisMarkDownasFileName's predicate.Left for later PRs:
package.json:async-mutex,@oclif/test,simple-git,nyc,eslint-plugin-import,eslint-config-prettier, and the@typespackages forbase-64,treeify,unzipperandprettier.prettieralso belongs in devDependencies.PluginConfig.hasNoSourceRepository,ServiceError.getError,PortalArtifacts.none().sdk generatestill readsgenerateVersionedPortalfromAPIMATIC-BUILD.jsonto tell whether the SDK is versioned. 2.0 dropped versioned projects, so that check can go, in its own PR.Tests: 1780 passing, 63 pending (after the merge from
dev).tsc --noUnusedLocalsfinds no unused imports left behind.🤖 Generated with Claude Code