Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion apps/desktop/src/window/DesktopWindow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function getIconOption(
}

function getInitialWindowBackgroundColor(shouldUseDarkColors: boolean): string {
return shouldUseDarkColors ? "#0a0a0a" : "#ffffff";
return shouldUseDarkColors ? "#000000" : "#ffffff";
}

type DisplayBounds = Pick<Electron.Rectangle, "x" | "y" | "width" | "height">;
Expand Down
10 changes: 5 additions & 5 deletions apps/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
name="viewport"
content="width=device-width, initial-scale=1.0, viewport-fit=cover, interactive-widget=resizes-content"
/>
<meta name="theme-color" content="#0a0a0a" />
<meta name="theme-color" content="#000000" />
<link rel="icon" href="/favicon.ico" sizes="48x48" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
<link rel="manifest" href="/manifest.webmanifest" />
<script>
(() => {
const LIGHT_BACKGROUND = "#ffffff";
const DARK_BACKGROUND = "#0a0a0a";
const DARK_BACKGROUND = "#000000";
const CUSTOM_THEMES_STORAGE_KEY = "t3code:themes:v1";
const THEME_FOLLOW_SYSTEM_STORAGE_KEY = "t3code:theme-follow-system";
const THEME_APPEARANCE_MODE_STORAGE_KEY = "t3code:theme-appearance-mode";
Expand All @@ -25,7 +25,7 @@
accent: "#4f46e5",
},
dark: {
background: "#0a0a0a",
background: "#000000",
foreground: "#f5f5f5",
accent: "#818cf8",
},
Expand Down Expand Up @@ -403,7 +403,7 @@
}

html.dark body {
background: #0a0a0a;
background: #000000;
color: #f5f5f5;
}

Expand Down Expand Up @@ -462,7 +462,7 @@

html.dark #boot-error {
--boot-error-fg: #f5f5f5;
--boot-error-bg: #0a0a0a;
--boot-error-bg: #000000;
}

html[data-theme-selected="true"] #boot-error {
Expand Down
3 changes: 0 additions & 3 deletions apps/web/src/appInit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ function startClientAppearance(): void {
if (previous?.chatWidth !== settings.chatWidth) {
root.dataset.chatWidth = settings.chatWidth;
}
if (previous?.redesignEnabled !== settings.redesignEnabled) {
root.toggleAttribute("data-redesign", settings.redesignEnabled);
}
if (previous?.appearanceContrast !== settings.appearanceContrast) {
applyAppearanceContrast(root, settings.appearanceContrast);
}
Expand Down
2 changes: 0 additions & 2 deletions apps/web/src/components/ChatView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1861,7 +1861,6 @@ export default function ChatView(props: ChatViewProps) {
const threadPanelInlineOpen = useRightPanelStore((state) =>
selectThreadPanelOpen(state.threadPanelVisibilityByThreadKey, activeThreadRef, "inline"),
);
const centerChatBesideDetails = useClientSettings((s) => s.redesignEnabled);
// Selects only the mode, so canvas resizes rerender the chat view only when the
// card switches presentation.
const threadPanelPresentation = useStore(
Expand All @@ -1873,7 +1872,6 @@ export default function ChatView(props: ChatViewProps) {
threadRef: activeThreadRef,
preview: canvasPreview,
detailsCardInlineOpen: threadPanelInlineOpen,
centerBesideDetails: centerChatBesideDetails,
}).detailsCardMode,
);
const threadPanelOpen = useRightPanelStore((state) =>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/ComposerPromptEditorTiptap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,7 @@ function ComposerPromptEditorTiptapInner(

const editorAttributes = {
class: cn(
"composer-tiptap -m-1 block max-h-52 min-h-19.5 redesign:min-h-12 overflow-y-auto p-1 whitespace-pre-wrap wrap-break-word bg-transparent leading-relaxed text-foreground focus:outline-none",
"composer-tiptap -m-1 block max-h-52 min-h-12 overflow-y-auto p-1 whitespace-pre-wrap wrap-break-word bg-transparent leading-relaxed text-foreground focus:outline-none",
className,
),
"data-testid": "composer-editor",
Expand Down
18 changes: 6 additions & 12 deletions apps/web/src/components/DiffPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ import { useStableCallback } from "../hooks/useStableCallback";
import {
buildFileDiffContentVersion,
buildFileDiffIdentityKey,
getDiffCollapseIconClassName,
getDiffLineStat,
getRenderablePatch,
resolveDiffThemeName,
Expand Down Expand Up @@ -122,14 +121,12 @@ function DiffFileCollapseToggle({
fileKey,
collapsed,
unavailable,
iconClassName,
onToggle,
}: {
filePath: string;
fileKey: string;
collapsed: boolean;
unavailable: boolean;
iconClassName: string;
onToggle: (fileKey: string) => void;
}) {
return (
Expand All @@ -151,7 +148,7 @@ function DiffFileCollapseToggle({
}
>
<MorphIcon
className={cn("size-4", iconClassName)}
className="size-4 text-muted-foreground/80"
icon={collapsed ? ChevronRight : ChevronDown}
/>
</TooltipTrigger>
Expand Down Expand Up @@ -706,9 +703,9 @@ export default function DiffPanel({
<Tooltip>
<TooltipTrigger
render={
// Too narrow for both refs, the New design keeps the target readable and drops
// the head, which is the thread's own branch.
<span className="flex min-w-[min(3rem,calc(100%-2.75rem))] items-center gap-2 overflow-hidden redesign:@max-[20rem]/diff-refs:hidden" />
// Too narrow for both refs, keep the target readable and drop the head, which
// is the thread's own branch.
<span className="flex min-w-[min(3rem,calc(100%-2.75rem))] items-center gap-2 overflow-hidden @max-[20rem]/diff-refs:hidden" />
}
>
<span className="min-w-0 max-w-48 truncate">
Expand All @@ -722,9 +719,7 @@ export default function DiffPanel({
</Tooltip>
<Tooltip>
<TooltipTrigger
render={
<span aria-hidden className="hidden redesign:@max-[20rem]/diff-refs:inline" />
}
render={<span aria-hidden className="hidden @max-[20rem]/diff-refs:inline" />}
>
vs
</TooltipTrigger>
Expand All @@ -746,7 +741,7 @@ export default function DiffPanel({
>
<ComboboxTrigger
render={<Button variant="ghost-muted" size="xs" />}
className="min-w-9 max-w-48 shrink redesign:shrink-0"
className="min-w-9 max-w-48 shrink-0"
aria-label={`Change comparison target. Currently ${selectedGitSource.baseRef}`}
>
<span className="min-w-0 truncate">{selectedGitSource.baseRef}</span>
Expand Down Expand Up @@ -1126,7 +1121,6 @@ export default function DiffPanel({
fileKey={fileKey}
collapsed={unavailable || collapsedDiffFileKeys.has(fileKey)}
unavailable={unavailable}
iconClassName={getDiffCollapseIconClassName(fileDiff)}
onToggle={toggleDiffFileCollapsed}
/>
);
Expand Down
10 changes: 2 additions & 8 deletions apps/web/src/components/DiffWorkerPoolProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ import { WorkerPoolManager } from "@pierre/diffs/worker";
import DiffsWorker from "@pierre/diffs/worker/worker.js?worker";
import * as Schema from "effect/Schema";
import { useEffect, useState, useSyncExternalStore, type ReactNode } from "react";
import { subscribeClientSettings } from "../hooks/useSettings";
import { getRenderedAppearance, subscribeRenderedAppearance } from "../hooks/useTheme";
import { resolveDiffThemeName } from "../lib/diffRendering";
import { PREFERRED_HIGHLIGHTER } from "../lib/syntaxHighlighting";

export class DiffWorkerError extends Schema.TaggedError<DiffWorkerError>()("DiffWorkerError", {
operation: Schema.Literals(["create-worker", "get-render-options", "set-render-options"]),
themeName: Schema.Literals(["pierre-light", "pierre-dark", "t3-light"]),
themeName: Schema.Literals(["pierre-dark", "t3-light"]),
cause: Schema.Defect(),
}) {
override get message(): string {
Expand Down Expand Up @@ -73,12 +72,7 @@ function createDiffWorkerPool(poolSize: number) {
);
return {
pool,
unsubscribeTheme: (() => {
const apply = () => applyDiffWorkerTheme(pool);
// The New design picks the light syntax palette, so a settings change can switch it too.
const unsubscribes = [subscribeRenderedAppearance(apply), subscribeClientSettings(apply)];
return () => unsubscribes.forEach((unsubscribe) => unsubscribe());
})(),
unsubscribeTheme: subscribeRenderedAppearance(() => applyDiffWorkerTheme(pool)),
consumers: 0,
idleTimer: undefined,
};
Expand Down
3 changes: 0 additions & 3 deletions apps/web/src/components/GitActionsControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ import { getSourceControlPresentation, sourceControlIcon } from "~/sourceControl
import { sourceControlClients } from "@t3tools/client-runtime/source-control-clients";
import { formatDiffCount } from "@t3tools/client-runtime/diff-count";
import { useOpenLink } from "~/browser/useOpenLink";
import { useClientSettings } from "~/hooks/useSettings";

interface GitActionsControlProps {
presentation?: "toolbar" | "menu";
Expand Down Expand Up @@ -1149,10 +1148,8 @@ export default function GitActionsControl({
? (quickAction.hint ?? "This action is currently unavailable.")
: null;
const gitActionProgress = resolveGitActionProgressPresentation(vcsActionState);
const redesign = useClientSettings((s) => s.redesignEnabled);
// A fresh draft or a thread with no turns hides commit, push, and diff rows until there is work.
const quietEmptyDraft =
redesign &&
isPanel &&
(draftId !== undefined || activeServerThreadShell?.latestRun === null) &&
gitActionProgress === null &&
Expand Down
10 changes: 3 additions & 7 deletions apps/web/src/components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3201,14 +3201,10 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve
olderSettledShelf.retry();
showMoreSettled();
}}
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"
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 hover:bg-sidebar-row-hover hover:text-sidebar-foreground disabled:cursor-default"
>
{/* The New design keeps plus for "add" and uses a chevron to reveal more. */}
<PlusIcon aria-hidden className="size-4 shrink-0 redesign:hidden" />
<ChevronDownIcon
aria-hidden
className="hidden size-4 shrink-0 redesign:block"
/>
{/* Plus means "add", so revealing more uses a chevron. */}
<ChevronDownIcon aria-hidden className="size-4 shrink-0" />
{olderSettledShelf.loading
? "Loading"
: olderSettledShelf.failed
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/ThreadStatusIndicators.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ function PullRequestBadge({
className={cn("contents font-normal text-xs tabular-nums", presentation.toneClassName)}
>
<presentation.Icon aria-hidden className="size-3 shrink-0" />
<span className="redesign:text-secondary-label">{presentation.text}</span>
<span className="text-secondary-label">{presentation.text}</span>
</span>
</TooltipTrigger>
<TooltipPopup
Expand Down
3 changes: 0 additions & 3 deletions apps/web/src/components/chat/ChatCanvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { resolveChatCanvasModel, type ChatCanvasStore } from "./canvasStore";
import { selectThreadPanelOpen, useRightPanelStore } from "../../rightPanelStore";
import { observeResize } from "../../lib/observeResize";
import type { ScopedThreadRef } from "@t3tools/contracts";
import { useClientSettings } from "~/hooks/useSettings";

export function ChatCanvas({
store,
Expand Down Expand Up @@ -72,14 +71,12 @@ export function ChatCanvas({
? false
: selectThreadPanelOpen(state.threadPanelVisibilityByThreadKey, threadRef, "inline"),
);
const centerBesideDetails = useClientSettings((s) => s.redesignEnabled);
const model = resolveChatCanvasModel({
measurements,
detailsCardMeasurement,
threadRef,
preview,
detailsCardInlineOpen,
centerBesideDetails,
});
const context = {
container: model.container,
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/chat/ChatComposer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3658,7 +3658,7 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
className={cn(
showMobilePendingAnswerActions && "max-sm:pb-12",
isComposerResting &&
"my-0 max-h-8 min-h-8 redesign:min-h-8 overflow-hidden py-0 whitespace-pre! leading-8",
"my-0 max-h-8 min-h-8 overflow-hidden py-0 whitespace-pre! leading-8",
)}
placeholderClassName={cn(
isComposerResting &&
Expand Down
29 changes: 4 additions & 25 deletions apps/web/src/components/chat/ComposerPrimaryActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { memo, type MouseEventHandler, type PointerEventHandler } from "react";
import { CheckIcon, ChevronDownIcon, ChevronLeftIcon, Minimize2Icon, PlayIcon } from "lucide-react";
import { CornerUpRight, ListPlus } from "lucide";
import { MorphIcon } from "~/components/MorphIcon";
import { useClientSettings, useEnvironmentIdentificationMode } from "~/hooks/useSettings";
import { useEnvironmentIdentificationMode } from "~/hooks/useSettings";
import { formatContextWindowTokens } from "~/lib/contextWindow";
import { cn } from "~/lib/utils";
import { useShortcutModifierState } from "../../shortcutModifierState";
Expand Down Expand Up @@ -113,7 +113,6 @@ export const ComposerPrimaryActions = memo(function ComposerPrimaryActions({
? { onPointerDown: preventPointerFocus }
: undefined;
const environmentIdentificationMode = useEnvironmentIdentificationMode();
const redesign = useClientSettings((s) => s.redesignEnabled);
const shortcutModifiers = useShortcutModifierState();
const isQueuing =
!isEditingQueuedMessage &&
Expand Down Expand Up @@ -369,16 +368,7 @@ export const ComposerPrimaryActions = memo(function ComposerPrimaryActions({
render={
<button
type="button"
className={
redesign
? "flex h-7 shrink-0 cursor-pointer items-center gap-1.5 rounded-(--control-radius) px-2 font-medium text-base text-foreground/80 tabular-nums outline-none hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-64 sm:text-sm aria-pressed:bg-accent/60 aria-pressed:text-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:text-muted-foreground"
: cn(
"flex h-9 shrink-0 cursor-pointer items-center gap-1.5 rounded-full border px-2.5 text-xs tabular-nums outline-none transition-colors focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-64 sm:h-8 [&_svg]:pointer-events-none [&_svg]:size-3.5",
keepFullHistory
? "border-border text-muted-foreground hover:text-foreground"
: "border-warning/40 text-warning hover:bg-warning/8",
)
}
className="flex h-7 shrink-0 cursor-pointer items-center gap-1.5 rounded-(--control-radius) px-2 font-medium text-base text-foreground/80 tabular-nums outline-none hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-64 sm:text-sm aria-pressed:bg-accent/60 aria-pressed:text-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:text-muted-foreground"
{...pointerFocusProps}
aria-pressed={!keepFullHistory}
aria-label={`Compact ${compactTokens} tokens of history before sending`}
Expand All @@ -388,19 +378,8 @@ export const ComposerPrimaryActions = memo(function ComposerPrimaryActions({
}
>
<Minimize2Icon aria-hidden="true" />
{/* The new design keeps the token count in the tooltip so the permission label keeps its room. */}
{redesign ? (
keepFullHistory ? (
"Keep full"
) : (
"Compact next"
)
) : (
<>
{keepFullHistory ? "Full" : "Compact"}
<span>{compactTokens}</span>
</>
)}
{/* The token count lives in the tooltip so the permission label keeps its room. */}
{keepFullHistory ? "Keep full" : "Compact next"}
</TooltipTrigger>
<TooltipPopup>
<div>
Expand Down
15 changes: 6 additions & 9 deletions apps/web/src/components/chat/ModelListRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export const ModelListRow = memo(function ModelListRow(props: {
acpRegistryIconUrl?: string | undefined;
isFavorite: boolean;
isSelected: boolean;
showSelection?: boolean;
showProvider: boolean;
preferShortName?: boolean;
useTriggerLabel?: boolean;
Expand Down Expand Up @@ -61,7 +60,7 @@ export const ModelListRow = memo(function ModelListRow(props: {
>
<div className="min-w-0 flex-1 text-left">
<div className="flex min-w-0 items-center gap-2">
<div className="min-w-0 truncate text-xs font-medium leading-snug redesign:text-sm redesign:font-normal">
<div className="min-w-0 truncate text-sm font-normal leading-snug">
{props.useTriggerLabel
? getTriggerDisplayModelLabel(model)
: getDisplayModelName(
Expand Down Expand Up @@ -124,7 +123,7 @@ export const ModelListRow = memo(function ModelListRow(props: {
"size-3.5 sm:size-3",
props.isFavorite
? "fill-current text-warning"
: "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",
: "opacity-0 group-hover:opacity-100 group-data-highlighted:opacity-100 in-focus-visible:opacity-100 pointer-coarse:opacity-100",
)}
/>
</Button>
Expand All @@ -135,12 +134,10 @@ export const ModelListRow = memo(function ModelListRow(props: {
</TooltipPopup>
</Tooltip>
{/* Last, and always reserved, so stars and the check keep fixed columns. */}
{props.showSelection ? (
<CheckIcon
className={cn("size-3.5", !props.isSelected && "invisible")}
aria-hidden="true"
/>
) : null}
<CheckIcon
className={cn("size-3.5", !props.isSelected && "invisible")}
aria-hidden="true"
/>
</div>
</ComboboxItem>
);
Expand Down
Loading
Loading