Skip to content

v0.2.0 feat: operations-console UI + structured escalation/denial signals#2

Merged
udtrad merged 4 commits into
mainfrom
feat/ops-console-ui
Jul 25, 2026
Merged

v0.2.0 feat: operations-console UI + structured escalation/denial signals#2
udtrad merged 4 commits into
mainfrom
feat/ops-console-ui

Conversation

@udtrad

@udtrad udtrad commented Jul 25, 2026

Copy link
Copy Markdown
Owner

What & why

Implements the EntAssistant UI/UX design pass into the live app, to a production bar. The
backend was already shipped and verified; this PR brings the "operations console" design into
ui/, adds the small backend support the design's cards need, and refreshes the docs.

Changes

Backend (additive, backward-compatible)

  • New app/turn_signals.py: pure, unit-tested parsers that pull the typed EscalationSummary
    and any permission_denied tool responses out of the ADK event stream.
  • run_turn captures those signals (with a session.state fallback); ChatResponse gains
    optional escalation and denials fields.
  • phoenix_public_url setting, exposed via /config for the header "traces" link.

Frontend (operations-console redesign)

  • Slate/paper design system; the monospace receipt strip (tools_used + trace_id) under
    every agent reply.
  • Four distinct non-happy-path treatments driven by real response fields: escalation card
    (risk or missing-info badge), amber policy card (RBAC denial), blue-grey rate-limit card.
  • Pre-login + session-loading screens; role identity dot; 429 handling (a real bug in the
    old UI — it rendered (no reply) on a rate-limit).
  • Pure helpers in ui/lib.js, unit-tested with node --test.
  • Labelled design showcase at /static/demo.html.
  • Fix: the HTML hidden attribute was overridden by display:flex, which left the "traces"
    pill a dead link (opened a new tab to the login screen) and kept the empty-state visible after
    the first turn. A global [hidden]{display:none!important} reset fixes both; the pill now
    links to Phoenix.

Docs

  • README: Further enhancements roadmap + demo-page pointer.
  • docs/architecture.md: full container + chat-turn sequence mermaid diagrams (validated to
    render error-free).
  • Refreshed the chat screenshot to the new UI.

Verification (evidence)

  • make check: 64 passed, 95.85% coverage (ruff + mypy strict clean).
  • node --test ui/tests/: 15/15.
  • Both mermaid diagrams render via mermaid-cli (exit 0).
  • Live against the running stack (real Gemini): admin escalation query returned a structured
    escalation object and the card rendered; a sales user hit denials (policy path); the full
    Keycloak PKCE login flow rendered the escalation card in the real app.

Notes

  • Version bumped 0.1.1 -> 0.2.0.
  • LLM non-determinism is inherent (the same Globex query returned High risk via the API and
    Needs more information via the UI on separate runs — both are correct renderings).
  • The 429 card is unit-tested (parseRetryAfter / classifyResponse) but not live-triggered.

🤖 Generated with Claude Code

cou and others added 4 commits July 25, 2026 01:41
…phoenix_url

run_turn now captures the typed EscalationSummary and any permission_denied tool
responses from the ADK event stream (new app/turn_signals.py, pure + unit-tested)
and returns them on ChatResponse, so the UI can render escalation and policy cards
from real data instead of parsing free text. Adds a phoenix_public_url setting
exposed via /config. Fully additive and backward-compatible.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…29, pre-login

Ports the design pass into the live UI: slate/paper design system, the monospace
receipt strip (tools_used + trace_id), escalation / policy / rate-limit cards driven
by the new response fields, pre-login + session-loading screens, a role identity dot,
and a working 429 cooldown (a real bug in the old UI). Pure helpers live in ui/lib.js,
unit-tested with node --test. Adds a labelled /static/demo.html showcase. Fixes the
[hidden]-vs-display bug so the traces pill links to Phoenix and the empty state hides
after the first turn.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…mp 0.2.0

README gains a Further enhancements roadmap and a demo-page pointer. architecture.md
now carries the full container + chat-turn sequence mermaid diagrams (validated to
render error-free via mermaid-cli). Refreshes the chat screenshot to the new UI.
Bumps version 0.1.1 -> 0.2.0 (additive feature work).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- runtime: drop the session-state escalation fallback. It could surface a prior
  turn's escalation (a different customer) when a later same-session escalation
  ran but its summarise step failed; reduce_signals is the sole, live-verified
  path now, degrading to a plain reply rather than showing stale data.
- ui: rename .risk-med -> .risk-medium so a Medium risk badge is styled (app.js
  generates risk-${level.toLowerCase()} from the enum).
- ui: render an honest error turn on non-OK HTTP (500/422) instead of an empty
  "(no reply)" bubble.
- ui: assign the cooldown interval before the first tick so a Retry-After of 0
  leaves no orphan interval.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@udtrad
udtrad merged commit 47bbc01 into main Jul 25, 2026
4 checks passed
@udtrad
udtrad deleted the feat/ops-console-ui branch July 25, 2026 01:12
udtrad added a commit that referenced this pull request Jul 25, 2026
Aligns uv.lock with the 0.2.0 bump from #2. No dependency changes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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