Skip to content

fix: use server-side Live field for live badge instead of reply author heuristic#311

Merged
tomasz-tomczyk merged 3 commits intomainfrom
fix/262-live-badge-false-positive
Apr 19, 2026
Merged

fix: use server-side Live field for live badge instead of reply author heuristic#311
tomasz-tomczyk merged 3 commits intomainfrom
fix/262-live-badge-false-positive

Conversation

@tomasz-tomczyk
Copy link
Copy Markdown
Owner

Summary

  • Add Live bool field to Comment struct, set server-side when POST /api/agent/request is called
  • Update isLiveThread() in frontend to check comment.live instead of scanning reply authors
  • Preserve Live field across round transitions in carryForwardComment
  • Fixes false-positive live badges on threads with CLI-authored agent replies

Closes #262

Review

  • Code review: passed (go-expert + frontend-expert)
  • Parity audit: N/A (agent features not in crit-web)

Test plan

  • go test ./... — all pass
  • TestHandleAgentRequest_Success verifies Live is set to true
  • carryForwardComment preserves Live field

🤖 Generated with Claude Code

tomasz-tomczyk and others added 3 commits April 19, 2026 08:46
…e badge

The live badge was showing on any thread where the agent had replied (e.g.
via CLI `crit comment --reply-to`), not just threads explicitly sent to the
agent via "Send to Agent". Now `isLiveThread()` reads `comment.live` which
is set server-side by `POST /api/agent/request`.

Fixes #262

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The live badge was incorrectly shown on threads with agent-authored CLI
replies, not just comments actually sent via "Send to Agent". This adds
a `Live` bool field to Comment that is explicitly set to true only when
handleAgentRequest dispatches the comment to the agent command.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add Live to carryForwardComment struct literal to prevent silent data
  loss across round transitions
- Remove TestHandleAgentRequest_SetsLive from server_test.go (already
  covered in server_agent_test.go)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tomasz-tomczyk tomasz-tomczyk merged commit 2bb458e into main Apr 19, 2026
4 checks passed
@tomasz-tomczyk tomasz-tomczyk deleted the fix/262-live-badge-false-positive branch April 19, 2026 08:19
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.

Live badge shows on threads with agent-authored CLI replies, not just Send to Agent

1 participant