From 3ba9c6f1caad4cfd1358f15686abe69da90741df Mon Sep 17 00:00:00 2001 From: Thomas Ricouard Date: Sat, 31 Jan 2026 07:06:28 +0100 Subject: [PATCH 1/2] feat: add workspace home mode selectors --- src/App.tsx | 9 ++ .../workspaces/components/WorkspaceHome.tsx | 88 +++++++++++++++++++ .../workspaces/hooks/useWorkspaceHome.ts | 17 +++- 3 files changed, 112 insertions(+), 2 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index c843b2c7..16519b48 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1058,6 +1058,8 @@ function MainApp() { activeWorkspace, models, selectedModelId, + effort: resolvedEffort, + collaborationMode: collaborationModePayload, addWorktreeAgent, connectWorkspace, startThreadForWorkspace, @@ -1961,6 +1963,13 @@ function MainApp() { modelSelections={workspaceModelSelections} onToggleModel={toggleWorkspaceModelSelection} onModelCountChange={setWorkspaceModelCount} + collaborationModes={collaborationModes} + selectedCollaborationModeId={selectedCollaborationModeId} + onSelectCollaborationMode={setSelectedCollaborationModeId} + reasoningOptions={reasoningOptions} + selectedEffort={selectedEffort} + onSelectEffort={setSelectedEffort} + reasoningSupported={reasoningSupported} error={workspaceRunError} isSubmitting={workspaceRunSubmitting} activeWorkspaceId={activeWorkspaceId} diff --git a/src/features/workspaces/components/WorkspaceHome.tsx b/src/features/workspaces/components/WorkspaceHome.tsx index 97b0c065..3a5379b9 100644 --- a/src/features/workspaces/components/WorkspaceHome.tsx +++ b/src/features/workspaces/components/WorkspaceHome.tsx @@ -15,6 +15,7 @@ import type { SkillOption, WorkspaceInfo, } from "../../../types"; +import { formatCollaborationModeLabel } from "../../../utils/collaborationModes"; import { ComposerInput } from "../../composer/components/ComposerInput"; import { useComposerImages } from "../../composer/hooks/useComposerImages"; import { useComposerAutocompleteState } from "../../composer/hooks/useComposerAutocompleteState"; @@ -56,6 +57,13 @@ type WorkspaceHomeProps = { modelSelections: Record; onToggleModel: (modelId: string) => void; onModelCountChange: (modelId: string, count: number) => void; + collaborationModes: { id: string; label: string }[]; + selectedCollaborationModeId: string | null; + onSelectCollaborationMode: (id: string | null) => void; + reasoningOptions: string[]; + selectedEffort: string | null; + onSelectEffort: (effort: string) => void; + reasoningSupported: boolean; error: string | null; isSubmitting: boolean; activeWorkspaceId: string | null; @@ -124,6 +132,13 @@ export function WorkspaceHome({ modelSelections, onToggleModel, onModelCountChange, + collaborationModes, + selectedCollaborationModeId, + onSelectCollaborationMode, + reasoningOptions, + selectedEffort, + onSelectEffort, + reasoningSupported, error, isSubmitting, activeWorkspaceId, @@ -671,6 +686,79 @@ export function WorkspaceHome({ )} + {collaborationModes.length > 0 && ( +
+ + + + + + +
+ )} +
+ + + + + + + + + +
diff --git a/src/features/workspaces/hooks/useWorkspaceHome.ts b/src/features/workspaces/hooks/useWorkspaceHome.ts index bff80e61..297874bc 100644 --- a/src/features/workspaces/hooks/useWorkspaceHome.ts +++ b/src/features/workspaces/hooks/useWorkspaceHome.ts @@ -30,6 +30,8 @@ type UseWorkspaceHomeOptions = { activeWorkspace: WorkspaceInfo | null; models: ModelOption[]; selectedModelId: string | null; + effort?: string | null; + collaborationMode?: Record | null; addWorktreeAgent: ( workspace: WorkspaceInfo, branch: string, @@ -45,7 +47,11 @@ type UseWorkspaceHomeOptions = { threadId: string, text: string, images?: string[], - options?: { model?: string | null; effort?: string | null }, + options?: { + model?: string | null; + effort?: string | null; + collaborationMode?: Record | null; + }, ) => Promise; onWorktreeCreated?: (worktree: WorkspaceInfo, parent: WorkspaceInfo) => Promise | void; }; @@ -166,6 +172,8 @@ export function useWorkspaceHome({ activeWorkspace, models, selectedModelId, + effort = null, + collaborationMode = null, addWorktreeAgent, connectWorkspace, startThreadForWorkspace, @@ -469,6 +477,8 @@ export function useWorkspaceHome({ : null; await sendUserMessageToThread(activeWorkspace, threadId, prompt, images, { model: localModel, + effort, + collaborationMode, }); const model = selectedModelId ? modelLookup.get(selectedModelId) ?? null : null; @@ -530,7 +540,8 @@ export function useWorkspaceHome({ images, { model: selection.model?.model ?? selection.modelId, - effort: null, + effort, + collaborationMode, }, ); instances.push({ @@ -580,9 +591,11 @@ export function useWorkspaceHome({ activeWorkspace, activeWorkspaceId, addWorktreeAgent, + collaborationMode, connectWorkspace, onWorktreeCreated, draft, + effort, isSubmitting, modelLookup, modelSelections, From aba9d799bf3a99eddc25dd7bb2e47194eceb272c Mon Sep 17 00:00:00 2001 From: Thomas Ricouard Date: Sat, 31 Jan 2026 07:41:27 +0100 Subject: [PATCH 2/2] fix: clarify mode selectors with consistent control styling --- .../workspaces/components/WorkspaceHome.tsx | 114 +++++++++--------- src/styles/composer.css | 8 +- src/styles/workspace-home.css | 23 ++++ 3 files changed, 86 insertions(+), 59 deletions(-) diff --git a/src/features/workspaces/components/WorkspaceHome.tsx b/src/features/workspaces/components/WorkspaceHome.tsx index 3a5379b9..9c6c8fa9 100644 --- a/src/features/workspaces/components/WorkspaceHome.tsx +++ b/src/features/workspaces/components/WorkspaceHome.tsx @@ -688,10 +688,59 @@ export function WorkspaceHome({
{collaborationModes.length > 0 && (
+
+ + + + + + +
+
+ )} +
+
+ + +
- )} -
- - - - - - - - -
diff --git a/src/styles/composer.css b/src/styles/composer.css index 223ab23b..13f18e6d 100644 --- a/src/styles/composer.css +++ b/src/styles/composer.css @@ -661,13 +661,13 @@ } .composer-select--collab { - width: 88px; - max-width: 88px; + width: 110px; + max-width: 110px; } .composer-select--effort { - width: 60px; - max-width: 60px; + width: 80px; + max-width: 80px; } .composer-select--approval { diff --git a/src/styles/workspace-home.css b/src/styles/workspace-home.css index d5a91b35..fd1dc5d9 100644 --- a/src/styles/workspace-home.css +++ b/src/styles/workspace-home.css @@ -162,6 +162,29 @@ background: var(--surface-card); } +.workspace-home-control.composer-select-wrap { + padding: 0; + background: transparent; + border: none; + border-radius: 0; + min-height: 0; +} + +.workspace-home-control.composer-select-wrap .open-app-button { + border-color: var(--border-muted); + background: var(--surface-card); + border-radius: 10px; + padding: 6px 10px; + align-items: center; + gap: 6px; +} + +.workspace-home-control.composer-select-wrap .composer-select { + font-size: 12px; + color: var(--text-stronger); + padding: 0 16px 0 0; +} + .workspace-home-dropdown { left: 0; }