# Phase 12: Native Tablo Chat - Discussion Log

> **Audit trail only.** Do not use as input to planning, research, or execution agents.
> Decisions are captured in CONTEXT.md — this log preserves the alternatives considered.

**Date:** 2026-05-16
**Phase:** 12-Native Tablo Chat
**Areas discussed:** Discussion placement, Message row behavior, Message lifecycle, Realtime transport feel, Participant model

---

## Discussion Placement

| Option | Description | Selected |
|--------|-------------|----------|
| Tab tab | Add Discussion tab inside existing tablo detail; matches Tasks, Files, Events. | ✓ |
| Separate page | Use a dedicated `/tablos/{id}/discussion` page. | |
| Both | Tab preview plus full page. | |

**User's choice:** Tab tab.
**Notes:** Tab label is `Discussion`; order is `Overview / Tasks / Files / Events / Discussion`. Direct loads render full tablo detail layout with Discussion active. Dashboard cards should show an unread badge.

---

## Message Row Behavior

| Option | Description | Selected |
|--------|-------------|----------|
| Author + timestamp + text | Plain persisted-discussion row content. | ✓ |
| Author + relative time + text | Friendlier but requires refresh behavior. | |
| Text only | Minimal, but weak for collaboration history. | |

**User's choice:** Author + timestamp + text.
**Notes:** Messages are oldest top, newest bottom, composer at bottom, with simple day separators. Empty state is `No messages yet` plus a short start prompt.

---

## Message Lifecycle

| Option | Description | Selected |
|--------|-------------|----------|
| Schema only | Store edit/delete metadata but expose no UI. | ✓ |
| Author can edit/delete | Add author lifecycle controls immediately. | |
| No metadata | Leave lifecycle metadata out entirely. | |

**User's choice:** No edit/delete UI, keep nullable metadata.
**Notes:** The user initially chose no edit support and no delete support. We resolved the conflict with CHAT-03 by keeping nullable edit/delete metadata in the schema while deferring UI. Future delete semantics remain undecided. Composer is a plain textarea plus send button.

---

## Realtime Transport Feel

| Option | Description | Selected |
|--------|-------------|----------|
| Lock SSE + POST | SSE receive, CSRF-protected HTMX POST send. | ✓ |
| Let planner decide | Research SSE first, allow WebSockets if necessary. | |
| Prefer WebSockets | Bidirectional socket from the start. | |

**User's choice:** Lock SSE + POST.
**Notes:** Silent reconnect. Stream new messages and unread badge updates. Sending POST renders the sender's message immediately; SSE broadcasts to other open tabs/views. Typing/presence was raised and deferred as scope creep.

---

## Participant Model

| Option | Description | Selected |
|--------|-------------|----------|
| Current owner-only model | Use today's Go tablo ownership model. | ✓ |
| Minimal members table | Add membership/access now. | |
| Owner plus invited emails later | Anticipate participants but keep UI owner-only. | |

**User's choice:** Current owner-only model.
**Notes:** Authors show name if added/available, email fallback. Current Go users only have email; planner may add nullable display-name fields only if needed. Discussion header can show a simple participant count. Unread badges use persistent per-user/tablo read state.

## the agent's Discretion

- Exact migration/query/handler/template names.
- Exact unread badge styling and empty-state wrapper layout.
- Exact max message length, provided server-side maximum and escaped rendering are enforced.

## Deferred Ideas

- Typing indicators and presence.
- Message edit UI.
- Message delete UI.
- Full membership/invitation model.
- Rich chat features: reactions, replies, read receipts, file/image messages, voice messages, pinned messages, search, threads, link previews, and rich media.
- Exact future delete semantics.
