diff --git a/.env.example b/.env.example index 2a46e587..b735c44d 100644 --- a/.env.example +++ b/.env.example @@ -84,8 +84,10 @@ GITHUB_TOKEN= # ⚙️ Configurações da Aplicação # ------------------------------------------------------------------------------ -NODE_ENV=development +# Preview deploys: leave unset so callbackUrl() falls back to NEXT_PUBLIC_VERCEL_URL. +# Production: set to the canonical domain (e.g. https://smartmanagementsystem.vercel.app). NEXT_PUBLIC_APP_URL=http://localhost:3000 +NODE_ENV=development # ⚠️ ADICIONE SUAS CHAVES CUSTOMIZADAS ABAIXO DESTA LINHA diff --git a/DESIGN.md b/DESIGN.md new file mode 100644 index 00000000..afdf0f30 --- /dev/null +++ b/DESIGN.md @@ -0,0 +1,164 @@ +# Five Star Gym - Design System + +This document outlines the master visual identity for **Five Star Gym**, a next-generation gym and personal training platform. + +## Design Philosophy + +The application is built with a premium, high-end aesthetic, akin to Apple Fitness+ or a luxury boutique gym. It is strictly **Dark Mode-first**. The UI is immersive, highly legible, and visually striking without being cluttered. + +- **Backgrounds:** Deep, OLED blacks to ensure contrast and reduce eye strain. +- **Surfaces/Cards:** Subtle, elevated dark grays to provide depth and separation. +- **Accents:** High-contrast neon/electric accents (Electric Cyan) for primary actions, active states, glowing indicators, and progress rings. +- **Text:** High-contrast white for primary headings, and muted grays for secondary or tertiary text to establish clear hierarchy. +- **Component Architecture:** Clean, modern borders (`border-white/10`) and radii (`rounded-xl`). Usage of subtle glowing drop-shadows instead of flat background colors for active states. +- **Motion:** Spring-based hover effects and hardware-accelerated layout transitions to make the UI feel fluid and responsive. + +--- + +## 🎨 Tailwind CSS Configuration (v4) + +Add these variables to your global CSS to define the core color palette. + +```css +@theme { + /* ========================================= */ + /* COLOR PALETTE */ + /* ========================================= */ + + /* Backgrounds & Surfaces (OLED Black -> Dark Gray) */ + --color-background: #000000; + --color-surface-100: #09090b; + --color-surface-200: #18181b; + --color-surface-300: #27272a; + + /* Text Colors */ + --color-text-primary: #ffffff; + --color-text-secondary: #a1a1aa; /* Zinc 400 */ + --color-text-tertiary: #71717a; /* Zinc 500 */ + + /* Borders */ + --color-border-subtle: rgb(255 255 255 / 0.1); + + /* Primary Accent: Electric Cyan */ + --color-accent-50: #ecfeff; + --color-accent-100: #cffafe; + --color-accent-200: #a5f3fc; + --color-accent-300: #67e8f9; + --color-accent-400: #22d3ee; /* Primary Action / Core Cyan */ + --color-accent-500: #06b6d4; + --color-accent-600: #0891b2; + --color-accent-700: #0e7490; + --color-accent-800: #155e75; + --color-accent-900: #164e63; + --color-accent-950: #083344; + + /* ========================================= */ + /* TYPOGRAPHY */ + /* ========================================= */ + + --font-sans: 'Inter', 'Roboto', 'Helvetica Neue', sans-serif; + --font-headline: 'Outfit', 'Inter', sans-serif; + --font-mono: + ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', + monospace; + + /* ========================================= */ + /* EFFECTS & SHADOWS */ + /* ========================================= */ + + /* Subtle glow for active states */ + --shadow-glow-accent: 0 0 15px rgba(34, 211, 238, 0.4); +} +``` + +--- + +## 🏃 Framer Motion Animation Variants + +Use these standardized Framer Motion variants for consistent, spring-based interactions across all components. + +```typescript +// src/lib/motion.ts +import { Variants } from 'framer-motion'; + +/** + * Standard spring transition for layout changes and hovers. + * Hardware-accelerated and smooth. + */ +export const springTransition = { + type: 'spring', + stiffness: 300, + damping: 20, +}; + +/** + * Workout Cards and interactive surface hover states. + */ +export const cardHover: Variants = { + initial: { scale: 1 }, + hover: { + scale: 1.02, + transition: springTransition, + }, + tap: { + scale: 0.98, + transition: { type: 'spring', stiffness: 400, damping: 15 }, + }, +}; + +/** + * Primary action buttons hover states (with subtle glow). + */ +export const buttonHover: Variants = { + initial: { scale: 1, boxShadow: 'none' }, + hover: { + scale: 1.05, + boxShadow: '0 0 15px rgba(34, 211, 238, 0.4)', // Electric Cyan glow + transition: springTransition, + }, + tap: { scale: 0.95 }, +}; + +/** + * Page and content fade-in animations. + */ +export const fadeIn: Variants = { + initial: { opacity: 0, y: 10 }, + animate: { + opacity: 1, + y: 0, + transition: { duration: 0.4, ease: 'easeOut' }, + }, + exit: { + opacity: 0, + y: -10, + transition: { duration: 0.2, ease: 'easeIn' }, + }, +}; +``` + +--- + +## 📐 Layout & Spacing Rules + +Adhere strictly to these parameters when building components with `shadcn/ui` and Tailwind. + +### Component Styling + +| Element | Tailwind Class | Description | +| :--------------------- | :---------------------------- | :---------------------------------------------------- | +| **Cards / Containers** | `rounded-xl` | Standard modern corner radius for all main surfaces. | +| **Buttons / Badges** | `rounded-md` | Subtly rounded for interactive actions and tags. | +| **Borders** | `border border-white/10` | Subtle, clean separation without being harsh. | +| **Glassmorphism** | `bg-white/5 backdrop-blur-md` | Reserved for floating nav bars or overlays. | + +### Typography Guidelines + +| Text Type | Font Family | Tailwind Classes | Description | +| :---------------------- | :---------- | :----------------------------------------- | :----------------------------------------------------------- | +| **Body Text** | Inter | `font-body` | Standard body text, buttons, labels, metadata. | +| **Headlines** | Outfit | `font-headline font-extrabold tracking-tight` | Large headings, section titles, hero text. | +| **Metrics & Numbers** | Mono | `font-mono font-bold tracking-tight` | BPM, Kcal, Duration, Sets/Reps. High legibility. | +| **Secondary Text** | Inter | `text-zinc-400 font-medium` | Labels, descriptions, tertiary info. | + +--- diff --git a/docs/CURRENT-STATE.md b/docs/CURRENT-STATE.md index 49884b8f..401a7203 100644 --- a/docs/CURRENT-STATE.md +++ b/docs/CURRENT-STATE.md @@ -1,4 +1,32 @@ -# Estado Atual (2026-07-06) +# Estado Atual (2026-07-08) + +## PR #194 `feat/aluno-ui-10-fixes` — review remediation completa (cubic + coderabbit) + +**Branch:** `feat/aluno-ui-10-fixes` (PR #194, +956/-371, 23 files). 4 commits de remediação: `f07f39f` (P0-P2), `48d6dd7` (sfU+se1), `7397157` (sfi+PLDGo), `641831d` (P2/P3 test coverage + a11y). + +### Remediação final — commit `641831d` + +28+ comentários triaged (4 bots: cubic ×2, coderabbit ×2) → 16 fixed / 4 FP / 8 deferred. Última batch resolveu os 8 deferred: + +- **O8GbK (P3)**: `card-treino` `focus-visible`→`focus-within` em exercise row div (container não-focusable; focus-within dispara no child focado). +- **O9Faj (P2)**: `.env.example` `NEXT_PUBLIC_APP_URL` revertido para `:3000` (match `next dev` default; `:3001` quebrava dev parity + test env). +- **O9Fap + O9Fa4 (P2)**: OAuth return contract split — campos dedicados `url`/`error` substituem heuristic `startsWith('http')`. `auth.ts` + 2 login pages + `auth.test.ts` atualizados. +- **O8Gaq (P2)**: `meus-treinos-client.test` — assert exercise names render (sliced 3, joined), omitidos quando 0 exercícios. +- **O9FaX + PMTVI (P2)**: `dashboard-client.test` — mock `@/lib/actions/treinos` (desbloqueia Prisma DATABASE_URL import-time failure) + WorkoutSession gate. Cobertura: WorkoutSession state toggle, `router.refresh()` pós `registrarHistoricoTreinoAction` success, error path. +- **PMTVN (P2)**: `aluno/login.test` — account-enumeration guard: "User already registered" + "User has already been registered" ambos mascarados p/ credential error genérico, sem leak, sem push. +- **sfi (resolved prior)**: lazy `NEXT_PUBLIC_APP_URL` read dentro de `callbackUrl()` (não module load) p/ test harness injetar env pós-import. + +### Gates + +112 test files / 1159 tests pass. Typecheck clean. Lint clean (prettier reformatou hoisted block). Push `641831d` em `7397157..641831d`. + +### Threads GitHub + +8 threads cubic-dev-ai resolvidas via `resolveReviewThread` (O8Gaq, O8GbK, O9FaX, O9Faj, O9Fap, O9Fa4, PMTVI, PMTVN). 0 unresolved restantes no PR #194. + +--- + +## Iteração 4 (P5) — CI/CD + Docker + SonarQube — PR #191 + #192 merged, tag estabilizada ## Iteração 4 (P5) — CI/CD + Docker + SonarQube — PR #191 + #192 merged, tag estabilizada diff --git a/docs/superpowers/plans/2026-05-14-fix-npm-audit-vulnerabilities.md b/docs/superpowers/plans/2026-05-14-fix-npm-audit-vulnerabilities.md deleted file mode 100644 index b2f431d9..00000000 --- a/docs/superpowers/plans/2026-05-14-fix-npm-audit-vulnerabilities.md +++ /dev/null @@ -1,341 +0,0 @@ -# Fix npm Audit Vulnerabilities — PR #100 Quality Gates - -> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. - -**Goal:** Resolver todas as 17 vulnerabilidades reportadas pelo `npm audit --audit-level=high` para destravar o Quality Gates no CI do PR #100. - -**Architecture:** Abordagem em duas fases: (1) `npm audit fix` resolve 15/17 vulnerabilidades corrigíveis automaticamente; (2) `overrides` no `package.json` força versões não-vulneráveis dos 2 pacotes `@opentelemetry/*` restantes, cujas correções não são puxadas pelas dependências transitórias do `genkit@1.32.0 → @genkit-ai/google-cloud`. - -**Tech Stack:** npm 10+, Next.js 15, Sentry 10, Genkit 1.32, OpenTelemetry - ---- - -## Contexto - -### Diagnóstico completo - -O CI do PR #100 falha no step **Quality Gates** com `npm audit --audit-level=high` retornando exit code 1. - -**17 vulnerabilidades totais: 13 HIGH + 4 MODERATE** - -### Grupo A — Corrigíveis por `npm audit fix` (15 vulnerabilidades) - -| Pacote | Severidade | Advisories | Origem | -| ------------------ | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------- | -| `next` (^15.5.15) | **HIGH** ×13 | GHSA-8h8q (DoS), GHSA-ffhc (XSS), GHSA-vfv6 (cache poison), GHSA-gx5p (XSS), GHSA-mg66 (DoS conn), GHSA-h64f (DoS img), GHSA-c4j6 (SSRF), GHSA-492v (middleware bypass), GHSA-wfc6 (cache), GHSA-267c (prefetch bypass), GHSA-36qx (i18n bypass), GHSA-3g8h (redirect cache), GHSA-26hh (prefetch follow-up) | direct dependency | -| `fast-uri` | **HIGH** ×2 | GHSA-q3j6 (path traversal), GHSA-v39h (host confusion) | transitive | -| `fast-xml-builder` | **HIGH** ×2 | GHSA-5wm8 (attribute bypass), GHSA-45c6 (comment bypass) | transitive | -| `hono` | MODERATE ×5 | bodyLimit, JSX injection, CSS injection, JWT validation, Cache middleware | transitive (via genkit) | -| `@protobufjs/utf8` | MODERATE ×1 | GHSA-q6x5 (UTF-8 decoding) | transitive (via genkit → google-cloud) | -| `postcss` | MODERATE ×1 | GHSA-qx2v (XSS via CSS output) | transitive (via next) | -| `uuid` | MODERATE ×1 | GHSA-w5hq (buffer bounds check) | transitive (via genkit → google-auth-library) | - -**Total corrigíveis: 11 HIGH + 4 MODERATE** - -### Grupo B — NÃO corrigíveis por `npm audit fix` (2 vulnerabilidades) - -| Pacote | Severidade | Advisory | Versão atual | Versão fixa | Origem | -| ------------------------------------------- | ----------- | ------------------------------------- | ------------ | ----------- | ---------------------------------------------------------------------------------------- | -| `@opentelemetry/auto-instrumentations-node` | **HIGH** ×1 | GHSA-q7rr (Prometheus exporter crash) | 0.49.2 | ≥0.75.0 | `genkit@1.32.0 → @genkit-ai/core → @genkit-ai/firebase → @genkit-ai/google-cloud@1.34.0` | -| `@opentelemetry/sdk-node` | **HIGH** ×1 | GHSA-q7rr (Prometheus exporter crash) | 0.52.1 | ≥0.218.0 | mesma cadeia acima | - -Ambos vêm do pacote `@genkit-ai/google-cloud@1.34.0` que **ainda** depende de: - -```json -"@opentelemetry/auto-instrumentations-node": "^0.49.1", -"@opentelemetry/sdk-node": "^0.52.0" -``` - -Genkit 1.34.0 (latest) não atualizou essas dependências. A única forma de corrigir é via **npm overrides**. - -### Análise de risco dos overrides - -- **`@opentelemetry/sdk-node`: 0.52.1 → 0.218.0** — Gap de versão muito grande (pré-1.0). Potencial de breaking changes na API do SDK Node do OpenTelemetry. -- **`@opentelemetry/auto-instrumentations-node`: 0.49.2 → 0.75.0** — Gap significativo. Pode quebrar auto-instrumentação de bibliotecas. -- **Impacto real na aplicação**: Esses pacotes são usados **apenas** pelo `@genkit-ai/google-cloud` para telemetria (Cloud Logging, Cloud Trace, Cloud Monitoring). O uso principal do Genkit no projeto é AI via Gemini (`@genkit-ai/google-genai`), **não** Google Cloud telemetry. O risco de quebra funcional é baixo. -- **Cenário de falha**: Se os overrides quebrarem o `genkit`, apenas funcionalidades de logging/tracing do Google Cloud seriam afetadas. O AI Workout Generator (que usa Gemini) continuaria funcionando. - ---- - -## Plano de Implementação - -### File Map - -| Arquivo | Ação | Responsabilidade | -| ------------------- | ------ | --------------------------------------------------------------------------------- | -| `package.json` | Modify | Adicionar campo `overrides` para OTel; versões de deps serão atualizadas pelo npm | -| `package-lock.json` | Modify | Atualizado automaticamente pelo `npm audit fix` e `npm install` | -| `node_modules/` | Modify | Atualizado automaticamente | - ---- - -### Task 1: Executar `npm audit fix` - -**Files:** - -- Modify: `package.json` (versões de dependências podem ser atualizadas) -- Modify: `package-lock.json` (lockfile atualizado) - -- [ ] **Step 1: Rodar `npm audit fix` (sem --force)** - -```bash -cd /home/emiyakiritsugu/Projetos_Antigravity/PWeb_Project -npm audit fix -``` - -Expected: Corrige next.js, fast-uri, fast-xml-builder, hono, @protobufjs/utf8, postcss, uuid. As versões no `package.json` podem ser atualizadas (ex: `next` pode ir de `^15.5.15` para `^15.5.16` ou similar). O `package-lock.json` será substancialmente alterado. - -- [ ] **Step 2: Verificar quantas vulnerabilidades restam** - -```bash -cd /home/emiyakiritsugu/Projetos_Antigravity/PWeb_Project -npm audit --audit-level=high 2>&1 -``` - -Expected: Ainda falha com exit code 1. Deve reportar apenas: - -``` -@opentelemetry/auto-instrumentations-node * -@opentelemetry/sdk-node * -``` - -Se houver MAIS do que essas duas, algo deu errado e precisa investigar. - -- [ ] **Step 3: Commit do audit fix** - -```bash -cd /home/emiyakiritsugu/Projetos_Antigravity/PWeb_Project -git add package.json package-lock.json -git commit -m "fix(security): resolve 15 of 17 npm audit vulnerabilities via npm audit fix" -``` - ---- - -### Task 2: Adicionar overrides para OpenTelemetry - -**Files:** - -- Modify: `package.json` (adicionar campo `overrides`) - -- [ ] **Step 1: Adicionar campo `overrides` ao `package.json`** - -Adicionar após o campo `"devDependencies"` (ou qualquer posição no nível raiz do JSON): - -```json -"overrides": { - "@opentelemetry/auto-instrumentations-node": "0.75.0", - "@opentelemetry/sdk-node": "0.218.0" -} -``` - -O `package.json` deve ficar com estrutura similar a: - -```json -{ - "name": "nextn", - "version": "1.0.0", - "private": true, - "scripts": { ... }, - "dependencies": { ... }, - "devDependencies": { ... }, - "overrides": { - "@opentelemetry/auto-instrumentations-node": "0.75.0", - "@opentelemetry/sdk-node": "0.218.0" - } -} -``` - -> **Nota sobre npm overrides**: O campo `overrides` força TODAS as ocorrências desses pacotes na árvore de dependências para as versões especificadas, independentemente do que qualquer `package.json` intermediário declare. Isso é uma feature nativa do npm 8.3+ (temos npm 10+). As versões escolhidas (0.75.0 e 0.218.0) são as PRIMEIRAS versões não-vulneráveis de cada pacote, minimizando o gap de versão. - -- [ ] **Step 2: Reinstalar com overrides aplicados** - -```bash -cd /home/emiyakiritsugu/Projetos_Antigravity/PWeb_Project -rm -rf node_modules package-lock.json -npm install --legacy-peer-deps -``` - -Expected: Instalação limpa com os overrides aplicados. Pode mostrar warnings de peer dependency — documentar mas não bloquear. - -- [ ] **Step 3: Verificar que npm audit passa LIMPO** - -```bash -cd /home/emiyakiritsugu/Projetos_Antigravity/PWeb_Project -npm audit --audit-level=high -``` - -Expected: **exit code 0**, output `found 0 vulnerabilities`. - -Se AINDA houver vulnerabilidades HIGH: - -- Verificar se o override foi aplicado: `npm ls @opentelemetry/sdk-node` deve mostrar `0.218.0` -- Se o override não aplicou, verificar sintaxe do JSON (campo `overrides` no nível raiz) -- Se aparecerem NOVAS vulnerabilidades (introduzidas pelas versões forçadas), documentar e avaliar - -- [ ] **Step 4: Commit dos overrides** - -```bash -cd /home/emiyakiritsugu/Projetos_Antigravity/PWeb_Project -git add package.json package-lock.json -git commit -m "fix(security): override OpenTelemetry packages to fix GHSA-q7rr via npm overrides" -``` - ---- - -### Task 3: Rodar Quality Gates localmente - -**Files:** Nenhum (verificação) - -- [ ] **Step 1: Rodar typecheck** - -```bash -cd /home/emiyakiritsugu/Projetos_Antigravity/PWeb_Project -npm run typecheck -``` - -Expected: exit code 0, sem erros de tipo. Se houver erros, VÃO SER erros de tipos do Next.js ou dos pacotes atualizados — provavelmente relacionados ao Next.js 15.6.x se o `npm audit fix` tiver mudado a minor version. - -Se typecheck falhar com erros NOVOS (não pré-existentes): - -- Erros de `next` types: verificar se `next@15.5.x` foi alterado para `15.6.x`. Se sim, considerar fixar em `15.5.x` com `"next": "15.5.x"` e rodar `npm audit fix` novamente. -- Erros de OTel types: improvável, pois são dependências transitórias. - -- [ ] **Step 2: Rodar lint** - -```bash -cd /home/emiyakiritsugu/Projetos_Antigravity/PWeb_Project -npm run lint -``` - -Expected: exit code 0. - -- [ ] **Step 3: Rodar format check** - -```bash -cd /home/emiyakiritsugu/Projetos_Antigravity/PWeb_Project -npm run format:check -``` - -Expected: exit code 0. - ---- - -### Task 4: Rodar testes unitários e verificar cobertura - -**Files:** Nenhum (verificação) - -- [ ] **Step 1: Rodar testes unitários** - -```bash -cd /home/emiyakiritsugu/Projetos_Antigravity/PWeb_Project -npm run test -``` - -Expected: 66/66 passed (ou o número atual de testes). Nenhum teste deve falhar devido às mudanças de versão. - -Se testes falharem: - -- Verificar stack trace para identificar se é relacionado a OTel ou next.js -- Se for OTel: remover overrides, ir para Plano B -- Se for next.js: verificar breaking changes na versão instalada - -- [ ] **Step 2: Rodar coverage** - -```bash -cd /home/emiyakiritsugu/Projetos_Antigravity/PWeb_Project -npm run test:coverage -``` - -Expected: cobertura similar à atual (100% em gamificationService.ts, ~80% global). - ---- - -### Task 5: Push e verificar CI no PR #100 - -**Files:** Nenhum (git push) - -- [ ] **Step 1: Push das alterações** - -```bash -cd /home/emiyakiritsugu/Projetos_Antigravity/PWeb_Project -git push -``` - -- [ ] **Step 2: Monitorar o CI do PR #100** - -Aguardar os checks: - -- ✅ `Quality Gates` deve passar (npm audit limpo, lint, format, typecheck) -- ✅ `Tests & Coverage` deve passar -- ✅ `E2E Tests` deve passar -- ✅ `SonarCloud Code Analysis` deve passar - -- [ ] **Step 3: Verificar o resultado final** - -```bash -gh pr checks 100 --repo EmiyaKiritsugu3/PWeb_Project -``` - -Expected: Todos os checks verdes, PR pronto para merge. - ---- - -### Fallback — Plano B (se overrides quebrarem algo) - -Se os overrides do OpenTelemetry causarem falhas nos testes ou na aplicação: - -- [ ] **Step B1: Reverter os overrides** - -```bash -cd /home/emiyakiritsugu/Projetos_Antigravity/PWeb_Project -git revert HEAD # reverte o commit dos overrides -``` - -- [ ] **Step B2: Alterar o CI workflow** - -Modificar `.github/workflows/ci.yml` linha 31: - -```yaml -# De: -run: npm audit --audit-level=high -# Para: -run: npm audit --audit-level=critical -``` - -Isso faz o Quality Gates ignorar vulnerabilidades HIGH (as 2 do OTel) e só falhar em CRITICAL. As 15 vulnerabilidades corrigíveis já foram resolvidas pelo `npm audit fix`. - -- [ ] **Step B3: Commit e push do fallback** - -```bash -cd /home/emiyakiritsugu/Projetos_Antigravity/PWeb_Project -git add .github/workflows/ci.yml -git commit -m "ci: lower audit threshold to critical — 2 unfixable OTel HIGH advisories accepted" -git push -``` - -- [ ] **Step B4: Documentar o risco aceito** - -Adicionar em `docs/security/BASELINE.json`: - -```json -{ - "accepted_advisories": [ - { - "id": "GHSA-q7rr-3cgh-j5r3", - "packages": ["@opentelemetry/auto-instrumentations-node", "@opentelemetry/sdk-node"], - "reason": "Transitive dependencies of genkit→@genkit-ai/google-cloud. Fix versions (>=0.75.0, >=0.218.0) not compatible with genkit's pinned OpenTelemetry API. Vulnerability requires Prometheus exporter endpoint exposure, which this application does not provide.", - "accepted_date": "2026-05-14", - "review_date": "2026-08-14" - } - ] -} -``` - ---- - -## Self-Review Checklist - -- [x] **Spec coverage**: Cada advisory do `npm audit` tem uma ação correspondente (Task 1 para os 15 corrigíveis, Task 2 para os 2 OTel) -- [x] **Placeholder scan**: Sem TBDs, TODOs, ou "implement later". Cada step tem comandos exatos e outputs esperados. -- [x] **Type consistency**: Os nomes de pacotes e versões são consistentes entre tasks. -- [x] **Fallback**: Plano B documentado caso os overrides quebrem algo. diff --git a/docs/superpowers/plans/2026-07-07-aluno-ui-10-fixes.md b/docs/superpowers/plans/2026-07-07-aluno-ui-10-fixes.md new file mode 100644 index 00000000..1f9a9752 --- /dev/null +++ b/docs/superpowers/plans/2026-07-07-aluno-ui-10-fixes.md @@ -0,0 +1,47 @@ +# Plan: 10 UI Fixes — Aluno Dashboard + +**Date:** 2026-07-07 +**Branch:** `feat/aluno-ui-10-fixes` +**Source:** Audit of PRD-UI-Aluno-Aprimoramento.md (25 tasks → 10 valid) +**Constraint:** ponytail — diff mínimo, zero deps novas + +--- + +## Phase 0 — Quick 1-liners + +| ID | File | Change | +|---|---|---| +| Q01 | `aluno-header.tsx:75` | aria-label typo fix | +| Q02 | `dashboard-client.tsx:241` | `justify-around` → `justify-center` | +| Q03 | `page.tsx:28` | brand name consistency | + +## Phase 1a — A11y + +| ID | File | Change | +|---|---|---| +| A01 | `card.tsx:30` | CardTitle `
+ Email enviado! Verifique sua caixa de entrada. +
+ )} + {magicLinkError &&{magicLinkError}
} +{treino.exercicios.length} exercícios + {treino.exercicios.length > 0 && ( + + {treino.exercicios + .slice(0, 3) + .map((e) => e.nomeExercicio) + .join(', ')} + + )}
O ambiente definitivo para alcançar seu potencial máximo. Gestão inteligente, treinos
diff --git a/src/components/dashboard/aluno/card-treino.tsx b/src/components/dashboard/aluno/card-treino.tsx
index 5b51d52c..2e863882 100644
--- a/src/components/dashboard/aluno/card-treino.tsx
+++ b/src/components/dashboard/aluno/card-treino.tsx
@@ -9,7 +9,7 @@ import {
} from '@/components/ui/card';
import { Checkbox } from '@/components/ui/checkbox';
import { Button } from '@/components/ui/button';
-import { CalendarOff, Sparkles, BrainCircuit, Info } from 'lucide-react';
+import { CalendarOff, Sparkles, BrainCircuit, Info, Play } from 'lucide-react';
import { CircularProgress } from '@/components/ui/circular-progress';
import { cn } from '@/lib/utils';
import type { Treino, Exercicio } from '@/lib/definitions';
@@ -20,6 +20,7 @@ interface CardTreinoProps {
onFinishTraining: (completedExercises: string[]) => void;
isFeedbackLoading: boolean;
onViewExercicio: (exercicio: Exercicio) => void;
+ onStartWorkout?: () => void;
}
export function CardTreino({
@@ -27,6 +28,7 @@ export function CardTreino({
onFinishTraining,
isFeedbackLoading,
onViewExercicio,
+ onStartWorkout,
}: Readonly