Skip to content

style(theme): warm greys, a green default, and cluster counts that read - #469

Merged
Ardnived merged 11 commits into
mainfrom
feat/warm-style
Nov 24, 2026
Merged

Ardnived merged 11 commits into
mainfrom
feat/warm-style

Conversation

@Ardnived

@Ardnived Ardnived commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • The Atlas is warmer. Radix sand replaces gray under the same gray-* names, and the panels stay white and near-black.
  • The default seeds are a green primary #2D9A76 and a coral contrast #E0775C.
  • Every embed, stock or branded, follows one marker rule:
    • a pin is ramp step 9 with a hard edge;
    • a circle is step 10, opaque, with a pale halo.
  • Markers are rasterised at the size they show, so the edges are smooth at 1× and 2×.
  • A selected radio card or toggle takes the solid button's dark green.

Change outline

Behaviour — where marker colours come from

The six hard-coded stock colours are gone. An unbranded embed now runs DEFAULT_SEEDS through the same engine a tenant's colours go through.

 markerColors(palette)                                  src/components/organisms/Mapbox/markers.ts
-  no usable seed → Studio constants (#21C1A2 pin, #37BB92 disc, #8CCDC4 ring, coral pair)
-  else buildPalette(light) → pin and disc both primary step 9, ring = fill +21 L / −16 S
+  each role → seedOrDefault(role, seed)                 # unusable or unset → DEFAULT_SEEDS
+  both defaults → DEFAULT_MARKER_COLORS                  # one shared object, as before
+  else deriveMarkerColors(primary, contrast)
+    buildPalette(light)                                   # selected-distinct still applies
+    pin    = { fill: SOLID_STEP (9) }                     # no brand ring any more
+    bubble = { fill: HOVER_STEP (10), ring: step 9 +34 L / −11 S, capped at 82 }

Behaviour — the marker art and how it is registered

A pin swaps its translucent ring for the basemap's fixed edge, as in the warm-look proposal build. That makes its art differ by mode. Every image is now drawn at the size it shows, at the screen's pixel ratio.

 markerImages(colors, mode, ratio)                      src/components/organisms/Mapbox/markers.ts
   pin(fill, MARKER_OUTLINE[mode], ratio)
-    head scaled 0.86 inside a 2.2 translucent ring
+    full head, 1.2 stroke: black on the light map, white on the dark
   cluster(fill, ring, ratio)
-    disc at opacity 0.914
+    disc opaque                                          # the basemap cannot thin the count
   svg(width, height, body, ratio, size)
-    bitmap = 2 × logical size; layers shrink pins with icon-size 0.85
+    bitmap = logical size × size × devicePixelRatio; no icon-size on resting pins
 registerMarkerImages(map, colors, mode)                # reads window.devicePixelRatio once
   addImage(id, image, { pixelRatio: ratio })
 Map.tsx effect deps: [mapbox, colors] → [mapbox, colors, theme]   # the pins' edge is per mode

Flow — the paints that read those colours

 clusterLayer(palette)                                  src/components/organisms/Mapbox/layers.ts
-  text-color: onHex(primary) ?? '#FFFFFF'                # step 9's on-colour
+  text-color: readableOn(markerColors(palette).cluster.fill)   # black or white for its disc
 unclusteredPointLayer / vaguePinLayer / selectedPointLayer
-  icon-size 0.85
+  (none)                                                # the art is already that size
 hoveredPointLayer
-  icon-size 1
+  icon-size 1 / PIN_SIZE                                 # the same pop as before
 vagueRingLayer / vagueDotLayer
-  stepHex(primary, 9) ?? '#21C1A2'
+  markerColors(palette).point.fill
 boundsLayer (DEBUG_BOUNDARY only)
-  stepHex(primary, mode, 9) ?? '#888'
+  buildScale(seedOrDefault('primary', primary), mode) step 9

Contract — the palette engine

 DEFAULT_SEEDS                                          src/config/theme/palette.ts
-  primary '#1E6C71', contrast '#d8735a'
+  primary '#2D9A76', contrast '#E0775C'                  # mirrored by sydevs/SahajCloud#1263
 SOLID_STEP = 9
+HOVER_STEP = 10
+seedOrDefault(role, seed)                               # the one fallback; isBrandSeed stays private
+readableOn(hex)                                         # foregroundFor, for a fill off step 9
-stepHex, onHex                                          # no callers left

Components — selected states and the stylesheet

                                                         src/styles/globals.css
-@import '@radix-ui/colors/gray.css' + gray-dark.css
+@import '@radix-ui/colors/sand.css' + sand-dark.css
+:root { --gray-N: var(--sand-N) }                       # every gray-* call site unchanged
 --primary-*, --contrast-* defaults                      # regenerated from DEFAULT_SEEDS
 RadioGroup checked card / ToggleGroup data-[state=on]   src/components/atoms/
-  bg-primary-9 + text-primary-foreground (both modes)
+  light: bg-primary-12 + white   dark: bg-primary-9 + on-colour   # as the solid Button and Checkbox
+  isInvalid repeats its danger fill under dark:, so it still wins there
 Alert close glyph: opacity-60 → opacity-80              src/components/atoms/Alert/Alert.tsx
 Chip remove glyph: opacity-60 → opacity-80              src/components/atoms/Chip/Chip.tsx

Preview

  • App (widget, unbranded): world view — the stock pins and cluster counts; United Kingdom — the green panel primary beside them; calendar — the today highlight on --primary-on
  • Ladle playground (Mapbox, Inputs / Radio Group, Inputs / Toggle Group, Alert; default preset) — preview pending

Contract impact

  • docs/embedding.md, "Your brand colours reach the map", now says:

    • a bubble is one shade deeper than a pin, and its number is black or white;
    • a pin's edge is black on the light map and white on the dark map;
    • the default is green and coral.

    CHANGELOG.md has a Changed entry.

  • No parameter, origin, CSP, storage or Permissions-Policy change. Neither host (WeMeditateWeb's lib/atlas-embed.ts or the WordPress templates) passes colours, so neither changes.

  • chore(clients): mirror the atlas's new default colours SahajCloud#1263 mirrors DEFAULT_SEEDS in ATLAS_DEFAULT_COLORS, the fallback for the admin colour pickers. The two can merge in either order.

Test results

  • Lean gate (check.sh: lint, typecheck, test:run): ✓, 2381 passed and 1 skipped. Re-run green over the four review commits.
    • Modal.focus-opener failed intermittently when the lane ran beside a dev server and Ladle. It passed alone and on every rerun, and it is untouched here.
  • New specs, each watched failing against its defect:
    • The count stays ≥ 4.5:1 on the stock disc and on five branded discs.
    • Each mode's pins carry that mode's edge and the bubbles carry none.
    • Only the edge differs between the dark and the light stock art.
    • No resting pin layer carries icon-size.
    • Images rasterise at the pixel ratio and display size.
    • The vague ring and dot follow the pin colour.
    • The radio accent is white in light mode and the on-colour in dark.
  • Build: ✓. assert-css-scoped confirms the alias compiles to :where(.sy-atlas). pnpm size ✓.
  • Browser checks (headless Chromium, software WebGL, real feed, clients/me colours stubbed):
    • Stock disc #268264 and pin #2d9a76 in both modes.
    • A branded #3a7bd5 embed gets its own blue markers.
    • --gray-11 is #63635e in light mode and #b5b3ad in dark.
    • The panel backgrounds are unchanged.
    • The pin edge is dark on the light map and white on the dark map.
    • Magnified at 1× and 2×, the pin edge went from stair-stepped to smooth.
    • Selected radio and toggle: #1c5f48 under white in light mode, #61d1ac under black in dark.

Manual verification

  1. On a phone, in light and dark, check that the pin edges look smooth. Then select a class and hover a card. The coral pin (#d87b64) and circle (#d2664b) should read as distinct from the greens. The hover pin scales up and may look slightly soft.
  2. Check a branded embed: its circles should be one shade deeper than its pins and solid, its counts readable, and its pins hard-edged.
  3. One spot still puts black text on the bright step-9 green in light mode: the calendar's --sx-color-on-primary, which affects the today highlight. Check that it reads well.
  4. Check the location notice's close icon at 80%. It measures 3.2:1 on its fill in light mode, against 2.3:1 before.
  5. Clear an active filter pill, in light and dark. Its remove × is now 80% too.

Notes for reviewer

  • Decisions the owner made in-session:

    • Stock and branded embeds follow the same rules.
    • Colours come from the ramps and contrast system, with the defaults retuned to get there.
    • Pins take the hard edge from the proposal build.
    • Selected form controls take the button's dark green.

    So branded maps change too. Circles go one step darker and solid, counts are re-picked and halos turn paler, and pins gain the edge. The ticket's option A had said branded maps would stay as they were.

  • The pins' art is now per mode, so Map.tsx re-registers the markers on a theme switch. The first switch into a mode decodes that mode's images, so its pins can land a frame after the new style. A shortcut: note says so.

  • The pixel ratio is read once per registration. A window moved to a screen with another ratio keeps slightly soft markers until the next palette or theme change. That is also a shortcut:.

  • Ordering: the ticket put the warm greys after the g-tidy-type-edges token piece. That piece is not on main or in any open PR. Both changes are one block in globals.css.

  • Dismissed findings from the first review pass:

    • Pass the memoised colors into the layer factories. The extra derivations cost tens of µs and run only at mount, a theme switch or a palette change.
    • DEFAULT_MARKER_COLORS is computed at import. That is about 0.25 ms, once, in the lazy full-interface chunk.
    • The identity check misses a differently cased default seed. Map.tsx memoises on the palette object, so that costs one derivation per change.
    • Repoint @theme and its 25 readers instead of aliasing. The alias is the smaller change.
    • Retire the opacity idiom on Alert and Chip. Retiring it is a redesign outside this ticket. Holding Chip to the same 3:1 floor was not, and the adversarial review asked for it: Chip's remove glyph is 80% too, and no opacity-60 is left in src/.
    • wire.ts and serve-embed-review.mjs still use #1E6C71. Those are a branded fixture and a host page, not mirrors of the default.
  • Security review (triggered by src/styles/): no findings. Every colour that reaches the SVG or a paint is colord-normalised #rrggbb, and the ratio is numeric.

Detail
  • Stock marker set:
    • pin #2d9a76;
    • circle #268264 with halo #9cd8c4;
    • selected pin #d87b64;
    • selected circle #d2664b with halo #e8c4bb;
    • pin edge #000000 on the light map and #ffffff on the dark map, 1.2 wide in art units (≈ 1 CSS px).
  • The ticket's hand-picked hexes were the target: #30A47D pin, #268264 circle and #9ED8C2 halo. The seed #2D9A76 was chosen so that step 10 lands exactly on #268264, and the halo shift was retuned so the stock halo lands on #9cd8c4.
  • A #30A47D seed would make the engine pick a black count, because white is only 3.0:1 on it. That is why the circle takes the darker step.
  • Why the pins looked pixelated: Mapbox resamples a scaled icon from its atlas with no mipmaps. Shrinking the 2× bitmap to 0.85 (and to 0.425 on a 1× screen) stair-stepped the 1.2 edge. Drawing at display size at the device ratio lets Mapbox sample 1:1.

🤖 Generated with Claude Code

Ardnived and others added 4 commits November 24, 2026 10:14
The built-in seeds move to a green primary (#2D9A76) and a coral contrast
(#E0775C), and every marker colour now comes from the palette engine by one
rule, branded or not: the pin is the ramp's step 9, the cluster disc its
step 10, one pale halo per role, and the count black or white by contrast.
The stock disc lands on #268264 with a white count at 4.7:1 (was 2.4:1 on
the translucent #37BB92), and the disc is opaque. The six hard-coded stock
marker constants are gone.

The neutral ramp is Radix sand, aliased under the gray-* names, so text and
borders read faintly warm; the panels stay white and near-black. A
dismissible Alert's close glyph is dimmed to 80%, which clears 3:1.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sydevs-dispatcher

sydevs-dispatcher Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

🤖 no session running

recent dispatches
  • 17:57Z address-review · attempt 1 · session · done
  • 17:57Z address-review · attempt 1 · session
  • 17:47Z review-pr · attempt 1 · session · done
  • 17:47Z review-pr · attempt 1 · session

Written by the sydevs dispatcher. Sessions never edit this comment.

@sydevs-dispatcher sydevs-dispatcher Bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 24, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Pending to Working in SYDevelopers Technical Roadmap Nov 24, 2026
Ardnived and others added 2 commits November 24, 2026 10:49
…'s dark green

In light mode a selected radio card or toggle filled with primary step 9 and
its black on-colour, which on the green default read bright beside the
step-12 buttons and checkboxes. Both now match the solid Button: step 12
under white in light mode, step 9 and its on-colour in dark. Danger still
wins in both modes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
As in the warm-look proposal build: a pin carries a thin 1.2 outline in the
basemap's fixed edge colour (black on the light map, white on the dark one),
and no translucent ring, so its head is drawn full size again. The cluster
bubble keeps its pale halo as its only edge. The pins' art is now per mode,
so Map.tsx re-registers the marker images on a theme switch.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@sydevs-bot sydevs-bot 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.

🧐 Adversarial review

Smaller than what it replaces: six hard-coded Studio hexes, stepHex and onHex all go, and an unbranded map now runs the engine a tenant's runs, for −12 net lines. The contrast claims check out — white is 4.71:1 on the step-10 disc #268264, black 6.0:1 on the step-9 solid #2d9a76 where white is 3.5:1 — so both on-colour picks are the engine's. The consumer mirror is real: SahajCloud#1263 sets color1 #2D9A76 / color3 #E0775C, matching DEFAULT_SEEDS, and no embed parameter, origin or CSP row changes.

Two things a reviewer cannot get from the PR. The body cites "the ticket" three times and links none; an org-wide search finds none either, so its scope claims are unverifiable. And both ## Preview rows say "preview pending" on a wholly visual change, leaving hex measurements as the only evidence of how it looks.

Findings

  • should-fix — markers.ts:157: a comment this diff adds names stepHex, which this diff deletes. docs/rules/mapbox.md:71 too.
  • should-fix — globals.css:324: the default light on-colour becomes black, so the Schedule-X comment at line 539 ("light: white") is now wrong.
  • should-fix — markers.ts:154: Streamline ringOf into its one caller.
  • consider — Alert.tsx:21: Chip.tsx:29 keeps the opacity-60 this glyph just left for a measured 3:1 floor.

What was checked

Read whole on the branch: palette.ts, markers.ts, layers.ts, globals.css, the four docs. Ladder walked for all 7 new pieces (streamliner: 7 covered, 6 kept). Confirmed vagueRing/vagueDot still use mode via MARKER_OUTLINE, and the deleted stock hexes survive only in a tenant stub and a host-page header. Consumer side: SahajCloud appearance.ts and #1263. Not read: WeMeditateWeb and the WordPress templates, outside this session's repo scope. No question threads. Profile read.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

Comment thread src/styles/globals.css Resolved
Comment thread src/components/atoms/Alert/Alert.tsx Resolved
@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 24, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Working to Pending in SYDevelopers Technical Roadmap Nov 24, 2026
@sydevs-dispatcher sydevs-dispatcher Bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 24, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Pending to Working in SYDevelopers Technical Roadmap Nov 24, 2026
… smooth

The pin art was rasterised at 2× its 34×38 box and shrunk to 0.85 with
`icon-size`. Mapbox resamples a scaled icon from its atlas with no mipmaps,
which stair-stepped the pins' 1.2 outline at both 1× and 2× (and every image
at 1×). Each image is now rasterised at the size it shows and at the
screen's own devicePixelRatio, and the resting pin layers carry no
`icon-size`, so Mapbox draws them 1:1. The hover highlight still scales up,
by 1 / PIN_SIZE, to keep its pop.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Ardnived
Ardnived enabled auto-merge November 24, 2026 18:04
@Ardnived
Ardnived disabled auto-merge November 24, 2026 18:08
The contrast was drawn against `stepHex`, which this branch deletes, so a
fresh reader could not find the function the note contrasts with.
`buildScale` is what `boundsLayer` still uses to take a step off a seed
without `selected-distinct`.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjYzmvbGXxGDz4QixH8
One call site since the halo became the bubble's alone, where `shiftHex`
reads the same. Colours are identical: the frozen stock SVGs and the
branded expectations both pass untouched.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjYzmvbGXxGDz4QixH8
The engine picks black or white per role, so the note's "light: white,
dark: black" held only for a tenant whose solid is dark. Every default
`--*-on` is black on this branch.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjYzmvbGXxGDz4QixH8
The same idiom and the same measurement as the Alert's close glyph. The
one rendered chip is neutral, whose step-12 glyph already cleared the
floor at 60% (4.2:1), but the tinted variants measured 2.3:1 there.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjYzmvbGXxGDz4QixH8
@sydevs-bot

Copy link
Copy Markdown
Contributor

All four critic threads adopted. Each reply has its SHA.

Lean gate green. Security review: no findings. Body refreshed.

⚠ The branch moved mid-run: head 4ef40d7 → d71d5f2 and the body was rewritten at 18:09Z, both after I read them. I rebuilt my commits on d71d5f2.
⚠ Deleting the stale relay claude/relay-469-2081d53 returned 403.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 24, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Working to Pending in SYDevelopers Technical Roadmap Nov 24, 2026
@Ardnived
Ardnived enabled auto-merge November 24, 2026 18:19

@sydevs-dispatcher sydevs-dispatcher Bot 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.

Approved for Ardnived, who wrote it: GitHub refuses an author's own approval. CI is green and the automated review has run. 🤖 Written by the sydevs autonomous loop — see what this is

@Ardnived
Ardnived added this pull request to the merge queue Nov 24, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Pending to Awaiting in SYDevelopers Technical Roadmap Nov 24, 2026
Merged via the queue into main with commit 55def5f Nov 24, 2026
21 checks passed
@Ardnived
Ardnived deleted the feat/warm-style branch November 24, 2026 18:27
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Awaiting to Done in SYDevelopers Technical Roadmap Nov 24, 2026
sydevs-bot pushed a commit that referenced this pull request Nov 24, 2026
#469's theme change and this branch's inline embed both inserted a new
entry at the top of the changelog's Unreleased > Changed section. Both
are host-visible and independent, so both entries stay, the inline
embed's first as the later landing.

Every other overlap auto-merged in disjoint regions: #469 rewrote the
palette, the markers and the grey ramp, while this branch only renamed
the slot machinery those files mention.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjYkskqfH2N9ChAJsXr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants