Skip to content

feat(dashboard): align system images with API config#1007

Open
zombee0 wants to merge 2 commits into
boxlite-ai:mainfrom
zombee0:feat/config-driven-system-images
Open

feat(dashboard): align system images with API config#1007
zombee0 wants to merge 2 commits into
boxlite-ai:mainfrom
zombee0:feat/config-driven-system-images

Conversation

@zombee0

@zombee0 zombee0 commented Jul 18, 2026

Copy link
Copy Markdown

Summary

Changes

How to verify

Risks / rollout

Summary by CodeRabbit

  • New Features
    • Added configurable curated system images for Base, Python, and Node via environment-driven configuration.
    • The API now returns systemImages as part of the boxlite configuration.
    • Box creation in the dashboard now uses the API-provided image references and defaults to Base.
  • Documentation
    • Added API model and Swagger documentation for SystemImagesConfig and updated BoxliteConfiguration docs.
  • Tests
    • Updated and added dashboard tests to verify the configured default image is used during box creation.

@zombee0
zombee0 requested a review from a team as a code owner July 18, 2026 05:06
@boxlite-agent

boxlite-agent Bot commented Jul 18, 2026

Copy link
Copy Markdown

📦 BoxLite review — couldn't complete

claude exited 1

stdout:
{"type":"result","subtype":"success","is_error":true,"api_error_status":403,"duration_ms":293,"duration_api_ms":0,"num_turns":1,"result":"Your organization has disabled Claude subscription access for Claude Code · Use an Anthropic API key instead, or ask your admin to enable access","stop_reason":"stop_sequence","session_id":"c5c9b01f-14b5-4906-b0ce-af5bca4010e2","total_cost_usd":0,"usage":{"input_tokens":0,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":0,"server_tool_use":{"web_search_requests":0,"web_fetch_requests":0},"service_tier":"standard","cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":0},"inference_geo":"","iterations":[],"speed":"standard"},"modelUsage":{},"permission_denials":[],"terminal_reason":"api_error","fast_mode_state":"off","uuid":"d4dbcacf-f154-4dca-8b11-4c4a4ab776c1"}

stderr:
<empty>

powered by BoxLite

@cla-assistant

cla-assistant Bot commented Jul 18, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@cla-assistant

cla-assistant Bot commented Jul 18, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

System 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.

Changes

System image configuration

Layer / File(s) Summary
API system image configuration
apps/api/src/common/constants/system-images.constant.ts, apps/api/src/box/constants/curated-images.constant.ts, apps/api/src/config/...
Default and environment-resolved base, Python, and Node images are added to API configuration and used by curated image validation.
Generated configuration client contract
apps/api-client-go/api/openapi.yaml, apps/api-client-go/model_*.go, apps/libs/api-client/src/models/..., apps/libs/api-client/src/docs/...
The OpenAPI schema and generated TypeScript and Go clients expose SystemImagesConfig through BoxliteConfiguration.
Dashboard box image selection
apps/dashboard/src/components/Box/..., apps/dashboard/src/mocks/fixtures.ts
The create-box dialog reads configured system images, defaults to the base image, renders configured choices, and tests the resulting mutation payload.

Generated client cleanup

Layer / File(s) Summary
Client header configuration
apps/libs/api-client/src/configuration.ts
The generated client no longer imports package metadata or sets a default User-Agent from its version.

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
Loading

Possibly related PRs

  • boxlite-ai/boxlite#758: Introduced the curated pinned-image restriction that this configuration-based allowlist continues.
  • boxlite-ai/boxlite#792: Related refactoring of curated image selection and supported image behavior.

Suggested reviewers: law-chain-hot

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is only the template and lacks the required Summary, Changes, and How to verify content. Fill in the template with a brief summary, notable changes, a verification step, and risks or remove unused sections.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly reflects the main change: dashboard system images now follow API configuration.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@zombee0
zombee0 force-pushed the feat/config-driven-system-images branch from ac514c2 to 06d9edb Compare July 19, 2026 08:54

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
apps/api-client-go/api/openapi.yaml (1)

5166-5166: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Provide a valid object example for systemImages.

The systemImages property 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, and rateLimit which 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

📥 Commits

Reviewing files that changed from the base of the PR and between ac514c2 and 06d9edb.

📒 Files selected for processing (18)
  • apps/api-client-go/.openapi-generator/FILES
  • apps/api-client-go/api/openapi.yaml
  • apps/api-client-go/model_boxlite_configuration.go
  • apps/api-client-go/model_system_images_config.go
  • apps/api/src/box/constants/curated-images.constant.ts
  • apps/api/src/common/constants/system-images.constant.ts
  • apps/api/src/config/configuration.ts
  • apps/api/src/config/dto/configuration.dto.ts
  • apps/dashboard/src/components/Box/CreateBoxDialog.test.tsx
  • apps/dashboard/src/components/Box/CreateBoxDialog.tsx
  • apps/dashboard/src/mocks/fixtures.ts
  • apps/libs/api-client/src/.openapi-generator/FILES
  • apps/libs/api-client/src/configuration.ts
  • apps/libs/api-client/src/docs/BoxliteConfiguration.md
  • apps/libs/api-client/src/docs/SystemImagesConfig.md
  • apps/libs/api-client/src/models/boxlite-configuration.ts
  • apps/libs/api-client/src/models/index.ts
  • apps/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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant