setV2HelpOpen(false)} onKeyDown={e => { if (e.key === "Escape") setV2HelpOpen(false); }}>
e.stopPropagation()}>
@@ -1123,6 +1167,89 @@ export default function Models({ apiBase }: { apiBase: string }) {
)}
>
);
+
+ if (workspaceView) {
+ return (
+
+
+
{t("nav.models")}
+
+ {t("models.active", { active: models.length - disabled.size, total: models.length })}
+
+
+
{t("models.subtitle")}
+ {status &&
{status}}
+
+
+
+ {controlsBlock}
+ {combosBlock}
+ {collapseControls}
+ {
+ // eslint-disable-next-line react-hooks/refs -- The hover ref is only read by row event handlers nested in this renderer.
+ visibleGroups.map(group => renderGroup(group))
+ }
+ {groups.length === 0 && emptyStateBlock}
+
+
+ {modalsBlock}
+
+ );
+ }
+
+ return (
+ <>
+
+
{t("nav.models")}
+
+ {t("models.active", { active: models.length - disabled.size, total: models.length })}
+
+
+
{t("models.subtitle")}
+ {status &&
{status}}
+ {controlsBlock}
+ {combosBlock}
+ {collapseControls}
+ {
+ // eslint-disable-next-line react-hooks/refs -- The hover ref is only read by row event handlers nested in this renderer.
+ groups.map(group => renderGroup(group))
+ }
+ {groups.length === 0 && emptyStateBlock}
+ {modalsBlock}
+ >
+ );
}
function discoveryFailureReason(
diff --git a/gui/src/styles-dashboard-workspace.css b/gui/src/styles-dashboard-workspace.css
index ab8001e8f..ffd9f4d12 100644
--- a/gui/src/styles-dashboard-workspace.css
+++ b/gui/src/styles-dashboard-workspace.css
@@ -138,12 +138,12 @@
}
.dash-sidecar-card__row .custom-select {
- /* Fixed width so both sidecar triggers stay equal from first paint —
- model labels like anthropic/claude-… must not grow the card later. */
- flex: 0 0 14rem;
- width: 14rem;
- max-width: 14rem;
- min-width: 0;
+ /* Reserve baseline space to prevent row reflow, but keep the trigger
+ compact instead of forcing a permanently wide fixed width. */
+ flex: 0 1 auto;
+ width: auto;
+ min-width: clamp(10rem, 24vw, 11.5rem);
+ max-width: min(100%, 14rem);
}
.dash-sidecar-card__row .select-trigger {
diff --git a/gui/src/styles-models-workspace.css b/gui/src/styles-models-workspace.css
new file mode 100644
index 000000000..8866a85e4
--- /dev/null
+++ b/gui/src/styles-models-workspace.css
@@ -0,0 +1,293 @@
+/* ============================================================================
+ models-workspace layout shell + shared Models controls
+ Namespace: models-workspace- (workspace shell/rail/main)
+ Shared controls: models-control-*, models-shadow-*, models-v2-* (workspace + classic)
+ Uses only design tokens from styles.css. No gradients.
+ ============================================================================ */
+
+.main-inner:has(.models-workspace-shell) {
+ max-width: 1200px;
+}
+
+.models-workspace-shell {
+ width: 100%;
+ min-width: 0;
+ container-type: inline-size;
+ container-name: models-workspace;
+}
+
+.models-workspace-root {
+ display: grid;
+ grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
+ gap: var(--space-4);
+ width: 100%;
+ max-width: 100%;
+ min-height: 480px;
+}
+
+/* ── Rail ─────────────────────────────────────────────── */
+
+.models-workspace-rail {
+ display: flex;
+ flex-direction: column;
+ gap: var(--space-3);
+ border-right: 1px solid var(--border);
+ padding-right: var(--space-3);
+ min-width: 0;
+}
+
+.models-workspace-rail-header {
+ display: flex;
+ align-items: baseline;
+ justify-content: space-between;
+ gap: 8px;
+}
+
+.models-workspace-rail-title {
+ font-size: var(--text-body);
+ font-weight: var(--weight-semibold);
+ color: var(--text);
+}
+
+.models-workspace-rail-count {
+ font-family: var(--mono);
+ font-size: 11px;
+ color: var(--faint);
+ font-variant-numeric: tabular-nums;
+}
+
+.models-workspace-rail-list {
+ display: flex;
+ flex-direction: column;
+ gap: 2px;
+ overflow-y: auto;
+ max-height: 640px;
+ min-height: 0;
+}
+
+.models-workspace-rail-row {
+ display: flex;
+ flex-direction: column;
+ gap: var(--space-0-5);
+ width: 100%;
+ min-height: 46px;
+ appearance: none;
+ background: none;
+ border: none;
+ border-radius: var(--radius-sm);
+ padding: var(--space-1-5) var(--space-2);
+ cursor: pointer;
+ text-align: left;
+ color: inherit;
+ font: inherit;
+ overflow: hidden;
+}
+
+.models-workspace-rail-row:hover {
+ background: var(--surface-2);
+}
+
+.models-workspace-rail-row--selected {
+ background: var(--surface-2);
+ box-shadow: inset 0 0 0 1px var(--border);
+}
+
+.models-workspace-rail-name {
+ font-size: var(--text-body);
+ font-weight: var(--weight-medium);
+ color: var(--text);
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+.models-workspace-rail-meta {
+ font-size: var(--text-caption);
+ color: var(--faint);
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ font-variant-numeric: tabular-nums;
+}
+
+/* ── Main pane ────────────────────────────────────────── */
+
+.models-workspace-main {
+ display: flex;
+ flex-direction: column;
+ gap: var(--space-3);
+ min-width: 0;
+}
+
+/* Controls row: shadow call on the left, sub-agent mode pinned right.
+ Right group does not move when the model name length changes. */
+.models-control-top-row {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr) auto;
+ align-items: center;
+ column-gap: clamp(var(--space-3), 2vw, var(--space-6));
+ row-gap: var(--space-2);
+ margin-bottom: var(--space-2);
+ min-width: 0;
+}
+
+.models-shadow-row {
+ display: flex;
+ align-items: center;
+ gap: 6px;
+ min-width: 0;
+ flex-wrap: nowrap;
+}
+
+.models-shadow-label {
+ white-space: nowrap;
+}
+
+.models-shadow-warning {
+ white-space: nowrap;
+}
+
+.models-shadow-model-slot {
+ flex: 0 1 auto;
+ min-width: 9.5rem;
+ max-width: 12.5rem;
+}
+
+.models-shadow-model-slot .custom-select {
+ width: auto;
+ min-width: 100%;
+ max-width: 100%;
+}
+
+.models-shadow-model-slot .select-trigger {
+ width: auto;
+ min-width: 100%;
+ max-width: 100%;
+ justify-content: space-between;
+}
+
+.models-shadow-model-slot .select-trigger > span {
+ min-width: 0;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+.models-v2-mode-row {
+ display: flex;
+ align-items: center;
+ gap: var(--space-2);
+ flex: 0 0 auto;
+ min-width: 0;
+ flex-wrap: nowrap;
+ justify-self: end;
+}
+
+.models-v2-detail-row {
+ gap: var(--space-2);
+ margin-bottom: var(--space-2);
+ flex-wrap: wrap;
+ align-items: center;
+}
+
+/* ── Provider group header (Classic + Workspace) ─────── */
+
+.models-provider-head {
+ flex-wrap: wrap;
+ row-gap: var(--space-2);
+ column-gap: var(--space-2);
+ align-items: center;
+ min-width: 0;
+}
+
+.models-provider-head > span.text-body {
+ min-width: 0;
+ overflow-wrap: anywhere;
+}
+
+.models-provider-actions {
+ margin-left: auto;
+ flex-wrap: wrap;
+ justify-content: flex-end;
+ align-items: center;
+ gap: 6px;
+ min-width: 0;
+ max-width: 100%;
+}
+
+/* ── Responsive ───────────────────────────────────────── */
+
+@media (max-width: 1160px) {
+ .models-control-top-row {
+ grid-template-columns: 1fr;
+ }
+
+ .models-shadow-row {
+ flex: 1 1 100%;
+ flex-wrap: wrap;
+ }
+
+ .models-shadow-model-slot {
+ flex: 1 1 12rem;
+ width: auto;
+ min-width: min(100%, 10rem);
+ max-width: 100%;
+ }
+
+ .models-v2-mode-row {
+ flex-wrap: wrap;
+ justify-self: start;
+ }
+}
+
+/*
+ Stack rail above the main pane when the workspace shell is squeezed —
+ typically by the persistent desktop sidebar at ~900–1024px viewports —
+ not only at the mobile drawer breakpoint.
+*/
+@container models-workspace (max-width: 720px) {
+ .models-workspace-root {
+ grid-template-columns: 1fr;
+ }
+
+ .models-workspace-rail {
+ border-right: none;
+ border-bottom: 1px solid var(--border);
+ padding-right: 0;
+ padding-bottom: var(--space-3);
+ }
+
+ .models-workspace-rail-list {
+ max-height: 240px;
+ }
+
+ .models-provider-actions {
+ width: 100%;
+ margin-left: 0;
+ justify-content: flex-start;
+ }
+}
+
+/* Mobile: sidebar is a drawer; still prefer rail-on-top for touch. */
+@media (max-width: 768px) {
+ .models-workspace-root {
+ grid-template-columns: 1fr;
+ }
+
+ .models-workspace-rail {
+ border-right: none;
+ border-bottom: 1px solid var(--border);
+ padding-right: 0;
+ padding-bottom: var(--space-3);
+ }
+
+ .models-workspace-rail-list {
+ max-height: 240px;
+ }
+
+ .models-provider-actions {
+ width: 100%;
+ margin-left: 0;
+ justify-content: flex-start;
+ }
+}
diff --git a/gui/src/styles.css b/gui/src/styles.css
index 2fce23943..c44c8ebda 100644
--- a/gui/src/styles.css
+++ b/gui/src/styles.css
@@ -13,6 +13,7 @@
@import "./styles/provider-workspace-settings.css";
@import "./styles/provider-overview-dashboard.css";
@import "./styles-combos-workspace.css";
+@import "./styles-models-workspace.css";
@import "./styles-dashboard-workspace.css";
:root {
@@ -1209,3 +1210,31 @@ button.prov-account-row.active { cursor: default; }
.model-tip-key { color: var(--muted); }
.model-tip-val { color: var(--text); font-family: var(--mono); font-size: var(--text-label); }
.model-tip-actions { display: flex; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border-soft); }
+
+/* ---- hover tooltip (styled replacement for native title) ---- */
+.ocx-tooltip { position: relative; display: inline-flex; align-items: center; }
+.ocx-tooltip-bubble {
+ position: absolute; z-index: var(--z-popover);
+ width: max-content;
+ background: color-mix(in oklab, canvas 84%, transparent);
+ backdrop-filter: blur(20px) saturate(1.4);
+ -webkit-backdrop-filter: blur(20px) saturate(1.4);
+ border: 1px solid var(--border);
+ border-radius: var(--radius-sm);
+ padding: 8px 12px;
+ box-shadow: 0 8px 32px rgb(0 0 0 / 0.16);
+ color: var(--text);
+ font-size: var(--text-label);
+ line-height: var(--leading-body);
+ white-space: normal;
+ pointer-events: none;
+ animation: ocx-tooltip-in var(--motion-fast) ease-out;
+}
+.ocx-tooltip-bubble--top { bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); }
+.ocx-tooltip-bubble--bottom { top: calc(100% + 8px); left: 50%; transform: translateX(-50%); }
+.ocx-tooltip-bubble--left { right: calc(100% + 8px); top: 50%; transform: translateY(-50%); }
+.ocx-tooltip-bubble--right { left: calc(100% + 8px); top: 50%; transform: translateY(-50%); }
+@keyframes ocx-tooltip-in {
+ from { opacity: 0; }
+ to { opacity: 1; }
+}
diff --git a/gui/src/ui.tsx b/gui/src/ui.tsx
index ce4a534cc..903712b94 100644
--- a/gui/src/ui.tsx
+++ b/gui/src/ui.tsx
@@ -237,3 +237,47 @@ export function EmptyState({ icon, title, children, className, style }: { icon?:
);
}
+
+/* Hover/focus tooltip — styled replacement for the native `title` attribute. */
+export function Tooltip({ content, children, side = "top", maxWidth = 280 }: {
+ content: ReactNode;
+ children: ReactNode;
+ side?: "top" | "bottom" | "left" | "right";
+ maxWidth?: number;
+}) {
+ const [open, setOpen] = useState(false);
+ const tipId = useId();
+ const timer = useRef