Skip to content

feat: display model name on observation/summary cards#1349

Open
ousamabenyounes wants to merge 2 commits intothedotmack:mainfrom
ousamabenyounes:feat/model-badge-1265
Open

feat: display model name on observation/summary cards#1349
ousamabenyounes wants to merge 2 commits intothedotmack:mainfrom
ousamabenyounes:feat/model-badge-1265

Conversation

@ousamabenyounes
Copy link
Contributor

Summary

Fixes #1265 — Adds model attribution to observations and summaries, displayed as a badge in the web UI.

When testing different models (haiku, sonnet, opus) for observation/summary generation, there was no way to see which model produced each card. This PR adds end-to-end support: DB schema, storage, API, and UI.

Changes

Database

  • Migration 24: ALTER TABLE observations ADD COLUMN model TEXT + same for session_summaries

Storage layer

  • storeObservation(), storeSummary(), storeObservations(), storeObservationsAndMarkComplete() — all accept optional model param
  • ResponseProcessor reads CLAUDE_MEM_MODEL from settings and passes it to storage

Types

  • model field added to ObservationRecord, SessionSummaryRecord (backend) and Observation, Summary (frontend)

UI

  • Model badge displayed next to project badge on ObservationCard and SummaryCard
  • .card-model CSS styling in viewer-template.html

Test plan

  • 24/24 tests pass (bun test tests/sqlite/observations.test.ts tests/sqlite/summaries.test.ts)
  • 4 new tests: model stored correctly when provided, null when omitted (for both observations and summaries)
  • Visual: open web UI at localhost:37777, verify model badge appears on cards
  • Backward compat: existing observations without model show no badge (graceful null handling)

Vibe-coded by Ousama Ben Younes 🎧
🤖 Generated with Claude Code (Claude Opus 4.6)

ousamabenyounes and others added 2 commits March 13, 2026 07:17
Records which AI model (haiku, sonnet, opus, etc.) produced each
observation and summary, and displays it as a badge in the web UI.

Changes:
- Migration 24: ADD COLUMN model TEXT to observations and session_summaries
- Storage: storeObservation(), storeSummary(), storeObservations() accept model param
- ResponseProcessor: reads CLAUDE_MEM_MODEL from settings and passes to storage
- Types: model field added to ObservationRecord, SessionSummaryRecord, Observation, Summary
- UI: model badge displayed next to project badge on ObservationCard and SummaryCard
- CSS: .card-model style added to viewer-template.html
- Tests: 4 new tests for model field storage (observations + summaries)

Fixes thedotmack#1265

Vibe-coded by Ousama Ben Younes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…hedotmack#1265)

The model field was stored in the DB but missing from SELECT queries
in PaginationHelper, SessionStore, and observations/recent.ts, so
the web UI badge never received the data. Added model to all relevant
queries, updated types, and added tests for getAllRecentObservations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Display model name on observation/summary cards in web UI

1 participant