chore(apps): regenerate API clients against merged API surface (#715 follow-up)#726
Merged
Merged
Conversation
…values) The Sandbox→Box rename collapsed the legacy route paths into exact duplicates of the canonical ones, making the LEGACY_* registrations unreachable and tripping @typescript-eslint/no-duplicate-enum-values — 4 pre-existing eslint errors at HEAD that fail the prek pre-commit hook (make lint:fix) for every commit. Remove the dead routes, enum members, and the orphaned LegacyBoxRedirect component. No behavior change.
… surface Pure openapi-generator 7.23.0 output, zero hand edits — regenerated via the api-client-drift recipe (NestJS spec boot, pinned generator, postprocess). analytics-api-client and toolbox-api-client regenerated to zero diff. #715 deliberately reset the generated clients to main's pre-merge side ('Generated clients now carry ZERO diff in this PR — regenerate upstream against the merged API surface'), leaving the API client drift check red on every apps/** PR since. This is that follow-up regen. Surface delta (mirrors the A2 + MVP API changes): - removed: snapshots/docker-registry/build/backup/archive-lifecycle/quota/ usage-overview endpoints and models; BoxState build states; write:snapshots + delete:snapshots permission values; listBoxesPaginated 'snapshots' filter param - added: SystemRole, UpdateOrganizationName (+ PATCH /organizations/{organizationId}/name), admin overview/observability models Consumers (apps/cli, apps/dashboard, apps/libs/sdk-typescript) still reference removed APIs; their adaptation is split into a follow-up PR.
DorianZheng
added a commit
that referenced
this pull request
Jun 10, 2026
…API clients (#727) ## What The consumer-adaptation follow-up that #726 disclosed: makes `apps/cli`, `apps/dashboard`, and `apps/libs/sdk-typescript` compile against the regenerated API clients by removing code whose server-side API was deleted in the A2+MVP merge (#715). 52 files, +115/−3063 — almost entirely deletions. ## cli - Deletes the Dockerfile-build flow: `--dockerfile`/`-f` and `--context`/`-c` flags on `boxlite create`, `CreateBuildInfo` construction (`cmd/common/build.go` with its Dockerfile parsing + MinIO context upload), build-log streaming (`cmd/common/logs.go`, hit the removed `/build-logs` endpoint), the MCP `create_box` `buildInfo` argument, and `pkg/minio` (its only consumer was the build flow; `go mod tidy` drops the dependency). - Drops `BOXSTATE_BUILD_FAILED` / `BOXSTATE_PENDING_BUILD` handling (states removed from the enum). - Regenerates cobra docs via `hack/generate-cli-docs.sh` — also clears stale `boxlite snapshot` docs left from the super PR. ## dashboard - Deletes the **Registries** page, `RegistryTable`, the 4 registry hooks, its route enum + hidden-routes entry, and `apiClient.ts` wiring (`DockerRegistryApi` was removed). The page was already in `HIDDEN_DASHBOARD_ROUTES`. - Removes the **usage-overview** wiring (`getOrganizationUsageOverview` removed with no successor): the `UsageOverview`/`UsageOverviewIndicator`/`LimitUsageChart` components, the quota-driven usage timeline chart (its "percent of quota" mode is built on the deleted `RegionUsageOverview` quotas throughout), the hook + query keys + `LiveIndicator` they orphaned. **Spending and Limits keep their billing/tier features** (wallet, cost breakdown, tier comparison, rate limits). - Drops the orphaned `templates` box filter (the `snapshots` query param left `listBoxesPaginated`; nothing set the filter). ## sdk-typescript - `Box`: drops `template`/`backupState`/`backupCreatedAt`/`buildInfo` — fields no longer on the wire model. - `BoxLite.create()`: the wire `CreateBox` accepts neither `buildInfo` nor `templateId` anymore, so `create()` now **throws a clear `BoxliteError`** when `image` or `templateId` params are provided instead of silently dropping them. The `CreateBoxFromImageParams` type, overload, and `Image` class stay exported (marked `@deprecated`) because the dashboard Playground imports them — its image flow now gets an honest runtime error (it was already broken server-side); the full Playground rework belongs to the MVP track (`PlaygroundProvider.tsx` already carries `TODO(image-rewrite)` markers). - Deletes the dead `processStreamingResponse` helper (`stdDemuxStream` stays — `Process.ts` uses it). - **Adds guard tests** (`__tests__/BoxLite.create-guards.test.ts`) for the two new throws, wiring the dormant jest harness to `tsconfig.spec.json` + the workspace path aliases so it actually runs (`yarn jest --config libs/sdk-typescript/jest.config.js`, 2/2 pass). The asserted messages are produced only by the guards — without them the call rejects with a network `AxiosError`. ## Verification - `go build ./...` + `gofmt` clean in `apps/cli`; `go mod tidy` applied. - sdk `tsconfig.lib` **and** `tsconfig.spec` typecheck clean; jest guard tests 2/2. - dashboard `tsc`: **216 errors vs the 232-error pre-merge baseline, zero new** (position-normalized diff; the dashboard has never been tsc-clean — #719 tracks that). - `make lint:fix` exits 0 modifying nothing. - Grep sweeps: zero remaining references to any removed client symbol outside the generated dirs. ## Out of scope (pre-existing) `apps/runner` fails to compile on main (`boxlite.WithPort` undefined in `pkg/boxlite`) — fails identically at clean HEAD, unrelated to the regen.
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.
What
Regenerates the committed API clients against the post-#715 (merged A2 + MVP) API surface — the follow-up that #715's merge commit explicitly deferred:
Since that merge, the API client drift check fails on every PR touching
apps/**(e.g. #725's run 8 minutes after the merge). This PR turns it green again.Content
Commit 2 — the regen (
apps/libs/api-client,apps/api-client-go, 231 files). Pureopenapi-generator7.23.0 output, zero hand edits, produced with the exactapi-client-drift.ymlrecipe (pinned generator viaopenapitools.json, NestJS spec boot with local Redis, GNU sed for the postprocess script).analytics-api-clientandtoolbox-api-clientregenerated to zero diff (already current since #721/#723).Surface delta (mirrors the A2 + MVP API changes):
BoxStatebuild states (pending_build,build_failed, …);write:snapshots+delete:snapshotspermission values;listBoxesPaginated'ssnapshotsfilter paramSystemRole,UpdateOrganizationName(+PATCH /organizations/{organizationId}/name), admin overview/observability modelsCommit 1 — prek lint unblock (34 deleted lines, dashboard). The Sandbox→Box rename left
LEGACY_*route enum members byte-identical to the canonical ones — 4 pre-existing@typescript-eslint/no-duplicate-enum-valueserrors at HEAD that fail the repo's prek pre-commit hook (make lint:fix) for every local commit. The legacy routes are unreachable (identical paths, canonical registrations precede them), so this deletes them plus the orphanedLegacyBoxRedirect. No behavior change. Included here because nothing can be committed locally until it lands.Verification
go build ./...passes inapps/api-client-go(standalone),apps/common-go,apps/otel-collector/exporter.Known follow-up (intentionally split)
Per review preference, this PR is generated code only. Three consumers still reference removed APIs and will not compile against the new clients until the prepared follow-up PR lands (branched on top of this one):
apps/cli— Dockerfile-build flow (CreateBuildInfo,BOXSTATE_BUILD_FAILED/PENDING_BUILD,--dockerfile/--context, MCPbuildInfoarg,pkg/minio)apps/dashboard— Registries page + registry hooks, usage-overview wiring in Spending/Limits,templatesfilter argapps/libs/sdk-typescript—Box.buildInfo/backupState/backupCreatedAt,getBuildLogsUrlNo CI workflow compiles these consumers on PR today (the drift check is the only
apps/**gate), so this PR is green-mergeable; the follow-up restores local builds. Noteapps/runnerhas a pre-existing unrelated compile failure on main (boxlite.WithPortundefined inpkg/boxlite) — out of scope here.