Skip to content

feat: Implement project dashboard and snippet management views - #3

Merged
MathCunha16 merged 5 commits into
mainfrom
feature/frontend-first-steps
Jul 11, 2026
Merged

feat: Implement project dashboard and snippet management views#3
MathCunha16 merged 5 commits into
mainfrom
feature/frontend-first-steps

Conversation

@MathCunha16

@MathCunha16 MathCunha16 commented Jul 11, 2026

Copy link
Copy Markdown
Owner

This pull request introduces the initial setup for the frontend and backend integration, including configuration for CORS, project dashboard UI, API client, and development tooling. The main changes are the addition of CORS support in the backend, a comprehensive React-based frontend with project management features, and configuration for linting and development dependencies.

Backend Integration

  • Added a new WebConfig class to configure CORS in the backend, allowing frontend requests from http://localhost:5173 to the /api/** endpoints and supporting common HTTP methods.

Frontend Project Bootstrapping

  • Added a new package.json with essential dependencies for React, routing, API calls, styling, and development tools, establishing the foundation for the frontend application.
  • Created a .gitignore to exclude build artifacts, logs, and IDE/editor files from version control.
  • Added a starter index.html and a custom SVG logo component (LogoDevaulty.tsx). [1] [2]

Frontend Features: Project Dashboard and API Client

  • Implemented a robust DashboardView component for managing projects, including creating, editing, archiving, unarchiving, and deleting projects, with UI feedback and error handling.
  • Added a reusable API client (apiClient) using Axios, with custom error handling via the ApiError class to standardize error responses throughout the app.

Development Tooling

  • Introduced ESLint configuration (eslint.config.js) with recommended rules for JavaScript, TypeScript, React hooks, and Vite integration, promoting code quality and consistency.
  • Added a detailed README.md with guidance on expanding ESLint rules and using React/Vite tooling.

Summary by CodeRabbit

  • Novos Recursos

    • Configuração de CORS para consumo do backend pelo frontend.
    • Layout completo com roteamento, navegação lateral, dashboard e páginas de detalhes (projetos e snippets).
    • Fluxos completos de projetos e snippets: criação, edição, arquivamento/restauração, exclusão e cópia de conteúdo.
    • Tema claro/escuro com persistência e novos componentes visuais.
  • Melhorias

    • Cliente HTTP com baseURL configurável e erros padronizados.
    • Atualização de dados após mutações com invalidação/refresh e notificações de sucesso/erro.
  • Documentação

    • README e configuração de lint/ambiente do frontend adicionados/atualizados.

@MathCunha16 MathCunha16 self-assigned this Jul 11, 2026
@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 78c3aa86-6026-4192-9ebf-bb1aaced6af0

📥 Commits

Reviewing files that changed from the base of the PR and between 706209b and 5c6a55f.

📒 Files selected for processing (4)
  • frontend/src/components/DashboardView.tsx
  • frontend/src/components/ProjectDetailView.tsx
  • frontend/src/components/RootLayout.tsx
  • frontend/src/utils/icons.ts

📝 Walkthrough

Walkthrough

A alteração adiciona o frontend React do Devaulty, com roteamento, tema, dashboard de projetos, gerenciamento de snippets, cliente Axios, hooks React Query, estilos e configurações de build. O backend passa a permitir CORS para a aplicação local em /api/**.

Changes

Aplicação web Devaulty

Layer / File(s) Summary
Contratos e integração de API
backend/src/.../WebConfig.java, frontend/src/api/*, frontend/src/types/*, frontend/src/features/*/api/*, frontend/src/features/*/hooks/*
Define contratos de projetos, snippets, paginação e erros; configura CORS, o cliente Axios, APIs REST e hooks React Query com atualização de cache.
Bootstrap, roteamento e shell frontend
frontend/package.json, frontend/src/main.tsx, frontend/src/routes/*, frontend/src/components/RootLayout.tsx, frontend/src/components/ThemeProvider.tsx, frontend/src/index.css, frontend/vite.config.ts, frontend/tsconfig*.json
Configura o projeto React/Vite, inicializa providers, registra rotas, implementa tema, sidebar, layout principal, ícones e estilos globais.
Dashboard e formulário de projetos
frontend/src/components/DashboardView.tsx, frontend/src/features/projects/components/*, frontend/src/routes/index*
Adiciona listagem de projetos ativos e arquivados, ações de arquivar/restaurar/excluir e modais de criação e edição.
Detalhes e edição de snippets
frontend/src/components/ProjectDetailView.tsx, frontend/src/routes/projects.$projectId*
Adiciona a tela de projeto com busca, filtros, seleção, criação, edição, exclusão, visualização Monaco e cópia de conteúdo.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Route as ProjectDetailRouteComponent
  participant View as ProjectDetailView
  participant Hooks as useSnippetsQuery
  participant API as snippetsApi
  Route->>View: Renderiza a rota do projeto
  View->>Hooks: Busca snippets
  Hooks->>API: Solicita dados
  API-->>View: Retorna snippets
  View->>API: Salva snippet
  API-->>View: Retorna snippet atualizado
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed O título resume bem a adição do dashboard de projetos e das telas de gerenciamento de snippets.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands.

@MathCunha16
MathCunha16 marked this pull request as ready for review July 11, 2026 04:06

@coderabbitai coderabbitai 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.

Actionable comments posted: 14

🧹 Nitpick comments (9)
frontend/src/components/ProjectDetailView.tsx (2)

555-565: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Import declarado no meio do módulo.

import { useQueryClient } from "@tanstack/react-query"; na linha 562 funciona por hoisting de módulos ES, mas colocar um import após declarações de função dificulta a leitura e pode ser pego por regras de lint como import/first. Recomenda-se mover para o topo do arquivo junto aos demais imports.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@frontend/src/components/ProjectDetailView.tsx` around lines 555 - 565, Move
the useQueryClient import to the top-level import section of
ProjectDetailView.tsx, alongside the other imports, and remove it from between
the useParamsHelper and useQueryClientHelper declarations; keep
useQueryClientHelper unchanged otherwise.

342-358: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Use useUpdateSnippetMutation no fluxo de edição
O update já tem um hook em ~features/snippets/hooks/useSnippets que invalida snippetsKeys.all(projectId) e atualiza o detalhe. Usá-lo aqui elimina o import() dinâmico e o snippet-saved global, deixando a sincronização de cache no mesmo lugar das outras mutations.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@frontend/src/components/ProjectDetailView.tsx` around lines 342 - 358,
Replace the direct snippetsApi.update call in the editing branch of
ProjectDetailView with useUpdateSnippetMutation from
~features/snippets/hooks/useSnippets, passing projectId and selectedSnippetId as
required. Await its mutateAsync result, remove the dynamic import and global
snippet-saved event dispatch, and preserve the existing success/error toast and
form-state updates.
frontend/src/components/DashboardView.tsx (1)

15-19: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Função getIconComponent duplicada em outro arquivo.

A mesma implementação (cast idêntico via unknown as Record<...>) aparece em frontend/src/components/ProjectDetailView.tsx (linhas 126-130). Vale extrair para um utilitário compartilhado (ex.: frontend/src/utils/icons.ts) para evitar divergência futura.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@frontend/src/components/DashboardView.tsx` around lines 15 - 19, Extraia a
implementação duplicada de getIconComponent para um utilitário compartilhado,
como icons.ts, preservando o fallback para Icons.Folder e o mesmo cast de tipos;
atualize DashboardView e ProjectDetailView para importarem e usarem essa função
compartilhada, removendo as definições locais.
frontend/src/routes/projects.$projectId.module.css (1)

347-360: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Remover CSS morto em frontend/src/routes/projects.$projectId.module.css:347-446
.codeViewer, .formTextarea e .formEditor não são usadas em frontend/src/components/ProjectDetailView.tsx nem em outro ponto do frontend; podem sair do módulo.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@frontend/src/routes/projects`.$projectId.module.css around lines 347 - 360,
Remove the unused CSS selectors `.codeViewer`, `.formTextarea`, and
`.formEditor` from the stylesheet, confirming they have no remaining frontend
references before deletion.
frontend/src/features/projects/hooks/useProjects.ts (1)

67-75: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Cache de detalhe do projeto não é limpo após exclusão.

useArchiveProjectMutation/useUnarchiveProjectMutation invalidam projectsKeys.detail(id) além de all, mas useDeleteProjectMutation não. Após excluir um projeto, o cache de detalhe permanece com dados obsoletos de um recurso inexistente, podendo ser servido caso alguma view ainda consulte projectsKeys.detail(id).

🔧 Sugestão de fix
 export const useDeleteProjectMutation = () => {
   const queryClient = useQueryClient();
   return useMutation({
     mutationFn: (id: string) => projectsApi.delete(id),
-    onSuccess: () => {
+    onSuccess: (_, id) => {
       queryClient.invalidateQueries({ queryKey: projectsKeys.all });
+      queryClient.removeQueries({ queryKey: projectsKeys.detail(id) });
     },
   });
 };
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@frontend/src/features/projects/hooks/useProjects.ts` around lines 67 - 75,
Atualize useDeleteProjectMutation para invalidar também projectsKeys.detail(id)
após a exclusão, além de projectsKeys.all; use o id recebido pela mutation no
callback onSuccess e siga o padrão adotado por
useArchiveProjectMutation/useUnarchiveProjectMutation.
backend/src/main/java/com/devaulty/backend/infrastructure/security/WebConfig.java (1)

16-19: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Origem de CORS hardcoded dificulta uso em outros ambientes.

A origem http://localhost:5173 está fixa no código. Isso é aceitável para desenvolvimento local, mas qualquer deploy em staging/produção com outra URL de frontend vai exigir alteração de código e novo build do backend. Considere externalizar via application.yml/@Value (ex.: app.cors.allowed-origins).

♻️ Sugestão de externalização
 `@Configuration`
 public class WebConfig {
+
+    `@Value`("${app.cors.allowed-origins:http://localhost:5173}")
+    private String[] allowedOrigins;

     `@Bean`
     public WebMvcConfigurer corsConfigurer(){
         return new WebMvcConfigurer() {
             `@Override`
             public void addCorsMappings(CorsRegistry registry) {
                 registry.addMapping("/api/**")
-                        .allowedOrigins("http://localhost:5173")
+                        .allowedOrigins(allowedOrigins)
                         .allowedMethods("GET", "POST", "PATCH", "DELETE", "PUT")
                         .allowedHeaders("*");
             }
         };
     }
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@backend/src/main/java/com/devaulty/backend/infrastructure/security/WebConfig.java`
around lines 16 - 19, Externalize the hardcoded CORS origin in WebConfig by
injecting an application property such as app.cors.allowed-origins via `@Value` or
configuration properties, and use that value in the
registry.addMapping("/api/**") configuration. Define a development default in
application.yml while allowing staging and production to override it without
rebuilding the backend.
frontend/src/features/snippets/hooks/useSnippets.ts (1)

47-55: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Cache de detalhe do snippet não é limpo após exclusão.

Mesmo padrão observado em useDeleteProjectMutation (useProjects.ts): o cache de detalhe (snippetsKeys.detail(projectId, snippetId)) não é removido/invalidado após a exclusão, podendo servir dados obsoletos de um snippet já excluído.

🔧 Sugestão de fix
 export const useDeleteSnippetMutation = (projectId: string) => {
   const queryClient = useQueryClient();
   return useMutation({
     mutationFn: (snippetId: string) => snippetsApi.delete(projectId, snippetId),
-    onSuccess: () => {
+    onSuccess: (_, snippetId) => {
       queryClient.invalidateQueries({ queryKey: snippetsKeys.all(projectId) });
+      queryClient.removeQueries({ queryKey: snippetsKeys.detail(projectId, snippetId) });
     },
   });
 };
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@frontend/src/features/snippets/hooks/useSnippets.ts` around lines 47 - 55,
Atualize useDeleteSnippetMutation para capturar o snippetId no onSuccess e
invalidar também snippetsKeys.detail(projectId, snippetId), além de manter a
invalidação de snippetsKeys.all(projectId), garantindo a limpeza do cache de
detalhes após a exclusão.
frontend/src/components/RootLayout.tsx (1)

152-152: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Não fixe o endpoint da API no status bar.

http://localhost:8080/api/v1 ficará incorreto em staging, produção ou qualquer ambiente com outra URL. Reutilize a mesma configuração/base URL do cliente Axios para evitar divergência entre o endpoint real e o texto exibido.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@frontend/src/components/RootLayout.tsx` at line 152, Replace the hardcoded
API URL in the status bar with the configured base URL used by the Axios client,
referencing the existing API configuration or client symbol in RootLayout so the
displayed endpoint matches each environment.
frontend/README.md (1)

1-75: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Atualize o README para refletir o aplicativo real.

O conteúdo ainda é o README genérico do template Vite e não documenta como iniciar o frontend, configurar a API ou usar o roteamento e as integrações adicionadas. Isso dificulta o onboarding e pode induzir a configurações incorretas.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@frontend/README.md` around lines 1 - 75, Substitua o README genérico do
template Vite por uma documentação do aplicativo real: descreva os
pré-requisitos, instalação e comandos para iniciar o frontend, explique a
configuração da API e variáveis de ambiente, e documente o roteamento e as
integrações disponíveis. Remova as seções específicas do template, como React
Compiler e recomendações genéricas de ESLint, e use os scripts e símbolos reais
definidos no projeto.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@frontend/src/api/client.ts`:
- Around line 16-21: Substitua o baseURL fixo na configuração de apiClient por
import.meta.env.VITE_API_BASE_URL, permitindo definir o endpoint conforme o
ambiente via variáveis do Vite. Considere fornecer um fallback apropriado para
desenvolvimento local.
- Around line 16-21: Configure a finite timeout in the axios instance created by
apiClient, using the project’s standard request-timeout value or a reasonable
default, so unresponsive backend requests fail promptly instead of remaining
pending indefinitely.

In `@frontend/src/components/DashboardView.tsx`:
- Around line 116-139: Action buttons remain clickable while archive, unarchive,
or delete mutations are pending, allowing duplicate requests. In the
DashboardView action controls and the corresponding unarchive controls, use
archiveMutation.isPending, unarchiveMutation.isPending, and
deleteMutation.isPending to set each button’s disabled state, preventing
repeated clicks during its mutation.
- Around line 168-176: O div archiveHeader é acionável apenas por clique e não
pode ser operado por teclado. Adicione role="button", tabIndex={0} e um handler
onKeyDown que alterne showArchived em Enter ou Espaço, preservando o onClick
existente e evitando a ação padrão do navegador nesses casos.

In `@frontend/src/components/ProjectDetailView.tsx`:
- Around line 378-387: Substitua o elemento input de descrição no componente
ProjectDetailView por um textarea, mantendo value, onChange e placeholder, e
aplique styles.formTextarea em vez de styles.formInput para permitir múltiplas
linhas e reutilizar o estilo existente.
- Around line 17-49: Atualize a constante POPULAR_LANGUAGES para incluir todas
as linguagens tratadas por mapLanguageToMonaco que estão ausentes: MONGODB,
GRAPHQL, TOML, INI, ENV, PROPERTIES, JSX, TSX, FISH, BATCH, VUE, SVELTE, SCSS,
LESS, KUBERNETES_YAML e PLSQL, garantindo que o select controlado ofereça uma
option para cada valor válido de SnippetLanguage.
- Around line 442-456: Os botões do formulário de snippet não refletem o estado
pendente das mutações, permitindo submissões duplicadas. Em ProjectDetailView,
use createSnippetMutation.isPending e o estado pending da mutação de atualização
no botão “Save” para definir disabled durante a operação; desabilite também
“Cancel” enquanto a mutação estiver pendente e preserve o comportamento após sua
conclusão.

In `@frontend/src/components/RootLayout.tsx`:
- Around line 120-125: Corrija a referência de estilo no fallback do sidebar: em
RootLayout, substitua ou remova o uso de styles.logoDot conforme as classes
realmente declaradas em __root.module.css, garantindo que o elemento do logo
utilize uma classe CSS existente e mantenha a estilização visual esperada.
- Line 161: O Toaster em RootLayout está fixado no tema escuro e deve acompanhar
o tema global. Mova-o para um componente filho renderizado dentro do
ThemeProvider, use useTheme() nesse componente e passe theme={theme} ao Toaster,
preservando suas demais propriedades.
- Around line 38-41: Os Links ativos aplicam apenas navItemActive e perdem os
estilos base. Atualize ambos os componentes Link em RootLayout para combinar
navItem com navItemActive em activeProps, preservando layout, padding e
text-decoration.
- Around line 13-16: Restrinja o lookup em getIconComponent a um allowlist
explícito de nomes de ícones permitidos pelo formulário, validando iconName
antes de acessar Icons; retorne Icons.Folder para valores ausentes,
desconhecidos ou não renderizáveis, e use esse componente validado ao montar
ProjectIcon.

In `@frontend/src/features/projects/components/ProjectForm.tsx`:
- Around line 120-134: Os botões de cor renderizados no mapa PRESET_COLORS não
têm informações acessíveis. Adicione a cada botão um aria-label que identifique
a cor e um aria-pressed indicando se color === col, mantendo o estado visual
existente em colorOptionActive.

In `@frontend/src/main.tsx`:
- Line 4: Substitua o import e o uso de createMemoryHistory por
createBrowserHistory em main.tsx, mantendo a configuração do createRouter e do
RouterProvider compatível com a history do navegador para preservar URL,
refresh, voltar/avançar e deep links.

In `@frontend/vite.config.ts`:
- Line 5: Substitua o uso de __dirname no arquivo de configuração do Vite por
uma resolução baseada em import.meta.url, usando fileURLToPath e dirname
conforme necessário; atualize também o import de path e preserve os aliases
definidos em resolve.alias para que funcionem no modo ESM.

---

Nitpick comments:
In
`@backend/src/main/java/com/devaulty/backend/infrastructure/security/WebConfig.java`:
- Around line 16-19: Externalize the hardcoded CORS origin in WebConfig by
injecting an application property such as app.cors.allowed-origins via `@Value` or
configuration properties, and use that value in the
registry.addMapping("/api/**") configuration. Define a development default in
application.yml while allowing staging and production to override it without
rebuilding the backend.

In `@frontend/README.md`:
- Around line 1-75: Substitua o README genérico do template Vite por uma
documentação do aplicativo real: descreva os pré-requisitos, instalação e
comandos para iniciar o frontend, explique a configuração da API e variáveis de
ambiente, e documente o roteamento e as integrações disponíveis. Remova as
seções específicas do template, como React Compiler e recomendações genéricas de
ESLint, e use os scripts e símbolos reais definidos no projeto.

In `@frontend/src/components/DashboardView.tsx`:
- Around line 15-19: Extraia a implementação duplicada de getIconComponent para
um utilitário compartilhado, como icons.ts, preservando o fallback para
Icons.Folder e o mesmo cast de tipos; atualize DashboardView e ProjectDetailView
para importarem e usarem essa função compartilhada, removendo as definições
locais.

In `@frontend/src/components/ProjectDetailView.tsx`:
- Around line 555-565: Move the useQueryClient import to the top-level import
section of ProjectDetailView.tsx, alongside the other imports, and remove it
from between the useParamsHelper and useQueryClientHelper declarations; keep
useQueryClientHelper unchanged otherwise.
- Around line 342-358: Replace the direct snippetsApi.update call in the editing
branch of ProjectDetailView with useUpdateSnippetMutation from
~features/snippets/hooks/useSnippets, passing projectId and selectedSnippetId as
required. Await its mutateAsync result, remove the dynamic import and global
snippet-saved event dispatch, and preserve the existing success/error toast and
form-state updates.

In `@frontend/src/components/RootLayout.tsx`:
- Line 152: Replace the hardcoded API URL in the status bar with the configured
base URL used by the Axios client, referencing the existing API configuration or
client symbol in RootLayout so the displayed endpoint matches each environment.

In `@frontend/src/features/projects/hooks/useProjects.ts`:
- Around line 67-75: Atualize useDeleteProjectMutation para invalidar também
projectsKeys.detail(id) após a exclusão, além de projectsKeys.all; use o id
recebido pela mutation no callback onSuccess e siga o padrão adotado por
useArchiveProjectMutation/useUnarchiveProjectMutation.

In `@frontend/src/features/snippets/hooks/useSnippets.ts`:
- Around line 47-55: Atualize useDeleteSnippetMutation para capturar o snippetId
no onSuccess e invalidar também snippetsKeys.detail(projectId, snippetId), além
de manter a invalidação de snippetsKeys.all(projectId), garantindo a limpeza do
cache de detalhes após a exclusão.

In `@frontend/src/routes/projects`.$projectId.module.css:
- Around line 347-360: Remove the unused CSS selectors `.codeViewer`,
`.formTextarea`, and `.formEditor` from the stylesheet, confirming they have no
remaining frontend references before deletion.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 9da94837-35f0-491c-b004-bc3ce795884f

📥 Commits

Reviewing files that changed from the base of the PR and between 3dcea43 and 17614f6.

⛔ Files ignored due to path filters (4)
  • frontend/package-lock.json is excluded by !**/package-lock.json
  • frontend/public/favicon.svg is excluded by !**/*.svg
  • frontend/public/icons.svg is excluded by !**/*.svg
  • frontend/src/assets/logo-devaulty.svg is excluded by !**/*.svg
📒 Files selected for processing (33)
  • backend/src/main/java/com/devaulty/backend/infrastructure/security/WebConfig.java
  • frontend/.gitignore
  • frontend/README.md
  • frontend/eslint.config.js
  • frontend/index.html
  • frontend/package.json
  • frontend/src/api/client.ts
  • frontend/src/components/DashboardView.tsx
  • frontend/src/components/LogoDevaulty.tsx
  • frontend/src/components/ProjectDetailView.tsx
  • frontend/src/components/RootLayout.tsx
  • frontend/src/components/ThemeProvider.tsx
  • frontend/src/features/projects/api/projectsApi.ts
  • frontend/src/features/projects/components/ProjectForm.module.css
  • frontend/src/features/projects/components/ProjectForm.tsx
  • frontend/src/features/projects/hooks/useProjects.ts
  • frontend/src/features/snippets/api/snippetsApi.ts
  • frontend/src/features/snippets/hooks/useSnippets.ts
  • frontend/src/hooks/useTheme.ts
  • frontend/src/index.css
  • frontend/src/main.tsx
  • frontend/src/routeTree.gen.ts
  • frontend/src/routes/__root.module.css
  • frontend/src/routes/__root.tsx
  • frontend/src/routes/index.module.css
  • frontend/src/routes/index.tsx
  • frontend/src/routes/projects.$projectId.module.css
  • frontend/src/routes/projects.$projectId.tsx
  • frontend/src/types/api.ts
  • frontend/tsconfig.app.json
  • frontend/tsconfig.json
  • frontend/tsconfig.node.json
  • frontend/vite.config.ts

Comment thread frontend/src/api/client.ts
Comment thread frontend/src/components/DashboardView.tsx
Comment thread frontend/src/components/DashboardView.tsx Outdated
Comment thread frontend/src/components/ProjectDetailView.tsx Outdated
Comment thread frontend/src/components/ProjectDetailView.tsx
Comment thread frontend/src/components/RootLayout.tsx Outdated
Comment thread frontend/src/components/RootLayout.tsx Outdated
Comment thread frontend/src/features/projects/components/ProjectForm.tsx
Comment thread frontend/src/main.tsx Outdated
Comment thread frontend/vite.config.ts
…ing to browser history, and refine UI state management and API configuration.
@MathCunha16 MathCunha16 added the enhancement New feature or request label Jul 11, 2026

@coderabbitai coderabbitai 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.

🧹 Nitpick comments (1)
frontend/src/components/ProjectDetailView.tsx (1)

163-181: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Extraia o allowlist de ícones para um util compartilhado

ICON_MAPPING e getIconComponent estão duplicados em frontend/src/components/ProjectDetailView.tsx, frontend/src/components/DashboardView.tsx e frontend/src/components/RootLayout.tsx. Centralizar isso em um módulo comum evita divergência quando novos ícones forem adicionados.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@frontend/src/components/ProjectDetailView.tsx` around lines 163 - 181,
Centralize the duplicated ICON_MAPPING allowlist and getIconComponent helper
into a shared frontend utility module. Update ProjectDetailView, DashboardView,
and RootLayout to import and use the shared symbols, removing their local
definitions while preserving the existing fallback to Icons.Folder and icon type
support.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@frontend/src/components/ProjectDetailView.tsx`:
- Around line 163-181: Centralize the duplicated ICON_MAPPING allowlist and
getIconComponent helper into a shared frontend utility module. Update
ProjectDetailView, DashboardView, and RootLayout to import and use the shared
symbols, removing their local definitions while preserving the existing fallback
to Icons.Folder and icon type support.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: c4dd86b4-e439-4451-945a-3aa203bb4438

📥 Commits

Reviewing files that changed from the base of the PR and between 17614f6 and 706209b.

📒 Files selected for processing (7)
  • frontend/src/api/client.ts
  • frontend/src/components/DashboardView.tsx
  • frontend/src/components/ProjectDetailView.tsx
  • frontend/src/components/RootLayout.tsx
  • frontend/src/features/projects/components/ProjectForm.tsx
  • frontend/src/main.tsx
  • frontend/vite.config.ts
🚧 Files skipped from review as they are similar to previous changes (5)
  • frontend/src/api/client.ts
  • frontend/vite.config.ts
  • frontend/src/features/projects/components/ProjectForm.tsx
  • frontend/src/components/DashboardView.tsx
  • frontend/src/components/RootLayout.tsx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant