nwhitehouse catches the chat that was quietly forgetting everything

Every message a user typed looked saved but was being silently thrown away before it ever hit the database.

chat-ui

On this fork, the chat felt completely normal - you'd type, get a reply, carry on. But behind the scenes every user message was being rejected by the database and discarded without an error, so the conversation history was building up to exactly nothing. Reload the page and it was all gone, with no warning that anything had failed.

nwhitehouse tracked it to a single mismatched field in how messages were being saved, removed it, and wired in logging so that if a save ever fails again, it shows up in the backend rather than vanishing in silence. The note in the fix is candid: if attaching workflow data to individual messages becomes a real requirement later, it deserves a proper, durable redesign rather than a quiet patch.

So what Anyone running a Mike build with persistent chat should check they aren't already losing history they never knew they had.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?

Commits in this thread

1 commit from nwhitehouse/mike, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
1271d07c [bug-001] Persist user messages - drop non-existent workflow column Nick Whitehouse 2026-05-03 ↗ GitHub
commit body
User messages were never being persisted to chat_messages. The insert
referenced a `workflow` column that doesn't exist in the schema; Supabase
silently rejected the entire insert with PGRST204 ("Could not find the
'workflow' column of 'chat_messages' in the schema cache"), and the result
was unchecked. Affected both POST /chat and POST /projects/:id/chat.

Effect: chats reloaded from the DB only showed assistant rows. Live chats
appeared correct because the frontend keeps message history in memory.

Fix: drop the `workflow` field from the insert in both routes, and surface
any future insert errors via console.error so the next regression isn't
silent. Same defensive logging added to the assistant-message insert.

If per-message workflow attachment ever needs to survive a reload, add a
column in a follow-up migration.

Verified by direct insert against the prod schema:
  with workflow:    PGRST204 (silently swallowed today)
  without workflow: OK

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-121.md from inside the repo you want the changes in.

⬇ Download capture-thread-121.md