chore(apps): adapt cli, dashboard, sdk-typescript to the regenerated API clients#727
Conversation
…API clients #726 regenerated the clients against the merged A2+MVP API surface; this adapts the three consumers that still referenced removed APIs (the follow-up disclosed in that PR). cli: drop the Dockerfile-build flow (--dockerfile/--context flags, BuildInfo construction, build-log streaming, MCP buildInfo arg, unused pkg/minio + its go.mod dependency) and the removed BUILD_FAILED/PENDING_BUILD states; regenerate cobra docs (also clears stale snapshot-command docs). dashboard: delete the Registries page + registry hooks/route (DockerRegistry API removed) and the usage-overview wiring in Spending/Limits (endpoint removed, no successor; pages keep billing/tier features) including the quota-driven usage timeline chart and the hooks, query keys, and LiveIndicator it orphaned; drop the orphaned 'templates' filter arg. sdk-typescript: drop Box fields removed from the wire model (template/backupState/backupCreatedAt/buildInfo); createBox no longer accepts buildInfo/templateId, so create() throws a clear BoxliteError when image/templateId params are provided instead of silently ignoring them — types stay exported (@deprecated) so the dashboard Playground keeps compiling; delete the dead processStreamingResponse helper; add guard tests (wiring the dormant jest harness to tsconfig.spec.json and the workspace path aliases to make it runnable). Verified: cli go build + gofmt; sdk tsconfig.lib + tsconfig.spec typecheck clean; jest guard tests 2/2; dashboard tsc 216 errors vs 232 pre-merge baseline with zero new (dashboard was not tsc-clean before); make lint:fix clean.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (51)
📝 WalkthroughWalkthroughThis PR removes template-based and image-based box creation, build context uploads, Docker registry management, and usage analytics components across the CLI, SDK, and dashboard. The changes simplify box creation to a runtime-only flow while removing preview/build functionality. ChangesBuild, Template, and Image Creation Removal
Dashboard Docker Registry Removal
Dashboard Usage Timeline and Overview Removal
Dashboard Minor Updates
🎯 4 (Complex) | ⏱️ ~45 minutes
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
What
The consumer-adaptation follow-up that #726 disclosed: makes
apps/cli,apps/dashboard, andapps/libs/sdk-typescriptcompile 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
--dockerfile/-fand--context/-cflags onboxlite create,CreateBuildInfoconstruction (cmd/common/build.gowith its Dockerfile parsing + MinIO context upload), build-log streaming (cmd/common/logs.go, hit the removed/build-logsendpoint), the MCPcreate_boxbuildInfoargument, andpkg/minio(its only consumer was the build flow;go mod tidydrops the dependency).BOXSTATE_BUILD_FAILED/BOXSTATE_PENDING_BUILDhandling (states removed from the enum).hack/generate-cli-docs.sh— also clears staleboxlite snapshotdocs left from the super PR.dashboard
RegistryTable, the 4 registry hooks, its route enum + hidden-routes entry, andapiClient.tswiring (DockerRegistryApiwas removed). The page was already inHIDDEN_DASHBOARD_ROUTES.getOrganizationUsageOverviewremoved with no successor): theUsageOverview/UsageOverviewIndicator/LimitUsageChartcomponents, the quota-driven usage timeline chart (its "percent of quota" mode is built on the deletedRegionUsageOverviewquotas throughout), the hook + query keys +LiveIndicatorthey orphaned. Spending and Limits keep their billing/tier features (wallet, cost breakdown, tier comparison, rate limits).templatesbox filter (thesnapshotsquery param leftlistBoxesPaginated; nothing set the filter).sdk-typescript
Box: dropstemplate/backupState/backupCreatedAt/buildInfo— fields no longer on the wire model.BoxLite.create(): the wireCreateBoxaccepts neitherbuildInfonortemplateIdanymore, socreate()now throws a clearBoxliteErrorwhenimageortemplateIdparams are provided instead of silently dropping them. TheCreateBoxFromImageParamstype, overload, andImageclass 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.tsxalready carriesTODO(image-rewrite)markers).processStreamingResponsehelper (stdDemuxStreamstays —Process.tsuses it).__tests__/BoxLite.create-guards.test.ts) for the two new throws, wiring the dormant jest harness totsconfig.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 networkAxiosError.Verification
go build ./...+gofmtclean inapps/cli;go mod tidyapplied.tsconfig.libandtsconfig.spectypecheck clean; jest guard tests 2/2.tsc: 216 errors vs the 232-error pre-merge baseline, zero new (position-normalized diff; the dashboard has never been tsc-clean — fix(api): prod webpack build clears 163 latent errors + structural blockers #719 tracks that).make lint:fixexits 0 modifying nothing.Out of scope (pre-existing)
apps/runnerfails to compile on main (boxlite.WithPortundefined inpkg/boxlite) — fails identically at clean HEAD, unrelated to the regen.Summary by CodeRabbit
Release Notes
Removed Features
Improvements