Skip to content

feat(tokens): neutralize light palette (premium direction) + sidebar adapts to theme - #126

Merged
nevitonsantana merged 1 commit into
mainfrom
feat/neutralize-tokens-premium
Jun 19, 2026
Merged

nevitonsantana merged 1 commit into
mainfrom
feat/neutralize-tokens-premium

Conversation

@nevitonsantana

Copy link
Copy Markdown
Collaborator

Contexto

A migração de tokens no produto (nomes #256 + valores #257) adotou os tokens lavanda que estavam no repo do Pulso. Mas o norte visual são os estudos premium (Linear/Mercury, neutros frios). Esta PR executa os passos 1+2 do plano de adoção premium:

  1. Persistir a referência como norte rastreável.
  2. Neutralizar a paleta canônica light mantendo o acento violeta.

O que muda

Passo 1 — referência versionada

design/product-reference/ com dashboard.html (o alvo a espelhar), tokens-premium.css, premium-direction.html e um README de proveniência. Saem do ~/Downloads volátil para o repo.

Passo 2 — neutralização dos tokens (src/app/globals.css)

Light chrome lavanda → cool-neutrals quentes, mantendo --primary violeta (#6C46F5):

Token Antes Depois
--background #F5F4FA lavanda #FBFAF7 warm off-white
--muted / --secondary / --accent #F1EEFA #F2F1EC
--surface-2 / --elevated #ECE7F8 #EBE9E2
--border #DDD7EE sólido rgba(20,18,12,.09) hairline
--foreground / --fg #171629 indigo #1C1B22 neutro
--fg-muted #73718A #65646E
--fg-subtle #706C88 #8C8B94
sidebar fixa dark adapta ao tema — #F5F3EE claro / #151126 escuro
  • Dark base (bg/risk/semantic/chart) inalterada — fora de escopo; refino editorial #0C0B10 fica para depois.
  • Espelhado em public/visual/pulso-ds/globals.css + tabelas do DESIGN.md para as três camadas ficarem em sincronia.
  • Artefato tokens/pulso-tokens.css regenerado.

Verificação

  • bun run check:tokens → ✓ Tokens consistentes entre as três fontes
  • bun run build:tokens --check → ✓ tokens/ em dia com a fonte canônica
  • Sem erros de console no preview

Próximos passos (não nesta PR)

  • Re-sync no produto: re-vendorizar vendor/pulso/pulso-tokens.css + node scripts/sync-pulso-tokens.mjs no Crisis Monitor.
  • Passo 3: implementar as telas espelhando o markup exato de dashboard.html (sidebar → dashboard → sidesheet da Cris), cada etapa um PR.

🤖 Generated with Claude Code

…bar adapts to theme

Lavender light chrome → warm cool-neutrals (Linear/Mercury study), keeping
violet --primary as the brand accent. Sidebar stops being fixed-dark and now
adapts to the theme (warm-gray panel in light, editorial near-black in dark).

- Light: --background #F5F4FA→#FBFAF7, --muted #F1EEFA→#F2F1EC,
  --border #DDD7EE→rgba(20,18,12,.09) hairline, fg hierarchy de-lavendered.
- Sidebar: light warm-gray (#F5F3EE); dark override added (#151126).
- Dark base palette and risk/semantic/chart tones unchanged (out of scope).
- Mirrored into public/visual/pulso-ds/globals.css + DESIGN.md tables so the
  three token layers stay in lockstep (check:tokens --strict ✓).
- Regenerated tokens/pulso-tokens.css artifact (build:tokens --check ✓).
- Persist premium study as traceable norte in design/product-reference/
  (dashboard.html + tokens-premium.css + premium-direction.html + README).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@nevitonsantana
nevitonsantana merged commit 1998092 into main Jun 19, 2026
1 check passed

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 797fd1be64

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


<meta charset="UTF-8">
<title>Crisis Monitor — Dashboard Premium</title>
<link rel="stylesheet" href="../../tokens-premium.css">

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Load the bundled token CSS for reference pages

When this page is opened from design/product-reference/, ../../tokens-premium.css resolves to a repo-root tokens-premium.css, but the only committed file from a repo-wide search is design/product-reference/tokens-premium.css. That leaves the dashboard without the --pm-* variables it uses throughout the inline CSS, so the reference renders largely unstyled; the sibling premium-direction.html has the same relative-path problem.

Useful? React with 👍 / 👎.

</script>

<div id="tweaks-mount"></div>
<script type="text/babel" src="tweaks-panel.jsx"></script>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Add the missing tweaks panel dependency

This new dashboard loads tweaks-panel.jsx, but a repo-wide search for tweaks-panel.jsx/useTweaks only finds this reference, so opening the page from design/product-reference/ 404s that script and the next Babel block calls window.useTweaks(...) while it is undefined. In that scenario the Tweaks panel crashes before it can render or apply the density/surface/accent controls.

Useful? React with 👍 / 👎.

--sidebar-accent-foreground: #FFFFFF;
--sidebar-border: #2A2540;
--sidebar-ring: color-mix(in oklab, #8A63FF 45%, transparent);
--sidebar-accent: #EBE9E2;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep active sidebar controls readable

With the light sidebar accent now set to #EBE9E2, the existing visual-sidebar CSS still renders active theme buttons as background: var(--sidebar-accent); color: var(--sidebar-primary-foreground) in public/visual/pulso-ds/pages/_page.css and index.html. Because --sidebar-primary-foreground remains white, those active icons become white on a near-white background in light mode (about 1.2:1 contrast); use the accent foreground token for this state or make the active background the primary color.

Useful? React with 👍 / 👎.

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