GeezerVison is showing github.com — feat(gui): improve models workspace layout stability by Wibias · Pull Request #438 · lidge-jun/opencodex
Conversation
Wibias
commented
Jul 25, 2026
•
edited by coderabbitai
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Summary
- add and wire the Models workspace view mode to the app-level route state so Workspace/Classic switching stays consistent
- update Models provider group rendering to the new grouped object shape, including empty-provider discovery hints and discovery-failure badges
- polish control layout stability in Models and Dashboard: keep Sub-agent controls aligned with Shadow Call, preserve inline warning text, tighten context-cap spacing, and reserve dropdown space without forcing oversized controls
Test plan
-
bun run build:gui
- manual check
/#models for Shadow Call + Sub-agent row alignment and reduced gap above Context cap
- manual check
/#dashboard sidecar dropdown behavior (no forced always-wide trigger)
-
bun run test
-
bun run typecheck
Summary by CodeRabbit
- New Features
- Added a provider-based workspace view for Models with an “all providers” rail selector.
- Added bulk controls to collapse/expand all provider groups and apply context caps in one step.
- Introduced a reusable hover/focus tooltip component.
- Localization
- Updated Models/Sub-agent and new workspace strings across all supported languages (including provider/workspace labels and picker guidance).
- Improvements
- Improved workspace styling and responsiveness for provider selection layout.
- Preserved the selected Models view mode across navigation and refined route state handling.
- Tests
- Added UI and CSS coverage for workspace provider head/actions and container/mobile rules.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Adds a workspace layout for the Models tab following the Providers workspace DNA. The left rail lists an All-providers entry plus each provider with its active/total count; the main pane renders the controls, the selected provider's model group (or all groups), and the empty state. The per-group render, controls, combos, empty state, and modals are extracted into shared blocks so classic and workspace views behave identically. Classic view stays available behind a toggle persisted in localStorage (ocx-models-view). New i18n keys for the rail header and All-providers entry in all six locales.
Adds a Workspace/Classic toggle to the sidebar footer that switches the whole app's view preference at once. It writes every tab's ocx-*-view localStorage key and bumps a render key so the current page remounts and re-reads its preference immediately. Per-page toggles keep working, and the sidebar label re-reads the preference on navigation so it stays accurate. Future tabs only need to register their key in WORKSPACE_VIEW_KEYS. Also fills in the 10 missing sub.workspace.* keys in ja.ts that the rebase onto dev surfaced. New i18n key app.viewMode in all six locales; reuses existing pws.workspaceToggle/classicToggle labels.
…d placement, drop orderHint)
The v2Applied status message leaked the internal config key multi_agent_v2 (with underscore) to users. Use the localized Sub-agent label instead, across all six locales.
Add a reusable Tooltip primitive (glass material, border, radius, fade-in) matching the design system, and use it for the Shadow Call Intercept info icon on the Models tab instead of the unstyleable browser title attribute.
# Conflicts:
# gui/src/App.tsx
# gui/src/pages/Models.tsx
# Conflicts:
# gui/src/App.tsx
# gui/src/styles.css
Keep models workspace controls on a stable top row and remove empty gaps so Sub-agent mode, shadow-call controls, and context-cap spacing remain consistent across model label lengths. Also loosen dashboard sidecar select sizing to reserve space without forcing oversized dropdowns.
coderabbitai
Bot
commented
Jul 25, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

📝 Walkthrough
Walkthrough
The Models page now supports an optional workspace view with provider filtering, collapse-all controls, shared rendering blocks, responsive styling, tooltips, synchronized view-mode routing, and updated localization across six languages.
Changes
Models workspace UI
| Layer / File(s) |
Summary |
Workspace rendering and interaction gui/src/App.tsx, gui/src/pages/Models.tsx, gui/src/use-app-route-state.ts, gui/tests/models-provider-head.test.ts |
viewMode is passed into Models, which now renders workspace and standard layouts through shared controls, provider filtering, collapse persistence, and reusable provider-group blocks; route hash callbacks are memoized and synchronized. |
Workspace styling and tooltip presentation gui/src/ui.tsx, gui/src/styles.css, gui/src/styles-models-workspace.css, gui/src/styles-dashboard-workspace.css, gui/tests/models-provider-head.test.ts |
Adds delayed hover/focus tooltips, workspace rail and main-pane styling, responsive layouts, flexible dashboard selector sizing, and CSS coverage for wrapping and mobile behavior. |
Workspace localization strings gui/src/i18n/{de,en,ja,ko,ru,zh}.ts |
Adds provider labels, context-cap and collapse/expand hints, updated ordering text, revised Sub-agent mode status messages, and warning labels while removing duplicate ordering entries. |
Estimated code review effort: 4 (Complex) | ~45 minutes
Sequence Diagram(s)
sequenceDiagram
participant App
participant RouteState
participant Models
participant Tooltip
participant localStorage
App->>RouteState: resolve view mode from route hash
RouteState->>Models: pass viewMode
Models->>Tooltip: render delayed control hints
Models->>localStorage: persist collapsed provider IDs
Models-->>App: render workspace or standard layout
Loading
Possibly related PRs
Suggested reviewers: ingwannu, lidge-jun
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
| Check name |
Status |
Explanation |
Resolution |
| Docstring Coverage |
⚠️ Warning |
Docstring coverage is 33.33% 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 |
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. |
| Description Check |
✅ Passed |
Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check |
✅ Passed |
The title is concise and accurately reflects the main change: improving Models workspace layout stability in the GUI. |
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
Comment @coderabbitai help to get the list of available commands.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as resolved.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as resolved.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Resolve review findings for Models workspace behavior and accessibility: keep empty routed provider groups correctly classified, reconcile stale selected provider state after polling, localize the shadow-call warning label, and replace nested main landmarks with a labeled section. Also align locale terminology updates, document shared control CSS scope, improve control responsiveness at medium widths, and make tooltip content screen-reader associated with Escape-to-dismiss support.
Move provider-selection reconciliation into models reload so we avoid set-state-in-effect while keeping stale selections safe, and memoize route hash handlers so hook dependencies are explicit and lint-clean.
Use a models-workspace container query so the provider rail stacks before actions clip beside the desktop sidebar, and wrap provider header actions with Models-specific classes.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Jul 25, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
✅ 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.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
left a comment
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 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 `@gui/src/pages/Models.tsx`:
- Around line 585-586: Replace the clickable provider header div in the Models
component with a dedicated focusable toggle button using
aria-expanded={isCollapsed ? false : true}, and keep the existing
provider-collapse behavior through toggleCollapse(provider). Structure
.models-provider-actions as a sibling rather than nesting its action buttons
inside the toggle button, while preserving the current collapsed/open styling.
🪄 Autofix (Beta)
❌ Autofix failed (check again to retry)
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: 883c77eb-daa1-4210-8cf1-e497dcd8ad60
📥 Commits
Reviewing files that changed from the base of the PR and between 8458caf and e98e75e.
📒 Files selected for processing (3)
gui/src/pages/Models.tsx
gui/src/styles-models-workspace.css
gui/tests/models-provider-head.test.ts
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Comment on lines
+585
to
+586
|
|
<div onClick={() => toggleCollapse(provider)}
|
|
|
className={`row group-head models-provider-head${isCollapsed ? "" : " open"}`}>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Make the provider-collapse control keyboard-operable.
Line 585 places collapse behavior on a non-focusable div, so keyboard users cannot expand or collapse provider groups. Use a dedicated toggle <button aria-expanded={...}> for the header summary, with .models-provider-actions as its sibling; nesting the existing action buttons inside a button would be invalid.
🤖 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 `@gui/src/pages/Models.tsx` around lines 585 - 586, Replace the clickable
provider header div in the Models component with a dedicated focusable toggle
button using aria-expanded={isCollapsed ? false : true}, and keep the existing
provider-collapse behavior through toggleCollapse(provider). Structure
.models-provider-actions as a sibling rather than nesting its action buttons
inside the toggle button, while preserving the current collapsed/open styling.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Jul 25, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
agentHits
pushed a commit
to agentHits/opencodex
that referenced
this pull request
Sep 17, 2026
feat(gui): improve models workspace layout stability
Reviewers
lidge-jun
Awaiting requested review from lidge-jun
lidge-jun is a code owner
Ingwannu
Awaiting requested review from Ingwannu
Ingwannu is a code owner
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|