feat: V2 accent + icon adoption (template, primitives, /check-module)#15
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Esta PR completa a adoção do redesign V2 no template do módulo, adicionando identidade visual (accent/icon), ajustando primitivas shadcn para o novo background “cream” do shell e estendendo a skill /check-module com validações relacionadas.
Changes:
- Adiciona
accenteicondefault nomodule.jsone documenta “Identidade visual” no README. - Ajusta estilos de
Input,SelecteTabspara usarbg-card(evitando componentes “invisíveis” no tema V2). - Estende a skill
/check-modulecom checks paraaccent,icone detecção de cores hardcoded emsrc/.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/components/ui/tabs.tsx | Ajusta estilo do tab ativo para bg-card e adiciona sombra V2. |
| src/components/ui/select.tsx | Ajusta background do trigger para bg-card e adiciona hover consistente. |
| src/components/ui/input.tsx | Ajusta background do input para bg-card, removendo override específico de dark. |
| README.md | Documenta o uso de accent e icon, incluindo defaults e comportamento quando ausentes. |
| module.json | Passa a declarar accent e icon por padrão no template. |
| .claude/skills/check-module/SKILL.md | Adiciona checks 2.9–2.11 (accent/icon/hardcoded colors). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // Active tab uses --card (white panel) so it stands off the | ||
| // shell's V2 cream page bg. The shadcn default (bg-background) | ||
| // matches the page bg in the new theme. | ||
| "data-[state=active]:bg-card data-[state=active]:text-foreground data-[state=active]:shadow-[0_2px_6px_-2px_rgba(0,0,0,0.08)]", |
Comment on lines
+186
to
+192
| HARDCODED=$(grep -rE "#[0-9a-fA-F]{3,8}\b|rgb\(|rgba\(" src/ --include='*.ts' --include='*.tsx' --include='*.css' 2>/dev/null \ | ||
| | grep -v "var(--" \ | ||
| | grep -vE "^\s*//|^\s*\*" \ | ||
| | head -10) | ||
| if [ -n "$HARDCODED" ]; then | ||
| COUNT=$(echo "$HARDCODED" | wc -l) | ||
| PROBLEMS+=("aviso: $COUNT cor(es) hardcoded em src/ — use var(--token) do shell para respeitar light/dark e o palette V2") |
…odule Phase 4 part 2 — closes the V2 contract loop on the module side. Template - module.json gains `accent: "coral"` and `icon: "shield"` so a freshly cloned module renders with declared identity instead of inheriting the auto-inferred default. Both fields stay optional in the contract. - README gets an "Identidade visual" section above the perspectives one: what the chip is, the closed accent set with hue + intent, the icon source (lucide kebab-case), and the auto-infer behavior so devs understand the safety net. Primitives — same fix already shipped in the shell (PR #9) - src/components/ui/input.tsx: bg-transparent → bg-card, dropped dark:bg-input/30 (bg-card adapts via the --card token) - src/components/ui/select.tsx: bg-transparent → bg-card on the trigger, plus a hover:bg-muted to mirror the shell - src/components/ui/tabs.tsx: data-[state=active]:bg-background → bg-card + the V2 shadow Without this, modules built from the template still ship with the old shadcn defaults that go invisible over the shell's V2 cream page (the Tweaks Management symptom). The shell already has a defensive data-slot override for legacy bundles; this stops the bleeding for new code. /check-module — three new checks - 2.9: accent must be one of the 7 V2 values when declared; warns informatively when ausente (auto-infer kicks in but identity stays generic) - 2.10: icon ausente → warn (chip falls back to the group default, which makes modules in the same group visually indistinguishable) - 2.11: greps src/ for hex / rgb() / rgba() that aren't behind a `var(--token)` — warn (not error) since SVG icons and shadow rgba()s legitimately use hex; reports up to 10 hits as a sample Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- tabs.tsx active shadow: replaced shadow-[0_2px_6px_-2px_rgba(0,0,0,0.08)]
with Tailwind's shadow-sm utility. The literal rgba in the className
would trip /check-module's new 2.11 hardcoded-color check on the
template itself — embarrassing for a check shipped in the same PR.
- /check-module 2.11 hardening:
* Total count now computed before truncation (was counting only the
first 10 lines)
* Up to 5 sample matches now go into PROBLEMS as separate lines so
the report is actionable instead of just "23 hits somewhere"
* grep -n adds line numbers per match
* Allowlist for false positives:
- lines that are comments (//, *, /*)
- lines that ARE the CSS var declaration (`--token: #hex`)
Both checked after stripping the file:line prefix grep -n adds.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
19082f0 to
041ea0d
Compare
Contributor
Author
|
@copilot review |
Revisei a branch e os pontos levantados na revisão anterior já estão corrigidos no commit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fase 4 parte 2/2 do redesign V2. Fecha o ciclo do contrato no lado do módulo, complementando a PR #11 do shell (já mergeada) que estendeu `@platform/shell-contract` e `@platform/module-register` com os campos.
Decisões fechadas (consultadas)
`accent` e `icon` permanecem opcionais no contrato. Quando ausentes:
O que entra
Template
Primitives shadcn (mesma correção da PR #9 do shell)
`/check-module` (3 checks novos)
Test plan
🤖 Generated with Claude Code