An open-source, faster Devin alternative
TypeScript
chore(web): Phase B close-out — delete theme.css, Preflight on
Igor Zalutski24927f4d9e7c
diff --git a/web/index.html b/web/index.htmlindex 638b834b..b66e5ecd 100644--- a/web/index.html+++ b/web/index.html@@ -4,12 +4,6 @@<meta charset="UTF-8" /><meta name="viewport" content="width=device-width, initial-scale=1.0" /><title>OpenComputer</title>- <link rel="preconnect" href="https://fonts.googleapis.com" />- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />- <link- href="https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300..700;1,9..40,300..700&family=JetBrains+Mono:wght@400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap"- rel="stylesheet"- /></head><body><div id="root"></div>diff --git a/web/src/components/ProtectedRoute.tsx b/web/src/components/ProtectedRoute.tsxindex 2810ef5b..31e54278 100644--- a/web/src/components/ProtectedRoute.tsx+++ b/web/src/components/ProtectedRoute.tsx@@ -1,6 +1,7 @@import { useEffect } from 'react'import { Outlet } from 'react-router-dom'-import { useAuth } from '../hooks/useAuth'+import { Loader2 } from 'lucide-react'+import { useAuth } from '@/hooks/useAuth'export default function ProtectedRoute() {const { user, loading } = useAuth()@@ -17,22 +18,9 @@ export default function ProtectedRoute() {if (loading || !user) {return (- <div style={{- display: 'flex',- flexDirection: 'column',- alignItems: 'center',- justifyContent: 'center',- height: '100vh',- gap: 16,- background: 'var(--bg-void)',- }}>- <div className="loading-spinner" />- <span style={{- fontSize: 12,- color: 'var(--text-tertiary)',- fontFamily: 'var(--font-mono)',- letterSpacing: '0.04em',- }}>+ <div className="bg-background flex min-h-screen flex-col items-center justify-center gap-3">+ <Loader2 className="text-muted-foreground size-5 animate-spin" />+ <span className="text-muted-foreground font-mono text-xs tracking-wide">Loading…</span></div>diff --git a/web/src/index.css b/web/src/index.cssindex 03c00296..6f7bb5c2 100644--- a/web/src/index.css+++ b/web/src/index.css@@ -2,37 +2,17 @@OpenComputer dashboard — design tokens (light, ink-on-paper)Brand source: opencomputer-site-v1/src/index.css + Mintlify docs.- COEXISTENCE NOTE (Phase A/B): the legacy `theme.css` ("Void Glass") is- imported HERE, into a low-priority `legacy` layer, during the migration.- This matters: theme.css has global `* { margin:0; padding:0 }` resets,- and unlayered CSS beats every @layer — so if theme.css were imported- unlayered (a plain JS import) it would override all Tailwind padding/- margin utilities and the new screens would lose their spacing. Importing- it into `legacy` (ordered below components/utilities) keeps Tailwind- utilities winning, while legacy classes still style the unmigrated- screens. `legacy` sits ABOVE `base` so theme.css's class borders survive- the base border reset.-- Tailwind Preflight is intentionally OFF here (we import the theme +- utilities layers explicitly, omitting preflight) so it does not fight- theme.css's resets. A minimal border reset replaces the slice of- preflight that shadcn components rely on. At the END of Phase B- (theme.css deleted) we drop the `legacy` layer + this import, swap to the- bundled `@import "tailwindcss";` (Preflight back on) and drop the manual- reset — see the close-out task.+ The legacy "Void Glass" theme.css is gone; Tailwind Preflight is on (the+ bundled `@import "tailwindcss"`), which provides the resets shadcn assumes+ (border reset, link/form-control inheritance, table border-collapse). The+ only base addition is defaulting the border color to --border (Tailwind v4+ defaults borders to currentColor) and the body bg/text/font.============================================================ */-@layer theme, base, legacy, components, utilities;--@import 'tailwindcss/theme.css' layer(theme);-@import 'tailwindcss/utilities.css' layer(utilities);+@import 'tailwindcss';@import 'tw-animate-css';@import 'shadcn/tailwind.css';-/* Legacy "Void Glass" styles — low layer so Tailwind utilities win (removed- with theme.css at the end of Phase B). */-@import './styles/theme.css' layer(legacy);-/* Self-hosted brand fonts (no external CDN dependency). */@import '@fontsource-variable/inter';@import '@fontsource-variable/geist-mono';@@ -243,59 +223,17 @@--sidebar-accent-foreground: hsl(40 10% 92%);}-/* Document font: Inter everywhere — including portaled overlays (dialogs,- dropdowns, toasts) that render outside the AppShell subtree. Unlayered so it- wins over the legacy body font during coexistence; per-element `font-mono`- utilities still override for code/terminal surfaces. */-html,-body {- font-family: var(--font-sans);- font-optical-sizing: auto;-}--/* Minimal base reset — the slice of Preflight we still need during coexistence- (Preflight itself is off so it doesn't fight theme.css). box-sizing is- already global via theme.css. */@layer base {- /* border-* utilities need a default style + color to render. */+ /* Tailwind v4 defaults borders to currentColor; make --border the default. */*,- ::before,- ::after {- border-width: 0;- border-style: solid;- border-color: var(--border);+ ::after,+ ::before {+ @apply border-border;}-- /* Links: no browser-default underline / blue (we style links explicitly).- Without Preflight the UA would underline every <a>, incl. nav + the logo. */- a {- color: inherit;- text-decoration: inherit;- }-- /* Tables collapse borders — without Preflight the UA default is- `border-collapse: separate`, whose cell spacing breaks the row hover into- segments (the "gaps"/"blank borders" between cells). */- table {- border-collapse: collapse;- border-color: inherit;- text-indent: 0;+ html {+ font-optical-sizing: auto;}-- /* Form controls inherit the page font — otherwise buttons/inputs fall back- to the UA system font (the "looks like Arial" effect) instead of Inter. */- button,- input,- optgroup,- select,- textarea {- font-family: inherit;- font-feature-settings: inherit;- font-variation-settings: inherit;- font-size: 100%;- font-weight: inherit;- line-height: inherit;- letter-spacing: inherit;- color: inherit;+ body {+ @apply bg-background text-foreground font-sans antialiased;}}diff --git a/web/src/main.tsx b/web/src/main.tsxindex b8767931..b5c92338 100644--- a/web/src/main.tsx+++ b/web/src/main.tsx@@ -6,8 +6,6 @@ import posthog from 'posthog-js'import { PostHogProvider } from '@posthog/react'import App from './App'import { Toaster } from './components/ui/sonner'-// theme.css (legacy) is imported via index.css into the `legacy` cascade layer-// so Tailwind utilities win during coexistence — see index.css for why.import './index.css'const queryClient = new QueryClient({diff --git a/web/src/styles/theme.css b/web/src/styles/theme.cssdeleted file mode 100644index 4b4514c1..00000000--- a/web/src/styles/theme.css+++ /dev/null@@ -1,448 +0,0 @@-/* ============================================================- OpenComputer — "Void Glass" Design System- Deep black surfaces, glass-morphism cards, neon chart accents- ============================================================ */--/* --- Design Tokens --- */-:root {- /* Backgrounds */- --bg-void: #08080c;- --bg-deep: #0c0c12;- --bg-surface: #111118;- --bg-card: rgba(17, 17, 24, 0.65);- --bg-elevated: #18182200;- --bg-hover: rgba(99, 102, 241, 0.05);-- /* Borders */- --border-subtle: rgba(255, 255, 255, 0.06);- --border-default: rgba(255, 255, 255, 0.08);- --border-accent: rgba(129, 140, 248, 0.22);- --border-glow: rgba(129, 140, 248, 0.4);-- /* Text */- --text-primary: #ededf0;- --text-secondary: #8585a0;- --text-tertiary: #4e4e64;- --text-accent: #a5b4fc;-- /* Accents */- --accent-indigo: #818cf8;- --accent-violet: #a78bfa;- --accent-emerald: #34d399;- --accent-cyan: #22d3ee;- --accent-amber: #fbbf24;- --accent-rose: #fb7185;- --accent-pink: #f472b6;-- /* Gradients */- --gradient-primary: linear-gradient(135deg, #6366f1, #818cf8);- --gradient-surface: linear-gradient(180deg, rgba(255,255,255,0.025) 0%, transparent 100%);-- /* Shadows */- --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);- --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);- --shadow-glow: 0 0 24px rgba(99, 102, 241, 0.12);-- /* Radii */- --radius-sm: 6px;- --radius-md: 10px;- --radius-lg: 14px;- --radius-xl: 20px;-- /* Typography */- --font-display: 'Outfit', sans-serif;- --font-body: 'DM Sans', sans-serif;- --font-mono: 'JetBrains Mono', monospace;-}--/* --- Reset & Base --- */-*, *::before, *::after {- box-sizing: border-box;- margin: 0;- padding: 0;-}--html {- -webkit-font-smoothing: antialiased;- -moz-osx-font-smoothing: grayscale;-}--body {- font-family: var(--font-body);- background: var(--bg-void);- color: var(--text-primary);- line-height: 1.5;-}--/* Ambient dot-grid texture */-body::before {- content: '';- position: fixed;- inset: 0;- background-image: radial-gradient(circle, rgba(99, 102, 241, 0.035) 1px, transparent 1px);- background-size: 28px 28px;- pointer-events: none;- z-index: 0;-}--#root {- position: relative;- z-index: 1;-}--/* --- Scrollbar --- */-::-webkit-scrollbar { width: 5px; height: 5px; }-::-webkit-scrollbar-track { background: transparent; }-::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }-::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.14); }--/* --- Glass Card --- */-.glass-card {- background: var(--bg-card);- backdrop-filter: blur(16px);- -webkit-backdrop-filter: blur(16px);- border: 1px solid var(--border-subtle);- border-radius: var(--radius-lg);- background-image: var(--gradient-surface);- transition: border-color 0.25s ease, box-shadow 0.25s ease;-}--.glass-card:hover {- border-color: var(--border-accent);- box-shadow: var(--shadow-glow);-}--/* --- Stat Card --- */-.stat-card {- position: relative;- background: var(--bg-surface);- background-image: var(--gradient-surface);- border: 1px solid var(--border-subtle);- border-radius: var(--radius-lg);- padding: 22px 24px;- overflow: hidden;- transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);-}--.stat-card::after {- content: '';- position: absolute;- bottom: 0;- left: 0;- right: 0;- height: 2px;- background: var(--gradient-primary);- opacity: 0;- transition: opacity 0.3s ease;-}--.stat-card:hover {- transform: translateY(-3px);- border-color: var(--border-accent);- box-shadow: var(--shadow-glow);-}--.stat-card:hover::after {- opacity: 1;-}--/* --- Animations --- */-@keyframes fadeInUp {- from { opacity: 0; transform: translateY(16px); }- to { opacity: 1; transform: translateY(0); }-}--@keyframes pulseDot {- 0%, 100% { opacity: 1; transform: scale(1); }- 50% { opacity: 0.35; transform: scale(0.85); }-}--@keyframes shimmer {- 0% { background-position: -200% center; }- 100% { background-position: 200% center; }-}--@keyframes spin {- to { transform: rotate(360deg); }-}--@keyframes subtleFloat {- 0%, 100% { transform: translateY(0); }- 50% { transform: translateY(-6px); }-}--.animate-in {- animation: fadeInUp 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;-}--.stagger-1 { animation-delay: 0.04s; opacity: 0; }-.stagger-2 { animation-delay: 0.10s; opacity: 0; }-.stagger-3 { animation-delay: 0.16s; opacity: 0; }-.stagger-4 { animation-delay: 0.22s; opacity: 0; }-.stagger-5 { animation-delay: 0.28s; opacity: 0; }--.pulse-dot { animation: pulseDot 2.2s ease-in-out infinite; }--/* --- Status Badges --- */-.badge {- display: inline-flex;- align-items: center;- gap: 6px;- font-size: 11px;- padding: 3px 10px;- border-radius: 20px;- font-weight: 500;- letter-spacing: 0.03em;-}--.badge-running {- background: rgba(52, 211, 153, 0.10);- color: #34d399;- border: 1px solid rgba(52, 211, 153, 0.18);-}--.badge-stopped {- background: rgba(133, 133, 160, 0.10);- color: #8585a0;- border: 1px solid rgba(133, 133, 160, 0.15);-}--.badge-error {- background: rgba(251, 113, 133, 0.10);- color: #fb7185;- border: 1px solid rgba(251, 113, 133, 0.18);-}--.badge-hibernated {- background: rgba(34, 211, 238, 0.10);- color: #22d3ee;- border: 1px solid rgba(34, 211, 238, 0.18);-}--/* --- Table --- */-.data-table {- width: 100%;- border-collapse: separate;- border-spacing: 0;-}--.data-table thead th {- text-align: left;- padding: 14px 16px;- font-size: 10px;- font-weight: 600;- color: var(--text-tertiary);- text-transform: uppercase;- letter-spacing: 0.1em;- border-bottom: 1px solid var(--border-subtle);- font-family: var(--font-body);-}--.data-table tbody tr {- transition: background 0.15s ease;-}--.data-table tbody tr:hover {- background: var(--bg-hover);-}--.data-table tbody td {- padding: 13px 16px;- font-size: 13px;- color: var(--text-secondary);- border-bottom: 1px solid rgba(255, 255, 255, 0.025);-}--.data-table tbody td code {- font-family: var(--font-mono);- font-size: 12px;- color: var(--text-accent);- background: rgba(99, 102, 241, 0.07);- padding: 2px 7px;- border-radius: 4px;-}--/* --- Buttons --- */-.btn-primary {- display: inline-flex;- align-items: center;- gap: 6px;- padding: 9px 22px;- background: var(--gradient-primary);- color: #fff;- border: none;- border-radius: var(--radius-sm);- cursor: pointer;- font-size: 13px;- font-weight: 600;- font-family: var(--font-body);- letter-spacing: 0.01em;- transition: all 0.2s ease;-}--.btn-primary:hover {- box-shadow: 0 0 24px rgba(99, 102, 241, 0.3);- transform: translateY(-1px);-}--.btn-primary:disabled {- opacity: 0.45;- cursor: default;- transform: none;- box-shadow: none;-}--.btn-ghost {- display: inline-flex;- align-items: center;- gap: 6px;- padding: 9px 18px;- background: transparent;- color: var(--text-secondary);- border: 1px solid var(--border-subtle);- border-radius: var(--radius-sm);- cursor: pointer;- font-size: 13px;- font-weight: 500;- font-family: var(--font-body);- transition: all 0.2s ease;-}--.btn-ghost:hover {- border-color: var(--border-accent);- color: var(--text-primary);- background: var(--bg-hover);-}--.btn-danger {- display: inline-flex;- align-items: center;- padding: 5px 14px;- background: rgba(251, 113, 133, 0.07);- color: var(--accent-rose);- border: 1px solid rgba(251, 113, 133, 0.14);- border-radius: var(--radius-sm);- cursor: pointer;- font-size: 12px;- font-weight: 500;- font-family: var(--font-body);- transition: all 0.2s ease;-}--.btn-danger:hover {- background: rgba(251, 113, 133, 0.14);- border-color: rgba(251, 113, 133, 0.28);-}--/* --- Filter Pills --- */-.filter-btn {- padding: 5px 16px;- border-radius: 20px;- border: 1px solid var(--border-subtle);- background: transparent;- color: var(--text-secondary);- cursor: pointer;- font-size: 12px;- font-weight: 500;- font-family: var(--font-body);- transition: all 0.2s ease;-}--.filter-btn:hover {- border-color: var(--border-accent);- color: var(--text-primary);-}--.filter-btn.active {- background: rgba(99, 102, 241, 0.10);- border-color: rgba(99, 102, 241, 0.28);- color: var(--accent-indigo);-}--/* --- Inputs --- */-.input {- width: 100%;- padding: 10px 14px;- background: var(--bg-deep);- border: 1px solid var(--border-subtle);- border-radius: var(--radius-sm);- color: var(--text-primary);- font-size: 14px;- font-family: var(--font-body);- outline: none;- transition: border-color 0.2s ease, box-shadow 0.2s ease;-}--.input:focus {- border-color: var(--accent-indigo);- box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);-}--.input::placeholder {- color: var(--text-tertiary);-}--/* --- Loading --- */-.loading-spinner {- width: 22px;- height: 22px;- border: 2px solid var(--border-subtle);- border-top-color: var(--accent-indigo);- border-radius: 50%;- animation: spin 0.75s linear infinite;-}--/* --- Recharts Overrides --- */-.recharts-cartesian-grid-horizontal line,-.recharts-cartesian-grid-vertical line {- stroke: rgba(255, 255, 255, 0.035) !important;-}--.recharts-text {- fill: var(--text-tertiary) !important;- font-family: var(--font-mono) !important;- font-size: 10px !important;-}--.recharts-tooltip-wrapper {- outline: none !important;-}--/* --- Utility --- */-.metric-value {- font-family: var(--font-mono);- font-variant-numeric: tabular-nums;- letter-spacing: -0.03em;-}--.section-title {- font-family: var(--font-display);- font-size: 11px;- font-weight: 600;- color: var(--text-tertiary);- text-transform: uppercase;- letter-spacing: 0.1em;- margin-bottom: 16px;-}--.page-title {- font-size: 26px;- font-weight: 700;- font-family: var(--font-display);- letter-spacing: -0.03em;- color: var(--text-primary);- margin-bottom: 4px;-}--.page-subtitle {- font-size: 13px;- color: var(--text-tertiary);- margin-bottom: 0;-}--/* --- Responsive --- */-@media (max-width: 1100px) {- .grid-stats { grid-template-columns: repeat(2, 1fr) !important; }- .grid-charts-main { grid-template-columns: 1fr !important; }- .grid-charts-secondary { grid-template-columns: 1fr !important; }-}