diff --git a/AGENTS.md b/AGENTS.md
index 694a98b..9149b33 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -61,7 +61,7 @@ bun --filter @gruperly/web icons # regenera los iconos PWA de apps/web
3. Sin `BILLING_ENFORCEMENT=on` todo es Pro y los guards no tocan la base (por eso los tests viejos con prisma mockeado no necesitan `billingSubscription`).
4. Los webhooks `POST /billing/webhooks/mp/:country` y `POST /billing/webhooks/stripe` son públicos (`isPublicApiRequest`): el adaptador verifica la firma (`x-signature` / `Stripe-Signature`) y solo dice qué suscripción sincronizar; se deduplica por `(source, dedupeKey)` y se le vuelve a pedir todo al proveedor. El polling (`ReconcileSubscriptions` + sync on-read en `GET /billing/status` si está `PENDING`) es el fallback.
5. `402` con `plan_limit_reached` / `plan_feature_required` / `plan_read_only`: la web abre el aviso de Pro desde el `MutationCache` de `main.tsx`.
- 6. Onboarding: paso **Plan** obligatorio (`POST /onboarding/plan`, guarda `country` y `plan_selected_at`); `first-group` da `409 plan_not_selected` sin él. Los pasos del wizard son ids (`features/onboarding/steps.ts`) y con Free se saltean Cobros y WhatsApp.
+ 6. Onboarding: paso **Plan** obligatorio (`POST /onboarding/plan`, guarda `country` y `plan_selected_at`); `first-group` da `409 plan_not_selected` sin él. Los pasos del wizard son ids (`features/onboarding/steps.ts`) y con Free se saltean Cobros y WhatsApp. El paso vive en `?step=` (el back del dispositivo retrocede un paso) y lo que pide la URL pasa por `effectiveStep`: sin plan no se pasa de Plan y con el grupo ya creado no se vuelve al formulario. Los callbacks (`?mp=`, `?wa=`, `?sub=`) navegan con `replace` al paso que corresponde.
- **zod en v3.24 (pin exacto)**, no v4: `better-call` (transitiva de better-auth) pide `zod ^4` — ese peer warning es conocido y aceptado. `validator` de hono (`hono/validator`) sustituyó a `@hono/zod-validator` (sus tipos duales zod v3/v4 causaban TS2589/exhaustion no resolubles con `ZodTypeAny`); las rutas tipan `c.req.valid` vía el `ValidationInput` derivado del schema.
- **PWA (`apps/web`)**: Workbox precachea todo lo que emite Vite, así que el tamaño del precache es un costo real de arranque offline. Cuatro trampas ya pisadas: (1) `globIgnores: ['**/workbox-*.js']` matchea también `workbox-window.*.js`, que es el módulo cliente de `virtual:pwa-register` — excluirlo rompe el registro del SW en cada carga; solo se excluye `**/sw.js`. (2) Importar `@fontsource-variable/inter/wght.css` arrastra los 7 subsets (~220 KB que el navegador nunca baja); por eso los `@font-face` de `latin`/`latin-ext` están escritos a mano en `src/index.css`. **No re-agregar `` a `fonts.googleapis.com`**: rompe el offline. (3) El SW necesita contexto seguro (HTTPS o `localhost`); por IP de LAN sobre `http://` no se registra y no avisa. (4) El aviso de instalación vive en `PwaProvider` (fuera del `RouterProvider`, así que sigue la ruta con `router.subscribe('onResolved')`) y **no** en `RootLayout`: `AppLayoutGuard` desmonta `RootLayout` cada vez que su query de onboarding vuelve a `pending`, y un `settled` de dwell en el hijo se perdería en cada navegación.
- **Aviso de instalación (`src/features/pwa/`)**: se ofrece solo con **sesión iniciada**, fuera de `/onboarding` y tras **20 s seguidos en la misma ruta** (navegar antes reinicia la cuenta; después de armado ya no se oculta). El descarte es definitivo vía `localStorage['pwa-install-dismissed']`. Ojo: `_authenticated` **no** es un guard de sesión —`AppLayoutGuard` renderiza `RootLayout` aunque no haya `user`—, así que el gate se chequea en el provider. Safari en iOS no dispara `beforeinstallprompt`: ahí se muestra `IosInstallHint` con la instrucción de Compartir → Agregar a pantalla de inicio (excluye CriOS/FxiOS/EdgiOS, que también usan WebKit pero se instalan desde Safari).
diff --git a/apps/web/src/components/ui/button.tsx b/apps/web/src/components/ui/button.tsx
index 72b3d01..663deff 100644
--- a/apps/web/src/components/ui/button.tsx
+++ b/apps/web/src/components/ui/button.tsx
@@ -2,7 +2,7 @@ import { forwardRef, type ButtonHTMLAttributes } from 'react'
import { cn } from '../../lib/utils'
export type ButtonVariant = 'primary' | 'ghost' | 'outline'
-export type ButtonSize = 'sm' | 'md' | 'icon'
+export type ButtonSize = 'sm' | 'md' | 'lg' | 'icon'
export type ButtonProps = ButtonHTMLAttributes & {
variant?: ButtonVariant
@@ -18,6 +18,8 @@ const variants: Record = {
const sizes: Record = {
sm: 'h-8 px-3 text-sm',
md: 'h-10 px-4 text-sm',
+ // Acciones principales de un flujo en mobile: 48px, cómodo para el pulgar.
+ lg: 'h-12 px-5 text-sm',
icon: 'size-9',
}
diff --git a/apps/web/src/features/billing/PlanOptionCard.tsx b/apps/web/src/features/billing/PlanOptionCard.tsx
index e93aa94..b5baf26 100644
--- a/apps/web/src/features/billing/PlanOptionCard.tsx
+++ b/apps/web/src/features/billing/PlanOptionCard.tsx
@@ -1,5 +1,5 @@
import type { Plan, PlanLimits } from '@gruperly/shared'
-import { Check } from 'lucide-react'
+import { Check, Lock } from 'lucide-react'
import type { ReactNode } from 'react'
import { Badge } from '../../components/ui'
import { cn } from '../../lib/utils'
@@ -29,18 +29,32 @@ export function PlanOptionCard({ plan, limits, price, current, highlighted, chil
>
{PLAN_NAMES[plan]}
- {current ? {t('option.yourPlan')} : null}
+ {current ? (
+ {t('option.yourPlan')}
+ ) : highlighted ? (
+ // El destacado no puede ser solo el color del borde.
+ {t('option.recommended')}
+ ) : null}
{price ?? t('option.free')}
{planFeatureList(limits).map((feature) => (
-
-
+ {feature.included ? (
+
+ ) : (
+
+ )}
+ {/* Lo que el plan no trae se nombra como "en Pro" y no tachado: se
+ lee como lo que falta, no como un castigo. */}
+
{feature.label}
+ {feature.included ? null : (
+
+ · {t('option.inPro')}
+
+ )}
{onCancel ? (
diff --git a/apps/web/src/features/groups/GroupForm.tsx b/apps/web/src/features/groups/GroupForm.tsx
index 6a12ab3..8041f85 100644
--- a/apps/web/src/features/groups/GroupForm.tsx
+++ b/apps/web/src/features/groups/GroupForm.tsx
@@ -1,10 +1,12 @@
import { type DefaultValues, useForm } from 'react-hook-form'
import { zodResolver } from '@hookform/resolvers/zod'
import type { BillingType, CountryCode, CreateFirstGroup, WeekDay } from '@gruperly/shared'
-import { CreateFirstGroupSchema, DEFAULT_COUNTRY } from '@gruperly/shared'
+import { COUNTRY_CURRENCY, CreateFirstGroupSchema, DEFAULT_COUNTRY } from '@gruperly/shared'
import { ArrowLeft, Check, Loader2 } from 'lucide-react'
+import type { ReactNode } from 'react'
+import { useId } from 'react'
import { useTranslation } from 'react-i18next'
-import { sortWeekDays } from '../../lib/format'
+import { currencySymbol, sortWeekDays } from '../../lib/format'
import { cn } from '../../lib/utils'
import { Button, FieldError, Input, Label } from '../../components/ui'
import { BILLING_TYPES, WEEK_DAYS } from '../onboarding/constants'
@@ -15,6 +17,8 @@ type GroupFormProps = {
submitLabel: string
isSubmitting: boolean
errorMessage?: string | null
+ /** Una acción para salir del error (p. ej. volver a elegir el plan). */
+ errorAction?: ReactNode
/** Solo lo usa el onboarding: ahí el país ya se eligió en el paso anterior. */
country?: CountryCode
onSubmit: (values: CreateFirstGroup) => void
@@ -27,7 +31,8 @@ export function GroupForm({
submitLabel,
isSubmitting,
errorMessage,
- country = DEFAULT_COUNTRY,
+ errorAction,
+ country,
onSubmit,
onBack,
}: GroupFormProps) {
@@ -42,8 +47,13 @@ export function GroupForm({
capacity: 10,
billingType: 'MONTHLY',
dueDay: 1,
- country,
+ country: country ?? DEFAULT_COUNTRY,
}
+ // Con país (onboarding) el símbolo sale de su moneda; sin país, del navegador,
+ // igual que el resto de los montos de la app.
+ const symbol = currencySymbol(country ? COUNTRY_CURRENCY[country] : undefined)
+ const daysLabelId = useId()
+ const billingLabelId = useId()
const {
register,
@@ -89,9 +99,13 @@ export function GroupForm({