Notes
LaIA inside: plans, assistance and passwords
Friday of two fronts: phase 4 of LaIA closes (weekly plans, verification
2 min read
Phase 4 closed, phase 5 lit
Friday of two fronts within the redesign of Panxing —the one from the ghost in the foam and 19,000 images queued. In the morning, closing phase 4 of LaIA (the AI side of the project): the weekly content plan now works end to end, with or without an account. In the evening, opening phase 5: AI assistance enters the admin (the management panel).
Anonymous plans that end up linked to someone
T4.4: if someone generates a plan without registering, they can request it with their email. They receive a verification link, and when they visit it, the plan is linked to their user. Behind it there are a couple of hours of debugging: LaIA's endpoints (the API gates) were checking identity with payload.auth() by reading the cookie directly, and inside a Next route handler (the code that responds to a URL) that doesn't resolve. The way that works is calling /api/users/me. A subtle detail: the JWT (the token that proves your identity) was caching the old _verified state, so it also refreshes from the database.
The short password
The 8-character minimum was a journey. First I put it in beforeValidate (a hook: code that runs by itself at a specific moment), and registration respected it. The reset didn't: the reset flow goes through a path that skips that hook. Migrating to beforeOperation, I left debug logs (the system journal) along the way, and finally: minimum 8 both on creating and resetting, and the logs are out.
Verification tokens also changed location. The email adapter writes the emails to the log, and the test was going to fetch them from the next dev output — which with Docker (the container system) doesn't exist. Now it reads docker logs.
The AI manager
In the evening, T5.1 to T5.4: /api/ai/assist with SEO notices (what positions in search engines) for the editor, and the collections ia_proveedores, ia_modelos, and ia_tareas with a hook that automatically detects models and a consumption log in ia_consum. Three details: encrypt: true doesn't work without the encryption plugin (out), the payload_locked_documents_rels table needed the new ia_* columns, and the role arriving in the cached JWT can be old — it refreshes from the DB.
To develop without burning tokens there's a stub: without a valid API key it always responds the same and the tests pass the same.
What remains
Phase 4, closed. Phase 5, lit: assistance, SEO notices, and AI manager already have a place inside the admin. The day after: The densest Saturday: editor, ingestion and a DNS that went down.