From 6ede2bee7eddf9653d16fbc05ed2207e2cedc053 Mon Sep 17 00:00:00 2001 From: Saravana Achu Mac Date: Tue, 5 May 2026 10:17:06 -0700 Subject: [PATCH] refactor(web): replace hardcoded app colors --- web/src/app/(app)/reviews/page.tsx | 4 +- web/src/app/(app)/settings/page.tsx | 12 ++--- web/src/app/(app)/workspaces/page.tsx | 4 +- web/src/app/(auth)/forgot-password/page.tsx | 6 +-- web/src/app/(auth)/login/page.tsx | 4 +- web/src/app/(auth)/register/page.tsx | 4 +- web/src/app/globals.css | 52 +++++++++++---------- web/src/app/layout.tsx | 4 +- web/src/app/loading.tsx | 2 +- web/src/app/page.tsx | 2 +- web/src/app/providers.tsx | 4 +- web/src/app/share/[token]/page.tsx | 2 +- web/src/components/AuthGuard.tsx | 2 +- web/src/components/BroadcastBanner.tsx | 2 +- web/src/components/CommandPalette.tsx | 6 +-- web/src/components/CreateNoteModal.tsx | 22 ++++----- web/src/components/CreateWorkspaceModal.tsx | 6 +-- web/src/components/LinkNoteModal.tsx | 26 +++++------ web/src/components/NoteEditor.tsx | 2 +- web/src/components/PalacePanel.tsx | 2 +- web/src/components/PromptTemplateEditor.tsx | 2 +- web/src/components/RunPromptModal.tsx | 2 +- web/src/components/ShareDialog.tsx | 2 +- web/src/components/Sidebar.tsx | 2 +- web/src/components/SurveyBanner.tsx | 12 ++--- 25 files changed, 96 insertions(+), 92 deletions(-) diff --git a/web/src/app/(app)/reviews/page.tsx b/web/src/app/(app)/reviews/page.tsx index 36303bb..1c0b74b 100644 --- a/web/src/app/(app)/reviews/page.tsx +++ b/web/src/app/(app)/reviews/page.tsx @@ -272,8 +272,8 @@ export default function ReviewsPage() { ? selectedBatchIds.has(item.id) ? "var(--nl-accent-primary)" : undefined : featuredProposal?.id === item.id ? "var(--nl-accent-primary)" : undefined, background: batchMode - ? selectedBatchIds.has(item.id) ? "rgba(90, 140, 255, 0.12)" : undefined - : featuredProposal?.id === item.id ? "rgba(90, 140, 255, 0.12)" : undefined, + ? selectedBatchIds.has(item.id) ? "var(--nl-accent-muted)" : undefined + : featuredProposal?.id === item.id ? "var(--nl-accent-muted)" : undefined, }} >
diff --git a/web/src/app/(app)/settings/page.tsx b/web/src/app/(app)/settings/page.tsx index 07a2776..61edd56 100644 --- a/web/src/app/(app)/settings/page.tsx +++ b/web/src/app/(app)/settings/page.tsx @@ -64,7 +64,7 @@ export default function SettingsPage() { title="Settings" description="Account, preferences, feedback, and session management." actions={ - } @@ -97,12 +97,12 @@ export default function SettingsPage() { {/* Change password */}
Change password - {error &&
{error}
} - {success &&
{success}
} + {error &&
{error}
} + {success &&
{success}
}
setCurrentPassword(e.target.value)} required /> setNewPassword(e.target.value)} required /> -
@@ -111,7 +111,7 @@ export default function SettingsPage() { {/* Danger zone */}
Danger zone -
@@ -188,7 +188,7 @@ MCP API base: ${MCP_SERVER_URL} diff --git a/web/src/app/(app)/workspaces/page.tsx b/web/src/app/(app)/workspaces/page.tsx index 5588c6d..22426dc 100644 --- a/web/src/app/(app)/workspaces/page.tsx +++ b/web/src/app/(app)/workspaces/page.tsx @@ -145,7 +145,7 @@ function WorkspacesPageInner() { actions={
diff --git a/web/src/app/(auth)/forgot-password/page.tsx b/web/src/app/(auth)/forgot-password/page.tsx index 00054c4..9c58d40 100644 --- a/web/src/app/(auth)/forgot-password/page.tsx +++ b/web/src/app/(auth)/forgot-password/page.tsx @@ -22,13 +22,13 @@ export default function ForgotPasswordPage() {

{error && ( -
+
{error}
)} {success && ( -
+
{success}
)} @@ -49,7 +49,7 @@ export default function ForgotPasswordPage() { type="submit" disabled={isLoading} className="input-shell" - style={{ background: "var(--nl-accent-primary, #5A8CFF)", color: "#fff", border: "none", fontWeight: 600, cursor: isLoading ? "wait" : "pointer" }} + style={{ background: "var(--nl-accent-primary)", color: "var(--nl-on-accent)", border: "none", fontWeight: 600, cursor: isLoading ? "wait" : "pointer" }} > {isLoading ? "Sending…" : "Send reset link"} diff --git a/web/src/app/(auth)/login/page.tsx b/web/src/app/(auth)/login/page.tsx index 94df825..ef5d066 100644 --- a/web/src/app/(auth)/login/page.tsx +++ b/web/src/app/(auth)/login/page.tsx @@ -23,7 +23,7 @@ export default function LoginPage() {

Sign in

{error && ( -
+
{error}
)} @@ -56,7 +56,7 @@ export default function LoginPage() { type="submit" disabled={isLoading} className="input-shell" - style={{ background: "var(--nl-accent-primary, #5A8CFF)", color: "#fff", border: "none", fontWeight: 600, cursor: isLoading ? "wait" : "pointer" }} + style={{ background: "var(--nl-accent-primary)", color: "var(--nl-on-accent)", border: "none", fontWeight: 600, cursor: isLoading ? "wait" : "pointer" }} > {isLoading ? "Signing in…" : "Sign in"} diff --git a/web/src/app/(auth)/register/page.tsx b/web/src/app/(auth)/register/page.tsx index acf58de..46cf741 100644 --- a/web/src/app/(auth)/register/page.tsx +++ b/web/src/app/(auth)/register/page.tsx @@ -24,7 +24,7 @@ export default function RegisterPage() {

Create account

{error && ( -
+
{error}
)} @@ -70,7 +70,7 @@ export default function RegisterPage() { type="submit" disabled={isLoading} className="input-shell" - style={{ background: "var(--nl-accent-primary, #5A8CFF)", color: "#fff", border: "none", fontWeight: 600, cursor: isLoading ? "wait" : "pointer" }} + style={{ background: "var(--nl-accent-primary)", color: "var(--nl-on-accent)", border: "none", fontWeight: 600, cursor: isLoading ? "wait" : "pointer" }} > {isLoading ? "Creating account…" : "Create account"} diff --git a/web/src/app/globals.css b/web/src/app/globals.css index fb69f19..b87fd60 100644 --- a/web/src/app/globals.css +++ b/web/src/app/globals.css @@ -3,6 +3,23 @@ /* Design tokens imported via @bytelyst/design-tokens/css/notelett in layout.tsx */ /* === END design tokens === */ +:root { + --nl-on-accent: white; + --nl-overlay-scrim: color-mix(in srgb, var(--nl-bg-canvas) 64%, transparent); + --nl-overlay-scrim-strong: color-mix(in srgb, var(--nl-bg-canvas) 72%, transparent); + --nl-surface-sidebar: color-mix(in srgb, var(--nl-bg-canvas) 82%, transparent); + --nl-surface-card-translucent: color-mix(in srgb, var(--nl-surface-card) 86%, transparent); + --nl-surface-muted-translucent: color-mix(in srgb, var(--nl-surface-muted) 72%, transparent); + --nl-input-bg: color-mix(in srgb, var(--nl-bg-canvas) 88%, transparent); + --nl-accent-muted: color-mix(in srgb, var(--nl-accent-primary) 16%, transparent); + --nl-accent-muted-strong: color-mix(in srgb, var(--nl-accent-primary) 22%, transparent); + --nl-danger-muted: color-mix(in srgb, var(--nl-danger) 14%, transparent); + --nl-success-muted: color-mix(in srgb, var(--nl-status-success) 14%, transparent); + --nl-warning-muted: color-mix(in srgb, var(--nl-status-warning) 14%, transparent); + --nl-info-muted: color-mix(in srgb, var(--nl-accent-primary) 12%, transparent); + --nl-command-shadow: 0 24px 80px color-mix(in srgb, black 45%, transparent); +} + * { box-sizing: border-box; } @@ -45,7 +62,7 @@ button { .sidebar { border-right: 1px solid var(--nl-border-default); - background: rgba(12, 17, 31, 0.82); + background: var(--nl-surface-sidebar); backdrop-filter: blur(16px); } @@ -57,14 +74,14 @@ button { .surface-card { border: 1px solid var(--nl-border-default); border-radius: var(--nl-radius-md); - background: rgba(18, 23, 37, 0.86); + background: var(--nl-surface-card-translucent); box-shadow: var(--nl-elevation-md); } .surface-muted { border: 1px solid var(--nl-border-default); border-radius: var(--nl-radius-sm); - background: rgba(26, 35, 53, 0.72); + background: var(--nl-surface-muted-translucent); } .badge { @@ -73,7 +90,7 @@ button { gap: 6px; border-radius: var(--nl-radius-pill); padding: 6px 10px; - background: rgba(90, 140, 255, 0.14); + background: var(--nl-accent-muted); color: var(--nl-text-primary); font-size: var(--nl-fs-sm); } @@ -82,7 +99,7 @@ button { width: 100%; border: 1px solid var(--nl-border-default); border-radius: var(--nl-radius-sm); - background: rgba(10, 15, 28, 0.88); + background: var(--nl-input-bg); color: var(--nl-text-primary); padding: 12px 14px; } @@ -105,7 +122,7 @@ button { /* Focus-visible — keyboard accessibility */ *:focus-visible { - outline: 2px solid var(--nl-accent-primary, #5A8CFF); + outline: 2px solid var(--nl-accent-primary); outline-offset: 2px; border-radius: 4px; } @@ -161,15 +178,15 @@ button:active:not(:disabled), [role="button"]:active:not(:disabled) { overflow-y: auto; } .app-sidebar.open { left: 0 !important; } - .sidebar-overlay { display: none; position: fixed; inset: 0; z-index: 39; background: rgba(0,0,0,0.5); } + .sidebar-overlay { display: none; position: fixed; inset: 0; z-index: 39; background: var(--nl-overlay-scrim); } .sidebar-overlay.open { display: block; } .sidebar-toggle { display: flex; align-items: center; justify-content: center; position: fixed; top: 12px; left: 12px; z-index: 38; width: 40px; height: 40px; border-radius: 8px; - border: 1px solid var(--nl-border-default, #2a2a4a); - background: var(--nl-bg-elevated, #12151c); - color: var(--nl-text-primary, #fff); + border: 1px solid var(--nl-border-default); + background: var(--nl-bg-elevated); + color: var(--nl-text-primary); cursor: pointer; font-size: 20px; line-height: 1; } } @@ -188,19 +205,6 @@ button:active:not(:disabled), [role="button"]:active:not(:disabled) { } } -/* Respect OS dark/light preference */ -@media (prefers-color-scheme: light) { - :root:not([data-theme="dark"]) { - --nl-bg-canvas: #F8FAFC; - --nl-bg-elevated: #FFFFFF; - --nl-surface-card: #FFFFFF; - --nl-surface-muted: #F1F5F9; - --nl-text-primary: #0F172A; - --nl-text-secondary: #475569; - --nl-text-tertiary: #94A3B8; - } -} - /* ── Responsive Sidebar ──────────────────────────────────────── */ .app-layout { @@ -221,7 +225,7 @@ button:active:not(:disabled), [role="button"]:active:not(:disabled) { display: none; position: fixed; inset: 0; - background: rgba(0,0,0,0.5); + background: var(--nl-overlay-scrim); z-index: 39; } diff --git a/web/src/app/layout.tsx b/web/src/app/layout.tsx index f0b1280..2de3cae 100644 --- a/web/src/app/layout.tsx +++ b/web/src/app/layout.tsx @@ -25,8 +25,8 @@ export const viewport: Viewport = { width: "device-width", initialScale: 1, themeColor: [ - { media: "(prefers-color-scheme: dark)", color: "#06070A" }, - { media: "(prefers-color-scheme: light)", color: "#F8FAFC" }, + { media: "(prefers-color-scheme: dark)", color: "black" }, + { media: "(prefers-color-scheme: light)", color: "white" }, ], }; diff --git a/web/src/app/loading.tsx b/web/src/app/loading.tsx index 559cc05..e928c24 100644 --- a/web/src/app/loading.tsx +++ b/web/src/app/loading.tsx @@ -2,7 +2,7 @@ import { LoadingSpinner } from "@bytelyst/dashboard-components"; export default function Loading() { return ( -
+
); diff --git a/web/src/app/page.tsx b/web/src/app/page.tsx index 6505441..a24ddb6 100644 --- a/web/src/app/page.tsx +++ b/web/src/app/page.tsx @@ -14,7 +14,7 @@ export default function HomePage() {

- + Open dashboard diff --git a/web/src/app/providers.tsx b/web/src/app/providers.tsx index 6fa0f80..12cfdad 100644 --- a/web/src/app/providers.tsx +++ b/web/src/app/providers.tsx @@ -26,9 +26,9 @@ export function Providers({ children }: { children: ReactNode }) { theme="dark" toastOptions={{ style: { - background: "var(--nl-surface-card, #121725)", + background: "var(--nl-surface-card)", border: "1px solid var(--nl-border-default)", - color: "var(--nl-text-primary, #EFF4FF)", + color: "var(--nl-text-primary)", fontFamily: "var(--nl-font-body)", }, }} diff --git a/web/src/app/share/[token]/page.tsx b/web/src/app/share/[token]/page.tsx index fdd0e88..0c4fb3e 100644 --- a/web/src/app/share/[token]/page.tsx +++ b/web/src/app/share/[token]/page.tsx @@ -45,7 +45,7 @@ export default function SharedNotePage() { }, [token]); return ( -
+
Read-only share · {PRODUCT_NAME} diff --git a/web/src/components/AuthGuard.tsx b/web/src/components/AuthGuard.tsx index c831c16..a1aef2b 100644 --- a/web/src/components/AuthGuard.tsx +++ b/web/src/components/AuthGuard.tsx @@ -36,7 +36,7 @@ export function AuthGuard({ children }: { children: ReactNode }) { return (
-

Service Unavailable

+

Service Unavailable

{killSwitchMsg}

diff --git a/web/src/components/BroadcastBanner.tsx b/web/src/components/BroadcastBanner.tsx index 90e4c1c..ba2d9a6 100644 --- a/web/src/components/BroadcastBanner.tsx +++ b/web/src/components/BroadcastBanner.tsx @@ -56,7 +56,7 @@ export function BroadcastBanner() { alignItems: "center", justifyContent: "space-between", padding: "var(--nl-space-3) var(--nl-space-4)", - background: msg.priority === "high" || msg.priority === "urgent" ? "rgba(255,180,70,0.12)" : "rgba(100,160,255,0.10)", + background: msg.priority === "high" || msg.priority === "urgent" ? "var(--nl-warning-muted)" : "var(--nl-info-muted)", borderRadius: "var(--nl-radius-sm)", fontSize: "var(--nl-fs-sm)", }} diff --git a/web/src/components/CommandPalette.tsx b/web/src/components/CommandPalette.tsx index 5290171..8ecc1c7 100644 --- a/web/src/components/CommandPalette.tsx +++ b/web/src/components/CommandPalette.tsx @@ -167,7 +167,7 @@ export function CommandPalette() { position: "fixed", inset: 0, zIndex: 200, - background: "rgba(0,0,0,0.55)", + background: "var(--nl-overlay-scrim-strong)", display: "grid", placeItems: "start center", paddingTop: "12vh", @@ -183,7 +183,7 @@ export function CommandPalette() { overflow: "hidden", display: "grid", gridTemplateRows: "auto 1fr", - boxShadow: "0 24px 80px rgba(0,0,0,0.45)", + boxShadow: "var(--nl-command-shadow)", }} onClick={(e) => e.stopPropagation()} > @@ -219,7 +219,7 @@ export function CommandPalette() { borderRadius: "var(--nl-radius-md)", textDecoration: "none", color: "var(--nl-text-primary)", - background: idx === activeIndex ? "rgba(90,140,255,0.2)" : "transparent", + background: idx === activeIndex ? "var(--nl-accent-muted-strong)" : "transparent", border: idx === activeIndex ? "1px solid var(--nl-accent-primary)" : "1px solid transparent", }} onMouseEnter={() => setActiveIndex(idx)} diff --git a/web/src/components/CreateNoteModal.tsx b/web/src/components/CreateNoteModal.tsx index 110d138..b450dc3 100644 --- a/web/src/components/CreateNoteModal.tsx +++ b/web/src/components/CreateNoteModal.tsx @@ -65,7 +65,7 @@ export function CreateNoteModal({ workspaces, defaultWorkspaceId, onCreated, onC style={{ position: "fixed", inset: 0, - background: "rgba(0,0,0,0.5)", + background: "var(--nl-overlay-scrim)", display: "flex", alignItems: "center", justifyContent: "center", @@ -79,18 +79,18 @@ export function CreateNoteModal({ workspaces, defaultWorkspaceId, onCreated, onC onSubmit={handleSubmit} className="surface-card" style={{ - padding: "var(--nl-space-6, 1.5rem)", + padding: "var(--nl-space-6)", width: "100%", maxWidth: 520, display: "grid", - gap: "var(--nl-space-4, 1rem)", + gap: "var(--nl-space-4)", }} > -
Create Note
+
Create Note
- {error &&
{error}
} + {error &&
{error}
} -