Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
163277d
Add runtime enablement config plumbing
ibetitsmike Feb 12, 2026
ea9f669
Add runtime enablement settings
ibetitsmike Feb 12, 2026
fc9bd8e
Respect runtime enablement in creation UI
ibetitsmike Feb 12, 2026
f8dc507
fix: seed runtime enablement in UI
ibetitsmike Feb 12, 2026
77daf2f
feat: adjust workspace creation controls
ibetitsmike Feb 12, 2026
c169e50
Add runtime defaults and per-project overrides
ibetitsmike Feb 12, 2026
fb92656
Rewrite runtime settings UI for project overrides
ibetitsmike Feb 12, 2026
6ef6f6b
Fix runtime override persistence and guard last runtime
ibetitsmike Feb 12, 2026
bf3d080
🤖 fix: hide disabled runtimes in creation UI
ibetitsmike Feb 12, 2026
fea4f62
Fix runtime override persistence
ibetitsmike Feb 12, 2026
59dc3ff
fix: restore branch selector styling
ibetitsmike Feb 12, 2026
36e2cbd
fix creation runtime settings fallbacks
ibetitsmike Feb 12, 2026
9e906f5
fix: project overrides use independent enablement (not merged with gl…
ibetitsmike Feb 12, 2026
22cef72
fix: filter fallback runtime by availability to prevent render oscill…
ibetitsmike Feb 12, 2026
e616d69
fix: filter fallback runtime against policy constraints
ibetitsmike Feb 12, 2026
6e11f7b
fix: non-git fallback respects enablement + track coder/ssh distincti…
ibetitsmike Feb 12, 2026
0ecce64
test: wrap useCreationWorkspace harness with ProjectProvider
ibetitsmike Feb 12, 2026
a5b41a1
test: add ProjectProvider to useDraftWorkspaceSettings tests
ibetitsmike Feb 12, 2026
81d7de9
fix: keep active runtime visible even if settings-disabled (prevent t…
ibetitsmike Feb 12, 2026
bfd0823
fix: stabilize enablement ref + unify non-git fallback with general s…
ibetitsmike Feb 12, 2026
f542f7a
fix: don't reattach coder config when settings default is plain SSH
ibetitsmike Feb 12, 2026
d123939
fix: treat all non-local modes as unavailable in non-git repos
ibetitsmike Feb 12, 2026
ce97b2b
fix: restore data-tutorial=trunk-branch anchor on branch selector
ibetitsmike Feb 12, 2026
51f157c
fix: check availability map in fallback + fall through cached default…
ibetitsmike Feb 12, 2026
627aa76
fix: align runtime defaults and enablement
ibetitsmike Feb 13, 2026
3aa7f86
fix: skip unavailable coder fallback
ibetitsmike Feb 13, 2026
0b809b4
fix: refresh runtime overrides after sync
ibetitsmike Feb 13, 2026
cb46a5c
fix: preserve runtime default config
ibetitsmike Feb 13, 2026
3dea1a0
fix: honor project runtime overrides
ibetitsmike Feb 13, 2026
c5a2153
fix: prefer worktree in runtime fallback
ibetitsmike Feb 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
304 changes: 232 additions & 72 deletions src/browser/components/ChatInput/CreationControls.tsx

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions src/browser/components/ChatInput/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import {
getInputAttachmentsKey,
AGENT_AI_DEFAULTS_KEY,
VIM_ENABLED_KEY,
RUNTIME_ENABLEMENT_KEY,
getProjectScopeId,
getPendingScopeId,
getDraftScopeId,
Expand Down Expand Up @@ -96,6 +97,7 @@ import type { PendingUserMessage } from "@/browser/utils/chatEditing";
import type { AgentSkillDescriptor } from "@/common/types/agentSkill";
import type { AgentAiDefaults } from "@/common/types/agentAiDefaults";
import { coerceThinkingLevel, type ThinkingLevel } from "@/common/types/thinking";
import { DEFAULT_RUNTIME_ENABLEMENT, normalizeRuntimeEnablement } from "@/common/types/runtime";
import { resolveThinkingInput } from "@/common/utils/thinking/policy";
import {
type MuxFrontendMetadata,
Expand Down Expand Up @@ -228,6 +230,14 @@ const ChatInputInner: React.FC<ChatInputProps> = (props) => {
};
})();

// User request: keep creation runtime controls synced with Settings enablement toggles.
const [rawRuntimeEnablement] = usePersistedState(
RUNTIME_ENABLEMENT_KEY,
DEFAULT_RUNTIME_ENABLEMENT,
{ listener: true }
);
const runtimeEnablement = normalizeRuntimeEnablement(rawRuntimeEnablement);

const [input, setInput] = usePersistedState(storageKeys.inputKey, "", { listener: true });

// Keep a stable reference to the latest input value so event handlers don't need to rebind
Expand Down Expand Up @@ -648,6 +658,15 @@ const ChatInputInner: React.FC<ChatInputProps> = (props) => {
const { projects } = useProjectContext();
const pendingSectionId = variant === "creation" ? (props.pendingSectionId ?? null) : null;
const creationProject = variant === "creation" ? projects.get(props.projectPath) : undefined;
const hasCreationRuntimeOverrides =
creationProject?.runtimeOverridesEnabled === true ||
Boolean(creationProject?.runtimeEnablement) ||
creationProject?.defaultRuntime !== undefined;
// Keep workspace creation in sync with Settings → Runtimes project overrides.
const creationRuntimeEnablement =
variant === "creation" && hasCreationRuntimeOverrides
? normalizeRuntimeEnablement(creationProject?.runtimeEnablement)
: runtimeEnablement;
const creationSections = creationProject?.sections ?? [];

const [selectedSectionId, setSelectedSectionId] = useState<string | null>(() => pendingSectionId);
Expand Down Expand Up @@ -790,6 +809,7 @@ const ChatInputInner: React.FC<ChatInputProps> = (props) => {
projectName: props.projectName,
nameState: creationState.nameState,
runtimeAvailabilityState: creationState.runtimeAvailabilityState,
runtimeEnablement: creationRuntimeEnablement,
sections: creationSections,
selectedSectionId,
onSectionChange: handleCreationSectionChange,
Expand Down
13 changes: 11 additions & 2 deletions src/browser/components/ChatInput/useCreationWorkspace.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { APIClient } from "@/browser/contexts/API";
import { ProjectProvider } from "@/browser/contexts/ProjectContext";
import type { DraftWorkspaceSettings } from "@/browser/hooks/useDraftWorkspaceSettings";
import {
getAgentIdKey,
Expand Down Expand Up @@ -161,7 +162,10 @@ type WorkspaceUpdateAgentAISettingsResult = Awaited<
type WorkspaceCreateResult = Awaited<ReturnType<APIClient["workspace"]["create"]>>;
type NameGenerationArgs = Parameters<APIClient["nameGeneration"]["generate"]>[0];
type NameGenerationResult = Awaited<ReturnType<APIClient["nameGeneration"]["generate"]>>;
type MockOrpcProjectsClient = Pick<APIClient["projects"], "listBranches" | "runtimeAvailability">;
type MockOrpcProjectsClient = Pick<
APIClient["projects"],
"list" | "listBranches" | "runtimeAvailability"
>;
type MockOrpcWorkspaceClient = Pick<
APIClient["workspace"],
"sendMessage" | "create" | "updateAgentAISettings"
Expand Down Expand Up @@ -266,6 +270,7 @@ const setupWindow = ({

currentORPCClient = {
projects: {
list: () => Promise.resolve([]),
listBranches: (input: ListBranchesArgs) => listBranchesMock(input),
runtimeAvailability: () =>
Promise.resolve({
Expand Down Expand Up @@ -881,7 +886,11 @@ function renderUseCreationWorkspace(options: HookOptions) {
return null;
}

render(<Harness {...options} />);
render(
<ProjectProvider>
<Harness {...options} />
</ProjectProvider>
);

return () => {
if (!resultRef.current) {
Expand Down
8 changes: 8 additions & 0 deletions src/browser/components/Settings/SettingsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
Bot,
Keyboard,
Layout,
Container,
BrainCircuit,
Shield,
ShieldCheck,
Expand All @@ -31,6 +32,7 @@ import { Button } from "@/browser/components/ui/button";
import { MCPSettingsSection } from "./sections/MCPSettingsSection";
import { SecretsSection } from "./sections/SecretsSection";
import { LayoutsSection } from "./sections/LayoutsSection";
import { RuntimesSection } from "./sections/RuntimesSection";
import { ExperimentsSection } from "./sections/ExperimentsSection";
import { ServerAccessSection } from "./sections/ServerAccessSection";
import { KeybindsSection } from "./sections/KeybindsSection";
Expand Down Expand Up @@ -85,6 +87,12 @@ const BASE_SECTIONS: SettingsSection[] = [
icon: <Layout className="h-4 w-4" />,
component: LayoutsSection,
},
{
id: "runtimes",
label: "Runtimes",
icon: <Container className="h-4 w-4" />,
component: RuntimesSection,
},
{
id: "experiments",
label: "Experiments",
Expand Down
Loading
Loading