Skip to content

Fase 5: rediseño GUI-UX del portal con React + shadcn/ui - #16

Merged
Alexendros merged 1 commit into
mainfrom
fase-5-shadcn-ui
Sep 20, 2026
Merged

Alexendros merged 1 commit into
mainfrom
fase-5-shadcn-ui

Conversation

@Alexendros

@Alexendros Alexendros commented Sep 20, 2026 •

Copy link
Copy Markdown
Owner

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 into portal/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; generated index.html, assets, and favicon are gitignored. make portal and local docs now require npm run build first; the portal Dockerfile installs frontend deps and runs the build in-image. CI adds a test-frontend job (Node 20, npm ci, Vitest); Makefile adds build-frontend, test-frontend, and install-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.js serves public/index.html for non-API routes (including /admin); integration tests assert SPA behavior.

Reviewed by Cursor Bugbot for commit 87f9d55. Configure here.

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

coderabbitai Bot commented Sep 20, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 4d50bf32-764e-465c-b318-6cd380416787

📥 Commits

Reviewing files that changed from the base of the PR and between 5ee907f and 87f9d55.

⛔ Files ignored due to path filters (3)
  • portal/frontend/package-lock.json is excluded by !**/package-lock.json
  • portal/frontend/public/favicon.svg is excluded by !**/*.svg
  • portal/frontend/src/assets/vite.svg is excluded by !**/*.svg
📒 Files selected for processing (45)
  • .github/workflows/ci.yml
  • .gitignore
  • Makefile
  • README.md
  • docs/ROADMAP.md
  • portal/Dockerfile
  • portal/frontend/.gitignore
  • portal/frontend/.oxlintrc.json
  • portal/frontend/README.md
  • portal/frontend/components.json
  • portal/frontend/index.html
  • portal/frontend/package.json
  • portal/frontend/src/App.tsx
  • portal/frontend/src/components/Brand.tsx
  • portal/frontend/src/components/Layout.tsx
  • portal/frontend/src/components/ui/badge.tsx
  • portal/frontend/src/components/ui/button.tsx
  • portal/frontend/src/components/ui/card.tsx
  • portal/frontend/src/components/ui/dialog.tsx
  • portal/frontend/src/components/ui/dropdown-menu.tsx
  • portal/frontend/src/components/ui/input.tsx
  • portal/frontend/src/components/ui/label.tsx
  • portal/frontend/src/components/ui/select.tsx
  • portal/frontend/src/components/ui/skeleton.tsx
  • portal/frontend/src/components/ui/sonner.tsx
  • portal/frontend/src/components/ui/table.tsx
  • portal/frontend/src/components/ui/tabs.tsx
  • portal/frontend/src/index.css
  • portal/frontend/src/lib/api.ts
  • portal/frontend/src/lib/utils.ts
  • portal/frontend/src/main.tsx
  • portal/frontend/src/pages/AdminPage.tsx
  • portal/frontend/src/pages/HomePage.test.tsx
  • portal/frontend/src/pages/HomePage.tsx
  • portal/frontend/src/test/setup.ts
  • portal/frontend/src/types.ts
  • portal/frontend/tsconfig.app.json
  • portal/frontend/tsconfig.json
  • portal/frontend/tsconfig.node.json
  • portal/frontend/vite.config.ts
  • portal/frontend/vitest.config.ts
  • portal/public/admin.html
  • portal/public/index.html
  • portal/server.js
  • portal/tests/app.test.js
 ______________________________________________________________________
< Stop swallowing exceptions. They don't become less real in the dark. >
 ----------------------------------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

❤️ Share

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

@Alexendros
Alexendros merged commit d5f7d9f into main Sep 20, 2026
4 of 5 checks passed
@Alexendros
Alexendros deleted the fase-5-shadcn-ui branch September 20, 2026 14:21

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

Cursor Bugbot has reviewed your changes using high effort and found 4 potential issues.

Fix All in Cursor

❌ 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);
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 87f9d55. Configure here.

const res = await fetch(`${API_BASE}${path}`, {
headers: { 'Content-Type': 'application/json' },
...init,
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 87f9d55. Configure here.

Comment thread .github/workflows/ci.yml

- name: Validate Ansible
run: make test-ansible

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 87f9d55. Configure here.

Comment thread portal/Dockerfile
COPY . /app

# Build React SPA into portal/public
RUN cd /app/portal/frontend && npm run build

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 87f9d55. Configure here.

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