Fase 5: rediseño GUI-UX del portal con React + shadcn/ui - #16
Conversation
- Crea portal/frontend/ con Vite, React, TypeScript, Tailwind CSS y shadcn/ui. - Migra index.html y admin.html a HomePage y AdminPage en React. - Añade componentes reutilizables y tema oscuro NEUBAT. - Implementa navegación SPA con react-router-dom. - Añade tests frontend con Vitest + React Testing Library. - Actualiza server.js para servir la SPA React en / y /admin; /wiki.html sigue como estático. - Actualiza Dockerfile para compilar el frontend en la imagen. - Añade job test-frontend en CI y targets en Makefile. - Elimina index.html/admin.html estáticos antiguos; ignora el build en .gitignore. - Actualiza README.md y docs/ROADMAP.md.
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (45)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 4 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 87f9d55. Configure here.
| } finally { | ||
| setLoading(false); | ||
| } | ||
| } |
There was a problem hiding this comment.
Admin login skips token check
High Severity
login stores the typed secret and then loads data from public GET /api/installations, which never sends Authorization. Any or empty token opens the admin panel. The protected GET /api/admin/installations endpoint is unused, so a missing ADMIN_TOKEN or a wrong secret still looks like a successful sign-in.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 87f9d55. Configure here.
| const res = await fetch(`${API_BASE}${path}`, { | ||
| headers: { 'Content-Type': 'application/json' }, | ||
| ...init, | ||
| }); |
There was a problem hiding this comment.
Admin status updates drop JSON
High Severity
fetchJson sets Content-Type: application/json and then spreads init, so caller headers replace that object. updateStatus only sends Authorization, the JSON body is not parsed by Express, and marking an installation pending, completed, or failed fails even with a valid admin token.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 87f9d55. Configure here.
|
|
||
| - name: Validate Ansible | ||
| run: make test-ansible | ||
|
|
There was a problem hiding this comment.
SPA tests run without a build
High Severity
Generated portal/public/index.html is gitignored, but the portal Jest job and make test never run npm run build. Requests to / and /admin therefore sendFile a missing shell, so CI fails. The same unbuilt public/ is what ISO and Ansible copy onto installed machines.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 87f9d55. Configure here.
| COPY . /app | ||
|
|
||
| # Build React SPA into portal/public | ||
| RUN cd /app/portal/frontend && npm run build |
There was a problem hiding this comment.
Docker copy can clobber frontend modules
Medium Severity
Frontend npm ci runs, then COPY . /app copies the full build context with no .dockerignore. A host portal/frontend/node_modules overwrites the Alpine install, including Vite/Rolldown native binaries, so npm run build can fail on developer machines even though a clean clone succeeds.
Reviewed by Cursor Bugbot for commit 87f9d55. Configure here.


Migra el frontend estático a una SPA React con Vite, TypeScript, Tailwind CSS y shadcn/ui. Incluye HomePage, AdminPage, tests frontend y actualización de Dockerfile/CI.
Note
Medium Risk
Large UI swap and build-time dependency on frontend compilation for Docker/local
portal; backend APIs unchanged but admin/install flows now depend on a correct Vite build intoportal/public.Overview
Replaces the portal’s static HTML UI with a React SPA (Vite, TypeScript, Tailwind, shadcn/ui) under
portal/frontend, with routes for the installer (/) and admin panel (/admin) calling the existing Express APIs.Build and delivery: Vite emits into
portal/public; generatedindex.html, assets, and favicon are gitignored.make portaland local docs now requirenpm run buildfirst; the portal Dockerfile installs frontend deps and runs the build in-image. CI adds atest-frontendjob (Node 20,npm ci, Vitest); Makefile addsbuild-frontend,test-frontend, andinstall-deps-frontend.Docs: README repo tree and quickstart reflect the new layout; ROADMAP marks the React redesign (and Ansible integration) as done. Backend SPA fallback in
server.jsservespublic/index.htmlfor non-API routes (including/admin); integration tests assert SPA behavior.Reviewed by Cursor Bugbot for commit 87f9d55. Configure here.