The best way to control Claude Code, Codex and more from any computer or phone
feat(web): morph composer and panel action icons (#14924)
Co-authored-by: maria-rcks <maria@kuuro.net>
Jake Leventhal committed
Oct 3, 2026 at 20:10 UTC
f2cc80a7a44ee05c1f39442779f2b719e31faeb5
31 files changed
+278
-230
apps/web/package.json
+2
@@ -48,8 +48,10 @@
48
"jose": "catalog:",
49
"jsonc-parser": "3.3.1",
50
"jszip": "3.10.1",
51
+ "lucide": "^0.564.0",
52
"lucide-react": "^0.564.0",
53
"mermaid": "^11.17.2",
54
+ "morphicons": "^1.7.1",
55
"react": "19.2.6",
56
"react-dom": "19.2.6",
57
"react-markdown": "^10.1.0",
apps/web/src/components/ChatMarkdown.tsx
+5
-7
@@ -5,10 +5,8 @@ import {
5
encodeComposerContextClipboardHtml,
6
} from "@t3tools/shared/composerContextClipboard";
7
import {
8
- CheckIcon,
8
ChevronRightIcon,
9
CodeIcon,
11
- CopyIcon,
10
FileSpreadsheetIcon,
11
FileTextIcon,
12
GlobeIcon,
@@ -16,10 +14,8 @@ import {
14
InfoIcon,
15
LightbulbIcon,
16
MailIcon,
19
- Maximize2Icon,
17
MessageSquareIcon,
18
MessageSquareWarningIcon,
22
- Minimize2Icon,
19
OctagonAlertIcon,
20
PlayIcon,
21
PresentationIcon,
@@ -29,6 +25,7 @@ import {
25
WrapTextIcon,
26
type LucideIcon,
27
} from "lucide-react";
28
+import { Check, Copy, Maximize2, Minimize2 } from "lucide";
29
import type {
30
AssetResource,
31
EnvironmentId,
@@ -123,6 +120,7 @@ import {
120
import { hasSpecificPierreIconForFileName, syntheticFileNameForLanguageId } from "../pierre-icons";
121
import { Tooltip, TooltipPopup, TooltipTrigger } from "./ui/tooltip";
122
import { Button } from "./ui/button";
123
+import { MorphIcon } from "~/components/MorphIcon";
124
import { ContextChip } from "./ContextChip";
125
import { Collapsible, CollapsiblePanel, CollapsibleTrigger } from "./ui/collapsible";
126
import { ScrollArea } from "./ui/scroll-area";
@@ -849,7 +847,7 @@ function MarkdownTable({ children, ...props }: React.ComponentProps<"table">) {
847
/>
848
}
849
>
852
- {expanded ? <Minimize2Icon className="size-3" /> : <Maximize2Icon className="size-3" />}
850
+ <MorphIcon className="size-3" icon={expanded ? Minimize2 : Maximize2} />
851
</TooltipTrigger>
852
<TooltipPopup side="top">{expandLabel}</TooltipPopup>
853
</Tooltip>
@@ -869,7 +867,7 @@ function MarkdownTable({ children, ...props }: React.ComponentProps<"table">) {
867
/>
868
}
869
>
872
- {copied ? <CheckIcon className="size-3" /> : <CopyIcon className="size-3" />}
870
+ <MorphIcon className="size-3" icon={copied ? Check : Copy} />
871
</TooltipTrigger>
872
<TooltipPopup side="top">{copyLabel}</TooltipPopup>
873
</Tooltip>
@@ -1063,7 +1061,7 @@ function MarkdownCodeBlock({
1061
/>
1062
}
1063
>
1066
- {copied ? <CheckIcon className="size-3" /> : <CopyIcon className="size-3" />}
1064
+ <MorphIcon className="size-3" icon={copied ? Check : Copy} />
1065
</TooltipTrigger>
1066
<TooltipPopup side="top">{copyLabel}</TooltipPopup>
1067
</Tooltip>
apps/web/src/components/DiffFilePathCopyButton.tsx
+7
-2
@@ -1,12 +1,14 @@
1
-import { CheckIcon, CopyIcon } from "lucide-react";
1
+import { Check, Copy } from "lucide";
2
import { useRef } from "react";
3
import { useCopyToClipboard } from "../hooks/useCopyToClipboard";
4
+import { cn } from "../lib/utils";
5
import {
6
ANCHORED_COPY_TOAST_TIMEOUT_MS,
7
showAnchoredCopyErrorToast,
8
showAnchoredCopySuccessToast,
9
} from "./ui/anchoredCopyToast";
10
import { Button } from "./ui/button";
11
+import { MorphIcon } from "~/components/MorphIcon";
12
import { Tooltip, TooltipPopup, TooltipTrigger } from "./ui/tooltip";
13
14
export function DiffFilePathCopyButton({ filePath }: { filePath: string }) {
@@ -30,7 +32,10 @@ export function DiffFilePathCopyButton({ filePath }: { filePath: string }) {
32
/>
33
}
34
>
33
- {isCopied ? <CheckIcon className="size-3 text-success" /> : <CopyIcon className="size-3" />}
35
+ <MorphIcon
36
+ className={cn("size-3", isCopied && "text-success")}
37
+ icon={isCopied ? Check : Copy}
38
+ />
39
</TooltipTrigger>
40
<TooltipPopup>
41
<p>{isCopied ? "Copied" : "Copy path"}</p>
apps/web/src/components/DiffPanel.tsx
+10
-17
@@ -12,15 +12,13 @@ import {
12
ArrowRightIcon,
13
CheckIcon,
14
ChevronDownIcon,
15
- ChevronRightIcon,
16
- ChevronsDownUpIcon,
17
- ChevronsUpDownIcon,
15
Columns2Icon,
16
FolderTreeIcon,
17
PilcrowIcon,
18
Rows3Icon,
19
TextWrapIcon,
20
} from "lucide-react";
21
+import { ChevronDown, ChevronRight, ChevronsDownUp, ChevronsUpDown } from "lucide";
22
import * as Schema from "effect/Schema";
23
import * as DateTime from "effect/DateTime";
24
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
@@ -58,6 +56,7 @@ import { AnnotatableCodeView, type AnnotatableCodeViewHandle } from "./diffs/Ann
56
import { DiffFileTree } from "./diffs/DiffFileTree";
57
import { diffFileTreeEntries } from "./diffs/diffFileTree.logic";
58
import { Button } from "./ui/button";
59
+import { MorphIcon } from "~/components/MorphIcon";
60
import { ToggleGroup, Toggle } from "./ui/toggle-group";
61
import { Switch } from "./ui/switch";
62
import {
@@ -873,11 +872,10 @@ export default function DiffPanel({
872
/>
873
}
874
>
876
- {allDiffFilesCollapsed ? (
877
- <ChevronsUpDownIcon className="size-3.5" />
878
- ) : (
879
- <ChevronsDownUpIcon className="size-3.5" />
880
- )}
875
+ <MorphIcon
876
+ className="size-3.5"
877
+ icon={allDiffFilesCollapsed ? ChevronsUpDown : ChevronsDownUp}
878
+ />
879
</TooltipTrigger>
880
<TooltipPopup side="top">
881
{allDiffFilesCollapsed ? "Expand all files" : "Collapse all files"}
@@ -1133,15 +1131,10 @@ export default function DiffPanel({
1131
/>
1132
}
1133
>
1136
- {collapsed ? (
1137
- <ChevronRightIcon
1138
- className={cn("size-4", getDiffCollapseIconClassName(fileDiff))}
1139
- />
1140
- ) : (
1141
- <ChevronDownIcon
1142
- className={cn("size-4", getDiffCollapseIconClassName(fileDiff))}
1143
- />
1144
- )}
1134
+ <MorphIcon
1135
+ className={cn("size-4", getDiffCollapseIconClassName(fileDiff))}
1136
+ icon={collapsed ? ChevronRight : ChevronDown}
1137
+ />
1138
</TooltipTrigger>
1139
<TooltipPopup side="top">
1140
{collapsed ? "Expand diff" : "Collapse diff"}
apps/web/src/components/MorphIcon.tsx
new
+6
@@ -0,0 +1,6 @@
1
+import { MorphIcon as BaseMorphIcon, type MorphIconProps } from "morphicons/react";
2
+
3
+/** Renders `lucide` icon data and morphs between shapes when `icon` changes. */
4
+export function MorphIcon({ reducedMotion = "user", ...props }: MorphIconProps) {
5
+ return <BaseMorphIcon reducedMotion={reducedMotion} {...props} />;
6
+}
apps/web/src/components/RightPanelTabs.tsx
+6
-7
@@ -23,9 +23,8 @@ import {
23
Globe2,
24
Plus,
25
TerminalSquare,
26
- Volume2,
27
- VolumeOff,
26
} from "lucide-react";
27
+import { Volume2, VolumeOff } from "lucide";
28
import {
29
type KeyboardEvent as ReactKeyboardEvent,
30
type MouseEvent as ReactMouseEvent,
@@ -44,6 +43,7 @@ import type { RightPanelSurface } from "~/rightPanelStore";
43
import { cn } from "~/lib/utils";
44
import { readLocalApi } from "~/localApi";
45
import { Button } from "~/components/ui/button";
46
+import { MorphIcon } from "~/components/MorphIcon";
47
import { AndroidIcon, AppleIcon } from "~/components/Icons";
48
import { Tooltip, TooltipPopup, TooltipTrigger } from "~/components/ui/tooltip";
49
import { Kbd } from "~/components/ui/kbd";
@@ -1149,11 +1149,10 @@ export function RightPanelTabs(props: RightPanelTabsProps) {
1149
.catch(() => undefined);
1150
}}
1151
>
1152
- {audio === "muted" ? (
1153
- <VolumeOff className="size-3" />
1154
- ) : (
1155
- <Volume2 className="size-3" />
1156
- )}
1152
+ <MorphIcon
1153
+ className="size-3"
1154
+ icon={audio === "muted" ? VolumeOff : Volume2}
1155
+ />
1156
</button>
1157
}
1158
/>
apps/web/src/components/chat/ChangedFilesTree.tsx
+11
-18
@@ -6,20 +6,15 @@ import {
6
summarizeTurnDiffStats,
7
type TurnDiffTreeNode,
8
} from "../../lib/turnDiffTree";
9
-import {
10
- ChevronsDownUpIcon,
11
- ChevronsUpDownIcon,
12
- ChevronRightIcon,
13
- FileDiffIcon,
14
- FolderIcon,
15
- FolderClosedIcon,
16
-} from "lucide-react";
9
+import { ChevronRightIcon, FileDiffIcon } from "lucide-react";
10
+import { ChevronsDownUp, ChevronsUpDown, Folder, FolderClosed } from "lucide";
11
import { cn } from "~/lib/utils";
12
import { DiffStatLabel, hasNonZeroStat } from "./DiffStatLabel";
13
import { PierreEntryIcon } from "./PierreEntryIcon";
14
import { Button } from "../ui/button";
15
import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip";
16
import { MiddleTruncate } from "../ui/middle-truncate";
17
+import { MorphIcon } from "~/components/MorphIcon";
18
19
const EMPTY_DIRECTORY_OVERRIDES: Record<string, boolean> = {};
20
@@ -86,11 +81,10 @@ export const ChangedFilesCard = memo(function ChangedFilesCard(props: {
81
/>
82
}
83
>
89
- {allDirectoriesExpanded ? (
90
- <ChevronsDownUpIcon className="size-3" />
91
- ) : (
92
- <ChevronsUpDownIcon className="size-3" />
93
- )}
84
+ <MorphIcon
85
+ className="size-3"
86
+ icon={allDirectoriesExpanded ? ChevronsDownUp : ChevronsUpDown}
87
+ />
88
</TooltipTrigger>
89
<TooltipPopup side="top">
90
{allDirectoriesExpanded ? "Collapse all folders" : "Expand all folders"}
@@ -195,11 +189,10 @@ export const ChangedFilesTree = memo(function ChangedFilesTree(props: {
189
isExpanded && "rotate-90",
190
)}
191
/>
198
- {isExpanded ? (
199
- <FolderIcon className="size-3.5 shrink-0 text-muted-foreground/75" />
200
- ) : (
201
- <FolderClosedIcon className="size-3.5 shrink-0 text-muted-foreground/75" />
202
- )}
192
+ <MorphIcon
193
+ className="size-3.5 shrink-0 text-muted-foreground/75"
194
+ icon={isExpanded ? Folder : FolderClosed}
195
+ />
196
<span className="truncate font-mono text-2xs text-muted-foreground/90 group-hover:text-foreground/90">
197
{node.name}
198
</span>
apps/web/src/components/chat/ComposerPrimaryActions.tsx
+4
-11
@@ -1,12 +1,7 @@
1
import { memo, type MouseEventHandler, type PointerEventHandler } from "react";
2
-import {
3
- CheckIcon,
4
- ChevronDownIcon,
5
- ChevronLeftIcon,
6
- CornerUpRightIcon,
7
- ListPlusIcon,
8
- PlayIcon,
9
-} from "lucide-react";
2
+import { CheckIcon, ChevronDownIcon, ChevronLeftIcon, PlayIcon } from "lucide-react";
3
+import { CornerUpRight, ListPlus } from "lucide";
4
+import { MorphIcon } from "~/components/MorphIcon";
5
import { useEnvironmentIdentificationMode } from "~/hooks/useSettings";
6
import { cn } from "~/lib/utils";
7
import { useShortcutModifierState } from "../../shortcutModifierState";
@@ -315,10 +310,8 @@ export const ComposerPrimaryActions = memo(function ComposerPrimaryActions({
310
<PlayIcon className="size-4 fill-current" aria-hidden="true" />
311
) : isEditingQueuedMessage ? (
312
<CheckIcon className="size-4" aria-hidden="true" />
318
- ) : isQueuing ? (
319
- <ListPlusIcon className="size-4" aria-hidden="true" />
313
) : isRunning ? (
321
- <CornerUpRightIcon className="size-4" aria-hidden="true" />
314
+ <MorphIcon className="size-4" icon={isQueuing ? ListPlus : CornerUpRight} />
315
) : (
316
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" aria-hidden="true">
317
<path
apps/web/src/components/chat/ExpandedImageDialog.tsx
+8
-3
@@ -7,8 +7,10 @@ import {
7
type ReactNode,
8
type KeyboardEvent,
9
} from "react";
10
-import { ChevronLeftIcon, ChevronRightIcon, ImageIcon, TextIcon, XIcon } from "lucide-react";
10
+import { ChevronLeftIcon, ChevronRightIcon, XIcon } from "lucide-react";
11
+import { Image as ImageGlyph, Text as TextGlyph } from "lucide";
12
import { Button } from "../ui/button";
13
+import { MorphIcon } from "~/components/MorphIcon";
14
import { Dialog, DialogPopup, DialogTitle } from "../ui/dialog";
15
import type { ExpandedImageItem, ExpandedImagePreview } from "./ExpandedImagePreview";
16
import { resolveExternalWebLinkHost } from "./externalLinkContextMenu";
@@ -165,7 +167,6 @@ export const ExpandedImageDialog = memo(function ExpandedImageDialog({
167
: accessibilityDetails?.format === "json"
168
? "Show accessibility JSON"
169
: "Show extracted text";
168
- const ContentsIcon = showingAccessibilityDetails ? ImageIcon : TextIcon;
170
171
return (
172
<Dialog
@@ -260,7 +261,11 @@ export const ExpandedImageDialog = memo(function ExpandedImageDialog({
261
/>
262
}
263
>
263
- <ContentsIcon className="size-3" aria-hidden="true" />
264
+ <MorphIcon
265
+ className="size-3"
266
+ aria-hidden="true"
267
+ icon={showingAccessibilityDetails ? ImageGlyph : TextGlyph}
268
+ />
269
</TooltipTrigger>
270
<TooltipPopup side="top">{contentsLabel}</TooltipPopup>
271
</Tooltip>
apps/web/src/components/chat/MessageCopyButton.tsx
+7
-2
@@ -1,6 +1,8 @@
1
import { memo, useRef } from "react";
2
-import { CopyIcon, CheckIcon } from "lucide-react";
2
+import { Check, Copy } from "lucide";
3
import { Button } from "../ui/button";
4
+import { MorphIcon } from "~/components/MorphIcon";
5
+import { cn } from "~/lib/utils";
6
import { useCopyToClipboard } from "~/hooks/useCopyToClipboard";
7
import {
8
ANCHORED_COPY_TOAST_TIMEOUT_MS,
@@ -47,7 +49,10 @@ export const MessageCopyButton = memo(function MessageCopyButton({
49
/>
50
}
51
>
50
- {isCopied ? <CheckIcon className="size-3 text-primary" /> : <CopyIcon className="size-3" />}
52
+ <MorphIcon
53
+ className={cn("size-3", isCopied && "text-primary")}
54
+ icon={isCopied ? Check : Copy}
55
+ />
56
</TooltipTrigger>
57
<TooltipPopup>
58
<p>Copy message</p>
apps/web/src/components/chat/MessagesTimeline.tsx
+7
-4
@@ -140,12 +140,14 @@ import {
140
XIcon,
141
ZapIcon,
142
} from "lucide-react";
143
+import { ChevronDown, ChevronRight } from "lucide";
144
import type {
145
ComposerContextId,
146
ComposerContextRecord,
147
KnownComposerContextRecord,
148
} from "@t3tools/contracts";
149
import { Button, InlineButton } from "../ui/button";
150
+import { MorphIcon } from "~/components/MorphIcon";
151
import { useAssetUrlRefresh, useAssetUrls, useAssetUrlState } from "../../assets/assetUrls";
152
import { MediaVideoPlayer } from "../media/MediaVideoPlayer";
153
import { getVirtualizedScrollFadeClassName } from "../ui/scroll-area";
@@ -2426,7 +2428,6 @@ function TimelineRowTimestamp({
2428
2429
function TurnFoldTimelineRow({ row }: { row: Extract<TimelineRow, { kind: "turn-fold" }> }) {
2430
const ctx = use(TimelineRowCtx);
2429
- const Icon = row.expanded ? ChevronDownIcon : ChevronRightIcon;
2431
2432
return (
2433
<div className="group/timeline-row relative flex items-center gap-1 border-b border-border/60 pb-2 pe-0.5 pt-1">
@@ -2438,7 +2439,7 @@ function TurnFoldTimelineRow({ row }: { row: Extract<TimelineRow, { kind: "turn-
2439
className="flex cursor-pointer select-none items-center gap-1 rounded-md px-1 text-sm leading-relaxed text-muted-foreground tabular-nums transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/70"
2440
>
2441
<span>{row.label}</span>
2441
- <Icon className="size-3.5" />
2442
+ <MorphIcon className="size-3.5" icon={row.expanded ? ChevronDown : ChevronRight} />
2443
</button>
2444
<TimelineRowTimestamp
2445
createdAt={row.createdAt}
@@ -2451,7 +2452,6 @@ function TurnFoldTimelineRow({ row }: { row: Extract<TimelineRow, { kind: "turn-
2452
2453
function AttemptFoldTimelineRow({ row }: { row: Extract<TimelineRow, { kind: "attempt-fold" }> }) {
2454
const ctx = use(TimelineRowCtx);
2454
- const Icon = row.expanded ? ChevronDownIcon : ChevronRightIcon;
2455
2456
return (
2457
<button
@@ -2462,7 +2462,10 @@ function AttemptFoldTimelineRow({ row }: { row: Extract<TimelineRow, { kind: "at
2462
onClick={() => ctx.onToggleAttemptFold(row.attemptId)}
2463
className="flex w-full cursor-pointer select-none items-center gap-2 rounded-md border border-border/60 bg-muted/20 px-2.5 py-2 text-left transition-colors hover:bg-muted/35 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/70"
2464
>
2465
- <Icon className="size-3.5 shrink-0 text-muted-foreground" />
2465
+ <MorphIcon
2466
+ className="size-3.5 shrink-0 text-muted-foreground"
2467
+ icon={row.expanded ? ChevronDown : ChevronRight}
2468
+ />
2469
<span className="text-xs font-medium text-foreground/80">{row.label}</span>
2470
<span className="text-2xs text-muted-foreground">Partial output retained</span>
2471
</button>
apps/web/src/components/chat/PanelLayoutControls.tsx
+4
-12
@@ -1,10 +1,6 @@
1
-import {
2
- Maximize2Icon,
3
- Minimize2Icon,
4
- PanelBottomIcon,
5
- PanelRightIcon,
6
- SquareMenuIcon,
7
-} from "lucide-react";
1
+import { PanelBottomIcon, PanelRightIcon, SquareMenuIcon } from "lucide-react";
2
+import { Maximize2, Minimize2 } from "lucide";
3
+import { MorphIcon } from "~/components/MorphIcon";
4
import { memo, type ReactElement } from "react";
5
6
import type { ThreadPanelPresentation } from "../../rightPanelLayout";
@@ -163,11 +159,7 @@ export const RightPanelMaximizeControl = memo(function RightPanelMaximizeControl
159
variant="ghost"
160
size="sm"
161
>
166
- {maximized ? (
167
- <Minimize2Icon className="size-4" />
168
- ) : (
169
- <Maximize2Icon className="size-4" />
170
- )}
162
+ <MorphIcon className="size-4" icon={maximized ? Minimize2 : Maximize2} />
163
</Toggle>
164
}
165
/>
apps/web/src/components/chat/ThreadDetailsPrRows.tsx
+3
-6
@@ -5,7 +5,7 @@ import {
5
threadPullRequestKeyOf,
6
visibleThreadPullRequests,
7
} from "@t3tools/shared/threadPullRequests";
8
-import { MinusIcon, PlusIcon } from "lucide-react";
8
+import { Minus, Plus } from "lucide";
9
import { useState, type ComponentProps, type MouseEvent as ReactMouseEvent } from "react";
10
11
import { findProjectOnChangeRequestHost, parseChangeRequestUrl } from "~/lib/openPullRequestLink";
@@ -13,6 +13,7 @@ import { findProjectOnChangeRequestHost, parseChangeRequestUrl } from "~/lib/ope
13
import { useProjects } from "~/state/entities";
14
15
import { pullRequestListLines } from "../pullRequest/pullRequestListLines";
16
+import { MorphIcon } from "~/components/MorphIcon";
17
import { linkedPullRequestSnapshotStatus, prStatusIndicator } from "../ThreadStatusIndicators";
18
19
import { ThreadDetailsPrRow } from "./ThreadDetailsPrRow";
@@ -96,11 +97,7 @@ export function ThreadDetailsPrRows({
97
tone="muted"
98
className="w-full active:scale-100"
99
>
99
- {expanded ? (
100
- <MinusIcon aria-hidden className="size-4 shrink-0" />
101
- ) : (
102
- <PlusIcon aria-hidden className="size-4 shrink-0" />
103
- )}
100
+ <MorphIcon aria-hidden className="size-4 shrink-0" icon={expanded ? Minus : Plus} />
101
{expanded ? "Show less" : `Show ${rest.length} more`}
102
</ThreadDetailsControl>
103
</>
apps/web/src/components/chat/WorktreeSetupCard.tsx
+3
-3
@@ -6,8 +6,6 @@ import {
6
import { formatDuration } from "@t3tools/shared/orchestrationTiming";
7
import {
8
CheckIcon,
9
- ChevronDownIcon,
10
- ChevronRightIcon,
9
CircleAlertIcon,
10
CircleIcon,
11
LaptopIcon,
@@ -15,9 +13,11 @@ import {
13
TerminalIcon,
14
XIcon,
15
} from "lucide-react";
16
+import { ChevronDown, ChevronRight } from "lucide";
17
import { useEffect, useState, type ReactNode } from "react";
18
19
import { Button } from "~/components/ui/button";
20
+import { MorphIcon } from "~/components/MorphIcon";
21
import { Spinner } from "~/components/ui/spinner";
22
import { MiddleTruncate } from "../ui/middle-truncate";
23
import { observeVisibleAnimation } from "~/lib/visibleAnimation";
@@ -409,7 +409,7 @@ export function WorktreeSetupCard({
409
aria-expanded={detailsOpen}
410
onClick={() => setDetailsOpen((open) => !open)}
411
>
412
- {detailsOpen ? <ChevronDownIcon aria-hidden /> : <ChevronRightIcon aria-hidden />}
412
+ <MorphIcon aria-hidden icon={detailsOpen ? ChevronDown : ChevronRight} />
413
Details
414
</Button>
415
{showTerminal ? (
apps/web/src/components/device/DeviceControlsRail.tsx
+3
-3
@@ -6,7 +6,6 @@ import {
6
Keyboard,
7
Box,
8
Maximize,
9
- Moon,
9
MoreHorizontal,
10
PictureInPicture2,
11
Power,
@@ -14,12 +13,13 @@ import {
13
SlidersHorizontal,
14
Smartphone,
15
Square,
17
- Sun,
16
Type,
17
X,
18
} from "lucide-react";
19
+import { Moon, Sun } from "lucide";
20
import type { ReactNode } from "react";
21
import { Button } from "~/components/ui/button";
22
+import { MorphIcon } from "~/components/MorphIcon";
23
import {
24
Menu,
25
MenuItem,
@@ -132,7 +132,7 @@ export function DeviceControlsRail(props: {
132
disabled={controls.disabled || !settings?.appearance}
133
onClick={() => void controls.act({ type: "setAppearance", value: nextAppearance })}
134
>
135
- {settings?.appearance === "dark" ? <Sun /> : <Moon />}
135
+ <MorphIcon icon={settings?.appearance === "dark" ? Sun : Moon} />
136
</RailButton>
137
<Menu>
138
<MenuTrigger
apps/web/src/components/device/DeviceSetup.tsx
+5
-3
@@ -1,10 +1,12 @@
1
import { DeviceHostUpdates } from "./DeviceHostUpdates";
2
import type { DevicePlatform, DeviceServiceState, EnvironmentId } from "@t3tools/contracts";
3
-import { Check, CircleAlert } from "lucide-react";
3
+import { Check } from "lucide-react";
4
+import { Check as CheckGlyph, CircleAlert } from "lucide";
5
import { useState } from "react";
6
7
import { Button } from "~/components/ui/button";
8
import { DialogClose } from "~/components/ui/dialog";
9
+import { MorphIcon } from "~/components/MorphIcon";
10
import { WizardHeader, WizardPanel, WizardSteps, WizardFooter } from "~/components/ui/wizard";
11
import { Spinner } from "~/components/ui/spinner";
12
import { Switch } from "~/components/ui/switch";
@@ -287,16 +289,16 @@ export function PlatformStatus(props: {
289
readonly status: { readonly ready: boolean; readonly message: string };
290
readonly compact?: boolean;
291
}) {
290
- const Icon = props.status.ready ? Check : CircleAlert;
292
return (
293
<div
294
className={cn("flex gap-2", !props.compact && "rounded-md border border-border/60 px-3 py-2")}
295
>
295
- <Icon
296
+ <MorphIcon
297
className={cn(
298
"mt-0.5 size-4 shrink-0",
299
props.status.ready ? "text-success" : "text-muted-foreground",
300
)}
301
+ icon={props.status.ready ? CheckGlyph : CircleAlert}
302
/>
303
<div className={cn(props.compact && props.status.ready && "flex items-center gap-2")}>
304
<p className="font-medium">{props.platform}</p>
apps/web/src/components/diffs/DiffFileTree.tsx
+6
-6
@@ -1,6 +1,6 @@
1
import type { GitStatusEntry } from "@pierre/trees";
2
import { FileTree, useFileTree, useFileTreeSelector } from "@pierre/trees/react";
3
-import { ChevronsDownUpIcon, ChevronsUpDownIcon } from "lucide-react";
3
+import { ChevronsDownUp, ChevronsUpDown } from "lucide";
4
import { useEffect, useMemo, useRef, useState, type ReactNode } from "react";
5
6
import { useTheme } from "~/hooks/useTheme";
@@ -10,6 +10,7 @@ import { PIERRE_TREE_UNSAFE_CSS, pierreTreeStyle } from "~/pierre-tree-theme";
10
11
import { areAllDirectoriesExpanded, setAllDirectoriesExpanded } from "../files/fileTreeExpansion";
12
import { Button } from "../ui/button";
13
+import { MorphIcon } from "~/components/MorphIcon";
14
import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip";
15
import {
16
buildDiffFileTreeUpdates,
@@ -189,11 +190,10 @@ export function DiffFileTree({
190
/>
191
}
192
>
192
- {allDirectoriesExpanded ? (
193
- <ChevronsDownUpIcon className="size-3.5" />
194
- ) : (
195
- <ChevronsUpDownIcon className="size-3.5" />
196
- )}
193
+ <MorphIcon
194
+ className="size-3.5"
195
+ icon={allDirectoriesExpanded ? ChevronsDownUp : ChevronsUpDown}
196
+ />
197
</TooltipTrigger>
198
<TooltipPopup>
199
{allDirectoriesExpanded ? "Collapse all folders" : "Expand all folders"}
apps/web/src/components/files/AttachmentFilePreview.tsx
+8
-20
@@ -3,22 +3,13 @@ import type { EnvironmentId } from "@t3tools/contracts";
3
import { formatAttachmentSize } from "@t3tools/client-runtime/state/attachments";
4
import { readFilePreviewResponse } from "@t3tools/client-runtime/file-preview";
5
import { filePreviewKind, FILE_TEXT_PREVIEW_MAX_BYTES } from "@t3tools/shared/filePreview";
6
-import {
7
- CheckIcon,
8
- ChevronRightIcon,
9
- Code2,
10
- CopyIcon,
11
- DownloadIcon,
12
- Eye,
13
- Table2,
14
- Trash2Icon,
15
- WrapTextIcon,
16
- XIcon,
17
-} from "lucide-react";
6
+import { ChevronRightIcon, DownloadIcon, Trash2Icon, WrapTextIcon, XIcon } from "lucide-react";
7
+import { Check, Code2, Copy, Eye, Table2 } from "lucide";
8
import { lazy, Suspense, useEffect, useMemo, useRef, useState } from "react";
9
10
import { useAssetUrlRefresh } from "~/assets/assetUrls";
11
import ChatMarkdown from "~/components/ChatMarkdown";
12
+import { MorphIcon } from "~/components/MorphIcon";
13
import { ScrollArea } from "~/components/ui/scroll-area";
14
import { toastManager } from "~/components/ui/toast";
15
import { useCopyToClipboard } from "~/hooks/useCopyToClipboard";
@@ -305,13 +296,10 @@ export function AttachmentFilePreview(props: {
296
pressed={rendered}
297
onPress={() => setRendered((value) => !value)}
298
>
308
- {rendered ? (
309
- <Code2 className="size-3.5" />
310
- ) : renderedMode === "table" ? (
311
- <Table2 className="size-3.5" />
312
- ) : (
313
- <Eye className="size-3.5" />
314
- )}
299
+ <MorphIcon
300
+ className="size-3.5"
301
+ icon={rendered ? Code2 : renderedMode === "table" ? Table2 : Eye}
302
+ />
303
</FileSurfaceAction>
304
) : null}
305
{showsRawText ? (
@@ -328,7 +316,7 @@ export function AttachmentFilePreview(props: {
316
label={isCopied ? "Copied" : content.truncated ? "Copy preview" : "Copy contents"}
317
onPress={() => copyToClipboard(content.text, undefined)}
318
>
331
- {isCopied ? <CheckIcon className="size-3.5" /> : <CopyIcon className="size-3.5" />}
319
+ <MorphIcon className="size-3.5" icon={isCopied ? Check : Copy} />
320
</FileSurfaceAction>
321
) : null}
322
{url ? (
apps/web/src/components/files/FileBrowserPanel.tsx
+6
-6
@@ -6,11 +6,12 @@ import type {
6
import type { EnvironmentId, ProjectEntry } from "@t3tools/contracts";
7
import { FileTree, useFileTree, useFileTreeSearch, useFileTreeSelector } from "@pierre/trees/react";
8
import { serializeComposerFileLink } from "@t3tools/shared/composerTrigger";
9
-import { ChevronsDownUpIcon, ChevronsUpDownIcon } from "lucide-react";
9
+import { ChevronsDownUp, ChevronsUpDown } from "lucide";
10
import { useEffect, useMemo, useRef, useState } from "react";
11
12
import { Button } from "~/components/ui/button";
13
import { InputGroup, InputGroupInput } from "~/components/ui/input-group";
14
+import { MorphIcon } from "~/components/MorphIcon";
15
import { toastManager } from "~/components/ui/toast";
16
import { Tooltip, TooltipPopup, TooltipTrigger } from "~/components/ui/tooltip";
17
import { useComposerHandleContext } from "~/composerHandleContext";
@@ -516,11 +517,10 @@ export default function FileBrowserPanel({
517
/>
518
}
519
>
519
- {allDirectoriesExpanded ? (
520
- <ChevronsDownUpIcon className="size-3.5" />
521
- ) : (
522
- <ChevronsUpDownIcon className="size-3.5" />
523
- )}
520
+ <MorphIcon
521
+ className="size-3.5"
522
+ icon={allDirectoriesExpanded ? ChevronsDownUp : ChevronsUpDown}
523
+ />
524
</TooltipTrigger>
525
<TooltipPopup>
526
{expandAll || allDirectoriesExpanded ? "Collapse all folders" : "Expand all folders"}
apps/web/src/components/files/FilePreviewPanel.tsx
+7
-8
@@ -21,7 +21,8 @@ import {
21
squashAtomCommandFailure,
22
} from "@t3tools/client-runtime/state/runtime";
23
import { mediaFileReference } from "@t3tools/client-runtime/media-reference";
24
-import { Code2, Eye, FolderTree, Globe2, Table2, WrapTextIcon } from "lucide-react";
24
+import { FolderTree, Globe2, WrapTextIcon } from "lucide-react";
25
+import { Code2, Eye, Table2 } from "lucide";
26
import * as Schema from "effect/Schema";
27
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
28
@@ -30,6 +31,7 @@ import { useAssetUrlRefresh, useAssetUrlState } from "~/assets/assetUrls";
31
import { OpenInPicker } from "~/components/chat/OpenInPicker";
32
import { MediaVideoPlayer } from "~/components/media/MediaVideoPlayer";
33
import { MediaActions, type MediaActionSource } from "~/components/media/MediaActions";
34
+import { MorphIcon } from "~/components/MorphIcon";
35
import { useRemoteOpenState } from "~/remoteOpen";
36
import { useClientSettings, useUpdateClientSettings } from "~/hooks/useSettings";
37
import { useTheme } from "~/hooks/useTheme";
@@ -1140,13 +1142,10 @@ export default function FilePreviewPanel({
1142
);
1143
}}
1144
>
1143
- {rendered ? (
1144
- <Code2 className="size-3.5" />
1145
- ) : renderedMode === "table" ? (
1146
- <Table2 className="size-3.5" />
1147
- ) : (
1148
- <Eye className="size-3.5" />
1149
- )}
1145
+ <MorphIcon
1146
+ className="size-3.5"
1147
+ icon={rendered ? Code2 : renderedMode === "table" ? Table2 : Eye}
1148
+ />
1149
</FileSurfaceAction>
1150
) : null}
1151
{showsRawText ? (
apps/web/src/components/onboarding/WelcomeWizard.tsx
+3
-2
@@ -26,11 +26,11 @@ import {
26
CheckIcon,
27
ChevronRightIcon,
28
CloudIcon,
29
- CopyIcon,
29
LinkIcon,
30
MonitorIcon,
31
TerminalIcon,
32
} from "lucide-react";
33
+import { Check, Copy } from "lucide";
34
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
35
36
import { TYPOGRAPHY_ADVANCED_STORAGE_KEY } from "../../appearanceFonts";
@@ -77,6 +77,7 @@ import { T3Wordmark } from "../T3Wordmark";
77
import { Alert, AlertDescription } from "../ui/alert";
78
import { Button } from "../ui/button";
79
import { Checkbox } from "../ui/checkbox";
80
+import { MorphIcon } from "~/components/MorphIcon";
81
import { Collapsible, CollapsiblePanel, CollapsibleTrigger } from "../ui/collapsible";
82
import { Input } from "../ui/input";
83
import { Tooltip, TooltipTrigger, TooltipPopup } from "../ui/tooltip";
@@ -1744,7 +1745,7 @@ function CommandBlock({
1745
aria-label="Copy command"
1746
onClick={() => copyToClipboard(command, undefined)}
1747
>
1747
- {isCopied ? <CheckIcon className="size-3.5" /> : <CopyIcon className="size-3.5" />}
1748
+ <MorphIcon className="size-3.5" icon={isCopied ? Check : Copy} />
1749
</Button>
1750
</div>
1751
);
apps/web/src/components/pullRequest/PullRequestCodeTab.tsx
+7
-12
@@ -13,8 +13,6 @@ import type {
13
import {
14
ChevronDownIcon,
15
ChevronRightIcon,
16
- ChevronsDownUpIcon,
17
- ChevronsUpDownIcon,
16
Columns2Icon,
17
FolderTreeIcon,
18
InfoIcon,
@@ -24,6 +22,7 @@ import {
22
TextWrapIcon,
23
TriangleAlertIcon,
24
} from "lucide-react";
25
+import { ChevronDown, ChevronRight, ChevronsDownUp, ChevronsUpDown } from "lucide";
26
import { useAtomRefresh } from "@effect/atom-react";
27
import * as Schema from "effect/Schema";
28
import { useCallback, useEffect, useMemo, useRef, useState, type ReactNode } from "react";
@@ -64,6 +63,7 @@ import { useCodeViewFileReveal } from "../diffs/useCodeViewFileReveal";
63
import { diffFileTreeEntries } from "../diffs/diffFileTree.logic";
64
import { StyledDiffCodeView } from "../diffs/StyledDiffCodeView";
65
import { Button } from "../ui/button";
66
+import { MorphIcon } from "~/components/MorphIcon";
67
import { Checkbox } from "../ui/checkbox";
68
import { Collapsible, CollapsiblePanel, CollapsibleTrigger } from "../ui/collapsible";
69
import {
@@ -791,11 +791,7 @@ function PullRequestCodeTab({
791
toggleFile(item.id);
792
}}
793
>
794
- {collapsed ? (
795
- <ChevronRightIcon className="size-4" />
796
- ) : (
797
- <ChevronDownIcon className="size-4" />
798
- )}
794
+ <MorphIcon className="size-4" icon={collapsed ? ChevronRight : ChevronDown} />
795
</Button>
796
);
797
},
@@ -1249,11 +1245,10 @@ function PullRequestCodeTab({
1245
/>
1246
}
1247
>
1252
- {allFilesCollapsed ? (
1253
- <ChevronsUpDownIcon className="size-3.5" />
1254
- ) : (
1255
- <ChevronsDownUpIcon className="size-3.5" />
1256
- )}
1248
+ <MorphIcon
1249
+ className="size-3.5"
1250
+ icon={allFilesCollapsed ? ChevronsUpDown : ChevronsDownUp}
1251
+ />
1252
</TooltipTrigger>
1253
<TooltipPopup side="top">
1254
{allFilesCollapsed ? "Expand all files" : "Collapse all files"}
apps/web/src/components/pullRequest/PullRequestReviewAnnotation.tsx
+7
-12
@@ -9,19 +9,15 @@ import type {
9
PullRequestThreadCommentsResult,
10
PullRequestThreadComment,
11
} from "@t3tools/contracts";
12
-import {
13
- CheckCircle2Icon,
14
- CircleIcon,
15
- HammerIcon,
16
- MessageSquareIcon,
17
- Trash2Icon,
18
-} from "lucide-react";
12
+import { HammerIcon, MessageSquareIcon, Trash2Icon } from "lucide-react";
13
+import { Circle, CircleCheck } from "lucide";
14
import { useRef, useState } from "react";
15
16
import { formatRelativeTimeLabel } from "~/timestampFormat";
17
import { cn } from "~/lib/utils";
18
19
import { Button } from "../ui/button";
20
+import { MorphIcon } from "~/components/MorphIcon";
21
import { PullRequestEditButton } from "./PullRequestEditButton";
22
import { Textarea } from "../ui/textarea";
23
import { isCommentSubmitShortcut } from "../diffs/commentSubmitShortcut";
@@ -219,11 +215,10 @@ export function ReviewThreadCard({
215
onPointerDown={(event) => event.stopPropagation()}
216
>
217
<div className="flex items-center gap-2 text-xs text-muted-foreground">
222
- {thread.isResolved ? (
223
- <CheckCircle2Icon className="size-3.5 text-success-foreground" />
224
- ) : (
225
- <CircleIcon className="size-3.5" />
226
- )}
218
+ <MorphIcon
219
+ className={cn("size-3.5", thread.isResolved && "text-success-foreground")}
220
+ icon={thread.isResolved ? CircleCheck : Circle}
221
+ />
222
<button
223
type="button"
224
className="hover:text-foreground"
apps/web/src/components/settings/DiagnosticsSettings.tsx
+4
-10
@@ -1,13 +1,7 @@
1
import { ProcessSignalActions } from "./ProcessSignalActions";
2
import { RefreshIcon } from "~/components/ui/refresh-icon";
3
-import {
4
- AlertTriangleIcon,
5
- ChevronDownIcon,
6
- ChevronRightIcon,
7
- CopyIcon,
8
- FolderOpenIcon,
9
- InfoIcon,
10
-} from "lucide-react";
3
+import { AlertTriangleIcon, CopyIcon, FolderOpenIcon, InfoIcon } from "lucide-react";
4
+import { ChevronDown, ChevronRight } from "lucide";
5
import {
6
isAtomCommandInterrupted,
7
squashAtomCommandFailure,
@@ -30,6 +24,7 @@ import { serverEnvironment } from "../../state/server";
24
import { shellEnvironment } from "../../state/shell";
25
import { useCopyToClipboard } from "../../hooks/useCopyToClipboard";
26
import { Button } from "../ui/button";
27
+import { MorphIcon } from "~/components/MorphIcon";
28
import { ScrollArea } from "../ui/scroll-area";
29
import { Toggle, ToggleGroup } from "../ui/toggle-group";
30
import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip";
@@ -268,7 +263,6 @@ function ProcessNameCell({
263
}) {
264
const name = formatProcessName(process.command);
265
const hasChildren = process.childPids.length > 0;
271
- const ChevronIcon = isExpanded ? ChevronDownIcon : ChevronRightIcon;
266
267
return (
268
<div
@@ -282,7 +276,7 @@ function ProcessNameCell({
276
aria-label={isExpanded ? `Collapse ${name}` : `Expand ${name}`}
277
onClick={() => onToggle(process.pid)}
278
>
285
- <ChevronIcon className="size-3.5" />
279
+ <MorphIcon className="size-3.5" icon={isExpanded ? ChevronDown : ChevronRight} />
280
</Button>
281
) : (
282
<span className="size-5 shrink-0" aria-hidden="true" />
apps/web/src/components/settings/ProviderInstanceCard.tsx
+6
-7
@@ -7,13 +7,12 @@ import {
7
ArrowUpCircleIcon,
8
CopyIcon,
9
DownloadIcon,
10
- LockIcon,
11
- LockOpenIcon,
10
ExternalLinkIcon,
11
PlusIcon,
12
Trash2Icon,
13
XIcon,
14
} from "lucide-react";
15
+import { Lock as LockGlyph, LockOpen } from "lucide";
16
import * as Arr from "effect/Array";
17
import * as Result from "effect/Result";
18
import { useEffect, useRef, useState, type ReactElement, type ReactNode } from "react";
@@ -41,6 +40,7 @@ import { useCopyToClipboard } from "../../hooks/useCopyToClipboard";
40
import { normalizeProviderAccentColor } from "../../providerInstances";
41
import { Badge } from "../ui/badge";
42
import { Button } from "../ui/button";
43
+import { MorphIcon } from "~/components/MorphIcon";
44
import { DraftInput } from "../ui/draft-input";
45
import { Popover, PopoverPopup, PopoverTrigger } from "../ui/popover";
46
import { Switch } from "../ui/switch";
@@ -438,11 +438,10 @@ function ProviderEnvironmentSection(props: {
438
aria-pressed={variable.sensitive}
439
aria-label={`Mark environment variable ${variable.name || index + 1} as sensitive`}
440
>
441
- {variable.sensitive ? (
442
- <LockIcon className="size-3" />
443
- ) : (
444
- <LockOpenIcon className="size-3" />
445
- )}
441
+ <MorphIcon
442
+ className="size-3"
443
+ icon={variable.sensitive ? LockGlyph : LockOpen}
444
+ />
445
</Button>
446
}
447
/>
apps/web/src/components/settings/ResourceTelemetryDiagnostics.tsx
+3
-4
@@ -4,14 +4,13 @@ import {
4
ActivityIcon,
5
AlertTriangleIcon,
6
BatteryIcon,
7
- ChevronDownIcon,
8
- ChevronRightIcon,
7
CpuIcon,
8
DatabaseIcon,
9
GaugeIcon,
10
HardDriveIcon,
11
MemoryStickIcon,
12
} from "lucide-react";
13
+import { ChevronDown, ChevronRight } from "lucide";
14
import type {
15
BackgroundBooleanState,
16
EnvironmentId,
@@ -44,6 +43,7 @@ import { serverEnvironment } from "../../state/server";
43
import { useAtomCommand } from "../../state/use-atom-command";
44
import { formatRelativeTime } from "../../timestampFormat";
45
import { Button } from "../ui/button";
46
+import { MorphIcon } from "~/components/MorphIcon";
47
import { ScrollArea } from "../ui/scroll-area";
48
import { Toggle, ToggleGroup } from "../ui/toggle-group";
49
import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip";
@@ -480,7 +480,6 @@ function ProcessTreeName({
480
}) {
481
const name = formatProcessName(process);
482
const hasChildren = process.childPids.length > 0;
483
- const ChevronIcon = collapsed ? ChevronRightIcon : ChevronDownIcon;
483
return (
484
<div
485
className="grid min-w-0 grid-cols-[1.25rem_0.375rem_minmax(0,1fr)] items-center gap-2"
@@ -493,7 +492,7 @@ function ProcessTreeName({
492
onClick={() => onToggle(process)}
493
aria-label={collapsed ? `Expand ${name}` : `Collapse ${name}`}
494
>
496
- <ChevronIcon className="size-3.5" />
495
+ <MorphIcon className="size-3.5" icon={collapsed ? ChevronRight : ChevronDown} />
496
</Button>
497
) : (
498
<span className="size-5" aria-hidden />
apps/web/src/components/settings/ThemeEditorPanel.tsx
+4
-9
@@ -1,11 +1,5 @@
1
-import {
2
- ChevronDownIcon,
3
- ChevronUpIcon,
4
- MousePointer2Icon,
5
- PaintbrushIcon,
6
- PlusIcon,
7
- XIcon,
8
-} from "lucide-react";
1
+import { MousePointer2Icon, PaintbrushIcon, PlusIcon, XIcon } from "lucide-react";
2
+import { ChevronDown, ChevronUp } from "lucide";
3
import {
4
useCallback,
5
useEffect,
@@ -36,6 +30,7 @@ import {
30
} from "../../themePalette";
31
import { cn } from "../../lib/utils";
32
import { Button } from "../ui/button";
33
+import { MorphIcon } from "~/components/MorphIcon";
34
import { Input } from "../ui/input";
35
import { Switch } from "../ui/switch";
36
import { Toggle, ToggleGroup } from "../ui/toggle-group";
@@ -1221,7 +1216,7 @@ export function ThemeEditorPanel({
1216
variant="ghost"
1217
onClick={() => setIsMinimized(!isMinimized)}
1218
>
1224
- {isMinimized ? <ChevronUpIcon /> : <ChevronDownIcon />}
1219
+ <MorphIcon icon={isMinimized ? ChevronUp : ChevronDown} />
1220
</Button>
1221
<Button
1222
aria-label="Close the theme editor"
apps/web/src/components/ui/sidebar.tsx
+3
-2
@@ -1,11 +1,12 @@
1
import { mergeProps } from "@base-ui/react/merge-props";
2
import { useRender } from "@base-ui/react/use-render";
3
import { cva, type VariantProps } from "class-variance-authority";
4
-import { PanelLeftCloseIcon, PanelLeftIcon } from "lucide-react";
4
+import { PanelLeft, PanelLeftClose } from "lucide";
5
import * as React from "react";
6
import { cn } from "~/lib/utils";
7
import { Button } from "~/components/ui/button";
8
import { Input, type InputProps } from "~/components/ui/input";
9
+import { MorphIcon } from "~/components/MorphIcon";
10
import { ScrollArea } from "~/components/ui/scroll-area";
11
import {
12
Sheet,
@@ -342,7 +343,7 @@ function SidebarTrigger({ className, onClick, ...props }: React.ComponentProps<t
343
variant="ghost"
344
{...props}
345
>
345
- {isOpen ? <PanelLeftCloseIcon className="size-4" /> : <PanelLeftIcon className="size-4" />}
346
+ <MorphIcon className="size-4" icon={isOpen ? PanelLeftClose : PanelLeft} />
347
<span className="sr-only">Toggle Sidebar</span>
348
</Button>
349
);
apps/web/src/components/ui/toast.tsx
+18
-30
@@ -14,20 +14,12 @@ import {
14
} from "react";
15
import { useParams } from "@tanstack/react-router";
16
import { type ScopedThreadRef, type ThreadId } from "@t3tools/contracts";
17
-import {
18
- CheckIcon,
19
- ChevronDownIcon,
20
- ChevronUpIcon,
21
- CircleAlertIcon,
22
- CircleCheckIcon,
23
- CopyIcon,
24
- InfoIcon,
25
- TriangleAlertIcon,
26
- XIcon,
27
-} from "lucide-react";
17
+import { CircleAlertIcon, CircleCheckIcon, InfoIcon, TriangleAlertIcon, XIcon } from "lucide-react";
18
+import { Check, ChevronDown, ChevronUp, Copy } from "lucide";
19
20
import { cn } from "~/lib/utils";
21
import { Button, buttonVariants } from "~/components/ui/button";
22
+import { MorphIcon } from "~/components/MorphIcon";
23
import { useComposerDraftStore } from "~/composerDraftStore";
24
import { useCopyToClipboard } from "~/hooks/useCopyToClipboard";
25
import { resolveThreadRouteTarget } from "~/threadRoutes";
@@ -135,7 +127,10 @@ function CopyErrorButton({ text }: { text: string }) {
127
/>
128
}
129
>
138
- {isCopied ? <CheckIcon className="size-3 text-success" /> : <CopyIcon className="size-3" />}
130
+ <MorphIcon
131
+ className={cn("size-3", isCopied && "text-success")}
132
+ icon={isCopied ? Check : Copy}
133
+ />
134
</TooltipTrigger>
135
<TooltipPopup side="top">{label}</TooltipPopup>
136
</Tooltip>
@@ -165,11 +160,11 @@ function ToastExpandableSection({
160
onClick={() => setOpen((prev) => !prev)}
161
type="button"
162
>
168
- {open ? (
169
- <ChevronUpIcon className="size-3.5 shrink-0 opacity-80" strokeWidth={2.25} />
170
- ) : (
171
- <ChevronDownIcon className="size-3.5 shrink-0 opacity-80" strokeWidth={2.25} />
172
- )}
163
+ <MorphIcon
164
+ className="size-3.5 shrink-0 opacity-80"
165
+ icon={open ? ChevronUp : ChevronDown}
166
+ strokeWidth={2.25}
167
+ />
168
{open ? collapseLabel : expandLabel}
169
</button>
170
{open ? <div className={toastExpandablePanelClassName}>{children}</div> : null}
@@ -249,19 +244,12 @@ function ToastDescriptionAndExpandable({
244
data-slot="toast-description"
245
/>
246
</div>
252
- {open ? (
253
- <ChevronUpIcon
254
- aria-hidden
255
- className="mt-0.5 size-3.5 shrink-0 text-muted-foreground opacity-80"
256
- strokeWidth={2.25}
257
- />
258
- ) : (
259
- <ChevronDownIcon
260
- aria-hidden
261
- className="mt-0.5 size-3.5 shrink-0 text-muted-foreground opacity-80"
262
- strokeWidth={2.25}
263
- />
264
- )}
247
+ <MorphIcon
248
+ aria-hidden
249
+ className="mt-0.5 size-3.5 shrink-0 text-muted-foreground opacity-80"
250
+ icon={open ? ChevronUp : ChevronDown}
251
+ strokeWidth={2.25}
252
+ />
253
</TooltipTrigger>
254
<TooltipPopup side="top">{open ? collapseLabel : expandLabel}</TooltipPopup>
255
</Tooltip>
apps/web/src/routes/__root.tsx
+4
-2
@@ -11,7 +11,7 @@ import {
11
useNavigate,
12
useRouter,
13
} from "@tanstack/react-router";
14
-import { CheckIcon, CopyIcon } from "lucide-react";
14
+import { Check, Copy } from "lucide";
15
import { useEffect, useEffectEvent, useMemo, useRef, useState } from "react";
16
17
import { APP_BASE_NAME, APP_DISPLAY_NAME, APP_STAGE_LABEL, APP_VERSION } from "../branding";
@@ -40,6 +40,7 @@ import { useCopyToClipboard } from "../hooks/useCopyToClipboard";
40
import { useDefaultThemeAdoption } from "../hooks/useDefaultTheme";
41
import { useEnvironmentThemeSync } from "../hooks/useEnvironmentTheme";
42
import { Button } from "../components/ui/button";
43
+import { MorphIcon } from "~/components/MorphIcon";
44
import { StandalonePage, StandalonePageHeader } from "../components/ui/standalone-page";
45
import {
46
AnchoredToastProvider,
@@ -49,6 +50,7 @@ import {
50
} from "../components/ui/toast";
51
import { resolveAndPersistPreferredEditor } from "../editorPreferences";
52
import { isElectron } from "../env";
53
+import { cn } from "../lib/utils";
54
import { applyAppearanceFontVariables } from "~/appearanceFonts";
55
import { applyAppearanceContrast } from "~/appearanceContrast";
56
import { useClientSettings } from "../hooks/useSettings";
@@ -418,7 +420,7 @@ function CopyErrorButton({ report }: { report: string }) {
420
421
return (
422
<Button size="sm" variant="outline" onClick={() => copyToClipboard(report)}>
421
- {isCopied ? <CheckIcon className="text-success" /> : <CopyIcon />}
423
+ <MorphIcon className={cn(isCopied && "text-success")} icon={isCopied ? Check : Copy} />
424
{isCopied ? "Copied" : "Copy error"}
425
</Button>
426
);
pnpm-lock.yaml
+101
-2
@@ -640,7 +640,7 @@ importers:
640
version: 0.9.0
641
'@legendapp/list':
642
specifier: 'catalog:'
643
- version: 3.3.5(patch_hash=680cc6a5c5b4a4032e467e7b3fde22f89a84c0ee2e6eac6fda737d6277cc0806)(react-dom@19.2.6(react@19.2.6))(react@19.2.6)
643
+ version: 3.3.5(patch_hash=680cc6a5c5b4a4032e467e7b3fde22f89a84c0ee2e6eac6fda737d6277cc0806)(react-dom@19.2.6(react@19.2.6))(react-native@0.88.0-rc.3(@babel/core@7.29.7)(@react-native/metro-config@0.88.0-rc.3(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.2.6)(utf-8-validate@6.0.6))(react@19.2.6)
644
'@noble/hashes':
645
specifier: 'catalog:'
646
version: 1.8.0
@@ -716,12 +716,18 @@ importers:
716
jszip:
717
specifier: 3.10.1
718
version: 3.10.1
719
+ lucide:
720
+ specifier: ^0.564.0
721
+ version: 0.564.0
722
lucide-react:
723
specifier: ^0.564.0
724
version: 0.564.0(react@19.2.6)
725
mermaid:
726
specifier: ^11.17.2
727
version: 11.17.2
728
+ morphicons:
729
+ specifier: ^1.7.1
730
+ version: 1.7.1(react-native-svg@15.15.5(react-native@0.88.0-rc.3(@babel/core@7.29.7)(@react-native/metro-config@0.88.0-rc.3(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.2.6)(utf-8-validate@6.0.6))(react@19.2.6))(react-native@0.88.0-rc.3(@babel/core@7.29.7)(@react-native/metro-config@0.88.0-rc.3(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.2.6)(utf-8-validate@6.0.6))(react@19.2.6)
731
react:
732
specifier: 19.2.6
733
version: 19.2.6
@@ -8814,6 +8820,9 @@ packages:
8820
peerDependencies:
8821
react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0
8822
8823
+ lucide@0.564.0:
8824
+ resolution: {integrity: sha512-FasyXKHWon773WIl3HeCQpd5xS6E0aLjqxiQStlHNKktni+HDncc1sqY+6vRUbCfmDsIaKQz43EEQLAUDLZO0g==}
8825
+
8826
lz-string@1.5.0:
8827
resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==}
8828
hasBin: true
@@ -9200,6 +9209,26 @@ packages:
9209
socks:
9210
optional: true
9211
9212
+ morphicons@1.7.1:
9213
+ resolution: {integrity: sha512-q5ylxy5/d7vBg0OAzanlooXf05PekovMYDuuQVpr6vAQZxl99lrJbaIi+jJ32PXQf9WEEaDO2pbNBsx1ZhEnFQ==}
9214
+ peerDependencies:
9215
+ react: '>=18'
9216
+ react-native: '>=0.71'
9217
+ react-native-svg: '>=14'
9218
+ svelte: '>=5'
9219
+ vue: '>=3.3'
9220
+ peerDependenciesMeta:
9221
+ react:
9222
+ optional: true
9223
+ react-native:
9224
+ optional: true
9225
+ react-native-svg:
9226
+ optional: true
9227
+ svelte:
9228
+ optional: true
9229
+ vue:
9230
+ optional: true
9231
+
9232
mrmime@2.0.1:
9233
resolution: {integrity: sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==}
9234
engines: {node: '>=10'}
@@ -13988,12 +14017,13 @@ snapshots:
14017
dependencies:
14018
jsbi: 4.3.2
14019
13991
- '@legendapp/list@3.3.5(patch_hash=680cc6a5c5b4a4032e467e7b3fde22f89a84c0ee2e6eac6fda737d6277cc0806)(react-dom@19.2.6(react@19.2.6))(react@19.2.6)':
14020
+ '@legendapp/list@3.3.5(patch_hash=680cc6a5c5b4a4032e467e7b3fde22f89a84c0ee2e6eac6fda737d6277cc0806)(react-dom@19.2.6(react@19.2.6))(react-native@0.88.0-rc.3(@babel/core@7.29.7)(@react-native/metro-config@0.88.0-rc.3(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.2.6)(utf-8-validate@6.0.6))(react@19.2.6)':
14021
dependencies:
14022
react: 19.2.6
14023
use-sync-external-store: 1.6.0(react@19.2.6)
14024
optionalDependencies:
14025
react-dom: 19.2.6(react@19.2.6)
14026
+ react-native: 0.88.0-rc.3(@babel/core@7.29.7)(@react-native/metro-config@0.88.0-rc.3(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.2.6)(utf-8-validate@6.0.6)
14027
14028
'@legendapp/list@3.3.5(patch_hash=680cc6a5c5b4a4032e467e7b3fde22f89a84c0ee2e6eac6fda737d6277cc0806)(react-dom@19.3.0(react@19.3.0))(react-native@0.88.0-rc.3(@babel/core@7.29.7)(@react-native/metro-config@0.88.0-rc.3(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0)':
14029
dependencies:
@@ -14921,6 +14951,16 @@ snapshots:
14951
14952
'@react-native/normalize-colors@0.88.0-rc.3': {}
14953
14954
+ '@react-native/virtualized-lists@0.88.0-rc.3(@types/react@19.3.0)(react-native@0.88.0-rc.3(@babel/core@7.29.7)(@react-native/metro-config@0.88.0-rc.3(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.2.6)(utf-8-validate@6.0.6))(react@19.2.6)':
14955
+ dependencies:
14956
+ invariant: 2.2.4
14957
+ nullthrows: 1.1.1
14958
+ react: 19.2.6
14959
+ react-native: 0.88.0-rc.3(@babel/core@7.29.7)(@react-native/metro-config@0.88.0-rc.3(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.2.6)(utf-8-validate@6.0.6)
14960
+ optionalDependencies:
14961
+ '@types/react': 19.3.0
14962
+ optional: true
14963
+
14964
'@react-native/virtualized-lists@0.88.0-rc.3(@types/react@19.3.0)(react-native@0.88.0-rc.3(@babel/core@7.29.7)(@react-native/metro-config@0.88.0-rc.3(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0)':
14965
dependencies:
14966
invariant: 2.2.4
@@ -19285,6 +19325,8 @@ snapshots:
19325
dependencies:
19326
react: 19.2.6
19327
19328
+ lucide@0.564.0: {}
19329
+
19330
lz-string@1.5.0: {}
19331
19332
magic-string@0.30.21:
@@ -19986,6 +20028,12 @@ snapshots:
20028
socks: 2.8.9
20029
optional: true
20030
20031
+ morphicons@1.7.1(react-native-svg@15.15.5(react-native@0.88.0-rc.3(@babel/core@7.29.7)(@react-native/metro-config@0.88.0-rc.3(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.2.6)(utf-8-validate@6.0.6))(react@19.2.6))(react-native@0.88.0-rc.3(@babel/core@7.29.7)(@react-native/metro-config@0.88.0-rc.3(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.2.6)(utf-8-validate@6.0.6))(react@19.2.6):
20032
+ optionalDependencies:
20033
+ react: 19.2.6
20034
+ react-native: 0.88.0-rc.3(@babel/core@7.29.7)(@react-native/metro-config@0.88.0-rc.3(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.2.6)(utf-8-validate@6.0.6)
20035
+ react-native-svg: 15.15.5(react-native@0.88.0-rc.3(@babel/core@7.29.7)(@react-native/metro-config@0.88.0-rc.3(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.2.6)(utf-8-validate@6.0.6))(react@19.2.6)
20036
+
20037
mrmime@2.0.1: {}
20038
20039
ms@2.0.0: {}
@@ -20885,6 +20933,14 @@ snapshots:
20933
react: 19.3.0
20934
react-native: 0.88.0-rc.3(@babel/core@7.29.7)(@react-native/metro-config@0.88.0-rc.3(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6)
20935
20936
+ react-native-svg@15.15.5(react-native@0.88.0-rc.3(@babel/core@7.29.7)(@react-native/metro-config@0.88.0-rc.3(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.2.6)(utf-8-validate@6.0.6))(react@19.2.6):
20937
+ dependencies:
20938
+ css-select: 5.2.2
20939
+ css-tree: 1.1.3
20940
+ react: 19.2.6
20941
+ react-native: 0.88.0-rc.3(@babel/core@7.29.7)(@react-native/metro-config@0.88.0-rc.3(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.2.6)(utf-8-validate@6.0.6)
20942
+ optional: true
20943
+
20944
react-native-svg@15.15.5(react-native@0.88.0-rc.3(@babel/core@7.29.7)(@react-native/metro-config@0.88.0-rc.3(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0):
20945
dependencies:
20946
css-select: 5.2.2
@@ -20928,6 +20984,49 @@ snapshots:
20984
transitivePeerDependencies:
20985
- supports-color
20986
20987
+ react-native@0.88.0-rc.3(@babel/core@7.29.7)(@react-native/metro-config@0.88.0-rc.3(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.2.6)(utf-8-validate@6.0.6):
20988
+ dependencies:
20989
+ '@react-native/asset-utils': 0.88.0-rc.3
20990
+ '@react-native/codegen': 0.88.0-rc.3(@babel/core@7.29.7)
20991
+ '@react-native/community-cli-plugin': 0.88.0-rc.3(@react-native/metro-config@0.88.0-rc.3(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(bufferutil@4.1.0)(utf-8-validate@6.0.6)
20992
+ '@react-native/gradle-plugin': 0.88.0-rc.3
20993
+ '@react-native/normalize-colors': 0.88.0-rc.3
20994
+ '@react-native/virtualized-lists': 0.88.0-rc.3(@types/react@19.3.0)(react-native@0.88.0-rc.3(@babel/core@7.29.7)(@react-native/metro-config@0.88.0-rc.3(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.2.6)(utf-8-validate@6.0.6))(react@19.2.6)
20995
+ anser: 1.4.10
20996
+ ansi-regex: 5.0.1
20997
+ base64-js: 1.5.1
20998
+ flow-enums-runtime: 0.0.6
20999
+ flow-parser: 0.327.0
21000
+ hermes-compiler: 260318099.0.4
21001
+ invariant: 2.2.4
21002
+ memoize-one: 5.2.1
21003
+ metro-runtime: 0.87.1
21004
+ metro-source-map: 0.87.1
21005
+ nullthrows: 1.1.1
21006
+ pretty-format: 29.7.0
21007
+ promise: 8.3.0
21008
+ react: 19.2.6
21009
+ react-devtools-core: 6.1.5(bufferutil@4.1.0)(utf-8-validate@6.0.6)
21010
+ react-refresh: 0.14.2
21011
+ regenerator-runtime: 0.13.11
21012
+ scheduler: 0.28.0
21013
+ semver: 7.8.5
21014
+ stacktrace-parser: 0.1.11
21015
+ tinyglobby: 0.2.17
21016
+ whatwg-fetch: 3.6.20
21017
+ ws: 7.5.11(bufferutil@4.1.0)(utf-8-validate@6.0.6)
21018
+ yargs: 17.7.2
21019
+ optionalDependencies:
21020
+ '@types/react': 19.3.0
21021
+ transitivePeerDependencies:
21022
+ - '@babel/core'
21023
+ - '@react-native-community/cli'
21024
+ - '@react-native/metro-config'
21025
+ - bufferutil
21026
+ - supports-color
21027
+ - utf-8-validate
21028
+ optional: true
21029
+
21030
react-native@0.88.0-rc.3(@babel/core@7.29.7)(@react-native/metro-config@0.88.0-rc.3(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6):
21031
dependencies:
21032
'@react-native/asset-utils': 0.88.0-rc.3