Skip to content

feat: UX overhaul + keyboard shortcuts, monthly charts, reports UI#41

Merged
sthevan027 merged 2 commits into
mainfrom
feat/ux-overhaul-and-functional-fixes
Jun 17, 2026
Merged

feat: UX overhaul + keyboard shortcuts, monthly charts, reports UI#41
sthevan027 merged 2 commits into
mainfrom
feat/ux-overhaul-and-functional-fixes

Conversation

@sthevan027

@sthevan027 sthevan027 commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Resumo

Este PR cobre dois tracks de melhorias no CodeFocus:

Track 1 — Correções Funcionais

  • Atalhos de teclado (useKeyboardShortcuts): hook estava 100% implementado mas nunca importado. Agora conectado no App.jsxSpace (toggle timer), R (reset), F/B/L (foco/pausa curta/longa), Ctrl+D/T (navegar), ? (modal de atalhos).
  • Timer sempre montado: substituída a estratégia de unmount/remount por className="hidden" — preserva estado do timer ao navegar entre views e mantém o ref válido para os atalhos.
  • Gráfico mensal: ProgressCharts exibia "Em breve.". Adicionado dbService.cycles.statsMonthly() com query SQLite agrupando os últimos 28 dias por semana; view "Mês" agora funcional.
  • UI de Relatórios (ReportsView.jsx): seletor de data, tipo (semanal/personalizado), botão gerar, lista com score colorido (verde/amarelo/vermelho), delete por item, empty state descritivo. Nova aba "Relatórios" no Dashboard.
  • Modal de atalhos (KeyboardHelpModal.jsx): lista todas as shortcuts; acessível pelo botão ? na Navigation e pela tecla ?.

Track 2 — UI/UX Overhaul

  • lucide-react instalado — todos os emojis usados como ícones substituídos por SVGs lucide em todos os componentes.
  • Design tokens em globals.css: variáveis CSS --surface-*, --border-*, --text-*; classes utilitárias .card, .card-hover, .skeleton (animação shimmer). Tailwind expandido com text-2xs, slide-up, glow-pulse.
  • Navigation: SVG logo com gradiente violet→blue, w-16, active bar lateral, tooltips dark estilo Linear, botão ? no rodapé.
  • Timer: badge de fase como pill colorido, countdown text-6xl font-extralight, botões circulares com ícones lucide, glow ring pulsante quando rodando, quick stats com separador vertical.
  • Dashboard: stats cards com .card+ícones, tabs underline-style, mini barras diárias no progress card, skeleton loading, ícones de fase (Brain/Coffee/Moon) nas atividades.
  • ProgressCharts: barras com gradiente from-indigo-600 to-indigo-400, hover tooltip, ícones Trophy/TrendingUp.
  • Settings: NumberInput composto [−][n][+], toggles redesenhados, seções com .card, backdrop blur forte.
  • TagManager: tags como pills com ícone <X> on-hover, checkbox com <Check>, pomodoro counter com <Flame>, delete on-hover.
  • QuickNotes: character counter (x/500), ícones tipados por item, tag color pills.
  • GitDetectModal: header com <GitCommit>, spinner refinado, layout darkened.

Plano de teste

  • pnpm tauri dev — app abre sem erros de console
  • Atalhos: focar fora de inputs → Space inicia/pausa, R reseta, F/B/L mudam fase, Ctrl+D abre Dashboard, ? abre modal de atalhos
  • Navegar Timer → Dashboard → Tasks → Timer: estado do timer preservado
  • Dashboard → aba Gráficos → clicar "Mês": barras por semana aparecem (ou empty state se sem dados)
  • Dashboard → aba Relatórios → gerar relatório → aparece na lista → deletar
  • Settings → alterar duração do foco → salvar → timer usa novo valor
  • Visual geral: Navigation com ícones SVG, cards com .card, sem emojis

🤖 Generated with Claude Code

sthevan027 and others added 2 commits June 17, 2026 08:36
…rts, reports UI)

Track 1 — Functional fixes:
- Wire useKeyboardShortcuts into App.jsx (Space/R/F/B/L/Ctrl+D/Ctrl+T/?)
- Keep Timer always mounted to preserve state across view changes
- Add dbService.cycles.statsMonthly() and implement monthly bar chart in ProgressCharts
- Create ReportsView component with date-range picker, generate/list/delete reports
- Add Reports tab to Dashboard
- Create KeyboardHelpModal with full shortcut reference

Track 2 — UI/UX overhaul:
- Add lucide-react; replace all emoji icons across every component
- Add CSS design tokens (--surface-*, --border-*, --text-*) and utility classes (.card, .card-hover, .skeleton shimmer)
- Extend Tailwind with text-2xs, slide-up/glow-pulse animations
- Rebuild Navigation: SVG logo, w-16, active underline bar, dark tooltips, keyboard hint button
- Timer: phase badge pill, text-6xl extralight countdown, circular icon buttons, ambient glow ring, separator stats
- Dashboard: stats cards with lucide icons, underline tabs, mini daily bars, skeleton loading, phase icons (Brain/Coffee/Moon)
- ProgressCharts: gradient bars, hover tooltip, Trophy/TrendingUp summary icons
- Settings: NumberInput [−][n][+], refined toggles, card sections, compact layout
- TagManager: pill tags with hover X, checkbox with Check icon, Flame pomodoro counter, on-hover delete
- QuickNotes: character counter, typed icons per item, tag color pills
- GitDetectModal: GitCommit icon header, refined spinner, dark card layout

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace toast.innerHTML with interpolated user-controlled strings with
safe DOM manipulation using createElement + textContent. The previous
pattern allowed arbitrary HTML injection through the title/message params.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sthevan027
sthevan027 merged commit b3a9e46 into main Jun 17, 2026
2 checks passed
@sthevan027
sthevan027 deleted the feat/ux-overhaul-and-functional-fixes branch June 17, 2026 11:42
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.

1 participant