Zvessa docs

Record views and the Journal starter

Record views are more ways to show and write a collection's records, on the Collections engine. They work for any collection: a journal, a gratitude log, a habit or workout tracker, a reading list, a sleep diary, a team's daily check-in. The Journal kit and the Journal starter are made only of these blocks plus existing ones, so the AI can build any of those from chat the same way.

The blocks #

All are described in convex/lib/records/views.ts (the AI, the page editor and the docs catalog read the same descriptions) and drawn by src/kits/records.

BlockWhat it is
records.composerA card with a question, the chip field's options to tap (a mood) and a button that opens the full-screen writing sheet
records.timelineRecords under month or day headers, with search (words and #tags) and a Write button. Tap one to read it
records.calendarA month painted with each day's chip colour; swipe or tap arrows for other months; tap a day to see or write for it
records.streakDays in a row, the best streak, the total, this week as dots, an optional goal bar, and a nudge until today has one
records.memories"On this day": records from a week, a month, six months and each year ago. Hidden when there are none
records.promptA daily prompt (the same all day, new tomorrow), "another one", and Write, which saves the prompt on the record
records.statsInsights over the last N days: days written, records, words, best streak, and a bar per chip option

Tapping a record anywhere opens the reader: the whole record, Share (the system share sheet), Edit (the writing sheet again) and Delete (with a confirm). Everything updates live.

Which field is which #

Props name the field for each part, so the blocks fit any collection:

"none" or "" turns a part off. A field the collection doesn't have is simply not drawn, so an older collection keeps working.

The writing sheet #

A native page sheet (swipe down on iOS): the day (‹ Today ›, a day at a time, never the future), the prompt if any, the chip options as big buttons, a big title, the body with a word count, #tags, then any other fields of the collection. Save plays a success haptic and the block shows the saved words ({streak} becomes the current streak). Cancel asks before throwing away what was written.

All words are props: question, note, write, placeholder, saved, label, shuffle, empty, heading, nudge, done.

Server reads #

convex/kits/records/views.ts: days (each day with records: count, newest chip, words), onDays (the records on given days), search and one. They follow the same rule as records.list: a person who can view the space sees a collection unless every block that shows it is hidden from them, so visibleTo: ["owner"] on a page keeps a journal private on the server too. Each read looks at the newest 2,000 records. Writing goes through records.add, records.update and records.remove.

Journal kit #

convex/kits/journal/kits.ts. Adds the journal collection (day, mood, title, entry, tags, prompt) and two owner-only pages: Journal (streak, prompt, composer, on this day, entries) and Mood calendar (calendar, insights). The collection id is the same as the Personal starter's journal: a space that already has a journal collection keeps it and its entries, gets only the missing fields, and keeps it if the kit is taken out.

Journal starter #

convex/lib/templates/journal.ts, in the Paper style (cream paper and ink, serif headings, sunrise accents, a night-blue dark mode; tint1 to tint4 are the moods).

Every journal page has visibleTo: ["owner"]. Its showcase gives the picker a bright cover (tagline, gradient, stickers and three mini cards).