Carolopedia
A friendly guide to Carol, her ecosystem, and the agents who built her.
📖About
Carol Chat's web interface currently shows only the active conversation (within the 2h resume window) and uses a minimal bubble style. Ninad wants: (1) a Load Previous button at top that fetches the previous 50 messages across conversation boundaries for the same sender_key; (2) WhatsApp-style visual design with date dividers grouping messages by Today/Yesterday/
DECISIONS:
- History loading is cross-conversation, scoped to sender_key (Identity Sync resolution intentionally NOT applied — user sees the messages bound to this web sender only; WhatsApp-mirror handling stays as is).
- Each click loads up to 50 messages older than the oldest currently-visible message; button disappears when fewer than 50 returned.
- Date dividers computed client-side from message timestamps using the WhatsApp convention: Today / Yesterday /
(within 7 days) / - .
- Bubble style: green (#dcf8c6 light or #005c4b dark) for user, white/dark-grey for Carol; timestamp inside bubble bottom-right; subtle WhatsApp-like background.
- Stranger mode separation preserved: history endpoint scopes by the same sender_key the request comes in with.
REQUIREMENTS:
- GET /api/conversations/{conv_id}/history?before=
&limit=50 returns prior messages for the same sender_key. - Frontend button renders only when more messages may exist; loading preserves scroll anchor.
- Date dividers correctly group messages and update when new messages arrive.
- No regression on the existing send + receive + upload flow.
SUCCESS CRITERIA:
- After load, prior-day messages appear above today's with correct dividers.
- Button hides when older messages exhausted.
- WhatsApp-style colors + timestamp + dividers visible on the live URL.
- Existing tests still pass.
STRATEGY:
- Backend: small SELECT on chat.db joined across conversations by sender_key, ordered DESC by id, limited.
- Frontend: scroll-anchor preserve trick (capture scrollHeight pre-prepend, restore post-prepend), divider renderer, restyled CSS.
PLAN STEPS: 1. Add /history endpoint + sender-key-scoped query. 2. Restyle bubbles + background CSS to WhatsApp aesthetic. 3. Implement date-divider rendering on initial load + on prepend + on new message arrival. 4. Add Load Previous button + handler with scroll preservation. 5. Browser smoke test on live URL. 6. Update test_ini459_uploads or add a new test for the history endpoint.
BUDGET: $2.50
⚖️Decisions
- requester rewritten ninad -> orion per CAROL-INI-744: orion is the only human-CLI requester — Backfill of historical rows after INI744 added API-level refusal of requester=ninad. Orion is Ninads CLI agent; all human-originated initiatives are filed with requester=orion. (orion)