Skip to content

radar-app-v1.13.3

@nadaverell nadaverell tagged this 07 Sep 21:35
## Summary

Allow hosted agents that implement assessment-bound, tool-free
explanations to expose the existing **Explain simply** interaction.
Hosts opt in with `AgentInfo.assessmentExplanations`; an unsupported
hosted agent continues to hide generation.

## What changed

- Add an optional, additive hosted explanation capability.
- Resolve it against the investigation's actual agent rather than the
currently selected agent.
- Reuse the existing assessment-local generation, loading, replay and
display path. Local-agent behavior and hosted Apply restrictions are
unchanged.

This is a frontend capability declaration, not a hosted backend
implementation. A host must implement the existing `explainAssessment`
request contract before advertising support.

## Testing

- `make build` — typecheck, frontend build and embedded Go binary.
- Frontend suite: 907 tests passed with bounded worker concurrency and a
30s test timeout.
- Capability tests cover missing agent, unsupported hosted agent,
explicit false/true and existing local behavior.
- Browser-tested a locally packed artifact in a hosted integration
fixture: inline completion, saved explanation replay, source
highlighting, narrow/wide and light/dark. Synthetic backend/model; no
live hosted model call.

Additive patch-compatible change; no new k8s-ui exports or package
publication included.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Additive frontend capability flag and UI gating only; local-agent
behavior and apply restrictions are unchanged.
> 
> **Overview**
> **Explain simply** is no longer blocked for every hosted
investigation. Hosted backends can advertise support via optional
`AgentInfo.assessmentExplanations`; unsupported hosted agents still hide
generation when no saved explanation exists.
> 
> The UI resolves capability from the **run’s agent** (`run.agent` in
the agents list), not the global `hosted` flag.
`supportsAssessmentExplanation` treats local agents as always eligible
and hosted agents as eligible only when they opt in. **Explain simply**
generation and idle-state hiding now use `explanationEnabled` instead of
`!hosted`, while existing replay, loading, and display paths are
unchanged. Apply and other hosted read-only rules are untouched.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
923171325065750d5c4a7a717f3001cdec3ba411. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Assets 2
Loading