Skip to content

fix(tui): stop styling the agent-view notice as an error - #134

Merged
ralyodio merged 1 commit into
mainfrom
fix/agent-view-notice-styling
Jul 31, 2026
Merged

fix(tui): stop styling the agent-view notice as an error#134
ralyodio merged 1 commit into
mainfrom
fix/agent-view-notice-styling

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

What

/agents <engine> printed its notice through err(), which renders a red . Opening an engine's agent view therefore looked like a failure when nothing had failed — privacycode agent list exits 0.

Observed:

✗ agent mode: privacycode agent list — opening its agent view.

Why

The message already branched on engine.agentsView, but both branches shared the error styling. Those two cases aren't the same severity:

  • agentsView engine — just opening a listing. Informational.
  • everything else — the engine's native approval prompts really are bypassed. Worth a warning.

Changes

  • src/ui.mjs — add an amber color and a warn helper (), sitting between info and err.
  • src/tui.mjs — agent-view case uses info, bypass case uses warn.
  • bin/moshcode.mjs — printed for both branches; now matches the same split.

Testing

node --test test/engines.test.mjs — 18/18 pass. The existing /agent mode:/ stderr assertion (test/engines.test.mjs:108) still matches, since only the prefix changed.

🤖 Generated with Claude Code

`/agents <engine>` printed its notice through err(), so opening an
engine's agent view rendered a red ✗ for what is purely informational
— it reads as a failure when nothing failed.

Split the two cases the message already covered: an agentsView engine
is just opening a listing (info), while everything else really does
bypass the engine's native approval prompts (new warn helper, amber ⚠).
bin/moshcode.mjs printed ⚠ for both branches; it now matches.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

vu1nz Security Review

0 finding(s) in PR #?

No security issues found.

@ralyodio
ralyodio marked this pull request as ready for review July 31, 2026 07:38
@ralyodio
ralyodio merged commit de76c1f into main Jul 31, 2026
3 checks passed
@ralyodio ralyodio mentioned this pull request Jul 31, 2026
ralyodio added a commit that referenced this pull request Jul 31, 2026
Cuts a release off main so the fixes merged after v0.13.1 actually reach
installs. v0.13.1 shipped before #135, so re-running the installer still
handed you a moshcode that reported turso as missing.

Included since v0.13.1:
- #135 fix(tools): find turso in ~/.turso instead of reporting it missing
- #134 fix(tui): stop styling the agent-view notice as an error
- #133 fix(runtime): deliver fire-and-forget notify() when the script throws

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
@ralyodio
ralyodio deleted the fix/agent-view-notice-styling branch August 8, 2026 17:06
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