diff --git a/apps/web/src/components/ComposerPromptEditorTiptap.tsx b/apps/web/src/components/ComposerPromptEditorTiptap.tsx index 4ba2418c5169b..58c5b107644fb 100644 --- a/apps/web/src/components/ComposerPromptEditorTiptap.tsx +++ b/apps/web/src/components/ComposerPromptEditorTiptap.tsx @@ -1101,7 +1101,7 @@ function ComposerPromptEditorTiptapInner( const editorAttributes = { class: cn( - "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", + "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", className, ), "data-testid": "composer-editor", diff --git a/apps/web/src/components/GitActionsControl.tsx b/apps/web/src/components/GitActionsControl.tsx index 479b6d7c7f491..5e7790e966510 100644 --- a/apps/web/src/components/GitActionsControl.tsx +++ b/apps/web/src/components/GitActionsControl.tsx @@ -120,6 +120,7 @@ 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"; @@ -1151,8 +1152,10 @@ 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 with nothing to commit, push, or diff hides those rows until there is work. const quietEmptyDraft = + redesign && isPanel && draftId !== undefined && gitActionProgress === null && diff --git a/apps/web/src/components/ThreadStatusIndicators.tsx b/apps/web/src/components/ThreadStatusIndicators.tsx index 75cb84a318a2a..e28b0f8b08f77 100644 --- a/apps/web/src/components/ThreadStatusIndicators.tsx +++ b/apps/web/src/components/ThreadStatusIndicators.tsx @@ -292,7 +292,9 @@ function PullRequestBadge({ aria-hidden className={cn("size-3 shrink-0", presentation.toneClassName)} /> - {presentation.text} + + {presentation.text} + s.redesignEnabled); const shortcutModifiers = useShortcutModifierState(); const isQueuing = !isEditingQueuedMessage && @@ -368,7 +369,16 @@ export const ComposerPrimaryActions = memo(function ComposerPrimaryActions({ render={ diff --git a/apps/web/src/index.css b/apps/web/src/index.css index 7142f65cc763c..649c63efc2f68 100644 --- a/apps/web/src/index.css +++ b/apps/web/src/index.css @@ -4,6 +4,8 @@ @custom-variant light (&:not(.dark, .dark *)); /* Window Controls Overlay: active when Electron exposes native titlebar control geometry. */ @custom-variant wco (&:is(.wco, .wco *)); +/* Beta "New design" (Settings -> Beta) sets data-redesign on . */ +@custom-variant redesign (&:where([data-redesign] *)); /* Secondary hovering pointers reveal sidebar actions on touch-primary devices. */ @custom-variant any-hover { @@ -1243,8 +1245,6 @@ html[data-mobile-composer-route-transition="true"]::view-transition-old(t3-mobil --accent-foreground: #f7f9ff; --muted: #0a0a0a; --muted-foreground: #a3a3a3; - /* Row metadata sits a step below read titles (75% white). */ - --secondary-label: #8f8f8f; --border: rgb(255 255 255 / 8%); --input: rgb(255 255 255 / 18%); --sidebar: var(--card); @@ -1663,6 +1663,11 @@ body { padding: 0; } +/* New design: sidebar row metadata sits a step below read titles (75% white). */ +.dark[data-redesign] [data-app-sidebar] { + --secondary-label: #8f8f8f; +} + /* Lighter default icon stroke. Zero specificity, so stroke-* classes still win over it while it still beats lucide's stroke-width="2" attribute. */ :where(svg.lucide[stroke-width="2"]) { diff --git a/apps/web/src/routes/__root.tsx b/apps/web/src/routes/__root.tsx index 2152b2c86bd75..d18e89d161a04 100644 --- a/apps/web/src/routes/__root.tsx +++ b/apps/web/src/routes/__root.tsx @@ -294,6 +294,10 @@ function ContrastAppearanceSync() { }, [diffColorScheme]); const chatWidth = useClientSettings((settings) => settings.chatWidth); + const redesignEnabled = useClientSettings((settings) => settings.redesignEnabled); + useEffect(() => { + document.documentElement.toggleAttribute("data-redesign", redesignEnabled); + }, [redesignEnabled]); useEffect(() => { document.documentElement.dataset.chatWidth = chatWidth; }, [chatWidth]); diff --git a/packages/contracts/src/settings.ts b/packages/contracts/src/settings.ts index 7ebdf72310c35..045e71a5eae9f 100644 --- a/packages/contracts/src/settings.ts +++ b/packages/contracts/src/settings.ts @@ -477,6 +477,8 @@ export const ClientSettingsSchema = Schema.Struct({ mathRenderingEnabled: Schema.Boolean.pipe(Schema.withDecodingDefault(Effect.succeed(false))), // Sidebar project icons rest in grayscale so titles lead; this keeps their colors. sidebarProjectIconColors: Schema.Boolean.pipe(Schema.withDecodingDefault(Effect.succeed(false))), + // Beta: the quieter sidebar, composer and panel design. Off keeps the current look. + redesignEnabled: Schema.Boolean.pipe(Schema.withDecodingDefault(Effect.succeed(false))), }); export type ClientSettings = typeof ClientSettingsSchema.Type; @@ -1683,5 +1685,6 @@ export const ClientSettingsPatch = Schema.Struct({ wordWrap: Schema.optionalKey(Schema.Boolean), mathRenderingEnabled: Schema.optionalKey(Schema.Boolean), sidebarProjectIconColors: Schema.optionalKey(Schema.Boolean), + redesignEnabled: Schema.optionalKey(Schema.Boolean), }); export type ClientSettingsPatch = typeof ClientSettingsPatch.Type;