diff --git a/.agents/skills/web-design-guidelines/SKILL.md b/.agents/skills/web-design-guidelines/SKILL.md new file mode 100644 index 0000000..ceae92a --- /dev/null +++ b/.agents/skills/web-design-guidelines/SKILL.md @@ -0,0 +1,39 @@ +--- +name: web-design-guidelines +description: Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices". +metadata: + author: vercel + version: "1.0.0" + argument-hint: +--- + +# Web Interface Guidelines + +Review files for compliance with Web Interface Guidelines. + +## How It Works + +1. Fetch the latest guidelines from the source URL below +2. Read the specified files (or prompt user for files/pattern) +3. Check against all rules in the fetched guidelines +4. Output findings in the terse `file:line` format + +## Guidelines Source + +Fetch fresh guidelines before each review: + +``` +https://raw.githubusercontent.com/vercel-labs/web-interface-guidelines/main/command.md +``` + +Use WebFetch to retrieve the latest rules. The fetched content contains all the rules and output format instructions. + +## Usage + +When a user provides a file or pattern argument: +1. Fetch guidelines from the source URL above +2. Read the specified files +3. Apply all rules from the fetched guidelines +4. Output findings using the format specified in the guidelines + +If no files specified, ask the user which files to review. diff --git a/agents.md b/agents.md index ffce1d3..dc64b83 100644 --- a/agents.md +++ b/agents.md @@ -104,6 +104,24 @@ This file is the single source of truth for codebase obstacles, oddities, and th **Solution/Workaround:** Use Tailwind v4 `@theme` tokens with semantic pairs such as `background/foreground`, `card/card-foreground`, `primary/primary-foreground`, `secondary/secondary-foreground`, `border`, `input`, and `ring`. Keep shared component structure in base classes like `.btn`, with variant classes only setting semantic colors. **Preference:** Prefer semantic token names over appearance-based names; add dark mode by overriding CSS variables under `.dark`. +### Dark-only Tailwind tokens live at root +**Area:** web/app/static/css/input.css, web/app/templates/*.html +**Obstacle:** The Firebreak UI is currently dark-only, but stale light theme tokens and scattered literal palette values made the active design system harder to change safely. +**Solution/Workaround:** Define Firebreak brand primitives and dark semantic roles in the root Tailwind v4 `@theme`; templates and component classes use token-backed utilities/classes instead of raw theme colors. +**Preference:** Keep palette values centralized in `@theme`; avoid arbitrary color utilities in templates. Reintroduce light mode only after defining a full paired token set. + +### Button hover states belong to variants +**Area:** web/app/static/css/input.css, web/app/templates/*.html +**Obstacle:** Buttons mixed shared variants with page-specific hover utilities and ID selectors, causing inconsistent hover colors across pages. +**Solution/Workaround:** Add explicit variants such as `btn-danger` and `btn-link`; templates should choose the correct variant instead of stacking custom hover color utilities. +**Preference:** Keep hover behavior in component variants. Use `btn-link` for low-emphasis navigation actions such as returning home from an error page. + +### Vercel web guideline fixes should stay template-scoped +**Area:** web/app/templates/*.html, web/app/static/css/input.css +**Obstacle:** Vercel Web Interface Guidelines flagged accessibility/theming issues such as missing skip links, missing dark `color-scheme`, non-locale date formatting, form inputs without autocomplete metadata, and motion without reduced-motion handling. +**Solution/Workaround:** Add global `color-scheme: dark`, keep form metadata in templates, format visible dates with `Intl.DateTimeFormat`, confirm destructive forms client-side, and provide `prefers-reduced-motion` CSS fallbacks. +**Preference:** Prefer lightweight template/CSS fixes for UI guideline compliance; avoid backend route changes unless the issue requires server state. + ### Header brand SVG inherits unwanted icon styling **Area:** web/app/templates/base.html, web/app/templates/index.html, web/app/static/css/input.css **Obstacle:** The inline Firebreak header wordmark uses hardcoded SVG fills, and page-level header rules can accidentally apply icon `stroke` styles to the brand SVG. On forced-dark landing headers, the `#17191C` wordmark fill disappears against the obsidian nav. diff --git a/skills-lock.json b/skills-lock.json new file mode 100644 index 0000000..4bc2e00 --- /dev/null +++ b/skills-lock.json @@ -0,0 +1,11 @@ +{ + "version": 1, + "skills": { + "web-design-guidelines": { + "source": "vercel-labs/agent-skills", + "sourceType": "github", + "skillPath": "skills/web-design-guidelines/SKILL.md", + "computedHash": "f3bc47f890f42a44db1007ab390709ec368e4b8c089baee6b0007182236ac474" + } + } +} diff --git a/web/app/static/css/input.css b/web/app/static/css/input.css index 12e1d5f..232bde8 100644 --- a/web/app/static/css/input.css +++ b/web/app/static/css/input.css @@ -4,103 +4,62 @@ --font-sans: "Geist", ui-sans-serif, system-ui, sans-serif; --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace; - --color-background: #f8f8f6; - --color-foreground: #17191c; - - --color-card: #f8f8f6; - --color-card-foreground: #17191c; - - --color-muted: #eeeeea; - --color-muted-foreground: #3a3d42; - - --color-accent: #f1f1ee; - --color-accent-foreground: #17191c; + --color-brand-obsidian: #17191c; + --color-brand-jet: #000000; + --color-brand-cream: #f7f2e8; + --color-brand-ash: #bdb8ad; + --color-brand-red: #c62030; + --color-brand-flame: #f04a36; + --color-background: var(--color-brand-obsidian); + --color-foreground: var(--color-brand-cream); + --color-card: #1f2226; + --color-card-foreground: var(--color-brand-cream); + --color-muted: #282b30; + --color-muted-foreground: var(--color-brand-ash); + --color-accent: #2f2728; + --color-accent-foreground: var(--color-brand-cream); --color-primary: #2a2d31; - --color-primary-foreground: #ffffff; - --color-primary-hover: #17191c; - --color-primary-muted: rgb(23 25 28 / 10%); - - --color-secondary: #eeeeea; - --color-secondary-foreground: #17191c; - - --color-border: #d8d8d2; - --color-border-subtle: #e9e9e4; - --color-input: #ffffff; - --color-ring: #2a2d31; - --color-ring-muted: rgb(23 25 28 / 12%); - --shadow-card: 0 1px 2px rgb(23 25 28 / 5%); - - --color-success: oklch(47.8% 0.13 150); - --color-success-foreground: oklch(47.8% 0.13 150); - --color-success-muted: oklch(94.8% 0.055 150); - - --color-warning: oklch(54.7% 0.13 65); - --color-warning-foreground: oklch(54.7% 0.13 65); - --color-warning-muted: oklch(96.3% 0.052 85); - - --color-danger: #c62030; - --color-danger-foreground: #c62030; - --color-danger-muted: rgb(198 32 48 / 10%); - - --color-expired: #5c5c58; - --color-expired-foreground: #4b4b47; - --color-expired-muted: #eeeeea; + --color-primary-foreground: var(--color-brand-cream); + --color-primary-hover: var(--color-brand-obsidian); + --color-primary-muted: rgb(247 242 232 / 14%); + --color-secondary: #282b30; + --color-secondary-foreground: var(--color-brand-cream); + --color-border: #34373d; + --color-border-subtle: #282b30; + --color-input: #1f2226; + --color-ring: var(--color-brand-cream); + --color-ring-muted: rgb(247 242 232 / 18%); + --color-header: var(--color-brand-jet); + --color-header-foreground: var(--color-brand-cream); + --color-panel: #1f2226; + --color-panel-foreground: var(--color-brand-cream); + --color-overlay: var(--color-brand-obsidian); + --color-success: oklch(75% 0.12 150); + --color-success-foreground: oklch(82% 0.12 150); + --color-success-muted: oklch(32% 0.07 150); + --color-warning: oklch(82% 0.13 75); + --color-warning-foreground: oklch(86% 0.13 75); + --color-warning-muted: oklch(35% 0.075 75); + --color-danger: var(--color-brand-flame); + --color-danger-foreground: #ff7a66; + --color-danger-hover: var(--color-brand-red); + --color-danger-hover-foreground: var(--color-brand-cream); + --color-danger-muted: rgb(240 74 54 / 18%); + --color-expired: var(--color-brand-ash); + --color-expired-foreground: #d6d0c4; + --color-expired-muted: #282b30; --radius-sm: 0.125rem; --radius-md: 0.25rem; --radius-lg: 0.375rem; --radius-xl: 0.5rem; --radius-2xl: 0.75rem; -} -@custom-variant dark (&:where(.dark, .dark *)); - -.dark { - --color-background: #17191c; - --color-foreground: #f7f2e8; - - --color-card: #1f2226; - --color-card-foreground: #f7f2e8; - - --color-muted: #282b30; - --color-muted-foreground: #bdb8ad; - - --color-accent: #2f2728; - --color-accent-foreground: #f7f2e8; - - --color-primary: #2a2d31; - --color-primary-foreground: #f7f2e8; - --color-primary-hover: #17191c; - --color-primary-muted: rgb(247 242 232 / 14%); - - --color-secondary: #282b30; - --color-secondary-foreground: #f7f2e8; - - --color-border: #34373d; - --color-border-subtle: #282b30; - --color-input: #1f2226; - --color-ring: #f7f2e8; - --color-ring-muted: rgb(247 242 232 / 18%); --shadow-card: 0 1px 2px rgb(0 0 0 / 22%); - - --color-success: oklch(75% 0.12 150); - --color-success-foreground: oklch(82% 0.12 150); - --color-success-muted: oklch(32% 0.07 150); - - --color-warning: oklch(82% 0.13 75); - --color-warning-foreground: oklch(86% 0.13 75); - --color-warning-muted: oklch(35% 0.075 75); - - --color-danger: #f04a36; - --color-danger-foreground: #ff7a66; - --color-danger-muted: rgb(240 74 54 / 18%); - - --color-expired: #bdb8ad; - --color-expired-foreground: #d6d0c4; - --color-expired-muted: #282b30; - - --image-wrapper-size: 100%; + --shadow-hero-logo: 0 14px 34px rgb(0 0 0 / 55%); + --shadow-hero-text: 0 4px 18px rgb(0 0 0 / 72%); + --shadow-hero-panel: 0 18px 50px rgb(0 0 0 / 24%); } @layer base { @@ -110,6 +69,7 @@ html { @apply bg-background text-foreground; + color-scheme: dark; font-family: var(--font-sans); } @@ -130,6 +90,10 @@ } @layer components { + .skip-link { + @apply fixed left-4 top-4 z-50 -translate-y-16 rounded-md bg-primary px-3 py-2 text-sm font-medium text-primary-foreground opacity-0 transition focus-visible:translate-y-0 focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background; + } + .btn { @apply inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md px-4 py-2.5 text-sm font-medium transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50; } @@ -151,7 +115,7 @@ } .btn-primary { - @apply text-primary-foreground bg-primary-hover hover:bg-[#c62030]/90 hover:text-[#f7f2e8]; + @apply bg-primary text-primary-foreground hover:bg-primary-hover hover:text-primary-foreground; } .btn-secondary { @@ -162,10 +126,18 @@ @apply bg-transparent text-foreground hover:bg-accent hover:text-accent-foreground; } + .btn-danger { + @apply border border-danger-muted bg-danger-muted text-danger-foreground hover:border-danger-hover hover:bg-danger-hover hover:text-danger-hover-foreground; + } + + .btn-link { + @apply inline-flex items-center justify-center gap-2 rounded-sm bg-transparent px-0 py-1 text-sm font-medium text-muted-foreground underline decoration-border underline-offset-4 transition hover:text-foreground hover:decoration-brand-red focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-4 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50; + } + .app-header { position: relative; z-index: 10; - background: lab(0% 0 0); + background: var(--color-header); border-bottom: 0; box-shadow: none; } @@ -173,37 +145,41 @@ .app-header a, .app-header button, .app-header nav svg { - color: #f7f2e8; - stroke: #f7f2e8; + color: var(--color-header-foreground); + stroke: var(--color-header-foreground); } .app-header .brand-link svg { stroke: none; } - .app-header .brand-link svg path[fill="#17191C"] { - fill: #f7f2e8; + .brand-mark { + color: var(--color-brand-red); + } + + .brand-wordmark { + color: var(--color-header-foreground); } .app-header .btn-borderless { - color: #f7f2e8; + color: var(--color-header-foreground); } .app-header .btn-borderless:hover { - background: rgb(247 242 232 / 10%); - color: #fffdf8; + background: color-mix(in oklab, var(--color-header-foreground) 10%, transparent); + color: var(--color-header-foreground); } .app-header .btn-secondary { - background: rgb(247 242 232 / 8%); - border-color: rgb(247 242 232 / 18%); - color: #f7f2e8; + background: color-mix(in oklab, var(--color-header-foreground) 8%, transparent); + border-color: color-mix(in oklab, var(--color-header-foreground) 18%, transparent); + color: var(--color-header-foreground); } .app-header .btn-secondary:hover { - background: rgb(247 242 232 / 14%); - border-color: rgb(247 242 232 / 28%); - color: #fffdf8; + background: color-mix(in oklab, var(--color-header-foreground) 14%, transparent); + border-color: color-mix(in oklab, var(--color-header-foreground) 28%, transparent); + color: var(--color-header-foreground); } .landing-page .app-header { @@ -211,7 +187,331 @@ } .landing-page { - background: #17191c; + background: var(--color-background); + } + + .hero-section { + @apply relative flex min-h-dvh w-full items-center justify-center overflow-hidden bg-background px-6 py-20 text-center text-foreground; + } + + .hero-video { + @apply absolute inset-0 h-full w-full object-cover; + } + + .hero-overlay { + @apply absolute inset-0 bg-overlay/65; + } + + .hero-vignette { + @apply absolute inset-0; + background: radial-gradient( + circle at center, + transparent 0, + transparent 30%, + color-mix(in oklab, var(--color-overlay) 44%, transparent) 62%, + color-mix(in oklab, var(--color-overlay) 92%, transparent) 100% + ); + } + + .hero-content { + @apply relative z-10 flex w-full max-w-4xl flex-col items-center; + } + + .hero-brand { + @apply h-auto w-full max-w-36 sm:max-w-48 lg:max-w-60; + filter: drop-shadow(var(--shadow-hero-logo)); + } + + .hero-tagline { + @apply mt-8 max-w-2xl text-balance text-base font-medium leading-8 tracking-normal text-foreground/90 sm:text-lg sm:leading-9; + filter: drop-shadow(var(--shadow-hero-text)); + } + + .hero-copy-panel { + @apply mt-7 max-w-xl rounded-lg border border-foreground/14 bg-background/42 px-5 py-4 text-sm leading-6 text-foreground/76 backdrop-blur-sm sm:text-[0.9375rem]; + box-shadow: var(--shadow-hero-panel); + } + + .setup-shell { + @apply flex min-h-dvh items-center justify-center px-6 py-20; + } + + .setup-logo { + @apply mx-auto h-auto w-full max-w-24; + } + + .setup-title { + @apply mt-6 text-2xl font-semibold text-foreground; + } + + .setup-copy { + @apply mt-2 text-sm leading-6 text-foreground/60; + } + + .setup-link { + @apply text-foreground/80 underline underline-offset-2 hover:text-foreground; + } + + .setup-help-panel { + @apply mb-8 rounded-lg border border-foreground/10 bg-card/60 px-5 py-4 text-xs leading-5 text-foreground/50; + } + + .setup-help-title { + @apply mb-2.5 font-medium text-foreground/70; + } + + .setup-strong { + @apply text-foreground/70; + } + + .setup-code { + @apply mt-1 inline-block rounded bg-foreground/8 px-1.5 py-0.5 font-mono text-[10px] text-foreground/60; + } + + .form-label { + @apply mb-1.5 block text-xs font-semibold uppercase tracking-[0.05em] text-foreground/50; + } + + .form-label-note { + @apply ml-1 font-normal normal-case tracking-normal text-foreground/30; + } + + .form-input { + @apply block w-full rounded-md border border-foreground/14 bg-input px-3 py-2.5 text-sm text-foreground placeholder:text-foreground/30 focus:border-foreground/30 focus:outline-none focus:ring-2 focus:ring-foreground/10; + } + + .form-input-mono { + @apply font-mono; + } + + .form-hint { + @apply mt-1.5 text-xs text-foreground/30; + } + + .form-hint-code { + @apply font-mono text-foreground/40; + } + + .error-shell { + @apply relative flex min-h-dvh items-center justify-center overflow-hidden px-6 py-20; + } + + .error-backdrop-logo { + @apply absolute inset-bs-8 opacity-50; + width: 100%; + height: 100%; + max-width: 800px; + } + + .error-backdrop-logo img { + display: block; + width: 100%; + height: auto; + } + + .error-content { + @apply relative z-10 w-full max-w-md text-center; + } + + .error-code { + @apply text-8xl font-bold text-foreground/20 sm:text-9xl; + } + + .error-title { + @apply mt-1 text-xl font-semibold text-foreground; + } + + .error-detail { + @apply mt-4 text-sm leading-6 text-foreground/60; + } + + .error-quip { + @apply text-xs italic text-foreground/30; + } + + @keyframes creep-in { + from { + opacity: 0; + transform: translateX(100%); + } + + to { + opacity: 1; + transform: translateX(0); + } + } + + @keyframes trot { + 0%, + 100% { + transform: translateY(0) rotate(0deg); + } + + 25% { + transform: translateY(-3px) rotate(-0.6deg); + } + + 75% { + transform: translateY(-3px) rotate(0.6deg); + } + } + + @keyframes look-up { + from { + transform: rotate(0deg); + } + + to { + transform: rotate(3deg); + } + } + + @keyframes laser-pulse { + 0%, + 100% { + opacity: 0.8; + } + + 50% { + opacity: 1; + } + } + + @keyframes rattle { + 0%, + 100% { + transform: translate(0, 0); + } + + 10% { + transform: translate(-1px, 1px); + } + + 20% { + transform: translate(1px, -1px); + } + + 30% { + transform: translate(-2px, 0); + } + + 40% { + transform: translate(2px, 1px); + } + + 50% { + transform: translate(-1px, -2px); + } + + 60% { + transform: translate(2px, 2px); + } + + 70% { + transform: translate(-3px, 1px); + } + + 80% { + transform: translate(3px, -1px); + } + + 90% { + transform: translate(-2px, 2px); + } + } + + .guard-dog-wrap { + animation: creep-in 6s ease-out both; + animation-delay: 1.5s; + } + + .guard-dog-trot { + animation: trot 0.4s ease-in-out 15; + animation-delay: 1.5s; + } + + .guard-dog-look { + animation: look-up 0.8s ease-out both; + animation-delay: 7.5s; + transform-origin: bottom center; + } + + .laser-eye { + position: absolute; + width: 5px; + height: 5px; + border-radius: 50%; + background: var(--color-brand-red); + box-shadow: + 0 0 8px 2px var(--color-brand-red), + 0 0 24px 6px color-mix(in oklab, var(--color-brand-red) 45%, transparent); + animation: laser-pulse 2s ease-in-out infinite; + animation-delay: 7.5s; + animation-fill-mode: both; + opacity: 0; + } + + .laser-eye-left { + inset-block-start: 40px; + inset-inline-start: 81px; + } + + .laser-eye-right { + inset-block-start: 39px; + inset-inline-start: 100px; + } + + .laser-beam { + position: fixed; + z-index: 100; + height: 2px; + pointer-events: none; + background: linear-gradient( + 90deg, + var(--color-brand-red), + color-mix(in oklab, var(--color-brand-red) 0%, transparent) + ); + box-shadow: + 0 0 8px 2px color-mix(in oklab, var(--color-brand-red) 67%, transparent), + 0 0 20px 4px color-mix(in oklab, var(--color-brand-red) 27%, transparent); + opacity: 0; + transform-origin: left center; + } + + .laser-beam.fire { + opacity: 1; + transition: opacity 0.05s; + } + + .laser-beam.fade { + opacity: 0; + transition: opacity 0.4s; + } + + .btn-zapped { + background: var(--color-brand-red) !important; + color: var(--color-brand-cream) !important; + box-shadow: + 0 0 12px 4px color-mix(in oklab, var(--color-brand-red) 50%, transparent), + 0 0 30px 8px color-mix(in oklab, var(--color-brand-red) 25%, transparent); + animation: rattle 0.15s linear infinite; + } + + @media (prefers-reduced-motion: reduce) { + .guard-dog-wrap, + .guard-dog-trot, + .guard-dog-look, + .laser-eye, + .laser-beam, + .btn-zapped { + animation: none !important; + transition: none !important; + } + + .laser-eye, + .laser-beam { + opacity: 0 !important; + } } .brand-link svg { @@ -224,10 +524,6 @@ height: auto; } - .dark .brand-link svg path[fill="#17191C"] { - fill: var(--color-foreground); - } - .section-header-subtle { @apply text-xs font-semibold uppercase tracking-[0.05em] text-muted-foreground; } @@ -281,17 +577,3 @@ @apply text-sm font-medium text-danger-foreground; } } - - -@utility img-wrapper-* { - width: 100%; - height: 100%; - max-width: --value(--max-w-*, [length], [percentage], [*], "none", "inherit", "initial", "unset"); - - /* Automatically target the image inside */ - & img { - width: 100%; /* Replaces 'stretch' for better compatibility */ - height: auto; /* Maintains aspect ratio */ - display: block; /* Removes bottom whitespace common in inline images */ - } -} \ No newline at end of file diff --git a/web/app/templates/base.html b/web/app/templates/base.html index b8e2d92..b7a0313 100644 --- a/web/app/templates/base.html +++ b/web/app/templates/base.html @@ -1,11 +1,12 @@ - + {% block title %}Firebreak{% endblock %} +
- - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + +
-
+
{% block content %}{% endblock %}
diff --git a/web/app/templates/dashboard.html b/web/app/templates/dashboard.html index 92ec2ed..436a3e4 100644 --- a/web/app/templates/dashboard.html +++ b/web/app/templates/dashboard.html @@ -8,10 +8,10 @@

{{ user.display_name or user.email }}.

{% if pat_registered %} - Create share link + Create Share Link {% else %} Create share link + aria-disabled="true">Create Share Link {% endif %}
diff --git a/web/app/templates/error.html b/web/app/templates/error.html index 0264a44..d79743a 100644 --- a/web/app/templates/error.html +++ b/web/app/templates/error.html @@ -3,120 +3,29 @@ {% block body_class %}landing-page{% endblock %} {% block main_class %}{% endblock %} {% block content %} - {% if status_code == 401 %} - - {% endif %} -
-
+
+ -
- {% if status_code == 401 %} -

{{ status_code }}

-

{{ title }}

- {% else %} -

{{ status_code }}

-

{{ title }}

- {% endif %} -

{{ detail }}

+
+

{{ status_code }}

+

{{ title }}

+

{{ detail }}

{% if status_code == 401 %} {% set quips = [ "I'm not saying you're a data scraper, but I AM saying that this page is off-limits.", - "I'm watching you Wazowski.... ALWAYS watching.", + "I'm watching you Wazowski… ALWAYS watching.", "He doesn't bite. He just harvests your data.", "Move along clanker! Nothing to see here.", "Just get out of here you STUPID, DUMB ANIMAL!" ] %} -

{{ quips | random }}

+

{{ quips | random }}

{% endif %}
{% if status_code == 401 %} @@ -138,7 +47,7 @@
{% if status_code == 401 %}