Skip to content

Update arch-docs theme to match brand guidelines#16

Merged
jonathanpopham merged 17 commits intomainfrom
fix/brand-guide-theme
Mar 11, 2026
Merged

Update arch-docs theme to match brand guidelines#16
jonathanpopham merged 17 commits intomainfrom
fix/brand-guide-theme

Conversation

@jonathanpopham
Copy link
Contributor

@jonathanpopham jonathanpopham commented Mar 11, 2026

Summary

  • Fonts: Replaced Inter → Public Sans, JetBrains Mono → Martian Mono (per brand guide: Public Sans for 90% of use, Martian Mono for data/details)
  • Colors: Updated all :root CSS variables to match the official Supermodel brand palette — pure black backgrounds, Deep Space teal surfaces, Starlight Blue accent, muted secondary colors (brown, green, purple, pink)
  • Hardcoded values: Fixed CTA gradient, hero button hover states, and source code block background to use brand-aligned colors

Color mapping applied

Token Before After
--bg #0f1117 (blue-gray) #000000 (Black)
--bg-card #1a1d27 (blue-gray) #161616 (Light Black)
--bg-hover #22263a #08191C (Deep Space)
--accent #6366f1 (indigo) #71B9BC (Starlight Blue)
--green #22c55e #7CCE86 (muted green)
--orange #f59e0b #D0A27D (brown)
--red #ef4444 #E589C6 (pink)
--blue #3b82f6 #8E8CE9 (purple)

Closes #15 (arch-docs portion — supermodeltools.github.io still needs separate update)

Test plan

  • Verify generated repo pages render correctly with new palette
  • Check contrast ratios on text/muted text against dark backgrounds
  • Confirm pill colors (accent, green, orange/brown, blue/purple) are legible
  • Test on mobile viewport

Summary by CodeRabbit

  • Style
    • Switched default fonts to Public Sans, Martian Mono and Lexend Peta for a refreshed, consistent typography.
    • Revamped theme to a brighter, high‑contrast teal/aqua and gray palette across backgrounds, cards, borders, accents, hovers and gradients.
    • Updated chart and visualization colors and label rendering (improved contrast and clipping for tight labels).
    • Overhauled UI spacing, radii, and typography (headers, nav, CTAs, code blocks, badges) for tighter, more consistent presentation.

- Replace Inter/JetBrains Mono with Public Sans/Martian Mono
- Update :root CSS variables to brand palette (pure black bg, teal accent, muted secondary colors)
- Fix hardcoded colors in CTA gradient, hero button hovers, and source code block

Closes #15 (arch-docs portion)
@coderabbitai
Copy link

coderabbitai bot commented Mar 11, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Replaced Google Fonts link and swapped Inter/JetBrains Mono for Public Sans, Martian Mono, and Lexend Peta; updated root CSS tokens, extensive theming and typography adjustments across styles and JS (colors, fonts, chart text rendering), and added treemap clipping for labels. No API or data-signature changes.

Changes

Cohort / File(s) Summary
Typography / Head
templates/_head.html
Replaced Google Fonts import: removed Inter & JetBrains Mono; added Public Sans, Martian Mono, and Lexend Peta with specific weights; updated font-family usage targets.
Global Styles
templates/_styles.css
Overhauled :root tokens and theme (black/bg, deep card, teal accent palette), reset root radius to 0px, adjusted typography (weights, line-height, letter-spacing), and updated visuals for nav, pills, cards, hero, code blocks, panels, hovers, and responsive type.
Chart & Presentation Rendering
templates/_main.js
Updated color palette for fills/strokes/labels, switched many text elements to Public Sans, adjusted legend/metric styling, added treemap clipPath for tile label clipping, updated fallback color maps and mermaid theme variables; no data logic/signature changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

Fonts rearranged, the palette turned serene,
Black backdrops gleam where teal slips in between.
Charts whisper Public Sans, code hums Martian Mono,
Lexend for labels, crisp and lightly shown-o.
A tidy theme shift—styles retuned, ready to go. ✨

🚥 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 accurately summarizes the main change: updating the theme to match brand guidelines, which is exactly what the PR accomplishes.
Linked Issues check ✅ Passed The PR successfully addresses the core requirements from issue #15: updated color palette across CSS variables, replaced fonts (Inter→Public Sans, JetBrains Mono→Martian Mono), and modernized typography throughout the arch-docs portion.
Out of Scope Changes check ✅ Passed All changes are directly related to the brand theme update. No unrelated modifications to unrelated features or functionality detected; changes are scoped to fonts, colors, and styling only.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/brand-guide-theme

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (2)
templates/_styles.css (1)

524-524: Use the theme tokens here instead of repeating the resolved hex values.

#08191C, #161616, and #E9E9E9 already exist as --bg-hover, --bg-card, and --text. Reusing the variables keeps the brand palette centralized and avoids drift on the next theme change.

Tokenized version
-  background: linear-gradient(135deg, var(--bg-card) 0%, `#08191C` 100%);
+  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-hover) 100%);
-  background: `#161616`;
+  background: var(--bg-card);
-  color: `#E9E9E9`;
+  color: var(--text);

Also applies to: 610-623

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@templates/_styles.css` at line 524, The gradient line using a hardcoded hex
(background: linear-gradient(135deg, var(--bg-card) 0%, `#08191C` 100%);) should
use theme tokens instead of literal colors: replace the trailing hexs with the
corresponding CSS variables (e.g., use var(--bg-hover) for `#08191C` and
var(--text) or var(--bg-card) where appropriate) so the rule uses
var(--bg-card), var(--bg-hover), var(--text) as intended; update the same
pattern in the other gradient/color occurrences noted (the block around the
later occurrences) so all instances reuse --bg-hover, --bg-card and --text
instead of hardcoded hexes.
templates/_head.html (1)

8-8: Trim the Google Fonts import to just the weights you're actually using.

Right now you're asking for Public Sans weights 200;300;400;500;600;700, but looking at your CSS, you only actually use 400/500/600/700. Same thing with Martian Mono—you're importing weights 300;400;500, but the CSS only uses 400 (regular). So you can shrink the import URL down to just the weights you need. This saves a little bit on the font download size, which is a nice win for performance.

Here's what the updated import would look like:

Public Sans: 400, 500, 600, 700
Martian Mono: 400
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@templates/_head.html` at line 8, Update the Google Fonts import link tag that
loads Public Sans and Martian Mono so it only requests the weights actually used
in the styles: reduce Public Sans weights to 400,500,600,700 and Martian Mono to
400; edit the <link> element that contains the fonts.googleapis.com URL (the
Google Fonts import line) to reflect those weight parameters so the fetched URL
only includes those weight values, reducing unnecessary font downloads.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@templates/_styles.css`:
- Line 14: The custom property --font currently contains an unquoted
BlinkMacSystemFont which triggers stylelint's value-keyword-case; update the
--font declaration used in templates/_styles.css (the --font variable string) to
quote "BlinkMacSystemFont" (e.g. '--font: 'Public Sans', -apple-system,
"BlinkMacSystemFont", sans-serif;') so the fallback is quoted and the
value-keyword-case lint error is resolved.
- Around line 8-9: The brand accent variable (--accent: `#71B9BC`) is too light
for white text (failing WCAG AA on filled controls); update the affected
controls (.skip-link, .cta-button, .pagination .current, .letter-active) to use
a high-contrast foreground (e.g., color: var(--accent-on)) or darken --accent to
a value that meets 4.5:1 contrast against white; modify either the variable
--accent or add rules for those selectors to set color to var(--accent-on) so
filled states render an accessible foreground.

---

Nitpick comments:
In `@templates/_head.html`:
- Line 8: Update the Google Fonts import link tag that loads Public Sans and
Martian Mono so it only requests the weights actually used in the styles: reduce
Public Sans weights to 400,500,600,700 and Martian Mono to 400; edit the <link>
element that contains the fonts.googleapis.com URL (the Google Fonts import
line) to reflect those weight parameters so the fetched URL only includes those
weight values, reducing unnecessary font downloads.

In `@templates/_styles.css`:
- Line 524: The gradient line using a hardcoded hex (background:
linear-gradient(135deg, var(--bg-card) 0%, `#08191C` 100%);) should use theme
tokens instead of literal colors: replace the trailing hexs with the
corresponding CSS variables (e.g., use var(--bg-hover) for `#08191C` and
var(--text) or var(--bg-card) where appropriate) so the rule uses
var(--bg-card), var(--bg-hover), var(--text) as intended; update the same
pattern in the other gradient/color occurrences noted (the block around the
later occurrences) so all instances reuse --bg-hover, --bg-card and --text
instead of hardcoded hexes.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 37277d6d-ce0a-4b41-ac50-73b888dcf331

📥 Commits

Reviewing files that changed from the base of the PR and between 2b3a440 and 3e9afaf.

📒 Files selected for processing (2)
  • templates/_head.html
  • templates/_styles.css

--orange: #D0A27D;
--red: #E589C6;
--blue: #8E8CE9;
--font: 'Public Sans', -apple-system, BlinkMacSystemFont, sans-serif;
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Quote BlinkMacSystemFont so stylelint stops tripping here.

This stack currently violates value-keyword-case. Quoting the fallback keeps the behavior the same and clears the lint error.

Small fix
-  --font: 'Public Sans', -apple-system, BlinkMacSystemFont, sans-serif;
+  --font: 'Public Sans', -apple-system, 'BlinkMacSystemFont', sans-serif;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
--font: 'Public Sans', -apple-system, BlinkMacSystemFont, sans-serif;
--font: 'Public Sans', -apple-system, 'BlinkMacSystemFont', sans-serif;
🧰 Tools
🪛 Stylelint (17.4.0)

[error] 14-14: Expected "BlinkMacSystemFont" to be "blinkmacsystemfont" (value-keyword-case)

(value-keyword-case)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@templates/_styles.css` at line 14, The custom property --font currently
contains an unquoted BlinkMacSystemFont which triggers stylelint's
value-keyword-case; update the --font declaration used in templates/_styles.css
(the --font variable string) to quote "BlinkMacSystemFont" (e.g. '--font:
'Public Sans', -apple-system, "BlinkMacSystemFont", sans-serif;') so the
fallback is quoted and the value-keyword-case lint error is resolved.

- Remap all hardcoded D3 chart colors from indigo/bright to brand teal/muted palette
- Update background, border, and text colors in JS to match CSS variables
- Replace Inter font references with Public Sans in SVG text elements
- Add clipPath to homepage treemap to prevent text overflow
- Set --text to #FFFFFF, --radius to 0px to match supermodel.com
- Align font fallback stacks with supermodel.com
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (5)
templates/_main.js (2)

31-33: Tiny inconsistency: "#fff" vs "#FFFFFF" for the same white color.

They render identically, but for consistency you might want to pick one format. Since you're using #FFFFFF elsewhere (like --text in the CSS), maybe standardize on that.

Suggested change
         var fill = isLast ? "#71B9BC" : "#161616";
         var stroke = isLast ? "#8CC6C9" : "#202020";
-        var textColor = isLast ? "#fff" : "#FFFFFF";
+        var textColor = "#FFFFFF";
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@templates/_main.js` around lines 31 - 33, The ternary that sets textColor
uses inconsistent hex formats ("#fff" vs "#FFFFFF"); update the textColor
assignment in the same block where fill and stroke are defined (the variables
fill, stroke, textColor computed from isLast) to use "#FFFFFF" instead of "#fff"
so the white color format matches the rest of the codebase.

386-386: Pre-existing code smell: multiple var redeclarations in the same function scope.

Static analysis flags svg, typeColors, root, and node being redeclared multiple times within this load handler. Since everything's wrapped in one big function, these var declarations all hoist to the same scope.

It's not a bug (JavaScript allows this with var), but it makes the code harder to reason about. For example, if someone accidentally references svg after the treemap section thinking it's the force graph SVG, they'd get the wrong one.

A future refactor could:

  1. Extract each chart into its own function (cleanest)
  2. Switch to let/const which would catch accidental reuse at dev time

This is pre-existing and outside the scope of your brand update, so totally fine to defer.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@templates/_main.js` at line 386, The load handler uses multiple var
declarations (svg, typeColors, root, node, etc.) that hoist to the same function
scope; to avoid accidental reuse, replace these var declarations with
block-scoped let/const (use const for values that don't reassign and let for
ones that do) in the sections that create the treemap and force graph (e.g., the
svg created from hpChartEl with hpW/hpH and related typeColors/root/node
variables), or better yet extract each chart into its own function to give each
chart its own scope; update the declarations consistently so each chart’s svg
and related variables are not reused across the handler.
templates/_styles.css (3)

623-623: And #FFFFFF is --text.

One more swap to keep everything pointing at the same source of truth.

Suggested change
 .source-code code {
   font-family: var(--mono);
   font-size: 13px;
-  color: `#FFFFFF`;
+  color: var(--text);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@templates/_styles.css` at line 623, Replace the hardcoded color declaration
"color: `#FFFFFF`;" with the CSS variable so the component uses the theme token;
change it to "color: var(--text);" in the same rule where "color: `#FFFFFF`;"
appears to ensure all text colors reference the single source of truth (--text).

610-610: Same deal here — #161616 is --bg-card.

Swap in the variable so you don't have to hunt down hardcoded values if the palette changes.

Suggested change
 .source-code {
-  background: `#161616`;
+  background: var(--bg-card);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@templates/_styles.css` at line 610, Replace the hardcoded color value
"#161616" with the CSS variable for the card background so the palette is
centralized; locate the rule in templates/_styles.css where "background:
`#161616`;" is used and change it to use "var(--bg-card)". Ensure any related
properties in the same selector (e.g., background-color, border colors,
hover/active states) are updated to use the same variable for consistency.

524-524: Consider using var(--bg-hover) instead of the hardcoded hex.

The #08191C value is already defined as --bg-hover in your root variables. Using the variable keeps things DRY and means if you tweak the palette later, this gradient updates automatically.

Suggested change
-.cta-section {
-  background: linear-gradient(135deg, var(--bg-card) 0%, `#08191C` 100%);
+.cta-section {
+  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-hover) 100%);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@templates/_styles.css` at line 524, Replace the hardcoded color in the
gradient declaration for the background property — change the second stop from
"#08191C" to the CSS variable "var(--bg-hover)" so the rule uses var(--bg-hover)
instead of the hex literal, ensuring the linear-gradient(135deg, var(--bg-card)
0%, var(--bg-hover) 100%) updates automatically when theme variables change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@templates/_main.js`:
- Around line 31-33: The ternary that sets textColor uses inconsistent hex
formats ("#fff" vs "#FFFFFF"); update the textColor assignment in the same block
where fill and stroke are defined (the variables fill, stroke, textColor
computed from isLast) to use "#FFFFFF" instead of "#fff" so the white color
format matches the rest of the codebase.
- Line 386: The load handler uses multiple var declarations (svg, typeColors,
root, node, etc.) that hoist to the same function scope; to avoid accidental
reuse, replace these var declarations with block-scoped let/const (use const for
values that don't reassign and let for ones that do) in the sections that create
the treemap and force graph (e.g., the svg created from hpChartEl with hpW/hpH
and related typeColors/root/node variables), or better yet extract each chart
into its own function to give each chart its own scope; update the declarations
consistently so each chart’s svg and related variables are not reused across the
handler.

In `@templates/_styles.css`:
- Line 623: Replace the hardcoded color declaration "color: `#FFFFFF`;" with the
CSS variable so the component uses the theme token; change it to "color:
var(--text);" in the same rule where "color: `#FFFFFF`;" appears to ensure all
text colors reference the single source of truth (--text).
- Line 610: Replace the hardcoded color value "#161616" with the CSS variable
for the card background so the palette is centralized; locate the rule in
templates/_styles.css where "background: `#161616`;" is used and change it to use
"var(--bg-card)". Ensure any related properties in the same selector (e.g.,
background-color, border colors, hover/active states) are updated to use the
same variable for consistency.
- Line 524: Replace the hardcoded color in the gradient declaration for the
background property — change the second stop from "#08191C" to the CSS variable
"var(--bg-hover)" so the rule uses var(--bg-hover) instead of the hex literal,
ensuring the linear-gradient(135deg, var(--bg-card) 0%, var(--bg-hover) 100%)
updates automatically when theme variables change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 720dfde0-65d5-4550-9bcf-95982df5a113

📥 Commits

Reviewing files that changed from the base of the PR and between 3e9afaf and fa841eb.

📒 Files selected for processing (2)
  • templates/_main.js
  • templates/_styles.css

Below 600px width, use d3.treemapSlice instead of squarify so each
taxonomy gets a full-width horizontal bar. Prevents text overflow
and keeps all labels readable on mobile.
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (1)
templates/_main.js (1)

77-84: Pull the palette from CSS tokens instead of copying hexes through JS.

This file now hardcodes the brand colors in a bunch of separate maps plus Mermaid config. The next token tweak will need _styles.css and _main.js to stay perfectly in sync by hand again. I’d read the CSS custom properties once with getComputedStyle(document.documentElement) and build the D3/Mermaid palettes from that.

Also applies to: 193-215, 297-297, 388-389, 411-412, 486-486, 550-550, 600-606

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@templates/_main.js` around lines 77 - 84, Replace the hardcoded color maps
(typeColors and edgeColors) by reading CSS custom properties at runtime: use
getComputedStyle(document.documentElement) to read the palette tokens and then
construct the D3/Mermaid palettes from those values (e.g., map token names to
the same keys used in typeColors and edgeColors). Update any other hardcoded hex
usages in this file (the other color maps and Mermaid config regions referenced)
to source their values from the same computed-style lookup so all palettes are
built from CSS tokens instead of inline hex strings.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@templates/_main.js`:
- Around line 31-33: The current logic sets textColor to white unconditionally
for certain brand fills (see variables fill, stroke, textColor and condition
isLast); replace this by choosing a contrasting foreground based on the fill
color at render time: compute the relative luminance or contrast ratio of the
fill (or use an existing utility) and set textColor to a dark color (e.g.,
"#161616" or computed dark) when contrast against "#fff" is below WCAG
thresholds, otherwise keep white; update every occurrence where textColor is set
(including the blocks around the variables shown and the other ranges noted) so
labels use the derived contrasting color instead of hardcoded "#fff".
- Around line 34-41: The SVG injection is vulnerable because items[i].name (used
as label) is concatenated into the svg string and later inserted via innerHTML;
escape XML special characters (&, <, >, ", ') in label before concatenation or
switch to building the SVG using DOM APIs; update the code that defines label
(from items[i].name) and the places that append the text node (the svg += '<text
...>' line and the similar occurrence around lines 54-55) to use an escapedLabel
or a created textNode so no raw input is placed into the SVG markup.
- Around line 105-106: The legend/text elements using fill "#505050" (e.g., the
svg.append("text") -> .attr("fill", "#505050") call) are too low-contrast on
black; update these small-size text fills to an AA-safe neutral (replace
"#505050" with "#808080" or your chosen AA-safe token) across all similar
occurrences (the repeated svg.append("text" / .attr("fill", "#505050") usages
and any small legend/heading/value label attributes) so that 10px–11px text
meets WCAG AA contrast on a black background.
- Around line 389-395: The chart code uses function-scoped var bindings (e.g.,
root, svg, node, typeColors, cell) which collide across multiple charts; update
these declarations to block-scoped names or unique chart-prefixed identifiers:
replace var with const/let for local, block-scoped bindings (e.g., const root =
..., const svg = ...) or rename to chart-specific identifiers (e.g., hpRoot,
hpSvg, hpCell, aeRoot, etc.) so each chart (references: hpChartEl, hpW, hpH,
colors and the other chart sections noted) has independent variables and avoids
accidental reuse across the shared load handler.

---

Nitpick comments:
In `@templates/_main.js`:
- Around line 77-84: Replace the hardcoded color maps (typeColors and
edgeColors) by reading CSS custom properties at runtime: use
getComputedStyle(document.documentElement) to read the palette tokens and then
construct the D3/Mermaid palettes from those values (e.g., map token names to
the same keys used in typeColors and edgeColors). Update any other hardcoded hex
usages in this file (the other color maps and Mermaid config regions referenced)
to source their values from the same computed-style lookup so all palettes are
built from CSS tokens instead of inline hex strings.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4693808e-9bf2-4917-b362-863c2cbafa32

📥 Commits

Reviewing files that changed from the base of the PR and between fa841eb and 474a83b.

📒 Files selected for processing (1)
  • templates/_main.js

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
templates/_main.js (1)

500-501: ⚠️ Potential issue | 🟡 Minor

Line count values using #505050 at 10px will be hard to see.

These are the actual line count numbers next to the bars — pretty important info! At 10px with #505050 on black, they'll be barely visible. Consider #808080 or lighter to match the label text on line 497.

Proposed fix
          g.append("text").attr("x", teLabelW + Math.max(teScale(d.lines), 3) + 5).attr("y", y + teBarH / 2 + 4)
-            .attr("fill", "#505050").attr("font-size", "10px").attr("font-family", "Public Sans,system-ui,sans-serif").text(d.lines);
+            .attr("fill", "#808080").attr("font-size", "10px").attr("font-family", "Public Sans,system-ui,sans-serif").text(d.lines);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@templates/_main.js` around lines 500 - 501, The small line-count text
appended with g.append("text") for d.lines is too dark and small on a black
background; update its styling to match the other label text by changing the
fill from "#505050" to a lighter color like "#808080" (or the exact color used
on the label at line 497) and ensure the font-size/font-family match that
label's settings (reuse the same font-size and font-family values instead of
hardcoding different ones).
🧹 Nitpick comments (2)
templates/_main.js (2)

701-705: Nice escHtml helper here — could reuse a similar pattern for SVG labels.

This DOM-based escaping approach for search results is solid. A similar helper (but for XML entities) could fix the SVG injection issue in the architecture map. Just a thought!

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@templates/_main.js` around lines 701 - 705, Add an XML-escaping helper
mirroring escHtml (e.g., escXml or escSvg) that escapes XML entities (&, <, >,
", ') and returns a safe string for SVG text/attributes; implement it by
creating a DOM node and using createTextNode or by replacing the five XML
entities. Then replace direct insertions of label strings into the architecture
map SVG rendering code (where SVG text/labels are created) with calls to this
new escXml helper so SVG labels are sanitized before being inserted into the
DOM.

194-203: Metric colors updated — minor note on #505050 for Files.

The new brand colors look solid here. One small thing: using #505050 for the "Files" bar (line 202) might make it nearly invisible against a dark background like #000 or #161616. If that's intentional (de-emphasizing files), cool — just wanted to flag it in case it's unintentional.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@templates/_main.js` around lines 194 - 203, The "Files" metric uses color
"#505050" which may be too low-contrast on dark backgrounds; update the color
value in the metrics array entry with key "fc" (label "Files") in
templates/_main.js to a higher-contrast hex (or the intended de-emphasized
color) to ensure visibility against dark backgrounds, e.g., pick a lighter shade
or confirm the current value is intentional and document that choice.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@templates/_main.js`:
- Around line 500-501: The small line-count text appended with g.append("text")
for d.lines is too dark and small on a black background; update its styling to
match the other label text by changing the fill from "#505050" to a lighter
color like "#808080" (or the exact color used on the label at line 497) and
ensure the font-size/font-family match that label's settings (reuse the same
font-size and font-family values instead of hardcoding different ones).

---

Nitpick comments:
In `@templates/_main.js`:
- Around line 701-705: Add an XML-escaping helper mirroring escHtml (e.g.,
escXml or escSvg) that escapes XML entities (&, <, >, ", ') and returns a safe
string for SVG text/attributes; implement it by creating a DOM node and using
createTextNode or by replacing the five XML entities. Then replace direct
insertions of label strings into the architecture map SVG rendering code (where
SVG text/labels are created) with calls to this new escXml helper so SVG labels
are sanitized before being inserted into the DOM.
- Around line 194-203: The "Files" metric uses color "#505050" which may be too
low-contrast on dark backgrounds; update the color value in the metrics array
entry with key "fc" (label "Files") in templates/_main.js to a higher-contrast
hex (or the intended de-emphasized color) to ensure visibility against dark
backgrounds, e.g., pick a lighter shade or confirm the current value is
intentional and document that choice.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 95452052-a3d4-4754-acf2-24c92b0442dd

📥 Commits

Reviewing files that changed from the base of the PR and between 474a83b and e6ba49b.

📒 Files selected for processing (1)
  • templates/_main.js

- Body: font-weight 300 (Public Sans Light)
- H1/hero: font-weight 200 (Extralight), letter-spacing -0.04em
- H2/section titles: font-weight 300-400, letter-spacing -0.02em
- Nav links: Martian Mono, uppercase, 0.68rem (matching supermodel.com)
- Overline labels: Lexend Peta 10px uppercase (brand accent typeface)
- Pills: Martian Mono (data/details font)
- Add Lexend Peta to Google Fonts import
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (4)
templates/_styles.css (4)

14-15: Quote these font names to silence stylelint.

Stylelint is complaining about the casing of BlinkMacSystemFont, Roboto, Consolas, and Menlo. These are proper font names so the capitalization is correct, but quoting them makes the linter happy and is totally valid CSS.

Quick fix
-  --font: 'Public Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
-  --mono: 'Martian Mono', "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
+  --font: 'Public Sans', -apple-system, 'BlinkMacSystemFont', 'Segoe UI', 'Roboto', sans-serif;
+  --mono: 'Martian Mono', 'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo', monospace;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@templates/_styles.css` around lines 14 - 15, Update the CSS variable
declarations for --font and --mono so the unquoted font family identifiers are
wrapped in quotes to satisfy stylelint: specifically quote BlinkMacSystemFont,
Roboto, Consolas, and Menlo within the --font and --mono variable values (leave
already-quoted families as-is) so the declarations using --font and --mono are
valid and lint-clean.

280-282: Consider using CSS color-mix() for easier maintenance.

These hardcoded rgba values work, but if you ever change --orange or --blue, you'd need to update these too. Modern CSS has color-mix() which can derive these automatically:

Example using color-mix()
.hero-btn-star:hover { background: color-mix(in srgb, var(--orange) 10%, transparent); }
.hero-btn-fork:hover { background: color-mix(in srgb, var(--blue) 10%, transparent); }

Not a big deal for now, just a nice-to-have if you want to reduce future maintenance.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@templates/_styles.css` around lines 280 - 282, Replace the hardcoded rgba
backgrounds on the hover rules for .hero-btn-star:hover and .hero-btn-fork:hover
with color-mix() that blends the respective CSS variables (--orange and --blue)
with transparent (e.g., 10%) so the hover tint tracks changes to those
variables; update the two rules .hero-btn-star:hover and .hero-btn-fork:hover to
use color-mix(in srgb, var(--orange) X%, transparent) and color-mix(in srgb,
var(--blue) X%, transparent) respectively (adjust X to match the original
opacity).

623-636: Use CSS variables instead of hardcoded hex values.

You've got #161616 (same as --bg-card) and #FFFFFF (same as --text) hardcoded here. Using the variables keeps everything in sync if the palette changes.

Consistency fix
 .source-code {
-  background: `#161616`;
+  background: var(--bg-card);
   ...
 }
 .source-code code {
   ...
-  color: `#FFFFFF`;
+  color: var(--text);
   ...
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@templates/_styles.css` around lines 623 - 636, The CSS currently hardcodes
colors in the rule that styles the code container and code text; replace
background: `#161616` with background: var(--bg-card) and color: `#FFFFFF` with
color: var(--text) so .source-code (and its nested code selector) use the theme
variables instead of literal hex values, keeping the styling consistent when the
palette changes.

535-535: Use var(--bg-hover) instead of hardcoding #08191C.

You've got --bg-hover: #08191C`` defined at line 4 but here you're hardcoding the same value. If the brand palette changes, this could get out of sync.

Small fix
-  background: linear-gradient(135deg, var(--bg-card) 0%, `#08191C` 100%);
+  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-hover) 100%);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@templates/_styles.css` at line 535, Replace the hardcoded color in the
linear-gradient with the CSS variable to keep palette centralized: in the rule
that currently uses "background: linear-gradient(135deg, var(--bg-card) 0%,
`#08191C` 100%);" switch the second stop to "var(--bg-hover)" so it reads use
var(--bg-card) and var(--bg-hover) instead of the literal "#08191C"; this
ensures the gradient stays in sync with the --bg-hover variable defined earlier.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@templates/_styles.css`:
- Around line 14-15: Update the CSS variable declarations for --font and --mono
so the unquoted font family identifiers are wrapped in quotes to satisfy
stylelint: specifically quote BlinkMacSystemFont, Roboto, Consolas, and Menlo
within the --font and --mono variable values (leave already-quoted families
as-is) so the declarations using --font and --mono are valid and lint-clean.
- Around line 280-282: Replace the hardcoded rgba backgrounds on the hover rules
for .hero-btn-star:hover and .hero-btn-fork:hover with color-mix() that blends
the respective CSS variables (--orange and --blue) with transparent (e.g., 10%)
so the hover tint tracks changes to those variables; update the two rules
.hero-btn-star:hover and .hero-btn-fork:hover to use color-mix(in srgb,
var(--orange) X%, transparent) and color-mix(in srgb, var(--blue) X%,
transparent) respectively (adjust X to match the original opacity).
- Around line 623-636: The CSS currently hardcodes colors in the rule that
styles the code container and code text; replace background: `#161616` with
background: var(--bg-card) and color: `#FFFFFF` with color: var(--text) so
.source-code (and its nested code selector) use the theme variables instead of
literal hex values, keeping the styling consistent when the palette changes.
- Line 535: Replace the hardcoded color in the linear-gradient with the CSS
variable to keep palette centralized: in the rule that currently uses
"background: linear-gradient(135deg, var(--bg-card) 0%, `#08191C` 100%);" switch
the second stop to "var(--bg-hover)" so it reads use var(--bg-card) and
var(--bg-hover) instead of the literal "#08191C"; this ensures the gradient
stays in sync with the --bg-hover variable defined earlier.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3746aa98-4eda-4013-8cba-1c5414a92459

📥 Commits

Reviewing files that changed from the base of the PR and between e6ba49b and cc0b512.

📒 Files selected for processing (2)
  • templates/_head.html
  • templates/_styles.css

Below 600px, the codebase composition switches from a squarified
treemap to a simple stacked bar list — full-width colored bars with
labels and counts. Treemap stays unchanged on desktop.
Extracts treemap/bar rendering into a function that re-renders on
window resize (debounced 150ms). Switches between treemap (>=600px)
and horizontal bar list (<600px) live as the viewport changes.
Move flex-wrap to the base rule so stats wrap naturally before
overflowing. Tighten gap on mobile for compact rows.
Codebase composition now uses flex-wrap divs instead of D3 treemap.
Each taxonomy is a flex item sized by flex-grow proportional to count,
with min-width ensuring text is always visible. Reflows naturally at
any viewport width — no breakpoints or resize listeners needed.
Each box now gets flex-basis as a percentage of total count (min 10%)
with no grow/shrink, so smaller items like File Extensions stay small
even when they wrap to a new row.
Fixed container height at 200px, items stretch to fill, labels
anchored to bottom. Tighter gap and padding for denser feel.
Split taxonomies at ~65% cumulative value: large items in a tall top
row (140px), small items in a short bottom row (60px). Width is
proportional within each row. Visual area now reflects data magnitude.
Both the architecture overview and entity force graphs now resize
their SVG width and re-center the simulation on window resize
(debounced 150ms). Nodes reflow to fill the new canvas.
When a taxonomy hub page has null/empty distributions and no top
entities, hide the chart panel container instead of showing an
empty rectangle.
- Use black text on accent-filled controls (skip-link, cta-button,
  pagination current, letter-active) for AA contrast on #71B9BC
- Bump chart label gray from #505050 to #808080 for AA contrast on black
@jonathanpopham jonathanpopham merged commit 7724e88 into main Mar 11, 2026
2 checks passed
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.

Update themes to match Supermodel brand guidelines

1 participant