Skip to content

fix(chat): a runtime notice is titled by what it says, not always "Background result delivered" - #418

Merged
devswha merged 2 commits into
mainfrom
fix/notice-titles
Oct 3, 2026
Merged

devswha merged 2 commits into
mainfrom
fix/notice-titles

Conversation

@devswha

@devswha devswha commented Oct 3, 2026

Copy link
Copy Markdown
Owner

Carries the notice-title half of #344 by @Haeminway1. The other half of that PR (OmO's "I read this as" lead line) is not included and stays in #344.

Change

Every runtime notice in the chat lens was titled Background result delivered, also ones that are not a background result: OmO's omo-model-profile:unavailable warning and gjc's irc:incoming messages.

  • shared/protocol.ts: the notice part gets an optional source, the runtime's own name for the notice (pi's customType).
  • server/transcript-records.ts: piNotice returns the part and sets source when the record has a customType.
  • src/components/ChatView.tsx: a notice with no source, or async-result, keeps the old title. Any other is titled by its first non-empty line, cut to one line (96 characters, and an ellipsis in CSS where the row is narrower).

No new string, no new endpoint, and an older remote-PC bridge that sends no source keeps the old title.

Validation

  • bun run typecheck: pass.
  • HERDR_TEST_MODE=unit bun test ./server/conversation.test.ts: 38 pass. The existing gjc test now expects source: "async-result", and a new one covers a notice with another customType and one with none.
  • bun run test:unit: 1151 pass, 3 skip, 0 fail.
  • bun run build: pass.
  • Not checked: how the title looks in a browser. No screenshot.

devswha and others added 2 commits October 4, 2026 07:08
…ckground result delivered"

Carried from #344, which also changed how OmO's lead line is shown; this is the notice-title half only.

Co-authored-by: haeminway <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

🧰 Additional context used
📚 Code guidelines (1)
server/AGENTS.md — configured

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: devswha/herdr-web-ui/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 193ca94d-f300-4ca7-b5b1-fb639675f188
📥 Commits

Reviewing files that changed from the base of the PR and between 66ce861 and 582794d.

📒 Files selected for processing (6)
  • CHANGELOG.md
  • server/conversation.test.ts
  • server/transcript-records.ts
  • shared/protocol.ts
  • src/components/ChatView.css
  • src/components/ChatView.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.


📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • Chat notices now display a label based on their content instead of using “Background result delivered” for every notice. Background-result notices keep that label; other notices use their first nonblank line, or their source name when no line is available.
    • Long notice labels are shortened with an ellipsis and stay on a single line.

Walkthrough

Notice parts now retain optional runtime source values. The chat view uses the source and notice text to choose a label, with long labels truncated to fit.

Changes

Runtime notices

Layer / File(s) Summary
Preserve runtime notice sources
shared/protocol.ts, server/transcript-records.ts, server/conversation.test.ts
Notice parts can include a source from a custom message’s customType. Transcript parsing inserts the notice part, and tests cover notices with and without a source.
Derive and render notice labels
src/components/ChatView.tsx, src/components/ChatView.css, CHANGELOG.md
The chat view uses the background-result label when the source is missing or async-result. Otherwise, it uses the first nonblank text line or the source, truncating labels over 96 characters. The label stays on one line with overflow ellipsis.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: yoonwoo-ha, diegolhambi

Merge Risk: ⚪ Minimal · up to 58279

Runtime notices retain the source needed for content-based titles, and long titles remain clipped within the chat row; no user-visible regression is identified.

Security Architecture Review

Security architecture risk: ⚪ Minimal · up to 58279

The new notice field affects display labels, not permissions or executable behavior. Existing notice visibility checks remain intact, and responses without the field retain their previous label.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — A party able to influence accepted runtime notice records can influence the displayed summary for non-background notices. In the inspected flow, this influence is limited to conversation presentation; source does not grant permissions, select a service or tenant, or invoke tools.

Trust Boundaries and Controls

  • observed — Base-to-head comparison preserves the existing rejection of non-custom-message records, display:false records, non-string content, and empty normalized content. The new metadata does not bypass these controls. Notice text was already displayed in the expandable body; the PR additionally exposes its first nonblank line in the summary.

Resilience and Maintainability Implications

  • observed — The notice transition remains a record-local conversion followed by the existing turn append. The change adds no reservation, retry, persistent mutation, ownership transfer, or recovery state. Rejection returns null before insertion, and successful notices retain their previous role and ordering.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: runtime notices use their content instead of always showing “Background result delivered.”
Description check ✅ Passed The description explains the change and reports validation results. It also notes that the browser appearance was not checked and no screenshot was included, although the template requests a screensho…
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 4 files. (2 skipped: 2 …
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@devswha
devswha merged commit 16e2d02 into main Oct 3, 2026
12 checks passed
@devswha
devswha deleted the fix/notice-titles branch October 3, 2026 22:18
devswha added a commit that referenced this pull request Oct 4, 2026
Bumps package.json and herdr-plugin.toml to 0.3.49 and moves the
Unreleased notes under [0.3.49] - 2026-10-04, with the compare link.
Every entry already carries its PR link and contributor credit. Raises
the remote PC bundle to 16: a runtime notice is titled by its own first
line on a remote PC too (`source` on the notice part, #418), and the
Antigravity meter reads the token file on a Linux PC (#399). Push the
`remote-v16` tag and let the bundle workflow publish before running
release.yml.

Carries #357, #399, #411, #413, #415, #414, #416, #417, #418, #346.
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