Skip to content

test(agent-surfaces): cover status-block, text-block, block-header - #1087

Merged
selfcontained merged 1 commit into
mainfrom
agt_6ef4df7f551c/job-test-enforcer-5610a27b
Sep 15, 2026
Merged

selfcontained merged 1 commit into
mainfrom
agt_6ef4df7f551c/job-test-enforcer-5610a27b

Conversation

@selfcontained

Copy link
Copy Markdown
Owner

Summary

Recurring test-enforcer maintenance run. Local suite was green on first pass (44th consecutive) — no failures, no flakes to triage. Added coverage for the highest-value gap flagged by the previous run's next_focus.

Changes

Direct/dedicated tests for three apps/web/src/components/app/agent-surfaces/blocks/ renderers that previously only got thin single-path exercise via surface-panel.test.tsx:

  • block-header.test.tsx — title/count/description gating, including the count === 0 vs truthiness distinction (count is a real falsy value, not "absent").
  • status-block.test.tsx — tone defaulting to neutral, timestamp presence/absence (relative text + absolute on the title attribute), detail-markdown gating.
  • text-block.test.tsx — neutral-vs-toned branch selection, toned callout classes, title/description gating within the toned branch.

18 tests total. Mutation-tested against both components: every behavior-changing mutant (conditional branches, tone/class sourcing, attribute wiring) was killed; two DOM-presence gaps found mid-battery (a "gated markdown node still renders empty" survivor in both block-header.tsx and status-block.tsx's detail-guard, and text-block.tsx's title/description guards) were fixed by asserting on the wrapper element's absence, not just its text.

Reviewed by a general-purpose agent scoped to only this diff (verdict: SHIP); one flagged redundant test with no unique mutation-kill value was trimmed.

Test plan

  • pnpm run check — clean
  • pnpm run format — clean
  • pnpm run test — server 187f/3321t, web 133f/1942t (+3 files/+18 tests), extension 9f/60t, all green
  • pnpm run finalize:web — build succeeds
  • pnpm run test:e2e — 198 passed / 12 skipped (unchanged)
  • pnpm run test:e2e:live — 11 passed, no stray e2e-* tmux sessions

CI scan

Checked the last 50 CI runs. All failures were pre-existing, branch-specific issues on one unrelated in-flight WIP branch (agt_683b115bc1e9/dispatch-harness-research's own PR-body session-link policy violation) — no cross-branch flakes observed.

🤖 Generated with Claude Code

Adds direct/dedicated test coverage for three agent-surfaces block
renderers that previously only got thin single-path exercise via
surface-panel.test.tsx:

- block-header.test.tsx: title/count/description gating, including
  the count===0 vs truthiness distinction
- status-block.test.tsx: tone defaulting, timestamp presence/absence
  (relative text + absolute title attr), detail markdown gating
- text-block.test.tsx: neutral-vs-toned branch selection, toned
  callout classes, title/description gating within the toned branch

18 tests, mutation-tested (all observable mutants killed). Reviewed
by a general-purpose agent (verdict: SHIP); trimmed one flagged
redundant test with no unique mutation-kill value.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@selfcontained
selfcontained merged commit 4f44a9c into main Sep 15, 2026
1 check passed
@selfcontained
selfcontained deleted the agt_6ef4df7f551c/job-test-enforcer-5610a27b branch September 15, 2026 02:26
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.

1 participant