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.
| Block | What it is |
|---|---|
records.composer | A card with a question, the chip field's options to tap (a mood) and a button that opens the full-screen writing sheet |
records.timeline | Records under month or day headers, with search (words and #tags) and a Write button. Tap one to read it |
records.calendar | A 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.streak | Days 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.prompt | A daily prompt (the same all day, new tomorrow), "another one", and Write, which saves the prompt on the record |
records.stats | Insights 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:
title: a text field (default: a field calledtitle)body: a longtext field (default: the first longtext)chip: a choice field drawn as a coloured chip, withicons(an emoji or icon per option) andtones(a colour role or colour per option; default tint1, tint2…)date: a date field, the record's day (default: the first date field; without one, the day it was written, at the person's own midnight)tags: a text field of #tags. #tags written in the body count toofield: a text field holding the prompt the record was written from
"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).
- Today: a header, the streak, "How are you feeling?" with the four moods, today's prompt, on this day, and tiles to Entries, the calendar, Photos and "Reflect with AI".
- Entries: the searchable timeline.
- Calendar: the mood calendar and a 30-day streak goal.
- Photos: the gallery feed, owner only.
- Insights: the last 30 days, this year, and a 100-day goal.
- HQ and the AI in the top bar.
Every journal page has visibleTo: ["owner"]. Its showcase gives the picker a bright cover (tagline, gradient, stickers and three mini cards).