Skip to content

Frontend cleanup - #25

Open
ManuMar28 wants to merge 17 commits into
mainfrom
frontend-cleanup
Open

ManuMar28 wants to merge 17 commits into
mainfrom
frontend-cleanup

Conversation

@ManuMar28

Copy link
Copy Markdown
Contributor

🛠️ Detalle de Cambios por Severidad

🔴 Severidad 1 (Alta) - Funcionalidad Rota & Discrepancias Críticas

  • 1.1 (app/dashboard/settings/page.tsx): Eliminación de botones sin backend implementado ("Cambiar Avatar", "Activar 2FA", "Ver Sesiones") y avatar genérico "CA".
  • 1.2 (components/landing/pricing-preview-section.tsx): Corrección de copy contradictorio en el plan Developer (eliminación de promesa de "no requiere tarjeta").
  • 1.3 (app/dashboard/api-keys/page.tsx): Actualización de snippets y copia rápida al paquete real @caerus-dev/sdk y clase CaerusClient.
  • 1.4 (app/docs/errors/page.tsx): Inclusión de anclas y secciones documentadas #idempotency-error y #not-found-error.

🟡 Severidad 2 (Media) - Experiencia de Usuario, Integración & Consistencia

  • 2.1 (app/dashboard/usage/page.tsx): Refactor integral de la pantalla de Consumo conectada a datos reales de facturación (useUser) y aplicaciones (useApps), descarga funcional de reporte CSV y estados vacíos consistentes.
  • 2.2 (lock-form.tsx, resource-form.tsx, locks-tab.tsx): Preservación de query parameters (?env=... y ?tab=...) al guardar, cancelar o eliminar; inclusión de <Suspense> en páginas de edición.
  • 2.3 (lock-form.tsx, resource-form.tsx): Reemplazo de alertas nativas del navegador window.confirm() por componentes Radix AlertDialog accesibles y tematizados.
  • 2.4 (applications/[id]/page.tsx, webhook-deliveries-view.tsx): Unificación de la solapa "Notificaciones" a "Webhooks".
  • 2.5 (applications/[id]/settings/page.tsx): Eliminación de console.log residuales de depuración.
  • 2.6 (components/landing/footer.tsx): Actualización del enlace de GitHub a la organización oficial https://github.com/caerus-dev.
  • 2.7 (app/docs/page.tsx): Corrección de ancla de documentación arquitectónica de id="aviones" a id="control-plane-vs-data-plane".

🟢 Severidad 3 (Baja) - Ortografía, Acentuación y Unificación de Términos

  • 3.1: Corrección ortográfica y acentuación en español (período, críticas, adquisición).
  • 3.2: Corrección gramatical de queísmos («¿Estás seguro de que deseas...»).
  • 3.3: Homologación de roles de usuario en toda la UI a español estándar (VIEWERLector, ADMINAdministrador).

Implements a 3-column documentation architecture inspired by SlothUI and React.dev:
- Added DocsLayout with sticky DocsHeader, responsive DocsSidebar, and dynamic TOC (DocsToc) with scrollspy.
- Created DocsSearchDialog supporting ⌘K / Ctrl+K instant modal navigation.
- Added CodeBlock with copy-to-clipboard, language badges, and SignatureBlock.
- Authored comprehensive guides for Overview & Hybrid Architecture, @caerus-dev/sdk, SRE concepts, DLS locks, and Error catalog.
- Added dedicated showcase pages for SRE (Caerus Cine) and DLS (Lock & Deadlock Simulator) with links to their respective repositories.
- Fully verified with zero TypeScript errors and successful Next.js static build.
@vercel

vercel Bot commented Sep 19, 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
caerus-fe Ignored Ignored Sep 19, 2026 2:36am UTC

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.

Copilot review overview

🟡 Changes recommended

Usage data is misleading, CSV export is unsafe, mobile navigation remains open, and several SDK error references are invalid.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 High severity · 5 Medium severity · 3 Low severity

Open (9)
What changed in this PR

Broad frontend cleanup improving documentation, dashboard navigation, usage reporting, and Spanish UI consistency.

Changes:

  • Introduces a redesigned documentation system with search, navigation, and new SDK/SRE/DLS guides.
  • Connects usage views to account/application data and improves form return navigation.
  • Standardizes terminology, spelling, links, dialogs, and SDK examples.
File Description
.gitignore Updates ignored workspace files.
app/​dashboard/​api-keys/​page.tsx Corrects SDK snippets and confirmation text.
app/​dashboard/​applications/​[id]/​locks/​[lockId]/​edit/​page.tsx Adds a Suspense boundary.
app/​dashboard/​applications/​[id]/​page.tsx Standardizes webhooks and confirmation text.
app/​dashboard/​applications/​[id]/​resources/​[resourceId]/​edit/​page.tsx Adds a Suspense boundary.
app/​dashboard/​applications/​[id]/​settings/​page.tsx Removes debug logging and fixes copy.
app/​dashboard/​applications/​[id]/​team/​page.tsx Standardizes role labels and grammar.
app/​dashboard/​applications/​page.tsx Updates role and deletion copy.
app/​dashboard/​page.tsx Updates role and billing labels.
app/​dashboard/​settings/​page.tsx Removes unavailable account actions.
app/​dashboard/​usage/​page.tsx Reworks billing usage, exports, and empty states.
app/​docs/​dls/​demo/​page.tsx Adds DLS simulator documentation.
app/​docs/​dls/​page.tsx Adds DLS concepts and SDK examples.
app/​docs/​errors/​page.tsx Adds an SDK error reference.
app/​docs/​layout.tsx Adds the documentation shell and metadata.
app/​docs/​page.tsx Replaces the documentation overview.
app/​docs/​sdk/​page.tsx Adds SDK setup documentation.
app/​docs/​sre/​demo/​page.tsx Adds SRE demo documentation.
app/​docs/​sre/​page.tsx Adds SRE concepts and lifecycle documentation.
app/​settings/​billing/​page.tsx Corrects Spanish accents.
components/​dashboard/​applications/​application-card.tsx Standardizes the viewer role label.
components/​dashboard/​applications/​tabs/​locks-tab.tsx Preserves environment navigation and fixes copy.
components/​dashboard/​applications/​tabs/​manual-control-tab.tsx Localizes the viewer role.
components/​dashboard/​applications/​tabs/​metrics-tab.tsx Corrects billing-period copy.
components/​dashboard/​applications/​tabs/​webhook-deliveries-view.tsx Renames notifications to webhooks.
components/​dashboard/​lock-form.tsx Adds accessible deletion and return navigation.
components/​dashboard/​resource-form.tsx Adds accessible deletion and return navigation.
components/​docs/​code-block.tsx Adds reusable code and signature blocks.
components/​docs/​docs-config.ts Defines documentation navigation metadata.
components/​docs/​docs-header.tsx Adds the responsive documentation header.
components/​docs/​docs-page-layout.tsx Adds breadcrumbs and page structure.
components/​docs/​docs-search-dialog.tsx Adds global documentation search.
components/​docs/​docs-shell.tsx Composes the documentation experience.
components/​docs/​docs-sidebar.tsx Adds filterable documentation navigation.
components/​docs/​docs-toc.tsx Adds an intersection-aware table of contents.
components/​landing/​footer.tsx Points to the official GitHub organization.
components/​landing/​pricing-preview-section.tsx Revises Developer-plan copy.
components/​landing/​use-cases-section.tsx Corrects Spanish spelling.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +87 to +90
const csvContent =
"data:text/csv;charset=utf-8," +
rows.map((e) => e.map((cell) => `"${cell}"`).join(",")).join("\n")
const encodedUri = encodeURI(csvContent)
Comment on lines +42 to +47
const { user, isLoading: isUserLoading } = useUser()
const { applications, isAppsLoading } = useApps()

const totalCalls = 0
const planLimit = 125000
const usagePercentage = 0
const isNearLimit = false
const consumedUnits = user?.billingUsage?.consumedUnits ?? 0
const includedUnits =
user?.billingUsage?.includedUnits ?? (user?.billingPlan?.includedBillingUnits ?? 50000)
Comment on lines 64 to 67
data.push({
date: d.toLocaleDateString('es-ES', { month: 'short', day: 'numeric' }),
date: d.toLocaleDateString("es-ES", { month: "short", day: "numeric" }),
calls: 0,
locks: 0
})
Comment on lines +356 to +362
<div className="text-right shrink-0 text-xs text-muted-foreground font-mono">
0 requests
</div>
</div>
))}
<p className="text-xs text-muted-foreground pt-2 text-center">
El desglose por aplicación se calcula a partir de los registros de telemetría de tus API keys.
Comment on lines +38 to +43
<DocsSidebar
onSearchClick={() => {
setSheetOpen(false)
onSearchClick()
}}
/>
Comment on lines +31 to +32
<strong className="text-foreground font-semibold">plan gratuito Developer ($0/mes)</strong> con
50.000 requests mensuales incluidas para prototipar y validar tu producto con costo inicial cero. A medida que tu
Comment thread app/docs/errors/page.tsx
Comment on lines +48 to +50
<TableCell className="font-mono font-semibold text-red-500">ConflictError</TableCell>
<TableCell className="font-mono">ABORTED / 409</TableCell>
<TableCell>El recurso ya está retenido por otro usuario o sin stock disponible.</TableCell>
Comment thread app/docs/errors/page.tsx
Comment on lines +117 to +125
code={`import { IdempotencyError } from '@caerus-dev/sdk';

try {
// Envía siempre una clave idempotente única asociada a la operación del usuario
const holder = await caerus.unitary('butaca_A1').take({
idempotencyKey: \`req_\${orderId}\`,
});
} catch (error) {
if (error instanceof IdempotencyError) {
Comment thread app/docs/errors/page.tsx
Comment on lines +143 to +151
<CodeBlock
language="typescript"
title="manejo-not-found.ts"
code={`import { NotFoundError } from '@caerus-dev/sdk';

try {
await caerus.confirm(holderId);
} catch (error) {
if (error instanceof NotFoundError) {
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