Skip to content

Commit b8c5346

Browse files
Merge remote-tracking branch 'origin/main' into fix/issue-25289
2 parents d511961 + c3888da commit b8c5346

55 files changed

Lines changed: 573 additions & 255 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎apps/web/src/components/CommandPalette.logic.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -809,8 +809,8 @@ export function buildPaletteRemoteSourceReadiness(
809809
: {
810810
...entry,
811811
hint: entry.hint.replace(
812-
"Open Source Control settings",
813-
"Open Settings -> Source Control",
812+
"Open source control settings",
813+
"Open Settings -> Source control",
814814
),
815815
};
816816
};

‎apps/web/src/components/CommandPalette.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1081,7 +1081,7 @@ function OpenCommandPaletteDialog(props: {
10811081
}
10821082
/>
10831083
<TooltipPopup align="end" side="left">
1084-
{disabledHint ?? "Open Settings -> Source Control to configure this provider."}
1084+
{disabledHint ?? "Open Settings -> Source control to configure this provider."}
10851085
</TooltipPopup>
10861086
</Tooltip>
10871087
</span>

‎apps/web/src/components/DiffPanel.tsx‎

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,9 @@ function DiffFileHeaderSuffix({
175175
}) {
176176
return (
177177
<>
178-
<DiffFilePathCopyButton filePath={filePath} />
178+
<span data-diff-copy-path className="inline-flex">
179+
<DiffFilePathCopyButton filePath={filePath} />
180+
</span>
179181
{hasStat ? (
180182
<DiffFileStatus error={error} truncated={truncated} retry={() => onRetry(filePath)} />
181183
) : null}
@@ -661,7 +663,7 @@ export default function DiffPanel({
661663

662664
const headerRow = (
663665
<>
664-
<div className="flex min-w-0 flex-1 items-center gap-3 [-webkit-app-region:no-drag]">
666+
<div className="@container/diff-refs flex min-w-0 flex-1 items-center gap-3 [-webkit-app-region:no-drag]">
665667
<DropdownMenu>
666668
<DropdownMenuTrigger
667669
render={<Button size="xs" variant="secondary" />}
@@ -717,7 +719,9 @@ export default function DiffPanel({
717719
<Tooltip>
718720
<TooltipTrigger
719721
render={
720-
<span className="flex min-w-[min(3rem,calc(100%-2.75rem))] items-center gap-2 overflow-hidden" />
722+
// Too narrow for both refs, the New design keeps the target readable and drops
723+
// the head, which is the thread's own branch.
724+
<span className="flex min-w-[min(3rem,calc(100%-2.75rem))] items-center gap-2 overflow-hidden redesign:@max-[20rem]/diff-refs:hidden" />
721725
}
722726
>
723727
<span className="min-w-0 max-w-48 truncate">
@@ -729,6 +733,18 @@ export default function DiffPanel({
729733
{`${selectedGitSource.headRef ?? "HEAD"} → ${selectedGitSource.baseRef}`}
730734
</TooltipPopup>
731735
</Tooltip>
736+
<Tooltip>
737+
<TooltipTrigger
738+
render={
739+
<span aria-hidden className="hidden redesign:@max-[20rem]/diff-refs:inline" />
740+
}
741+
>
742+
vs
743+
</TooltipTrigger>
744+
<TooltipPopup side="top">
745+
{`${selectedGitSource.headRef ?? "HEAD"} → ${selectedGitSource.baseRef}`}
746+
</TooltipPopup>
747+
</Tooltip>
732748
<Combobox
733749
items={baseRefItems}
734750
filteredItems={filteredBaseRefItems}
@@ -743,7 +759,7 @@ export default function DiffPanel({
743759
>
744760
<ComboboxTrigger
745761
render={<Button variant="ghost-muted" size="xs" />}
746-
className="min-w-9 max-w-48 shrink"
762+
className="min-w-9 max-w-48 shrink redesign:shrink-0"
747763
aria-label={`Change comparison target. Currently ${selectedGitSource.baseRef}`}
748764
>
749765
<span className="min-w-0 truncate">{selectedGitSource.baseRef}</span>

‎apps/web/src/components/DiffWorkerPoolProvider.tsx‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ import { WorkerPoolManager } from "@pierre/diffs/worker";
33
import DiffsWorker from "@pierre/diffs/worker/worker.js?worker";
44
import * as Schema from "effect/Schema";
55
import { useEffect, useState, useSyncExternalStore, type ReactNode } from "react";
6+
import { subscribeClientSettings } from "../hooks/useSettings";
67
import { getRenderedAppearance, subscribeRenderedAppearance } from "../hooks/useTheme";
78
import { resolveDiffThemeName } from "../lib/diffRendering";
89
import { PREFERRED_HIGHLIGHTER } from "../lib/syntaxHighlighting";
910

1011
export class DiffWorkerError extends Schema.TaggedError<DiffWorkerError>()("DiffWorkerError", {
1112
operation: Schema.Literals(["create-worker", "get-render-options", "set-render-options"]),
12-
themeName: Schema.Literals(["pierre-light", "pierre-dark"]),
13+
themeName: Schema.Literals(["pierre-light", "pierre-dark", "t3-light"]),
1314
cause: Schema.Defect(),
1415
}) {
1516
override get message(): string {
@@ -72,7 +73,12 @@ function createDiffWorkerPool(poolSize: number) {
7273
);
7374
return {
7475
pool,
75-
unsubscribeTheme: subscribeRenderedAppearance(() => applyDiffWorkerTheme(pool)),
76+
unsubscribeTheme: (() => {
77+
const apply = () => applyDiffWorkerTheme(pool);
78+
// The New design picks the light syntax palette, so a settings change can switch it too.
79+
const unsubscribes = [subscribeRenderedAppearance(apply), subscribeClientSettings(apply)];
80+
return () => unsubscribes.forEach((unsubscribe) => unsubscribe());
81+
})(),
7682
consumers: 0,
7783
idleTimer: undefined,
7884
};

‎apps/web/src/components/GitActionsControl.tsx‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ function getPublishProviderReadiness(input: {
205205
if (!discovered) {
206206
return {
207207
ready: false,
208-
hint: "Provider status unavailable. Open Settings -> Source Control and rescan.",
208+
hint: "Provider status unavailable. Open Settings -> Source control and rescan.",
209209
};
210210
}
211211
if (discovered.status !== "available") {
@@ -216,7 +216,7 @@ function getPublishProviderReadiness(input: {
216216
ready: false,
217217
hint:
218218
Option.getOrNull(discovered.auth.detail) ??
219-
`${discovered.label} is not authenticated. Open Settings -> Source Control for setup guidance.`,
219+
`${discovered.label} is not authenticated. Open Settings -> Source control for setup guidance.`,
220220
};
221221
}
222222
return { ready: true, hint: null };
@@ -673,7 +673,7 @@ function PublishRepositoryDialog(props: PublishRepositoryDialogProps) {
673673
/>
674674
<TooltipPopup side="top" align="end">
675675
{readiness.hint ??
676-
"Open Settings -> Source Control to configure this provider."}
676+
"Open Settings -> Source control to configure this provider."}
677677
</TooltipPopup>
678678
</Tooltip>
679679
</div>
@@ -1153,11 +1153,11 @@ export default function GitActionsControl({
11531153
: null;
11541154
const gitActionProgress = resolveGitActionProgressPresentation(vcsActionState);
11551155
const redesign = useClientSettings((s) => s.redesignEnabled);
1156-
// A fresh draft with nothing to commit, push, or diff hides those rows until there is work.
1156+
// A fresh draft or a thread with no turns hides commit, push, and diff rows until there is work.
11571157
const quietEmptyDraft =
11581158
redesign &&
11591159
isPanel &&
1160-
draftId !== undefined &&
1160+
(draftId !== undefined || activeServerThreadShell?.latestRun === null) &&
11611161
gitActionProgress === null &&
11621162
!gitStatusError &&
11631163
quickAction.disabled &&

‎apps/web/src/components/Sidebar.tsx‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ import {
5959
} from "@t3tools/contracts";
6060
import type { OlderSettledScope } from "@t3tools/client-runtime/state/threads";
6161

62-
import { FolderIcon, ListFilterIcon, PlusIcon, SettingsIcon } from "lucide-react";
62+
import { ChevronDownIcon, FolderIcon, ListFilterIcon, PlusIcon, SettingsIcon } from "lucide-react";
6363
import {
6464
useEffect,
6565
useLayoutEffect,
@@ -3210,9 +3210,14 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve
32103210
olderSettledShelf.retry();
32113211
showMoreSettled();
32123212
}}
3213-
className="flex h-9 w-full cursor-pointer items-center gap-2.5 rounded-md px-2.5 text-left text-sm text-sidebar-muted-foreground/55 hover:bg-sidebar-row-hover hover:text-sidebar-foreground disabled:cursor-default"
3213+
className="flex h-9 w-full cursor-pointer items-center gap-2.5 rounded-md px-2.5 text-left text-sm text-sidebar-muted-foreground/55 hover:bg-sidebar-row-hover hover:text-sidebar-foreground disabled:cursor-default redesign:text-sidebar-muted-foreground"
32143214
>
3215-
<PlusIcon aria-hidden className="size-4 shrink-0" />
3215+
{/* The New design keeps plus for "add" and uses a chevron to reveal more. */}
3216+
<PlusIcon aria-hidden className="size-4 shrink-0 redesign:hidden" />
3217+
<ChevronDownIcon
3218+
aria-hidden
3219+
className="hidden size-4 shrink-0 redesign:block"
3220+
/>
32163221
{olderSettledShelf.loading
32173222
? "Loading"
32183223
: olderSettledShelf.failed

‎apps/web/src/components/chat/ChatCanvas.tsx‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { ChatCanvasContext } from "./ChatCanvasContext";
33
import { resolveChatCanvasLayout, type ChatCanvasPreview } from "./chatCanvasLayout";
44
import type { PreviewMiniPlayerObstacles } from "../preview/previewMiniPlayerLayout";
55
import { observeResize } from "../../lib/observeResize";
6+
import { useClientSettings } from "~/hooks/useSettings";
67

78
export function ChatCanvas({
89
composerOverlayElement,
@@ -93,6 +94,7 @@ export function ChatCanvas({
9394
if (timelineElement) observed.push(timelineElement);
9495
return observeResize(observed, measure);
9596
}, [composerOverlayElement, timelineElement, detailsCardTopInset]);
97+
const redesign = useClientSettings((s) => s.redesignEnabled);
9698
const container = { width: measurements.width, height: measurements.height };
9799
const findBar =
98100
detailsCardTopInset > 0
@@ -111,6 +113,7 @@ export function ChatCanvas({
111113
preview,
112114
detailsCard,
113115
findBar,
116+
centerBesideDetails: redesign,
114117
}),
115118
previewKey: preview?.key ?? null,
116119
reportPreview,

‎apps/web/src/components/chat/ModelListRow.tsx‎

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export const ModelListRow = memo(function ModelListRow(props: {
6161
>
6262
<div className="min-w-0 flex-1 text-left">
6363
<div className="flex min-w-0 items-center gap-2">
64-
<div className="min-w-0 truncate text-xs font-medium leading-snug">
64+
<div className="min-w-0 truncate text-xs font-medium leading-snug redesign:text-sm redesign:font-normal">
6565
{props.useTriggerLabel
6666
? getTriggerDisplayModelLabel(model)
6767
: getDisplayModelName(
@@ -101,9 +101,6 @@ export const ModelListRow = memo(function ModelListRow(props: {
101101
</div>
102102

103103
<div className="flex shrink-0 items-center gap-1.5">
104-
{props.showSelection && props.isSelected ? (
105-
<CheckIcon className="size-3.5" aria-hidden="true" />
106-
) : null}
107104
{props.jumpLabel ? <Kbd>{props.jumpLabel}</Kbd> : null}
108105
<Tooltip>
109106
<TooltipTrigger
@@ -125,7 +122,9 @@ export const ModelListRow = memo(function ModelListRow(props: {
125122
<StarIcon
126123
className={cn(
127124
"size-3.5 sm:size-3",
128-
props.isFavorite && "fill-current text-warning",
125+
props.isFavorite
126+
? "fill-current text-warning"
127+
: "redesign:opacity-0 redesign:group-hover:opacity-100 redesign:group-data-highlighted:opacity-100 redesign:in-focus-visible:opacity-100 redesign:pointer-coarse:opacity-100",
129128
)}
130129
/>
131130
</Button>
@@ -135,6 +134,13 @@ export const ModelListRow = memo(function ModelListRow(props: {
135134
{props.isFavorite ? "Remove from favorites" : "Add to favorites"}
136135
</TooltipPopup>
137136
</Tooltip>
137+
{/* Last, and always reserved, so stars and the check keep fixed columns. */}
138+
{props.showSelection ? (
139+
<CheckIcon
140+
className={cn("size-3.5", !props.isSelected && "invisible")}
141+
aria-hidden="true"
142+
/>
143+
) : null}
138144
</div>
139145
</ComboboxItem>
140146
);

‎apps/web/src/components/chat/ModelPickerContent.tsx‎

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ import {
4949
shortcutLabelForCommand,
5050
} from "../../keybindings";
5151
import {
52+
useClientSettings,
5253
useEnvironmentModelPreferences,
5354
useToggleEnvironmentModelFavorite,
5455
} from "~/hooks/useSettings";
@@ -190,10 +191,12 @@ function modelJumpLabelsByKey(
190191
function ModelPickerProviderNotices({
191192
setupEntries,
192193
updateRequiredNotices,
194+
emptyLabel,
193195
onRequestClose,
194196
onOpenProviderSetup,
195197
}: {
196198
setupEntries: ReadonlyArray<ProviderInstanceEntry>;
199+
emptyLabel: string;
197200
updateRequiredNotices: ReadonlyArray<{ instanceId: ProviderInstanceId; notice: string }>;
198201
onRequestClose: (() => void) | undefined;
199202
onOpenProviderSetup: ((instanceId: ProviderInstanceId) => void) | undefined;
@@ -221,7 +224,7 @@ function ModelPickerProviderNotices({
221224
))}
222225
</div>
223226
) : (
224-
<ComboboxEmpty className="empty:h-0">No models found</ComboboxEmpty>
227+
<ComboboxEmpty className="empty:h-0">{emptyLabel}</ComboboxEmpty>
225228
)}
226229
{updateRequiredNotices.map(({ instanceId, notice }) => (
227230
<p
@@ -572,6 +575,9 @@ export const ModelPickerContent = memo(function ModelPickerContent(props: {
572575

573576
const isLocked = lockedProvider !== null;
574577
const isSearching = searchQuery.trim().length > 0;
578+
// Inside one provider's tab the provider line repeats the selected rail icon on every row.
579+
const redesign = useClientSettings((s) => s.redesignEnabled);
580+
const rowsMixProviders = !redesign || isSearching || selectedInstanceId === "favorites";
575581
const lockedDisabledInstanceIds = (() => {
576582
if (!isLocked) {
577583
return undefined;
@@ -937,8 +943,10 @@ export const ModelPickerContent = memo(function ModelPickerContent(props: {
937943
className="group w-full cursor-pointer"
938944
>
939945
<div className="min-w-0 flex-1 text-left">
940-
<div className="text-xs font-medium leading-snug">Legacy models</div>
941-
<div className="mt-1 text-xs font-normal leading-snug text-muted-foreground/70">
946+
<div className="text-xs font-medium leading-snug redesign:text-sm redesign:font-normal">
947+
Legacy models
948+
</div>
949+
<div className="mt-1 text-xs font-normal leading-snug text-muted-foreground/70 redesign:text-muted-foreground">
942950
{legacySection.legacyModels.length} models
943951
</div>
944952
</div>
@@ -977,8 +985,8 @@ export const ModelPickerContent = memo(function ModelPickerContent(props: {
977985
? selectedModelKeySet.has(modelKey)
978986
: modelKey === activeModelKey
979987
}
980-
showSelection={selectedModelKeys !== undefined}
981-
showProvider
988+
showSelection={selectedModelKeys !== undefined || redesign}
989+
showProvider={rowsMixProviders || Boolean(model.subProvider)}
982990
preferShortName={!isLocked}
983991
useTriggerLabel={false}
984992
showNewBadge={model.badge === "new"}
@@ -993,6 +1001,11 @@ export const ModelPickerContent = memo(function ModelPickerContent(props: {
9931001
<ModelPickerProviderNotices
9941002
setupEntries={providerSetupEntries}
9951003
updateRequiredNotices={updateRequiredNotices}
1004+
emptyLabel={
1005+
selectedInstanceId === "favorites" && !isSearching
1006+
? "No favorites yet"
1007+
: "No models found"
1008+
}
9961009
onRequestClose={onRequestClose}
9971010
onOpenProviderSetup={onOpenProviderSetup}
9981011
/>

‎apps/web/src/components/chat/ModelPickerSidebar.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function describeUnavailableInstance(entry: ProviderInstanceEntry): string {
2626
}
2727

2828
const SELECTED_INDICATOR_CLASS =
29-
"pointer-events-none absolute -right-1 top-1/2 z-10 h-5 w-0.75 -translate-y-1/2 rounded-l-full bg-primary";
29+
"pointer-events-none absolute -right-1 top-1/2 z-10 h-5 w-0.75 -translate-y-1/2 rounded-l-full bg-primary redesign:right-1 redesign:rounded-full";
3030
const BADGE_BASE_CLASS =
3131
"pointer-events-none absolute -right-0.5 top-0.5 z-10 flex size-3.5 items-center justify-center rounded-full bg-transparent shadow-sm ";
3232
const NEW_BADGE_CLASS = `${BADGE_BASE_CLASS} text-update-foreground `;

0 commit comments

Comments
 (0)