Skip to content

Settle a finding when the banner dismisses it - #16

Merged
salemsayed merged 2 commits into
mainfrom
fix/dismiss-settles-finding
Oct 28, 2026
Merged

salemsayed merged 2 commits into
mainfrom
fix/dismiss-settles-finding

Conversation

@salemsayed

Copy link
Copy Markdown
Owner

This replaces #15 by @k0d3r1s, which we couldn't push to because its fork belongs to an organization. Their commit is included as they wrote it, with one follow-up commit on top.

From #15 (dd9be1f). The banner's Dismiss now settles the finding's chain, the same as resolving it from the panel. The reviewer stops listing it as open, and the agent no longer gets it again on later turns. The severity the user dismissed is stored in a new dismissed_severity column. If the advisor raises the finding again at a higher severity, the chain reopens. A chain resolved from the panel never reopens. See #15 for the full write-up.

Follow-up (64901cf). Testing #15 in a real BB showed two problems:

  • A round the advisor raised while the finding was dismissed was saved as pending. Hidden while the chain was settled, all those rounds reached the agent together when an escalation reopened it, so the agent got the same finding several times. A round that joins a chain the user settled is now marked delivered on arrival.
  • The banner's "The agent was told this before" line and the agent's "This repeats advice already given" note went by the chain's length alone. After a dismissal, both claimed the agent had been told when it never had. They now require an earlier round to have actually been sent. pendingAdvice gains a toldBefore field for the banner.

Side effect: a chain reopened from the panel no longer brings back an old round in the banner. It shows again at the next review.

Validation:

  • Typecheck and 139 tests pass on Node 22.19.0. Two new tests cover the escalation briefing and the told-before wording, and both fail without the follow-up. One existing test used the "still unresolved" note as proof that a second review ran. It now checks the repeat count, since that review never reached the agent.
  • dist/ is rebuilt from a clean copy, and npm pack --dry-run passes.
  • Real app, using an isolated BB 0.47.1 with Opus 5.5 as agent and reviewer:
    • Settle a finding when the banner dismisses it #15 migrated a copy of a real 0.1.4 database (30 → 31 migrations, all 91 reviews kept).
    • The banner's Dismiss settled the finding, and a same-severity re-raise stayed hidden.
    • An escalation to blocker reopened the finding. With the follow-up, only the blocker round was sent to the agent, and the banner showed "Must fix · 4×" without the told-before line.

🤖 Generated with Claude Code

k0d3r1s and others added 2 commits October 28, 2026 15:05
Dismiss only marked the shown row delivered. The chain stayed open, so every later review listed it as still open, the advisor raised it again, and the re-raise reached the agent. Dismissing now settles the chain root the way resolveFinding does and records the dismissed severity in a new dismissed_severity column, appended to the migration list. A later re-raise at a higher severity reopens a dismissed chain. A chain settled from the panel never reopens.
A round the advisor raises on a chain the user settled is now retired on
arrival. Left pending, every round raised while a finding was dismissed
reached the agent together once an escalation reopened it.

The banner's "told this before" line and the agent's "repeats advice"
note now require an earlier round to have actually reached the agent,
not just a longer chain.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@salemsayed
salemsayed merged commit aab1c5b into main Oct 28, 2026
1 check passed
@salemsayed
salemsayed deleted the fix/dismiss-settles-finding branch October 28, 2026 14:32
@salemsayed salemsayed mentioned this pull request Oct 28, 2026
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.

2 participants