Skip to content

Commit 3c54ea4

Browse files
authored
fix: First session nits (read desc) (#1626)
## Problem Several small UI inconsistencies hurt the first-session experience, mismatched button styles, noisy placeholders and missing empty states. I realized just how different everything on that task input page was, each dropdown looked different, there was different font sizes all over, it was kind of a learned behavior to just ignore how inconsistent the styling was there. How many can you spot?! Before: ![CleanShot 2026-04-13 at 13.11.17@2x.png](https://app.graphite.com/user-attachments/assets/47383e90-023b-4685-9d6c-110fd3d96412.png) After: <!-- Who is this for and what problem does it solve? --> <!-- Closes #ISSUE_ID --> ## ![CleanShot 2026-04-13 at 13.10.38@2x.png](https://app.graphite.com/user-attachments/assets/33168da0-aaba-4155-ad08-070e11bd2acb.png) ## Changes 1. Prevent text selection when clicking the mode indicator 2. Standardize task input placeholders and contextual hints 3. Reduce max prompt history from 50 to 15 4. Match branch selector and dropdown triggers to consistent outline style 5. Add empty state to the task list sidebar 6. Remove unused ComboboxTriggerVariant type <!-- What did you change and why? --> <!-- If there are frontend changes, include screenshots. --> ## How did you test this? Manually <!-- Describe what you tested -- manual steps, automated tests, or both. --> <!-- If you're an agent, only list tests you actually ran. -->
1 parent 4cf2dca commit 3c54ea4

File tree

12 files changed

+110
-69
lines changed

12 files changed

+110
-69
lines changed

apps/code/src/renderer/components/ui/combobox/Combobox.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@
381381

382382
.combobox-trigger.size-1 {
383383
height: var(--space-5);
384-
gap: var(--space-1);
384+
gap: var(--space-2);
385385
font-size: var(--font-size-1);
386386
line-height: var(--line-height-1);
387387
letter-spacing: var(--letter-spacing-1);
@@ -586,7 +586,7 @@
586586
}
587587

588588
.combobox-trigger.variant-outline {
589-
color: var(--gray-11);
589+
color: var(--gray-12);
590590
background-color: transparent;
591591
box-shadow: inset 0 0 0 1px var(--gray-a7);
592592
}
@@ -609,7 +609,7 @@
609609
}
610610

611611
.combobox-trigger.variant-outline .combobox-trigger-icon {
612-
color: var(--gray-11);
612+
color: var(--gray-12);
613613
}
614614

615615
.combobox-trigger:disabled .combobox-trigger-icon {

apps/code/src/renderer/components/ui/combobox/Combobox.tsx

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
import { CaretDown, Check, MagnifyingGlass } from "@phosphor-icons/react";
2-
import { Popover } from "@radix-ui/themes";
1+
import { Check, MagnifyingGlass } from "@phosphor-icons/react";
2+
import { ChevronDownIcon } from "@radix-ui/react-icons";
3+
import { Button, Flex, Popover } from "@radix-ui/themes";
4+
import type { Responsive } from "@radix-ui/themes/dist/esm/props/prop-def.js";
35
import { Command as CmdkCommand } from "cmdk";
46
import React, {
57
createContext,
@@ -15,12 +17,6 @@ import "./Combobox.css";
1517
import { useComboboxFilter } from "./useComboboxFilter";
1618

1719
type ComboboxSize = "1" | "2" | "3";
18-
type ComboboxTriggerVariant =
19-
| "classic"
20-
| "surface"
21-
| "soft"
22-
| "ghost"
23-
| "outline";
2420
type ComboboxContentVariant = "solid" | "soft";
2521

2622
interface ComboboxContextValue {
@@ -150,7 +146,7 @@ function ComboboxRoot({
150146
interface ComboboxTriggerProps {
151147
children?: React.ReactNode;
152148
className?: string;
153-
variant?: ComboboxTriggerVariant;
149+
variant?: "outline" | "ghost" | "surface" | "soft" | "classic";
154150
color?: string;
155151
placeholder?: string;
156152
style?: React.CSSProperties;
@@ -159,33 +155,33 @@ interface ComboboxTriggerProps {
159155
function ComboboxTrigger({
160156
children,
161157
className = "",
162-
variant = "surface",
158+
variant = "outline",
163159
placeholder = "Select...",
164160
style,
165161
}: ComboboxTriggerProps) {
166162
const { size, value, open, disabled, getItemLabel } = useComboboxContext();
167163

168164
const displayValue =
169165
children ?? (getItemLabel(value) || value || placeholder);
170-
const hasPlaceholder = !children && !value;
171166

172167
return (
173168
<Popover.Trigger>
174-
<button
175-
type="button"
176-
className={`combobox-trigger size-${size} variant-${variant} ${className}`}
177-
data-state={open ? "open" : "closed"}
178-
data-placeholder={hasPlaceholder ? "" : undefined}
169+
<Button
170+
color="gray"
171+
variant={variant}
172+
size={size as Responsive<"1" | "2" | "3">}
179173
disabled={disabled}
174+
className={className}
175+
data-state={open ? "open" : "closed"}
180176
style={style}
181177
>
182-
<span className="combobox-trigger-inner">{displayValue}</span>
183-
{!disabled && (
184-
<span className="combobox-trigger-icon">
185-
<CaretDown weight="bold" />
186-
</span>
187-
)}
188-
</button>
178+
<Flex justify="between" align="center" gap="2">
179+
<Flex align="center" gap="2" style={{ minWidth: 0 }}>
180+
{displayValue}
181+
</Flex>
182+
{!disabled && <ChevronDownIcon style={{ flexShrink: 0 }} />}
183+
</Flex>
184+
</Button>
189185
</Popover.Trigger>
190186
);
191187
}

apps/code/src/renderer/features/command-center/components/CommandCenterToolbar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ export function CommandCenterToolbar({
118118
gap="3"
119119
px="3"
120120
py="2"
121-
className="shrink-0 border-gray-6 border-b"
121+
className="no-drag shrink-0 border-gray-6 border-b"
122122
>
123123
<Select.Root
124124
value={layout}

apps/code/src/renderer/features/git-interaction/components/BranchSelector.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export function BranchSelector({
122122
effectiveLoading || (isCloudMode && open && cloudBranchesFetchingMore);
123123

124124
const triggerContent = (
125-
<Flex align="center" gap="1" style={{ minWidth: 0 }}>
125+
<Flex align="center" gap="2" style={{ minWidth: 0 }}>
126126
{showSpinner ? (
127127
<Spinner size="1" />
128128
) : (

apps/code/src/renderer/features/message-editor/components/ModeIndicatorInput.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,10 @@ export function ModeIndicatorInput({
9090
<Flex
9191
align="center"
9292
justify="between"
93-
py="1"
94-
style={onCycleMode ? { cursor: "pointer" } : undefined}
93+
py="0"
94+
style={
95+
onCycleMode ? { cursor: "pointer", userSelect: "none" } : undefined
96+
}
9597
onClick={onCycleMode}
9698
>
9799
<Flex align="center" gap="1">

apps/code/src/renderer/features/message-editor/components/message-editor.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* Tiptap placeholder - targets empty first paragraph */
22
.cli-editor p.is-editor-empty:first-child::before {
33
content: attr(data-placeholder);
4-
color: var(--gray-11);
4+
color: var(--gray-8);
55
pointer-events: none;
66
float: left;
77
height: 0;

apps/code/src/renderer/features/message-editor/stores/taskInputHistoryStore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ interface TaskInputHistoryActions {
1111

1212
type TaskInputHistoryStore = TaskInputHistoryState & TaskInputHistoryActions;
1313

14-
const MAX_HISTORY = 50;
14+
const MAX_HISTORY = 15;
1515

1616
export const useTaskInputHistoryStore = create<TaskInputHistoryStore>()(
1717
persist(

apps/code/src/renderer/features/message-editor/tiptap/useTiptapEditor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export interface UseTiptapEditorOptions {
3939
}
4040

4141
const EDITOR_CLASS =
42-
"cli-editor min-h-[1.5em] w-full break-words border-none bg-transparent pr-2 text-[13px] text-[var(--gray-12)] outline-none [overflow-wrap:break-word] [white-space:pre-wrap] [word-break:break-word]";
42+
"cli-editor min-h-[1.5em] w-full break-words border-none bg-transparent pr-2 text-[14px] text-[var(--gray-12)] outline-none [overflow-wrap:break-word] [white-space:pre-wrap] [word-break:break-word]";
4343

4444
async function pasteTextAsFile(
4545
view: EditorView,
Lines changed: 42 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { SessionConfigOption } from "@agentclientprotocol/sdk";
2-
import { Brain } from "@phosphor-icons/react";
3-
import { Flex, Select, Text } from "@radix-ui/themes";
2+
import { Brain, CaretDown, Check } from "@phosphor-icons/react";
3+
import { Button, DropdownMenu, Flex, Text } from "@radix-ui/themes";
44
import { flattenSelectOptions } from "../stores/sessionStore";
55

66
interface ReasoningLevelSelectorProps {
@@ -10,6 +10,16 @@ interface ReasoningLevelSelectorProps {
1010
disabled?: boolean;
1111
}
1212

13+
const triggerStyle = {
14+
fontSize: "var(--font-size-1)",
15+
color: "var(--gray-11)",
16+
padding: "4px 8px",
17+
height: "auto",
18+
minHeight: "unset",
19+
gap: "6px",
20+
userSelect: "none" as const,
21+
};
22+
1323
export function ReasoningLevelSelector({
1424
thoughtOption,
1525
adapter,
@@ -27,25 +37,9 @@ export function ReasoningLevelSelector({
2737
options.find((opt) => opt.value === activeLevel)?.name ?? activeLevel;
2838

2939
return (
30-
<Select.Root
31-
value={activeLevel}
32-
onValueChange={(value) => onChange?.(value)}
33-
disabled={disabled}
34-
size="1"
35-
>
36-
<Select.Trigger
37-
variant="ghost"
38-
style={{
39-
fontSize: "var(--font-size-1)",
40-
color: "var(--gray-11)",
41-
padding: "4px 8px",
42-
marginLeft: "4px",
43-
height: "auto",
44-
minHeight: "unset",
45-
gap: "6px",
46-
}}
47-
>
48-
<Flex align="center" gap="1">
40+
<DropdownMenu.Root>
41+
<DropdownMenu.Trigger disabled={disabled}>
42+
<Button variant="ghost" color="gray" size="1" style={triggerStyle}>
4943
<Brain
5044
size={14}
5145
weight="regular"
@@ -54,15 +48,34 @@ export function ReasoningLevelSelector({
5448
<Text size="1">
5549
{adapter === "codex" ? "Reasoning" : "Effort"}: {activeLabel}
5650
</Text>
57-
</Flex>
58-
</Select.Trigger>
59-
<Select.Content position="popper" sideOffset={4}>
51+
<CaretDown
52+
size={10}
53+
weight="bold"
54+
style={{ color: "var(--gray-9)", flexShrink: 0 }}
55+
/>
56+
</Button>
57+
</DropdownMenu.Trigger>
58+
59+
<DropdownMenu.Content align="start" sideOffset={4} size="1">
6060
{options.map((level) => (
61-
<Select.Item key={level.value} value={level.value}>
62-
{level.name}
63-
</Select.Item>
61+
<DropdownMenu.Item
62+
key={level.value}
63+
onSelect={() => onChange?.(level.value)}
64+
>
65+
<Flex align="center" gap="2" style={{ minWidth: "100px" }}>
66+
<Check
67+
size={12}
68+
weight="bold"
69+
style={{
70+
flexShrink: 0,
71+
opacity: level.value === activeLevel ? 1 : 0,
72+
}}
73+
/>
74+
<Text size="1">{level.name}</Text>
75+
</Flex>
76+
</DropdownMenu.Item>
6477
))}
65-
</Select.Content>
66-
</Select.Root>
78+
</DropdownMenu.Content>
79+
</DropdownMenu.Root>
6780
);
6881
}

apps/code/src/renderer/features/sessions/components/UnifiedModelSelector.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import type {
55
import type { AgentAdapter } from "@features/settings/stores/settingsStore";
66
import {
77
ArrowsClockwise,
8+
CaretDown,
89
Check,
910
Cpu,
1011
Robot,
@@ -71,10 +72,10 @@ export function UnifiedModelSelector({
7172
fontSize: "var(--font-size-1)",
7273
color: "var(--gray-11)",
7374
padding: "4px 8px",
74-
marginLeft: "4px",
7575
height: "auto",
7676
minHeight: "unset",
7777
gap: "6px",
78+
userSelect: "none" as const,
7879
};
7980

8081
if (isConnecting) {
@@ -123,6 +124,11 @@ export function UnifiedModelSelector({
123124
{ADAPTER_ICONS[adapter]}
124125
</Flex>
125126
<Text size="1">{currentLabel ?? "Model"}</Text>
127+
<CaretDown
128+
size={10}
129+
weight="bold"
130+
style={{ color: "var(--gray-9)", flexShrink: 0 }}
131+
/>
126132
</Button>
127133
</DropdownMenu.Trigger>
128134

0 commit comments

Comments
 (0)