Skip to content

feat(dashboard): expose remaining vision sidecar controls - #1561

Merged
Wibias merged 4 commits into
lidge-jun:devfrom
LeoWang331:feat/1201-vision-sidecar-controls
Aug 13, 2026
Merged

feat(dashboard): expose remaining vision sidecar controls#1561
Wibias merged 4 commits into
lidge-jun:devfrom
LeoWang331:feat/1201-vision-sidecar-controls

Conversation

@LeoWang331

@LeoWang331 LeoWang331 commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Dashboard and GET/PUT /api/sidecar-settings now expose the remaining Vision sidecar controls from #1201: enabled, maxDescriptionsPerTurn, and timeoutMs, alongside the existing model, backend, and reasoning fields.

  • GET returns the full public Vision object (defaults applied for omitted config).
  • PUT is partial: omitted fields stay as they are. enabled must be a boolean; maxDescriptionsPerTurn must be a positive integer; timeoutMs uses the single runtime contract in src/vision/timeout-bounds.ts (1 to 2147483647). Invalid input returns { error } with HTTP 400.
  • The Dashboard imports those timeout bounds (it does not restate them as a second literal set) and aliases them in gui/src/pages/dashboard-shared.ts. VISION_MAX_DESCRIPTIONS_DEFAULT still mirrors the runtime default and is pinned by the same contract test. tests/vision-sidecar-timeout-bounds.test.ts pins both.
  • The Vision card adds an enable switch, a per-turn description cap, and a timeout (ms) stepper. Disable/re-enable keeps model, backend, reasoning, timeout, and limit. Unrelated saves (web-search, model, reasoning) send only the edited field.
  • Copy is in every GUI locale. User docs cover the three controls.

Layout follow-up: a real Dashboard at 1440 / 1280 / 768 / 420 showed the extra number fields collapsing the title into a one-glyph column. The card now wraps to a stacked copy-then-controls layout instead of shrinking the hint.

Closes #1201

1440:

Vision sidecar at 1440

Verification

Targeted management API (pass, ~3.6s):

  • bun test tests/sidecar-settings-vision-controls.test.ts tests/vision-sidecar-timeout-bounds.test.ts tests/vision-anthropic.test.ts tests/vision-cache.test.ts -- 32 pass

GUI (pass):

  • cd gui && bun test tests/vision-sidecar-controls.test.ts tests/vision-sidecar-dashboard.test.tsx -- 8 pass (model/reasoning coverage clicks the real Select controls; hydration uses non-default 12 / 30000)
  • cd gui && bun test tests -- 781 pass, 0 fail, ~59s (run on the layout commit d1941dadb; not re-run after the CodeRabbit follow-up)
  • cd gui && bun run lint -- pass
  • cd gui && bun run lint:i18n -- pass
  • cd gui && bun run build -- pass

Repo:

  • bun run typecheck -- pass
  • bun run privacy:scan -- pass
  • git diff --check -- pass (no whitespace errors)

Docs:

  • cd docs-site && bun install --frozen-lockfile -- pass
  • cd docs-site && bun run build -- pass (265 pages)

bun run test (full suite, one earlier attempt): did not pass. Exit code 3 after ~1028s. About 169 (fail) lines, then Bun 1.3.14 crashed during tests/codex-native-residue.test.ts. Not re-run. The local-CI checklist box stays unchecked.

CodeRabbit (ASSERTIVE) posted 4 comments on d1941dadb. Three were applied (Russian agreement, hydration fixture using non-default values, vision.reasoning on the management-API doc). The fourth asked the Dashboard to import DEFAULT_MAX_DESCRIPTIONS_PER_TURN from src/vision/index.ts; that would pull the vision runtime into the GUI bundle, so the GUI still mirrors 8 and the existing contract test now pins it to the runtime export.

Fork CI (Cross-platform CI, React Doctor) is action_required until a maintainer approves the workflows. This PR stays Draft.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

Review readiness checklist

This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:

  • All CI tests are green on my local testing.

  • I pushed my PR to the latest dev commit.

  • I resolved all correct Codex and CodeRabbit findings.

  • My PR is ready for review.

Summary by CodeRabbit

  • New Features

    • Added Dashboard controls to enable or disable the Vision sidecar.
    • Added advanced settings for per-turn description limits and request timeouts.
    • Settings remain preserved when the sidecar is disabled.
    • Added validation for timeout values from 1 to 2,147,483,647 milliseconds.
    • Added localized labels, guidance, and validation messages across supported languages.
  • Documentation

    • Updated Dashboard, API, configuration, and localized documentation to describe the new controls and partial updates.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: c349c3d0-0a8f-4e97-9a27-a4a05b3a87f3

📥 Commits

Reviewing files that changed from the base of the PR and between d1941da and 53bd0d2.

📒 Files selected for processing (16)
  • docs-site/src/content/docs/ru/guides/sidecars.md
  • gui/src/i18n/de.ts
  • gui/src/i18n/en.ts
  • gui/src/i18n/ja.ts
  • gui/src/i18n/ko.ts
  • gui/src/i18n/ru.ts
  • gui/src/i18n/tr.ts
  • gui/src/i18n/zh-TW.ts
  • gui/src/i18n/zh.ts
  • gui/src/pages/dashboard-overview-sections.tsx
  • gui/src/pages/dashboard-shared.ts
  • gui/src/styles-dashboard-workspace.css
  • gui/tests/vision-sidecar-dashboard.test.tsx
  • src/vision/index.ts
  • structure/05_gui-and-management-api.md
  • tests/vision-sidecar-timeout-bounds.test.ts

📝 Walkthrough

Walkthrough

The PR adds Dashboard controls for Vision sidecar enablement, description limits, and request timeouts. It extends management API serialization, validation, and persistence, centralizes runtime timeout bounds, adds GUI and API tests, and updates localized documentation.

Changes

Vision sidecar controls

Layer / File(s) Summary
Runtime bounds and management API
src/vision/..., src/server/management/config-routes.ts, tests/sidecar-settings-vision-controls.test.ts, tests/vision-*.test.ts, structure/05_gui-and-management-api.md
Adds shared timeout bounds, runtime timeout resolution, API fields, validation, persistence, resolved responses, and regression coverage.
Dashboard controls and shared state
gui/src/pages/dashboard-shared.ts, gui/src/pages/dashboard-overview-sections.tsx, gui/src/styles-dashboard-workspace.css, gui/src/i18n/*
Adds enable/disable controls, description and timeout inputs, patch helpers, validation, responsive layouts, and translations.
Dashboard behavior coverage
gui/tests/vision-sidecar-controls.test.ts, gui/tests/vision-sidecar-dashboard.test.tsx
Tests hydration, isolated patches, partial merges, validation, disable/re-enable preservation, and unrelated web-search updates.
Documentation updates
docs-site/src/content/docs/**/guides/sidecars.md, docs-site/src/content/docs/**/reference/configuration/server.md
Documents Dashboard settings, API partial updates, preserved settings, and the valid timeout range across supported locales.

Estimated code review effort: 4 (Complex) | ~45 minutes

Mergeability Score: 🟡 Moderate · up to 53bd0

The PR adds Vision sidecar controls without a reported product-impact defect, but the full test suite previously failed and the branch is not confirmed up to date with dev, so merge readiness remains unproven until those checks are resolved or explicitly accepted.

Sequence Diagram(s)

sequenceDiagram
  participant Dashboard
  participant SidecarSettingsAPI
  participant ConfigStore
  participant VisionRuntime
  Dashboard->>SidecarSettingsAPI: Submit Vision settings patch
  SidecarSettingsAPI->>SidecarSettingsAPI: Validate fields and timeout bounds
  SidecarSettingsAPI->>ConfigStore: Persist enabled state and timeout
  SidecarSettingsAPI-->>Dashboard: Return resolved Vision settings
  VisionRuntime->>ConfigStore: Resolve Vision timeout
  ConfigStore-->>VisionRuntime: Return bounded timeout
Loading

Possibly related PRs

Suggested reviewers: wibias, lidge-jun, ingwannu

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 15.15% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR implements issue #1201 requirements for enablement, limits, timeouts, partial API updates, persistence, validation, and regression coverage.
Out of Scope Changes check ✅ Passed The Dashboard, API, runtime bounds, tests, translations, styles, and documentation changes directly support issue #1201.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the primary change: exposing the remaining Vision sidecar controls in the Dashboard.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 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.

@github-actions

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the enhancement New feature or request label Aug 12, 2026
@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

✅ READY

  • all PR quality gates passed; the review readiness checklist is complete.

Review readiness checklist

  • ✅ All CI tests are green on my local testing.
  • ✅ I pushed my PR to the latest dev commit.
  • ✅ I resolved all correct Codex and CodeRabbit findings.
  • ✅ My PR is ready for review.

4/4 boxes ticked.

This pull request is already Ready for Review.
The review-ready label marks this PR as ready; review automation runs independently. If no CodeRabbit review appears, comment @coderabbitai review to request one.
Maintainers: @lidge-jun @Ingwannu @Wibias

@LeoWang331

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 4

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

Inline comments:
In `@docs-site/src/content/docs/ru/guides/sidecars.md`:
- Around line 146-147: Update the preserved-settings sentence in the Russian
sidecars documentation to replace “прежние модель, бэкенд, reasoning, таймаут и
лимит” with the grammatically correct “прежние значения модели, бэкенда,
reasoning, таймаута и лимита”.

In `@gui/src/pages/dashboard-shared.ts`:
- Around line 213-220: Export DEFAULT_MAX_DESCRIPTIONS_PER_TURN from the runtime
vision module and replace the hardcoded 8 assigned to
VISION_MAX_DESCRIPTIONS_DEFAULT in dashboard-shared.ts with that exported
runtime default, keeping the GUI and runtime values synchronized.

In `@gui/tests/vision-sidecar-dashboard.test.tsx`:
- Around line 24-38: The hydration test fixture and assertions use values
identical to the defaults, so they cannot prove server values are applied.
Update initialSidecar and the test “Dashboard hydrates enabled, max
descriptions, and timeout from the server” to use distinct
maxDescriptionsPerTurn and timeoutMs values such as 12 and 30_000, then assert
those rendered inputs show the fixture values; optionally add a separate
undefined-values case to verify default fallback.

In `@structure/05_gui-and-management-api.md`:
- Line 111: Update the Sidecar/shadow-call settings entry to include
vision.reasoning in the PUT-accepted fields and add the vision reasoning value
to the reported GET and PUT-response fields, matching
publicVisionSidecarSettings and the config-routes handler.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 8d19152e-d04a-4353-8fab-9e60e4adfbcf

📥 Commits

Reviewing files that changed from the base of the PR and between cfc61c1 and d1941da.

⛔ Files ignored due to path filters (5)
  • docs/pr-assets/1201-vision-1280.png is excluded by !**/*.png
  • docs/pr-assets/1201-vision-1440.png is excluded by !**/*.png
  • docs/pr-assets/1201-vision-420.png is excluded by !**/*.png
  • docs/pr-assets/1201-vision-768.png is excluded by !**/*.png
  • docs/pr-assets/1201-vision-sidecar-controls.png is excluded by !**/*.png
📒 Files selected for processing (33)
  • docs-site/src/content/docs/guides/sidecars.md
  • docs-site/src/content/docs/ja/guides/sidecars.md
  • docs-site/src/content/docs/ja/reference/configuration/server.md
  • docs-site/src/content/docs/ko/guides/sidecars.md
  • docs-site/src/content/docs/ko/reference/configuration/server.md
  • docs-site/src/content/docs/reference/configuration/server.md
  • docs-site/src/content/docs/ru/guides/sidecars.md
  • docs-site/src/content/docs/ru/reference/configuration/server.md
  • docs-site/src/content/docs/zh-cn/guides/sidecars.md
  • docs-site/src/content/docs/zh-cn/reference/configuration/server.md
  • docs-site/src/content/docs/zh-tw/guides/sidecars.md
  • docs-site/src/content/docs/zh-tw/reference/configuration/server.md
  • gui/src/i18n/de.ts
  • gui/src/i18n/en.ts
  • gui/src/i18n/ja.ts
  • gui/src/i18n/ko.ts
  • gui/src/i18n/ru.ts
  • gui/src/i18n/tr.ts
  • gui/src/i18n/zh-TW.ts
  • gui/src/i18n/zh.ts
  • gui/src/pages/dashboard-overview-sections.tsx
  • gui/src/pages/dashboard-shared.ts
  • gui/src/styles-dashboard-workspace.css
  • gui/tests/vision-sidecar-controls.test.ts
  • gui/tests/vision-sidecar-dashboard.test.tsx
  • src/server/management/config-routes.ts
  • src/vision/index.ts
  • src/vision/timeout-bounds.ts
  • structure/05_gui-and-management-api.md
  • tests/sidecar-settings-vision-controls.test.ts
  • tests/vision-anthropic.test.ts
  • tests/vision-cache.test.ts
  • tests/vision-sidecar-timeout-bounds.test.ts

Comment thread docs-site/src/content/docs/ru/guides/sidecars.md Outdated
Comment thread gui/src/pages/dashboard-shared.ts
Comment thread gui/tests/vision-sidecar-dashboard.test.tsx
Comment thread structure/05_gui-and-management-api.md Outdated
@LeoWang331

Copy link
Copy Markdown
Contributor Author

Addressed the CodeRabbit review on d1941dadb:

  • Applied: Russian agreement in docs-site/src/content/docs/ru/guides/sidecars.md; hydration fixture now uses 12 / 30000 so it cannot pass on Dashboard defaults alone; structure/05_gui-and-management-api.md now lists vision.reasoning.
  • Not applied as an import: pulling DEFAULT_MAX_DESCRIPTIONS_PER_TURN from src/vision/index.ts into the Dashboard would load the vision runtime into the GUI bundle. The GUI still mirrors 8, and tests/vision-sidecar-timeout-bounds.test.ts now pins that alias to the runtime export.

Follow-up commit: d9cd5baebbfe537c835769a9b394aa6827b08025. PR stays Draft. Not merging; Cross-platform CI and React Doctor still need maintainer approval.

@Wibias Wibias left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Re-review on exact head d9cd5baebbfe537c835769a9b394aa6827b08025: I do not see a remaining code blocker in the Vision-sidecar changes.

The earlier CodeRabbit points are addressed on current code: the hydration test now uses distinct server values (12 / 30000), the Russian wording and vision.reasoning documentation are corrected, and the mirrored GUI max-description default is protected by a cross-layer contract test against DEFAULT_MAX_DESCRIPTIONS_PER_TURN rather than importing the full Vision runtime into the GUI bundle. The management API also preserves partial-update semantics, validates enabled/limit/timeout strictly, and returns resolved defaults consistently.

I am not approving this stale draft head yet: it is currently 15 commits behind dev (6c14e343), and Cross-platform CI is still in progress. Rebase onto current dev, rerun exact-head CI, then this is ready for final approval if the rebase stays clean.

@Wibias
Wibias marked this pull request as ready for review August 13, 2026 05:08
@github-actions
github-actions Bot marked this pull request as draft August 13, 2026 05:08
LeoWang331 and others added 4 commits August 13, 2026 07:13
Let operators toggle Vision sidecar, cap descriptions per turn, and set timeout from the Dashboard without clobbering model, backend, or reasoning on unrelated saves.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ontrols

The two number fields made the control group wider than the card, and a zero flex basis collapsed the title into a one-glyph column. Stack the card when that happens, import timeout bounds from one runtime module, and drive the model/reasoning GUI test through real Select interaction.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use non-default fixture values so hydration is actually proven, pin the description-cap default to the runtime export, document vision.reasoning on the management API, and fix Russian agreement in the sidecars guide.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Wibias
Wibias force-pushed the feat/1201-vision-sidecar-controls branch from 53bd0d2 to 938a517 Compare August 13, 2026 05:14
@Wibias
Wibias marked this pull request as ready for review August 13, 2026 05:15
@github-actions
github-actions Bot marked this pull request as draft August 13, 2026 05:15
@github-actions
github-actions Bot marked this pull request as ready for review August 13, 2026 05:16
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@github-actions[bot] The PR readiness gate is complete for head SHA 938a517b9f384e975e05534399f0a701ded8f7b3.

The PR is marked Ready for Review. The review-ready label is present. Maintainers were notified.


🧠 Learnings used
Learnt from: Wibias
Repo: lidge-jun/opencodex PR: 986
File: .github/workflows/enforce-pr-target.yml:631-636
Timestamp: 2026-08-04T06:41:30.089Z
Learning: For the PR readiness gate in `.github/workflows/enforce-pr-target.yml`, the required scope is to bind contributor checklist completion and maintainer notification to the exact PR head SHA, then reset them after a new head commit. Maintainer approval staleness is separate from this gate and should be enforced by GitHub branch protection, such as `dismiss-stale-reviews` or `require_last_push_approval`, when configured for `dev`.

You are interacting with an AI system.

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@github-actions[bot] Acknowledged. PR #1561 is Ready for Review at head SHA 938a517b9f384e975e05534399f0a701ded8f7b3. The review-ready label is present.


🧠 Learnings used
Learnt from: Wibias
Repo: lidge-jun/opencodex PR: 986
File: .github/workflows/enforce-pr-target.yml:631-636
Timestamp: 2026-08-04T06:41:30.089Z
Learning: For the PR readiness gate in `.github/workflows/enforce-pr-target.yml`, the required scope is to bind contributor checklist completion and maintainer notification to the exact PR head SHA, then reset them after a new head commit. Maintainer approval staleness is separate from this gate and should be enforced by GitHub branch protection, such as `dismiss-stale-reviews` or `require_last_push_approval`, when configured for `dev`.

You are interacting with an AI system.

2 similar comments
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@github-actions[bot] Acknowledged. PR #1561 is Ready for Review at head SHA 938a517b9f384e975e05534399f0a701ded8f7b3. The review-ready label is present.


🧠 Learnings used
Learnt from: Wibias
Repo: lidge-jun/opencodex PR: 986
File: .github/workflows/enforce-pr-target.yml:631-636
Timestamp: 2026-08-04T06:41:30.089Z
Learning: For the PR readiness gate in `.github/workflows/enforce-pr-target.yml`, the required scope is to bind contributor checklist completion and maintainer notification to the exact PR head SHA, then reset them after a new head commit. Maintainer approval staleness is separate from this gate and should be enforced by GitHub branch protection, such as `dismiss-stale-reviews` or `require_last_push_approval`, when configured for `dev`.

You are interacting with an AI system.

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@github-actions[bot] Acknowledged. PR #1561 is Ready for Review at head SHA 938a517b9f384e975e05534399f0a701ded8f7b3. The review-ready label is present.


🧠 Learnings used
Learnt from: Wibias
Repo: lidge-jun/opencodex PR: 986
File: .github/workflows/enforce-pr-target.yml:631-636
Timestamp: 2026-08-04T06:41:30.089Z
Learning: For the PR readiness gate in `.github/workflows/enforce-pr-target.yml`, the required scope is to bind contributor checklist completion and maintainer notification to the exact PR head SHA, then reset them after a new head commit. Maintainer approval staleness is separate from this gate and should be enforced by GitHub branch protection, such as `dismiss-stale-reviews` or `require_last_push_approval`, when configured for `dev`.

You are interacting with an AI system.

@Wibias

Wibias commented Aug 13, 2026

Copy link
Copy Markdown
Owner

Thanks @LeoWang331 for the work on this! This is genuinely useful because it exposes the remaining Vision sidecar controls directly in the Dashboard instead of forcing users to edit config manually. In particular, being able to disable Vision without losing the selected model/settings, plus having the per-turn description limit and timeout available in the UI, makes the sidecar much easier and safer to tune in normal use. The partial-update behavior and regression coverage are also nice additions.

@Wibias
Wibias merged commit c306fb5 into lidge-jun:dev Aug 13, 2026
39 of 45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request review-ready

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants