Skip to content

feat(api-status): redesign dashboard with brand-driven chrome#1104

Merged
Huxpro merged 13 commits into
mainfrom
feat/unify-platform-colors
Jun 8, 2026
Merged

feat(api-status): redesign dashboard with brand-driven chrome#1104
Huxpro merged 13 commits into
mainfrom
feat/unify-platform-colors

Conversation

@Huxpro

@Huxpro Huxpro commented Jun 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Redesigns the API Status dashboard (/api/status) to match the homepage's design language. Sidebar, header bar, and all four pages (Search, Categories, Coverage, Recent) adopt the same color-mix brand-driven token system used by SubsiteRow / ChoiceTabs / shared-tabs.scss.

The old surface mixed shadcn admin-template chrome (checkbox rows, bg-emerald-500/10 Tailwind shorthand, identical stat-card grids) with the rest of the docs site. This PR brings it into one design system.

What changed

Sidebar (APIStatusSidebar)

  • Pages become full-width brand-washed rows (no PAGES eyebrow, no chevron caret — wash + bold text already mark active)
  • Platforms become an icon rail with per-cell --platform brand color; coverage % under each cell
  • Clay aggregate + a Show Clay surfaces toggle that opens a flush teal-tinted tray with the 4 sub-platforms
  • Collapsed (icon-only) state works for pages, platforms, and the Clay expand
  • Sidebar header overrides shadcn's flex-col gap-2 p-2 defaults so it lines up with the page header bar (64px tall, shared bottom border)

Header (APIStatusLayout)

  • Page title + brand stem accent + short subtitle on the left
  • Single quiet meta line on the right: Updated DATE · X of Y platforms
  • !top-16 override on the Sidebar so its fixed-position container matches rspress's 64px-tall top nav (shadcn defaults to top-14)

Coverage page

  • Replaces the stat-card grid (which was the AI hero-metric trope) with a horizontal parity list — one row per platform, full-width bar dominant
  • Trend chart fills its plate width (preserveAspectRatio="none"), per-platform Y offset so overlapping lines render visibly separated, end-of-line platform labels in brand color

Categories / Recent / Search

  • Categories flattened: dropped the plate wrapper so CategoryTable's own dividers carry the page (was: outer border + bg tint stacking over internal zebra stripes)
  • Recent: per-platform stat cards with version-block layout; version chips inherit --platform so they tint to the parent card's color
  • Search: search bar in a plate that picks up a brand focus ring, transparent filter selects, quiet results meta line

Token system

  • All chrome reads from color-mix() over --platform or --rp-c-brand
  • Dark mode adjusts mix percentages rather than hardcoding alternates

Test plan

  • /api/status light mode: sidebar + all 4 pages render with brand-tinted chrome
  • Dark mode: brand colors still readable, no AI-slop glow accents
  • Sidebar collapsed to icon-only: pages, platforms, and Clay expand all still work
  • Sidebar header baseline aligns with page header baseline (both top=64, bottom=128)
  • Clay aggregate ↔ Clay 4-detail toggle preserves user selection
  • Coverage trend chart shows all selected platforms as distinct lines even when values overlap
  • Categories highlight pill toggle (Highlight good / Highlight gaps) works and shows green/red wash on active

Redesign API Status dashboard with brand-driven color and layout system

Centralize platform color tokens into platform-colors.ts and unify the API Status dashboard (/api/status) with brand-driven chrome, creating a cohesive visual system across sidebar, header, and page content.

Platform colors and badge system

  • Extract platform color definitions into src/components/platform-navigation/platform-colors.ts as a centralized single source of truth, covering iOS, macOS, Android, Harmony, Web, Web Lynx, Windows, and clay variants
  • Refactor PlatformBadge to derive user-facing text from a label-mapping helper (map "clay" to "Desktop") while preserving technical component names and keys
  • Update PlatformBadge.css to use a variable-driven system with --platform-badge-* CSS variables and add --only and --no modifier variants with strikethrough and dimming effects

Sidebar and navigation redesign

  • Rewrite APIStatusSidebar to render page navigation as full-width brand-washed rows and platform selection as a square icon rail with per-platform --platform color variables
  • Add animated detail tray for clay aggregate expansion/collapse with optional toggleable sub-platform cells
  • Introduce [data-state='collapsed'] responsive mode converting full-width rows and platform cells into compact 32×32 icon chips
  • Add dedicated APIStatusSidebar.scss with complete visual styling for sidebar structure, platform rail, clay toggle, and collapse animations
  • Export PageType and APIStatusSidebar as named exports for reusability

Header and layout updates

  • Update APIStatusLayout to use per-page localized metadata with title and subtitle, derived from useLang() for English/Chinese support
  • Replace header UI with left-aligned page title (with brand stem accent) and optional subtitle, plus single-line meta showing "Updated DATE · X of Y platforms"
  • Add APIStatusLayout.scss for flex-based header structure with responsive subtitle/meta hiding and scrollable main content area
  • Adjust sidebar fixed-position top offset to 64px to align with page header height

Page-specific redesigns

  • Replace CoveragePage card-grid layout with horizontal parity list showing one full-width row per platform, trend chart with larger coordinate system and per-platform Y offsets, and platform labels rendered directly on chart
  • Flatten CategoriesPage card structure and introduce pill-style highlight toggles driven by CSS variable --tint and shared class selectors
  • Refactor RecentPage to render per-platform sections as stat cards with header icon/label and total count, using new aps-stat-card class structure
  • Update SearchPage input UI to use plain controlled <input> with new aps-search-bar-* classNames and restructured results meta showing count ratio

Component and style improvements

  • Add comprehensive APIStatusPages.scss defining shared chrome for stat cards, parity lists, plates, category sections, pill toggles, version chips, search bar, and empty states
  • Extend PlatformIcon (PlatformSvg) and icon factory to accept optional style prop for CSS variable injection
  • Update PlatformIconWrapper to use typed PlatformKey instead of generic string and import PLATFORM_TINT from centralized platform-colors module
  • Adjust support-status indicator styling to include explicit inline-block alongside dimensions

Huxpro added 10 commits June 6, 2026 21:06
Extracts the inline PLATFORM_TINT map from the homepage feature row into
src/components/platform-navigation/platform-colors.ts as the single source
of truth for platform brand color across the site. Covers every platform
key consumed by PlatformBadge — including the clay umbrella + clay_*
variants — and exposes both the Tailwind tint string and the underlying
hex/bg values so the PlatformBadge CSS can stay in lockstep with what
the homepage row uses.

Brand mapping:
  apple family (ios, macos) -> zinc
  android                   -> emerald
  harmony                   -> rose
  web / web_lynx            -> orange
  windows                   -> sky
  clay umbrella + variants  -> cyan

Change-Id: I10af83dc736bf9e057e3b6bd1a6d0c4a0c93d7fe
Three coordinated changes so the API-doc PlatformBadge stops fighting the
rest of the site:

1. Palette unified to the shared platform color tokens. iOS goes from
   saturated blue back to Apple's zinc-silver, Harmony from orange to the
   Huawei rose, web from purple to lynx orange, and the four clay_*
   variants collapse from cyan/indigo/teal/sky into one Clay cyan so
   ClayAndroidOnly stays visually distinct from AndroidOnly even though
   they share the Android glyph.

2. Contrast quieted. Background drops from a saturated ~500@10% wash to a
   tinted 50/950, while the icon stays in full platform color so the badge
   is still scannable at a glance — the icon does the signalling.

3. Visual semantics for *Only / No*. Previously info/warning/danger all
   rendered in the same platform color, so "iOS Only" and "No iOS" looked
   like the same chip with different words. Now:
     default            platform color, subtle bg
     .platform-badge--only  adds an inset platform-tinted ring (emphasis)
     .platform-badge--no    drops platform color, mutes to neutral, strikes
                            the label, dims the icon (negation)

Also relabels bare `clay` as "Desktop" in the user-facing label only — the
component export names (ClayOnly, NoClay), APIStatus colors, and compat
tables keep `clay`. Temporary until the desktop branding settles.

Change-Id: If12a812aab5d351e19c39f01065847954ca24d85
The previous commit changed mapPlatformNameToFullName('clay') to return
'Desktop' so the badge would read "Desktop", but that same function also
drove the dynamic component-name derivation. Result: generatedComponents
held 'DesktopOnly'/'NoDesktop' while the destructured exports still asked
for 'ClayOnly'/'NoClay', so both came back as undefined and every MDX page
that rendered <ClayOnly/> SSG-failed with React #130.

Split the responsibility:
  - mapPlatformNameToTechnicalName -> stable 'Clay'/'Harmony'/... drives
    the generatedComponents keys, so ClayOnly/NoClay stay valid.
  - mapPlatformNameToLabel         -> what the user sees, returns
    'Desktop' for clay.

Also drops em dashes from comments in this PR's new code per repo prose
preferences.

Change-Id: Ib82b76c1511b665405204e76a7475c58dc092dad
Change-Id: I98a04f9a62cc6e860d74719f5e4f1d0f6bb968ea
The Rspress Badge is inline-flex, which baseline-aligns its line box to
the surrounding text baseline. That looks fine next to body text and code
chips, but inside a heading it makes the chip cling to the bottom of the
heading line and read as stranded. Setting vertical-align: middle on the
chip re-centers it on the line box and fixes alignment in body, TOC, and
heading contexts without changing the chip's size.

Also moves the icon size from inline Tailwind utilities into the same
CSS rule (--icon-size: 0.9rem) so future tweaks live in one place.

Change-Id: Ibc9c30567a716e666be65a20e55b9e323d7963d5
Two adjacent fixes for how platform chips read on the api/status page.

1. Android SVG viewBox cropped from `0 0 21 20` to `1.5 1.5 18 18`.
   The half-dome glyph only fills the lower half of the original
   viewBox, so at the same `--icon-size` the rendered Android glyph
   looked visibly smaller than Apple / Harmony / Web (which fill their
   viewBoxes). The new square crop centers on the glyph centroid and
   removes the dead margin so the rendered icon picks up the same
   visual weight as the other platforms.

2. API-status support chips in `APIStatusDashboard.tsx` shrunk to
   match the older compact pill. Icon 10px -> 8px, dot 6px -> 4px,
   padding 4/2px -> 2/1px, gap 2px -> 1px. The chip footprint goes
   from ~26x14 down to ~16x10, restoring the tight pill feel.

Change-Id: I5f45a45f00c314871207eab1ebc98112be3c50af
…ine-block on dot

Tailwind `w-2 h-2` lost to `.icon { width: var(--size) }` in CSS source
order, so the chip icons rendered at 1rem (16px) instead of the intended
8px. Pass `--icon-size: 0.5rem` on the chip wrapper so the .icon rule
picks up the right size, and switch the status dot from `<span>` (inline,
ignores width/height) to an inline-block element so the 4px circle
actually renders.

Change-Id: I50f994b4a40449a20c80cf10f62d3e9c93fad799
Previous shrink went too tight: icon (8px) and dot (4px) sat right next
to each other with 1px gap and 2px padding, so the chip read as a single
cramped square instead of an "icon + status" pill.

Back off slightly to match the reference proportions:
  --icon-size: 0.625rem (10px)
  dot 6px
  gap 4px
  padding 4px / 2px

Chip footprint becomes roughly 22 x 14 — small enough on mobile to fit a
multi-platform row, comfortable enough on desktop that the icon and the
status dot don't read as one blob.

Change-Id: I2303122243c05c347974668186381e84abddf2bb
The previous attempt set --icon-size on the chip wrapper hoping it would
cascade into the .icon child, but .icon's `width: var(--size)` was still
winning at the rendered size (~16px) on desktop, so the chips read as
huge despite the smaller Tailwind paddings. Add a `style` pass-through
on PlatformSvg + the api-status icon factory, and set the chip icon to
{ width: 10, height: 10 } directly. Inline style sits above any cascade
contest so the icon actually renders at 10px now.

Change-Id: I1a2a182b24f183ed3d3e1ce2e981133166f41a5a
Sidebar, header, and all four pages adopt the homepage's color-mix +
lifted-card vocabulary (mirrors SubsiteRow / ChoiceTabs / shared-tabs).

Sidebar
- Pages as full-width brand-washed rows; no PAGES eyebrow, no caret on active row
- Platforms as icon rail with per-cell --platform brand color; coverage % below
- Clay aggregate + "Show Clay surfaces" toggle that opens a flush tray
- Collapsed (icon-only) state works for pages, platforms, and Clay expand
- Sidebar header overrides shadcn's flex-col/p-2 defaults so it lines up
  with the page header bar (64px tall, shared bottom border)

Header (APIStatusLayout)
- Page title + brand stem accent + short subtitle on the left
- Single quiet meta line on the right ("Updated DATE · X of Y platforms")
- Sidebar fixed-position override (!top-16) so it aligns with rspress's
  64px-tall top nav (shadcn defaults to top-14)

Coverage page
- Replaces stat-card grid with a horizontal parity list (one row per
  platform, full-width bar dominant)
- Trend chart fills its plate width (preserveAspectRatio="none"), per-
  platform Y offset so overlapping lines render visibly separated,
  end-of-line platform labels in brand color

Categories / Recent / Search
- Categories flattened: dropped the plate wrapper, header row sits above
  the CategoryTable so its own dividers carry the page
- Recent: per-platform stat cards with version-block layout; version
  chips inherit --platform so they tint to the parent card's color
- Search: search bar in a plate that picks up a brand focus ring,
  transparent filter selects, quiet results meta line

Token system
- All chrome reads from color-mix() over --platform or --rp-c-brand
- Dark mode adjusts mix percentages, not hardcoded alternates

Change-Id: I34b37d4404b18a69e13d48a246b41c0fa08939c2
Copilot AI review requested due to automatic review settings June 7, 2026 21:26
@Huxpro Huxpro requested a review from SoonIter as a code owner June 7, 2026 21:26
@netlify

netlify Bot commented Jun 7, 2026

Copy link
Copy Markdown

Deploy Preview for lynx-doc ready!

Name Link
🔨 Latest commit 2213c3c
🔍 Latest deploy log https://app.netlify.com/projects/lynx-doc/deploys/6a2621a3b31c55000851a556
😎 Deploy Preview https://deploy-preview-1104--lynx-doc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Jun 7, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Huxpro, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 24 minutes and 52 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 23ae14b4-3bb0-4aac-bd76-637cd3c98b89

📥 Commits

Reviewing files that changed from the base of the PR and between c053b37 and 2213c3c.

📒 Files selected for processing (4)
  • src/components/api-status/APIStatusLayout.tsx
  • src/components/api-status/APIStatusPages.scss
  • src/components/api-status/pages/CoveragePage.tsx
  • src/components/api-status/pages/SearchPage.tsx

Walkthrough

This PR introduces a centralized platform color system, refactors platform badge styling with CSS variables, extends icon infrastructure to support inline styles, and completely redesigns the API Status dashboard with new layout structure, sidebar navigation, shared page styling conventions, and per-page component refactors.

Changes

Platform Color System & Icon Infrastructure

Layer / File(s) Summary
Platform Colors Centralization
src/components/platform-navigation/platform-colors.ts
New centralized module defining PlatformKey type union, PlatformHue structure with Tailwind tints and light/dark hex colors, and exports PLATFORM_HUES and PLATFORM_TINT mappings for platform-specific styling.
Icon System Style Prop Extension
src/components/platform-navigation/PlatformIcon.tsx, src/components/api-status/constants.tsx
PlatformSvg and PlatformIcon updated to accept optional style prop for inline style overrides. PlatformConfig.icon interface widened to accept { className?, style? } and makeIcon factory updated to forward style to underlying PlatformSvg.
Home Features Icon Refactor
src/components/home-comps/features/icon.tsx
PlatformIconWrapper refactored to accept typed PlatformKey instead of string, with PLATFORM_TINT moved to centralized import from platform-colors.

Platform Badge Component Refactor

Layer / File(s) Summary
Badge CSS Variable System
src/components/api-badge/PlatformBadge.css
CSS rewritten from per-platform --rp-container-* overrides to unified --platform-badge-{fg,bg,ring} variables per platform, with dark-mode adjustments, single unified Rspress container wiring, and new badge presentation rules: vertical alignment, icon sizing, --only inset-ring variant, and --no variant with strikethrough and dimmed icon.
Badge Component Logic & Generators
src/components/api-badge/PlatformBadge.tsx
Component refactored with separate technicalNameMapper (clay→clay for exports) and labelMapper (clay→Desktop for display). TYPE_TO_MODIFIER map added to apply CSS modifier classes. PlatformBadgeInner redesigned to render PlatformSvg with dedicated class and split label span; generator loop switched to technical-name mapping for stable component names.
Dashboard Badge Integration
src/components/api-status/APIStatusDashboard.tsx
Platform icon sizing in APIItem badge changed from className-based to inline style prop; support-status indicator dot explicitly includes inline-block class.

API Status Dashboard Layout & Architecture

Layer / File(s) Summary
Layout Container & Header Structure
src/components/api-status/APIStatusLayout.scss, src/components/api-status/APIStatusLayout.tsx
New .aps-header with flexbox layout, title block with brand accent, responsive subtitle/meta hiding. .aps-main scrollable content shell with custom scrollbars. Layout component now uses localized PAGE_META model, computes updatedDate and platform counts from stats, and renders new header with meta line showing selected platform fraction.
Sidebar Complete Redesign
src/components/api-status/APIStatusSidebar.scss, src/components/api-status/APIStatusSidebar.tsx
New sidebar stylesheet defines header/section layout, full-width page-nav rows with brand states, platform-rail grid with per-platform square cells, expandable clay toggle/tray with CSS grid animation, pulsing status chip, and icon-only mode via [data-state='collapsed']. Component introduces local PageType model, platformVars() helper for per-platform CSS variables, custom sidebar render with page buttons + platform rail (replacing shadcn components), clay detail toggle, and standardized SVG icon markup. Now exports PageType and named export APIStatusSidebar.
Shared Page Components Styling
src/components/api-status/APIStatusPages.scss
New stylesheet defines reusable page UI patterns: .aps-page-section headers, .aps-stat-card brand-tinted stat containers with --platform variable control, .aps-parity-list ranked progress layout, .aps-plate neutral card chrome, .aps-pill-group toggle controls, .aps-version-chip badges, .aps-legend-* chips, .aps-search-bar input, .aps-results-meta display, .aps-empty state, and .aps-version-block spacing.
Individual Page Component Refactors
src/components/api-status/pages/CategoriesPage.tsx, src/components/api-status/pages/SearchPage.tsx, src/components/api-status/pages/RecentPage.tsx, src/components/api-status/pages/CoveragePage.tsx
CategoriesPage replaces card layout with aps-cat header/legend and pill-toggle active-state styling. SearchPage replaces shadcn Input with native <input>, updates i18n placeholders and restructures result-meta display as {shown} / {filtered}. RecentPage introduces platformVars() helper and replaces Card layout with aps-stat-card article structure with platform icon/label header. CoveragePage redesigns ParityChart with 1200×320 SVG, per-platform Y offsets, end-of-line platform labels, and replaces card-grid with aps-plate parity strip and in-plate trend chart.

🎯 4 (Complex) | ⏱️ ~60 minutes


Possibly related PRs

  • lynx-family/lynx-website#1089: Overlaps on PlatformBadge variable-driven styling, label/technical-name mapping, and APIStatusDashboard icon sizing work.
  • lynx-family/lynx-website#1086: Shares platform-icon refactor adding style support to PlatformSvg and icon consumers like homepage features.
  • lynx-family/lynx-website#1082: Updates the same PlatformSvg/PlatformConfig pipeline by extending icon props to accept optional style forwarding.

Suggested reviewers

  • SoonIter
  • colinaaa
  • toretto-wt
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(api-status): redesign dashboard with brand-driven chrome' clearly and specifically summarizes the main change: a redesign of the API Status dashboard using brand-driven color styling and chrome components.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/unify-platform-colors

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR redesigns the /api/status dashboard UI to align with the site’s brand-driven “color-mix” chrome, introducing new SCSS-based components for the sidebar and page interiors and consolidating platform color tokens for reuse across the site.

Changes:

  • Introduces a new API Status sidebar + page chrome (SCSS-driven) to replace the prior shadcn/admin-template look.
  • Adds a centralized platform color mapping (platform-colors.ts) and wires homepage platform icons to use it.
  • Updates platform badges and API status pages/components to support brand-tinted styling and new layouts (coverage parity list, trend chart, recent/search/category chrome).

Reviewed changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
src/components/platform-navigation/PlatformIcon.tsx Allows passing inline style to the masked platform icon renderer.
src/components/platform-navigation/platform-colors.ts Adds a shared platform color token map (tint + hex/bg pairs).
src/components/home-comps/features/icon.tsx Switches homepage platform tinting to the centralized token map.
src/components/api-table/compat-table/assets/icons/android.svg Adjusts Android icon viewBox for improved framing.
src/components/api-status/pages/SearchPage.tsx Redesigns search UI into a unified “plate” search/filter bar + results meta line.
src/components/api-status/pages/RecentPage.tsx Replaces shadcn cards with new aps-* stat-card and version-block chrome.
src/components/api-status/pages/CoveragePage.tsx Replaces stat-card grid with parity list and redesigns trend chart rendering.
src/components/api-status/pages/CategoriesPage.tsx Flattens categories layout and introduces new pill-group header controls.
src/components/api-status/constants.tsx Extends platform icon components to accept style props (for CSS-var driven layouts).
src/components/api-status/APIStatusSidebar.tsx Major sidebar redesign: page rows, platform rail, Clay tray, footer utilities.
src/components/api-status/APIStatusSidebar.scss New sidebar chrome implementing brand-wash/active/hover states and collapsed mode.
src/components/api-status/APIStatusPages.scss New shared page chrome (plates, parity rows, stat cards, search bar, etc.).
src/components/api-status/APIStatusLayout.tsx New layout header bar with page meta + updated platform count display.
src/components/api-status/APIStatusLayout.scss New layout shell + imports shared pages chrome.
src/components/api-status/APIStatusDashboard.tsx Tweaks APIItem platform-status badges to use styled icons and inline-flex layout.
src/components/api-badge/PlatformBadge.tsx Separates technical vs user-facing labels (“Clay” vs “Desktop”) and adds variant modifiers.
src/components/api-badge/PlatformBadge.css Rebuilds badge styling using platform color vars + adds “Only”/“No” visual variants.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 48 to 69
export const PlatformSvg = ({
platformName,
className,
key,
style,
}: {
platformName: PlatformName | string;
className?: string;
key?: string;
style?: React.CSSProperties;
}) => {
const svgUrl = toIconUrl(platformName);
return (
<div
className={cn('icon', className)}
key={key}
style={{
maskImage: `url(${svgUrl})`,
WebkitMaskImage: `url(${svgUrl})`,
...style,
}}
/>
Comment on lines +18 to 26
/* apple family (ios, macos) → zinc */
.platform-badge-ios,
.platform-badge-clay_ios,
.platform-badge-macos,
.platform-badge-clay_macos {
--platform-badge-fg: #52525b; /* zinc-600 */
--platform-badge-bg: #fafafa; /* zinc-50 */
--platform-badge-ring: #d4d4d8; /* zinc-300 */
}
Comment on lines +57 to 64
/* clay umbrella + variants → cyan (Clay/Desktop signature) */
.platform-badge-clay,
.platform-badge-clay_android,
.platform-badge-clay_windows {
--rp-container-info-text: #0369a1;
--rp-container-info-bg: #0ea5e91a;
--rp-container-warning-text: #0369a1;
--rp-container-warning-bg: #0ea5e91a;
--rp-container-danger-text: #0369a1;
--rp-container-danger-bg: #0ea5e91a;
--platform-badge-fg: #0891b2;
--platform-badge-bg: #ecfeff;
--platform-badge-ring: #a5f3fc;
}
Comment on lines +66 to 74
/* Dark mode bumps foreground to ~400 and swaps bg to a deep tinted wash. */
:where(html.rp-dark, html.dark) .platform-badge-ios,
:where(html.rp-dark, html.dark) .platform-badge-clay_ios,
:where(html.rp-dark, html.dark) .platform-badge-macos,
:where(html.rp-dark, html.dark) .platform-badge-clay_macos {
--platform-badge-fg: #d4d4d8;
--platform-badge-bg: #27272a99;
--platform-badge-ring: #52525b;
}
Comment on lines 101 to +107
:where(html.rp-dark, html.dark) .platform-badge-clay,
:where(html.rp-dark, html.dark) .platform-badge-clay_android {
--rp-container-info-text: #2dd4bf;
--rp-container-info-bg: #14b8a626;
--rp-container-warning-text: #2dd4bf;
--rp-container-warning-bg: #14b8a626;
--rp-container-danger-text: #2dd4bf;
--rp-container-danger-bg: #14b8a626;
:where(html.rp-dark, html.dark) .platform-badge-clay_android,
:where(html.rp-dark, html.dark) .platform-badge-clay_windows {
--platform-badge-fg: #22d3ee;
--platform-badge-bg: #08344499;
--platform-badge-ring: #155e75;
}
Comment on lines +128 to 133
<input
className="aps-search-input"
value={searchQuery}
onChange={(e) => setSearchQuery(e.target.value)}
placeholder={t.searchPlaceholder}
/>
Comment on lines 353 to +355
title={`${PLATFORM_CONFIG[platform]?.label || platform}: ${isSupported ? 'Supported' : 'Not supported'}`}
>
{Icon && <Icon className="w-2.5 h-2.5" />}
{Icon && <Icon style={{ width: 10, height: 10 } as any} />}
Comment on lines 5 to 7
import { APIStatusSidebar, type PageType } from './APIStatusSidebar';
import { PLATFORM_CONFIG } from './constants';
import { CategoriesPage } from './pages/CategoriesPage';
Comment on lines +108 to +114
const surfaceCount = selectedPlatforms.length;
// Total native surfaces in the dataset (= dataset size of selectable
// platforms minus the clay aggregate, since that's a roll-up not its own
// surface). Kept defensively in case the schema gains new ones.
const totalSurfaces = Object.keys(stats.summary.by_platform).filter(
(p) => p !== 'clay',
).length;
Comment on lines +299 to +305
.aps-plate {
position: relative;
background: color-mix(in srgb, currentColor 3%, transparent);
border: 1px solid color-mix(in srgb, currentColor 10%, transparent);
border-radius: 14px;
overflow: hidden;
}

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/components/api-status/APIStatusDashboard.tsx (1)

192-198: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Missing style prop support breaks icon sizing at line 355.

The PlatformIcon component does not accept a style parameter, but line 355 attempts to pass style={{ width: 10, height: 10 }}. This will silently fail, causing the icon to render at its default size instead of the intended 10×10 pixels. Other page components (CoveragePage, RecentPage) correctly extend PlatformIcon with style support.

🔧 Proposed fix
-const PlatformIcon: React.FC<{ platform: string; className?: string }> = ({
-  platform,
-  className,
-}) => {
+const PlatformIcon: React.FC<{
+  platform: string;
+  className?: string;
+  style?: React.CSSProperties;
+}> = ({ platform, className, style }) => {
   const Icon = PLATFORM_CONFIG[platform]?.icon;
-  return Icon ? <Icon className={className} /> : null;
+  return Icon ? <Icon className={className} style={style} /> : null;
 };
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/api-status/APIStatusDashboard.tsx` around lines 192 - 198,
PlatformIcon currently only accepts platform and className so passing
style={{...}} is ignored; update the PlatformIcon component signature to accept
an optional style prop (e.g., style?: React.CSSProperties), include it in the
props destructuring for the PlatformIcon function, and forward that style to the
rendered Icon (from PLATFORM_CONFIG[platform]?.icon) along with className so the
consumer-provided sizing (e.g., width/height) is applied.
src/components/api-status/pages/CoveragePage.tsx (1)

95-210: ⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

preserveAspectRatio="none" will distort interactive elements and text.

Setting preserveAspectRatio="none" (line 99) causes the SVG to stretch non-uniformly to fill its container. On narrow or wide viewports, this will:

  • Turn interactive circles (lines 156-170, radii 18/6/3.5) into ellipses, degrading hover precision.
  • Horizontally stretch/compress platform labels (lines 176-185) and axis text, reducing readability.
  • Create inconsistent visual weight across different viewport sizes.

While vectorEffect="non-scaling-stroke" preserves stroke width, it does not prevent distortion of circles, text, or layout proportions. The PR summary mentions this is intentional ("chart fills width"), but the user experience trade-off may be significant.

Consider either:

  • Using preserveAspectRatio="xMidYMid meet" to maintain proportions with letterboxing.
  • Implementing dynamic viewBox calculation based on container aspect ratio.
  • Accepting the distortion as a design constraint and documenting it.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/api-status/pages/CoveragePage.tsx` around lines 95 - 210, The
SVG chart uses `preserveAspectRatio="none"` which causes non-uniform scaling
that distorts the interactive circles and text labels across different viewport
sizes. Replace the `preserveAspectRatio="none"` attribute with
`preserveAspectRatio="xMidYMid meet"` to maintain proper aspect ratio with
letterboxing, which will preserve the circular shape of the interactive points
(those with radii of 18, 6, and 3.5), keep platform labels legible, and ensure
consistent visual appearance. This maintains the intended chart behavior while
preventing the distortion of interactive elements and improving the user
experience across different screen sizes.
🧹 Nitpick comments (3)
src/components/api-status/APIStatusSidebar.scss (1)

22-22: 💤 Low value

Consider using lowercase currentcolor for CSS keyword consistency.

Consistent with the other SCSS files in this PR, using the canonical lowercase form of CSS color keywords is preferred for linter compliance.

Also applies to: 25-25, 91-91, 140-140, 174-174, 267-267, 422-422, 443-443, 489-489, 512-512, 658-659

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/api-status/APIStatusSidebar.scss` at line 22, Replace the CSS
keyword usage of "currentColor" with the canonical lowercase "currentcolor"
inside the color-mix(...) calls in
src/components/api-status/APIStatusSidebar.scss; specifically update the
border-bottom and all other color-mix occurrences (the lines using color-mix(in
srgb, currentColor 8%, transparent)) so they use "currentcolor" consistently
across the file (also update the other listed occurrences on the same file:
lines referencing color-mix at the noted positions).

Source: Linters/SAST tools

src/components/api-status/APIStatusLayout.scss (1)

18-18: 💤 Low value

Consider using lowercase currentcolor for CSS keyword consistency.

CSS color keywords are case-insensitive, but the canonical lowercase form (currentcolor) is preferred by linters and modern style guides.

♻️ Proposed fix
-  border-bottom: 1px solid color-mix(in srgb, currentColor 8%, transparent);
+  border-bottom: 1px solid color-mix(in srgb, currentcolor 8%, transparent);

Apply similar changes on lines 130, 137, 143, 155.

Also applies to: 130-130, 137-137, 143-143, 155-155

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/api-status/APIStatusLayout.scss` at line 18, Replace the
capitalized CSS keyword "currentColor" with the canonical lowercase
"currentcolor" in the color-mix() usages within APIStatusLayout.scss
(specifically the occurrences shown around the border and similar rules), i.e.,
update each color-mix(in srgb, currentColor ...) to color-mix(in srgb,
currentcolor ...) for the occurrences at the reported sites (lines shown in the
review: 18, 130, 137, 143, 155) so the stylesheet matches linter/style-guide
expectations.

Source: Linters/SAST tools

src/components/api-status/APIStatusPages.scss (1)

118-118: 💤 Low value

Consider using lowercase currentcolor for CSS keyword consistency.

Similar to the layout stylesheet, using the canonical lowercase form of CSS color keywords is preferred for consistency and linter compliance.

Also applies to: 176-176, 211-211, 235-235, 301-302, 313-313, 380-381, 471-471, 490-491, 580-581, 613-613

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/api-status/APIStatusPages.scss` at line 118, Replace the
capitalized CSS keyword currentColor with the canonical lowercase currentcolor
wherever used in the color-mix background rules (e.g., the declarations using
"background: color-mix(in srgb, currentColor 8%, transparent)"); update each
occurrence listed (and any other matches) so the property reads "background:
color-mix(in srgb, currentcolor 8%, transparent)" to maintain consistent CSS
keyword casing and satisfy linters.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/components/api-badge/PlatformBadge.css`:
- Around line 19-22: The CSS groups .platform-badge-clay_ios and
.platform-badge-clay_macos with Apple/zinc hues causing inconsistency with the
centralized mapping in platform-colors.ts; update PlatformBadge.css so the
selectors .platform-badge-clay_ios and .platform-badge-clay_macos use the
Clay/cyan color variables (same tokens used by platform-colors.ts) instead of
the Apple/zinc ones, and make the same change for the duplicate selectors at
lines 67-70 to restore single-source-of-truth styling.

---

Outside diff comments:
In `@src/components/api-status/APIStatusDashboard.tsx`:
- Around line 192-198: PlatformIcon currently only accepts platform and
className so passing style={{...}} is ignored; update the PlatformIcon component
signature to accept an optional style prop (e.g., style?: React.CSSProperties),
include it in the props destructuring for the PlatformIcon function, and forward
that style to the rendered Icon (from PLATFORM_CONFIG[platform]?.icon) along
with className so the consumer-provided sizing (e.g., width/height) is applied.

In `@src/components/api-status/pages/CoveragePage.tsx`:
- Around line 95-210: The SVG chart uses `preserveAspectRatio="none"` which
causes non-uniform scaling that distorts the interactive circles and text labels
across different viewport sizes. Replace the `preserveAspectRatio="none"`
attribute with `preserveAspectRatio="xMidYMid meet"` to maintain proper aspect
ratio with letterboxing, which will preserve the circular shape of the
interactive points (those with radii of 18, 6, and 3.5), keep platform labels
legible, and ensure consistent visual appearance. This maintains the intended
chart behavior while preventing the distortion of interactive elements and
improving the user experience across different screen sizes.

---

Nitpick comments:
In `@src/components/api-status/APIStatusLayout.scss`:
- Line 18: Replace the capitalized CSS keyword "currentColor" with the canonical
lowercase "currentcolor" in the color-mix() usages within APIStatusLayout.scss
(specifically the occurrences shown around the border and similar rules), i.e.,
update each color-mix(in srgb, currentColor ...) to color-mix(in srgb,
currentcolor ...) for the occurrences at the reported sites (lines shown in the
review: 18, 130, 137, 143, 155) so the stylesheet matches linter/style-guide
expectations.

In `@src/components/api-status/APIStatusPages.scss`:
- Line 118: Replace the capitalized CSS keyword currentColor with the canonical
lowercase currentcolor wherever used in the color-mix background rules (e.g.,
the declarations using "background: color-mix(in srgb, currentColor 8%,
transparent)"); update each occurrence listed (and any other matches) so the
property reads "background: color-mix(in srgb, currentcolor 8%, transparent)" to
maintain consistent CSS keyword casing and satisfy linters.

In `@src/components/api-status/APIStatusSidebar.scss`:
- Line 22: Replace the CSS keyword usage of "currentColor" with the canonical
lowercase "currentcolor" inside the color-mix(...) calls in
src/components/api-status/APIStatusSidebar.scss; specifically update the
border-bottom and all other color-mix occurrences (the lines using color-mix(in
srgb, currentColor 8%, transparent)) so they use "currentcolor" consistently
across the file (also update the other listed occurrences on the same file:
lines referencing color-mix at the noted positions).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e3b3ecc4-4a8d-44b7-82b2-4dc55b92d4f6

📥 Commits

Reviewing files that changed from the base of the PR and between 679c646 and c053b37.

⛔ Files ignored due to path filters (1)
  • src/components/api-table/compat-table/assets/icons/android.svg is excluded by !**/*.svg
📒 Files selected for processing (16)
  • src/components/api-badge/PlatformBadge.css
  • src/components/api-badge/PlatformBadge.tsx
  • src/components/api-status/APIStatusDashboard.tsx
  • src/components/api-status/APIStatusLayout.scss
  • src/components/api-status/APIStatusLayout.tsx
  • src/components/api-status/APIStatusPages.scss
  • src/components/api-status/APIStatusSidebar.scss
  • src/components/api-status/APIStatusSidebar.tsx
  • src/components/api-status/constants.tsx
  • src/components/api-status/pages/CategoriesPage.tsx
  • src/components/api-status/pages/CoveragePage.tsx
  • src/components/api-status/pages/RecentPage.tsx
  • src/components/api-status/pages/SearchPage.tsx
  • src/components/home-comps/features/icon.tsx
  • src/components/platform-navigation/PlatformIcon.tsx
  • src/components/platform-navigation/platform-colors.ts

Comment on lines +19 to +22
.platform-badge-ios,
.platform-badge-clay_ios,
.platform-badge-macos,
.platform-badge-clay_macos {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Clay variant badge colors are inconsistent with the centralized platform contract.

clay_ios and clay_macos are grouped with Apple/zinc here, but src/components/platform-navigation/platform-colors.ts maps all clay_* to the Clay/cyan hue. This breaks the “single source of truth” behavior and makes Clay variants visually inconsistent.

Proposed fix
-/* apple family (ios, macos) → zinc */
+/* apple family (ios, macos) → zinc */
 .platform-badge-ios,
-.platform-badge-clay_ios,
 .platform-badge-macos,
-.platform-badge-clay_macos {
+.platform-badge-macos {
   --platform-badge-fg: `#52525b`; /* zinc-600 */
   --platform-badge-bg: `#fafafa`; /* zinc-50 */
   --platform-badge-ring: `#d4d4d8`; /* zinc-300 */
 }

@@
-/* clay umbrella + variants → cyan (Clay/Desktop signature) */
+/* clay umbrella + variants → cyan (Clay/Desktop signature) */
 .platform-badge-clay,
+.platform-badge-clay_ios,
 .platform-badge-clay_android,
+.platform-badge-clay_macos,
 .platform-badge-clay_windows {
   --platform-badge-fg: `#0891b2`;
   --platform-badge-bg: `#ecfeff`;
   --platform-badge-ring: `#a5f3fc`;
 }

@@
 :where(html.rp-dark, html.dark) .platform-badge-ios,
-:where(html.rp-dark, html.dark) .platform-badge-clay_ios,
 :where(html.rp-dark, html.dark) .platform-badge-macos,
-:where(html.rp-dark, html.dark) .platform-badge-clay_macos {
+:where(html.rp-dark, html.dark) .platform-badge-macos {
   --platform-badge-fg: `#d4d4d8`;
   --platform-badge-bg: `#27272a99`;
   --platform-badge-ring: `#52525b`;
 }

@@
 :where(html.rp-dark, html.dark) .platform-badge-clay,
+:where(html.rp-dark, html.dark) .platform-badge-clay_ios,
 :where(html.rp-dark, html.dark) .platform-badge-clay_android,
+:where(html.rp-dark, html.dark) .platform-badge-clay_macos,
 :where(html.rp-dark, html.dark) .platform-badge-clay_windows {
   --platform-badge-fg: `#22d3ee`;
   --platform-badge-bg: `#08344499`;
   --platform-badge-ring: `#155e75`;
 }

Also applies to: 67-70

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/api-badge/PlatformBadge.css` around lines 19 - 22, The CSS
groups .platform-badge-clay_ios and .platform-badge-clay_macos with Apple/zinc
hues causing inconsistency with the centralized mapping in platform-colors.ts;
update PlatformBadge.css so the selectors .platform-badge-clay_ios and
.platform-badge-clay_macos use the Clay/cyan color variables (same tokens used
by platform-colors.ts) instead of the Apple/zinc ones, and make the same change
for the duplicate selectors at lines 67-70 to restore single-source-of-truth
styling.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 7, 2026

Copy link
Copy Markdown

Deploying lynx-website-next with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2213c3c
Status: ✅  Deploy successful!
Preview URL: https://0a47357f.lynx-website-next.pages.dev
Branch Preview URL: https://feat-unify-platform-colors.lynx-website-next.pages.dev

View logs

Huxpro added 3 commits June 8, 2026 09:48
- APIStatusLayout: drop unused PLATFORM_CONFIG import
- APIStatusLayout: totalSurfaces now mirrors the sidebar rail's count
  (native + 1 clay-aggregate in collapsed mode, native + 4 clay_* in
  detail mode) so the header reads "X of 5" / "X of 8" consistently
  with the sidebar's "X/Y" instead of always "X of 8"
- SearchPage: type="search" + aria-label on the search input so screen
  readers announce it properly and browsers can offer search UA chrome
- CoveragePage: correct the trend-chart comment — preserveAspectRatio
  is "none" (intentional horizontal stretch), with non-scaling strokes
  keeping line width constant. Previous comment incorrectly described
  it as "scales without distorting strokes"
- APIStatusPages.scss: declare container-type on .aps-plate so the
  parity-row's @container (max-width: 540px) query actually matches
  (was a dormant no-op without a container ancestor)

Change-Id: Ia547f44d818e43e73e3a9e4602aaba7a37e352a4
…ynx-website into feat/unify-platform-colors

Change-Id: I4cdcc839363be28e76aa757c7afba3dca8af0d41
@Huxpro Huxpro merged commit d5b6bf4 into main Jun 8, 2026
13 of 15 checks passed
@Huxpro Huxpro deleted the feat/unify-platform-colors branch June 8, 2026 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants