Persona custom entries
The existing persona editor now ends with Add entry. Each entry has an editable title and content and can be removed. Existing appearance, personality, Backstory and private notes retain their behavior.
Entries persist as user_personas.entries, a non-null JSONB list of { title, content } with an empty-list default. Older clients can omit the field on PATCH without erasing saved entries; passing [] explicitly clears it. Empty draft rows are ignored, while partly completed rows show a validation error and stay editable.
Shared validation permits 20 entries, titles up to 100 characters, content up to 5,000 characters per entry, and 20,000 characters across entry titles and content. UI and API use the same validation. All five interface languages include labels and validation text.
The current selected persona supplies its entries to the main chat prompt, , session metadata, session snapshots, social replies, and the game account-context path. Explicit sandbox persona imports include a copied entries list. Private notes remain excluded. Locked sessions pick up edits to their selected persona; disabling or switching personas clears old entry metadata. Social replies continue to obey their existing overall request budget, with a 13,000-character persona allocation.
Database rollout
Before deploying this code to any PostgreSQL environment, apply packages/server/drizzle/0060_persona_entries.sql to that environment. It adds the column without altering existing persona text. The migration is idempotent and was tested against an existing row. Embedded PGlite startup also adds the column. The production migration was applied and its JSONB type, non-null constraint and empty-list default verified on 2026-09-22 before the application release.
Rollback application code without dropping the new column, preserving any newly saved entries.
Validation
- Full monorepo build.
- Full monorepo typecheck.
- Real editor component exercised in an offline DOM: add, incomplete-entry validation, save, reopen, delete, preserve Backstory.
- API and isolated database: create/get/update, legacy PATCH, limits and malformed input, ownership, session selection, deletion and metadata clearing, repeated migration.
- Persona prompt, session, social-budget, sandbox import and macro regression checks.
- Entry-only edits refresh the current chat identity; switching or disabling a persona replaces or clears cached entries. Emoji-heavy entries stay within the social completion endpoint's UTF-16 request budget.
The actual local application was also used to save and reopen a persona with custom entries, and the owner approved screenshots of that interface. Automated checks require no real model calls.
