From fc82e58e6b9a56a24473021f3c0b1a6a8978aa01 Mon Sep 17 00:00:00 2001 From: Trevor Walker Date: Wed, 30 Sep 2026 09:40:57 -0600 Subject: [PATCH 1/3] fix(web): web colors come from theme tokens Ports the remaining chat, settings, pull request and Usage hunks of upstream 315fcca10a826d8aa1cbdffc3ef5b5eb5a1e2f9d (#13371). The thread-status subset landed earlier in #908. Raw palette classes become semantic theme tokens so status tones follow custom themes; the macOS permission and Computer Use marks move into Icons.tsx. The upstream shadcn/no-raw-colors lint rule is not ported because Pylon does not carry the @shadcn/lint plugin. --- apps/web/src/components/ChatMarkdown.tsx | 2 +- apps/web/src/components/Icons.tsx | 85 +++++++++++++++++++ apps/web/src/components/LegacySidebar.tsx | 2 +- apps/web/src/components/QuitHoldOverlay.tsx | 2 +- apps/web/src/components/ThreadSearchMatch.tsx | 2 +- apps/web/src/components/chat/ChatComposer.tsx | 2 +- .../components/chat/ContextWindowMeter.tsx | 2 +- .../src/components/chat/MessagesTimeline.tsx | 26 +----- apps/web/src/components/chat/ModelListRow.tsx | 2 +- .../chat/TerminalContextInlineChip.tsx | 2 +- .../cloud/ConnectCliAuthSurface.tsx | 2 +- .../components/device/DeviceStreamView.tsx | 4 +- .../preview/ThreadPreviewMiniPlayer.tsx | 4 +- .../pullRequest/PullRequestCodeTab.tsx | 6 +- .../pullRequest/PullRequestDetailPanel.tsx | 2 +- .../PullRequestReviewAnnotation.tsx | 2 +- .../pullRequest/PullRequestSummaryTab.tsx | 2 +- .../settings/AddProviderInstanceDialog.tsx | 2 +- .../settings/ConnectionsSettings.tsx | 2 +- .../settings/DiagnosticsSettings.tsx | 10 +-- .../settings/ResourceTelemetryDiagnostics.tsx | 48 +++++------ .../settings/SnapShotSetupDialog.tsx | 77 ++--------------- .../sidebar/DesktopUpdateStatusIcon.tsx | 2 +- apps/web/src/components/usage/UsagePage.tsx | 2 +- apps/web/src/routes/_chat.pull-requests.tsx | 2 +- 25 files changed, 145 insertions(+), 149 deletions(-) diff --git a/apps/web/src/components/ChatMarkdown.tsx b/apps/web/src/components/ChatMarkdown.tsx index 346d304296..2243fba945 100644 --- a/apps/web/src/components/ChatMarkdown.tsx +++ b/apps/web/src/components/ChatMarkdown.tsx @@ -326,7 +326,7 @@ function CodexArtifactTemplateCard(props: {
- + diff --git a/apps/web/src/components/Icons.tsx b/apps/web/src/components/Icons.tsx index 975edf5226..eb2776b70f 100644 --- a/apps/web/src/components/Icons.tsx +++ b/apps/web/src/components/Icons.tsx @@ -798,3 +798,88 @@ export const ForgejoIcon: Icon = (props) => ( ); + +// macOS System Settings > Privacy & Security pane marks, so the SnapShot setup +// step points at the same icon the user is about to look for. +export const MacScreenRecordingIcon: Icon = (props) => { + const gradientId = useId(); + return ( + + ); +}; + +export const MacAccessibilityIcon: Icon = (props) => { + const gradientId = useId(); + return ( + + ); +}; + +// Codex's Computer Use app mark, shown on computer-use rows in the work log. +export const ComputerUseAppIcon: Icon = (props) => { + const gradientId = `${useId().replaceAll(":", "")}-computer-use-app-gradient`; + return ( + + ); +}; diff --git a/apps/web/src/components/LegacySidebar.tsx b/apps/web/src/components/LegacySidebar.tsx index be43769347..2842c4bfb2 100644 --- a/apps/web/src/components/LegacySidebar.tsx +++ b/apps/web/src/components/LegacySidebar.tsx @@ -868,7 +868,7 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThreadRowP diff --git a/apps/web/src/components/chat/TerminalContextInlineChip.tsx b/apps/web/src/components/chat/TerminalContextInlineChip.tsx index 48abba3386..1c8eb90db1 100644 --- a/apps/web/src/components/chat/TerminalContextInlineChip.tsx +++ b/apps/web/src/components/chat/TerminalContextInlineChip.tsx @@ -61,7 +61,7 @@ export function TerminalContextInlineChip(props: TerminalContextInlineChipProps) >
- + {terminalLabel} diff --git a/apps/web/src/components/cloud/ConnectCliAuthSurface.tsx b/apps/web/src/components/cloud/ConnectCliAuthSurface.tsx index 85a418add2..3c80be8059 100644 --- a/apps/web/src/components/cloud/ConnectCliAuthSurface.tsx +++ b/apps/web/src/components/cloud/ConnectCliAuthSurface.tsx @@ -27,7 +27,7 @@ function ConnectCliAuthMessage({ return ( <> {eyebrow ? ( -

+

{eyebrow}

) : null} diff --git a/apps/web/src/components/device/DeviceStreamView.tsx b/apps/web/src/components/device/DeviceStreamView.tsx index b9e60528e1..2abf89828b 100644 --- a/apps/web/src/components/device/DeviceStreamView.tsx +++ b/apps/web/src/components/device/DeviceStreamView.tsx @@ -292,7 +292,7 @@ export function DeviceStreamView(props: { {axElements.map((element) => (
{element.label ? ( - + {element.label} ) : null} diff --git a/apps/web/src/components/preview/ThreadPreviewMiniPlayer.tsx b/apps/web/src/components/preview/ThreadPreviewMiniPlayer.tsx index 53fac8470e..fe414c5ed3 100644 --- a/apps/web/src/components/preview/ThreadPreviewMiniPlayer.tsx +++ b/apps/web/src/components/preview/ThreadPreviewMiniPlayer.tsx @@ -464,7 +464,7 @@ function MiniPlayerShell({ @@ -478,7 +478,7 @@ function MiniPlayerShell({ > {recording ? ( - + ) : null} diff --git a/apps/web/src/components/pullRequest/PullRequestCodeTab.tsx b/apps/web/src/components/pullRequest/PullRequestCodeTab.tsx index 000a7ba436..66a087d071 100644 --- a/apps/web/src/components/pullRequest/PullRequestCodeTab.tsx +++ b/apps/web/src/components/pullRequest/PullRequestCodeTab.tsx @@ -1114,7 +1114,7 @@ function PullRequestCodeTab({ > @@ -1154,7 +1154,7 @@ function PullRequestCodeTab({ }> @@ -1170,7 +1170,7 @@ function PullRequestCodeTab({ }> diff --git a/apps/web/src/components/pullRequest/PullRequestDetailPanel.tsx b/apps/web/src/components/pullRequest/PullRequestDetailPanel.tsx index 7a038ff8eb..cf9c50157d 100644 --- a/apps/web/src/components/pullRequest/PullRequestDetailPanel.tsx +++ b/apps/web/src/components/pullRequest/PullRequestDetailPanel.tsx @@ -383,7 +383,7 @@ function PullRequestBaseFreshnessWarning({ type="button" aria-label={summary} className={cn( - "inline-flex min-w-0 shrink-0 cursor-help items-center gap-1 rounded-sm text-amber-600 outline-none focus-visible:ring-2 focus-visible:ring-ring dark:text-amber-400/90", + "inline-flex min-w-0 shrink-0 cursor-help items-center gap-1 rounded-sm text-warning-foreground outline-none focus-visible:ring-2 focus-visible:ring-ring", className, )} /> diff --git a/apps/web/src/components/pullRequest/PullRequestReviewAnnotation.tsx b/apps/web/src/components/pullRequest/PullRequestReviewAnnotation.tsx index d49cb52cc3..688cae121d 100644 --- a/apps/web/src/components/pullRequest/PullRequestReviewAnnotation.tsx +++ b/apps/web/src/components/pullRequest/PullRequestReviewAnnotation.tsx @@ -220,7 +220,7 @@ export function ReviewThreadCard({ >
{thread.isResolved ? ( - + ) : ( )} diff --git a/apps/web/src/components/pullRequest/PullRequestSummaryTab.tsx b/apps/web/src/components/pullRequest/PullRequestSummaryTab.tsx index 0937c1ee3e..ff4f9da52a 100644 --- a/apps/web/src/components/pullRequest/PullRequestSummaryTab.tsx +++ b/apps/web/src/components/pullRequest/PullRequestSummaryTab.tsx @@ -957,7 +957,7 @@ export function PullRequestSummaryTab({ ) : ( <> {detail.commentsTruncated ? ( -

+

This conversation is longer than this page reads in one go. The most recent{" "} {detail.comments.length} are here; open it on the host to read the rest.

diff --git a/apps/web/src/components/settings/AddProviderInstanceDialog.tsx b/apps/web/src/components/settings/AddProviderInstanceDialog.tsx index 83c28f5a27..b910ea12c9 100644 --- a/apps/web/src/components/settings/AddProviderInstanceDialog.tsx +++ b/apps/web/src/components/settings/AddProviderInstanceDialog.tsx @@ -298,7 +298,7 @@ export function AddProviderInstanceDialog({ optionBlocked ? (optionSupport.reason ?? undefined) : undefined } className={cn( - "relative flex cursor-pointer items-center gap-3 rounded-lg bg-card px-3 py-3 text-left text-muted-foreground outline-none ring-1 ring-black/5 hover:bg-zinc-50 focus-visible:ring-2 focus-visible:ring-ring data-checked:bg-primary/8 data-checked:text-foreground data-checked:ring-2 data-checked:ring-primary data-checked:hover:bg-primary/8 dark:bg-white/3 dark:ring-white/5 dark:hover:bg-white/5 dark:data-checked:bg-primary/15 dark:data-checked:ring-primary dark:data-checked:hover:bg-primary/15", + "relative flex cursor-pointer items-center gap-3 rounded-lg bg-card px-3 py-3 text-left text-muted-foreground outline-none ring-1 ring-black/5 hover:bg-accent focus-visible:ring-2 focus-visible:ring-ring data-checked:bg-primary/8 data-checked:text-foreground data-checked:ring-2 data-checked:ring-primary data-checked:hover:bg-primary/8 dark:bg-white/3 dark:ring-white/5 dark:hover:bg-white/5 dark:data-checked:bg-primary/15 dark:data-checked:ring-primary dark:data-checked:hover:bg-primary/15", optionBlocked && "cursor-not-allowed opacity-55", )} > diff --git a/apps/web/src/components/settings/ConnectionsSettings.tsx b/apps/web/src/components/settings/ConnectionsSettings.tsx index e84623dd19..f8f68cbe54 100644 --- a/apps/web/src/components/settings/ConnectionsSettings.tsx +++ b/apps/web/src/components/settings/ConnectionsSettings.tsx @@ -739,7 +739,7 @@ const PairingLinkListRow = memo(function PairingLinkListRow({

{primaryLabel}

diff --git a/apps/web/src/components/settings/DiagnosticsSettings.tsx b/apps/web/src/components/settings/DiagnosticsSettings.tsx index ab22c40b5c..9d8807d6bc 100644 --- a/apps/web/src/components/settings/DiagnosticsSettings.tsx +++ b/apps/web/src/components/settings/DiagnosticsSettings.tsx @@ -120,7 +120,7 @@ function StatBlock({
@@ -293,7 +293,7 @@ function ProcessNameCell({ ) : (
@@ -1079,17 +1077,17 @@ export function ResourceTelemetryDiagnostics({
@@ -1202,7 +1200,7 @@ export function ResourceTelemetryDiagnostics({ value={String(snapshot.health.inaccessibleProcessCount)} valueClassName={ snapshot.health.inaccessibleProcessCount > 0 - ? "text-amber-600 dark:text-amber-300" + ? "text-warning-foreground" : undefined } /> diff --git a/apps/web/src/components/settings/SnapShotSetupDialog.tsx b/apps/web/src/components/settings/SnapShotSetupDialog.tsx index 7491b9a33f..f70e5020a6 100644 --- a/apps/web/src/components/settings/SnapShotSetupDialog.tsx +++ b/apps/web/src/components/settings/SnapShotSetupDialog.tsx @@ -5,7 +5,8 @@ import { type DesktopSnapShotSetupAction, type DesktopSnapShotState, } from "@t3tools/contracts"; -import { useId, useState, type ReactNode } from "react"; +import { useState, type ReactNode } from "react"; +import { MacAccessibilityIcon, MacScreenRecordingIcon } from "../Icons"; import { CaptureShortcutConfig } from "./CaptureShortcutConfig"; import { Button } from "../ui/button"; import { Dialog, DialogDescription } from "../ui/dialog"; @@ -61,72 +62,6 @@ const GNOME_ACCESS_COPY = { }, }; -function ScreenRecordingIcon() { - const gradientId = useId(); - return ( - - ); -} - -function AccessibilityPermissionIcon() { - const gradientId = useId(); - return ( - - ); -} - export function SnapShotSetupDialog({ state, initialStep, @@ -333,7 +268,9 @@ export function SnapShotSetupDialog({ permissions={[ { id: "screenRecording", - icon: , + icon: ( + + ), title: "Screen Recording", description: "Capture the window you're using.", granted: macPermissions.screenRecording, @@ -341,7 +278,9 @@ export function SnapShotSetupDialog({ }, { id: "accessibility", - icon: , + icon: ( + + ), title: "Accessibility", description: includeAccessibility ? "Include text and controls from the captured app." diff --git a/apps/web/src/components/sidebar/DesktopUpdateStatusIcon.tsx b/apps/web/src/components/sidebar/DesktopUpdateStatusIcon.tsx index 833559e1cc..04ee884bbf 100644 --- a/apps/web/src/components/sidebar/DesktopUpdateStatusIcon.tsx +++ b/apps/web/src/components/sidebar/DesktopUpdateStatusIcon.tsx @@ -67,7 +67,7 @@ function DesktopUpdateDownloadingIcon({ percent }: { readonly percent: number | cy="16" r={DOWNLOAD_PROGRESS_RADIUS} fill="none" - stroke="color-mix(in srgb, currentColor 22%, transparent)" + className="stroke-current/22" strokeWidth="1.5" /> ) : showUsageStatus && hasIssue ? ( ) : ( diff --git a/apps/web/src/routes/_chat.pull-requests.tsx b/apps/web/src/routes/_chat.pull-requests.tsx index 20506300e3..d82e3f51b0 100644 --- a/apps/web/src/routes/_chat.pull-requests.tsx +++ b/apps/web/src/routes/_chat.pull-requests.tsx @@ -1857,7 +1857,7 @@ function PullRequestsRouteView() { )} {listQuery.error && shownCount > 0 ? ( -
+
{listQuery.error} Showing the last pull requests loaded.
{metadata.title}
-
+
{metadata.headBranch}