feat(dashboard): align system images with API config#1007
Conversation
📦 BoxLite review — couldn't completepowered by BoxLite |
|
|
📝 WalkthroughWalkthroughSystem image references are centralized in API configuration, exposed through TypeScript and Go client contracts, and consumed by the dashboard’s box creation dialog instead of hardcoded image values. The generated TypeScript client also removes its package-derived default User-Agent header. ChangesSystem image configuration
Generated client cleanup
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Environment
participant API
participant ApiClient
participant CreateBoxDialog
Environment->>API: configure base, python, and node image refs
API->>ApiClient: expose systemImages in configuration
ApiClient->>CreateBoxDialog: provide system image refs
CreateBoxDialog->>API: create box with selected image ref
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ac514c2 to
06d9edb
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
apps/api-client-go/api/openapi.yaml (1)
5166-5166: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueProvide a valid object example for
systemImages.The
systemImagesproperty is defined as an object schema, but its example is an empty string (""). Strict OpenAPI validators and some generator targets may fail or emit warnings when example types do not match the expected schema.Consider updating it to a valid object representation (and optionally doing the same for
posthog,oidc, andrateLimitwhich share this pattern).♻️ Proposed fix
- systemImages: "" + systemImages: + base: "ghcr.io/boxlite-ai/boxlite-agent-base:20260605-p0-r3" + python: "ghcr.io/boxlite-ai/boxlite-agent-python:20260605-p0-r3" + node: "ghcr.io/boxlite-ai/boxlite-agent-node:20260605-p0-r3"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/api-client-go/api/openapi.yaml` at line 5166, Update the systemImages example in the OpenAPI schema to use an object value matching its declared object type instead of an empty string. Also update the examples for posthog, oidc, and rateLimit if they use the same invalid pattern, preserving their existing schemas.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@apps/api-client-go/api/openapi.yaml`:
- Line 5166: Update the systemImages example in the OpenAPI schema to use an
object value matching its declared object type instead of an empty string. Also
update the examples for posthog, oidc, and rateLimit if they use the same
invalid pattern, preserving their existing schemas.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 20249a05-977b-41b6-9301-603587331e91
📒 Files selected for processing (18)
apps/api-client-go/.openapi-generator/FILESapps/api-client-go/api/openapi.yamlapps/api-client-go/model_boxlite_configuration.goapps/api-client-go/model_system_images_config.goapps/api/src/box/constants/curated-images.constant.tsapps/api/src/common/constants/system-images.constant.tsapps/api/src/config/configuration.tsapps/api/src/config/dto/configuration.dto.tsapps/dashboard/src/components/Box/CreateBoxDialog.test.tsxapps/dashboard/src/components/Box/CreateBoxDialog.tsxapps/dashboard/src/mocks/fixtures.tsapps/libs/api-client/src/.openapi-generator/FILESapps/libs/api-client/src/configuration.tsapps/libs/api-client/src/docs/BoxliteConfiguration.mdapps/libs/api-client/src/docs/SystemImagesConfig.mdapps/libs/api-client/src/models/boxlite-configuration.tsapps/libs/api-client/src/models/index.tsapps/libs/api-client/src/models/system-images-config.ts
💤 Files with no reviewable changes (1)
- apps/libs/api-client/src/configuration.ts
🚧 Files skipped from review as they are similar to previous changes (12)
- apps/libs/api-client/src/docs/SystemImagesConfig.md
- apps/libs/api-client/src/models/index.ts
- apps/libs/api-client/src/.openapi-generator/FILES
- apps/api/src/common/constants/system-images.constant.ts
- apps/api/src/config/configuration.ts
- apps/libs/api-client/src/models/system-images-config.ts
- apps/dashboard/src/mocks/fixtures.ts
- apps/libs/api-client/src/docs/BoxliteConfiguration.md
- apps/dashboard/src/components/Box/CreateBoxDialog.test.tsx
- apps/api/src/config/dto/configuration.dto.ts
- apps/dashboard/src/components/Box/CreateBoxDialog.tsx
- apps/libs/api-client/src/models/boxlite-configuration.ts
Summary
Changes
How to verify
Risks / rollout
Summary by CodeRabbit
systemImagesas part of the boxlite configuration.SystemImagesConfigand updatedBoxliteConfigurationdocs.