Skip to content

UI: formularios en desktop, responsividad, colores por ambiente y fixes de navegación - #12

Merged
twinik merged 5 commits into
mainfrom
feature/desktop-forms-responsive-ui
Jul 24, 2026
Merged

UI: formularios en desktop, responsividad, colores por ambiente y fixes de navegación#12
twinik merged 5 commits into
mainfrom
feature/desktop-forms-responsive-ui

Conversation

@twinik

@twinik twinik commented Jul 24, 2026

Copy link
Copy Markdown
Member

Resumen

Pase de UI/UX sobre el dashboard: formularios adaptados a desktop (dejaron de estar todos en columna única), responsividad verificada/corregida en varias vistas, colores consistentes por ambiente (dev/staging/prod), mejor contraste en inputs y switches, y algunos bugs funcionales encontrados al probar en caliente.

Cambios principales

Bug crítico

  • api-keys: loop infinito de render que congelaba toda la navegación del sidebar (causado por un array inestable en las dependencias de un useEffect).

Formularios en desktop

  • "Nueva Aplicación": ensanchado, ambientes en 3 columnas en vez de apilados, y las cards de ambiente ahora son 100% clickeables (antes solo el texto).
  • "Nuevo/Editar Recurso": reorganizado en cards balanceadas (Identidad arriba, Ciclo de Vida + Concurrencia en una sola card con columnas alineadas fila por fila), en vez de dos cards de alturas muy distintas.
  • Config de aplicación: "Información General" y "Ambientes" lado a lado.
  • Diálogo "Invitar Colaborador": campos en 2 columnas.
  • Ancho por defecto de los diálogos aumentado (sm:max-w-lgsm:max-w-2xl).

Responsividad

  • Header de la página "Colaboradores" y las listas de colaboradores/invitaciones ahora colapsan bien en mobile.
  • Padding del layout escalado por breakpoint, y el sidebar mobile se cierra solo al navegar.
  • Grids de stats estandarizados entre páginas.

Colores por ambiente

  • Nuevo helper getEnvColors() (lib/utils.ts) para que dev/staging/prod usen siempre el mismo color (azul/amarillo/verde) en selector de ambiente, banner de descripción, y cards de recursos/locks/API keys.
  • El indicador de ambiente en el sidebar estaba hardcodeado a "dev" para todas las apps — ahora refleja los ambientes reales de cada una.

Contraste de inputs

  • Input/Textarea/Switch usaban un color de fondo casi idéntico al de las cards. Se subió el token --input y se ajustaron las opacidades.

Otros bugs

  • "Crear Ambiente" fallaba (400) por faltar applicationId en el body.
  • Botones de "volver" en la config de la app apuntaban al listado en vez de al detalle de la app.
  • Alineación de íconos y textos en las listas de recursos/locks.

Nota

pnpm-workspace.yaml se corrigió (faltaba el campo packages), sin el cual pnpm dev/pnpm run fallaban con "packages field missing or empty" — no relacionado a la UI, pero bloqueaba correr el proyecto localmente.

Test plan

  • Probar creación de aplicación, ambiente, recurso y colaborador end-to-end
  • Verificar el fix de api-keys (cuenta con 0 apps, navegar desde el sidebar)
  • Revisar los formularios en desktop (≥1280px) y mobile (375px)
  • Confirmar que los colores dev/staging/prod son consistentes en toda la vista de detalle de app

twinik added 5 commits July 23, 2026 19:25
…onsiveness and input styling

- Fix infinite render loop in api-keys page caused by an unstable
  array reference feeding a useEffect dependency (froze the app and
  blocked sidebar navigation for accounts with zero applications).
- Widen DialogContent default and adapt the "Nueva Aplicacion",
  application settings, and invite-collaborator forms to use the
  grid-cols-1 md:grid-cols-2/3 pattern already used in the resource
  and lock forms, instead of stacking every field on desktop.
- Fix responsive gaps in the team page (header, collaborator and
  invitation rows), dashboard layout padding and mobile sidebar
  auto-close on navigation, application card height, and stats grid
  breakpoints.
- Align Input/Textarea styling with Select/Button by using the
  existing --input token and a consistent hover/transition recipe.
…r-coding

- Fix "Crear Ambiente" 400 error: backend requires applicationId in the
  POST body in addition to the path param; add it to the request.
- Fix back button and Cancelar on app settings pointing to the
  applications list instead of back to the app detail page.
- Narrow the main dashboard content area (max-w-7xl) so pages don't
  stretch edge-to-edge on wide screens.
- Add a shared getEnvColors() helper (lib/utils.ts) so dev/staging/prod
  use one consistent color everywhere, and apply it to the app detail
  page's environment selector, description banner, and resource/lock/
  API key list items (plus fix their icon vertical alignment).
- Fix the sidebar's per-application environment indicator, which was
  hardcoded to always show "dev" regardless of the app's real
  environments; it now reads the real environments from the API and
  shows a color-coded dot per environment.
- Remove the "Documentación" sidebar entry (duplicated with the top
  navbar link, which now has an icon) and the "Configuración" entry
  from the top user dropdown (kept only in the sidebar's Cuenta
  section) to reduce duplication.
- Merge the "Ciclo de Vida" and "Concurrencia" cards into one card
  with two aligned columns (TTL/Estrategia and Webhook/Idempotencia
  share the same grid row so they line up), and move "Guardar
  Metadatos" to its own full-width row below both columns.
- Split "Identidad del Recurso" (name/mode/description) into its own
  top card, since it's naturally taller and was unbalancing a
  side-by-side split with the other fields.
- Give the Switch component a visible border in both states — the
  unchecked track color was nearly identical to the surrounding card
  background, making the toggle boundary hard to see.
The --input token was identical to --secondary/--muted/--accent
(oklch 0.18), only 0.04 away from --card (0.14) — too close to read
clearly as a filled control. Bump it to 0.22 and raise the Input/
Textarea fill opacity (60% default, solid on hover) so fields read as
distinct surfaces. Also drop the Switch's dark-mode opacity reduction
on its unchecked track, which was fighting against contrast instead
of helping.
Copilot AI review requested due to automatic review settings July 24, 2026 22:15
@vercel

vercel Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
caerus-fe Ignored Ignored Jul 24, 2026 10:15pm

@twinik
twinik merged commit f2096fa into main Jul 24, 2026
3 checks passed
@twinik
twinik deleted the feature/desktop-forms-responsive-ui branch July 24, 2026 22:16

Copilot AI 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.

Pull request overview

Actualiza la UI del dashboard para mejorar la experiencia en desktop/mobile, estandariza el color-coding por ambiente (dev/staging/prod) en vistas clave, y corrige bugs de navegación y lógica (incluyendo el loop de render en API Keys).

Changes:

  • Mejora de layout/responsividad (formularios, listas y layout general; cierre automático del sidebar mobile al navegar).
  • Unificación de colores por ambiente mediante getEnvColors() y aplicación en sidebar y detalle de aplicación (selector/banner/cards).
  • Fixes funcionales: body de “Crear Ambiente” incluye applicationId, navegación “volver” corregida, y estabilización de dependencias en api-keys para evitar render loops.

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pnpm-workspace.yaml Corrige workspace para que pnpm dev/run funcione (agrega packages).
lib/utils.ts Agrega helper getEnvColors() para colores consistentes por ambiente.
components/ui/textarea.tsx Ajusta estilos para mayor contraste/feedback hover/focus.
components/ui/switch.tsx Ajusta estilos del switch (bordes/estados) para mejor contraste.
components/ui/input.tsx Ajusta estilos del input para mayor contraste/feedback hover/focus.
components/ui/dialog.tsx Aumenta ancho máximo de diálogos (sm:max-w-2xl).
components/dashboard/sidebar.tsx Sidebar refleja ambientes reales por app y actualiza UI de indicador por ambiente.
components/dashboard/resource-form.tsx Reorganiza formulario de recurso en cards/columnas para desktop.
components/dashboard/layout.tsx Padding responsivo y cierre automático del sidebar mobile al cambiar de ruta.
components/dashboard/header.tsx Ajusta padding responsivo y mejora link de documentación (icono + texto).
app/globals.css Ajusta token --input para mejorar contraste.
app/dashboard/usage/page.tsx Mejora truncado/alineación en event log (responsivo).
app/dashboard/applications/page.tsx Ajusta cards para altura mínima (evita rigidez de layout).
app/dashboard/applications/new/page.tsx Layout desktop para selector de ambientes y hace cards 100% clickeables.
app/dashboard/applications/[id]/team/page.tsx Header/listas responsivas + diálogo de invitación en 2 columnas.
app/dashboard/applications/[id]/settings/page.tsx Fix de applicationId en “Crear Ambiente” + navegación de vuelta al detalle + layout 2 columnas.
app/dashboard/applications/[id]/page.tsx Aplica getEnvColors() en selector/banner y en cards de recursos/locks/api keys.
app/dashboard/api-keys/page.tsx Evita loop de render estabilizando environments con useMemo.
.claude/launch.json Agrega configuración de launch para entorno dev con pnpm dev.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/utils.ts
Comment on lines +17 to +19
// Single source of truth for environment color-coding, shared across the
// app-creation form, environment lists, and the app detail page so "dev"
// always reads blue, "staging" yellow, and "prod" green everywhere.
Comment on lines +269 to 279
{!isCollapsed && app.environments.length > 0 && (
<span className="flex shrink-0 items-center gap-1">
{app.environments.map((env: string) => (
<span
key={env}
title={env}
className={cn("h-1.5 w-1.5 rounded-full", getEnvColors(env).dot)}
/>
))}
</span>
)}
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.

2 participants