Skip to content

feat(ui): WebUI modernization PR2 — approval flow as inline decision cards#110

Closed
jkyberneees wants to merge 1 commit into
feat/webui-modernization-1from
feat/webui-modernization-2
Closed

feat(ui): WebUI modernization PR2 — approval flow as inline decision cards#110
jkyberneees wants to merge 1 commit into
feat/webui-modernization-1from
feat/webui-modernization-2

Conversation

@jkyberneees

Copy link
Copy Markdown
Contributor

feat(ui): WebUI modernization PR2 — approval flow as inline decision cards

Second PR of the WebUI modernization roadmap (Phase 2b: approval UX).
Stacked on #109 (feat/webui-modernization-1).

Replaces the blocking approval modal with an inline decision card pinned
at the bottom of the message stream (position: sticky), so the operator
can scroll back through the transcript while deciding. During an approval
the agent is mid-turn (busy), so nothing is lost vs the modal; the gate
itself is untouched - every decision still goes to the server as an
explicit approval_response, and Escape no longer closes the prompt.

  • Queue: multiple approval requests (parallel tool calls) render one at a
    time with a "request 1 of N" indicator instead of stacking modals.
  • approval_ack handling: requests answered from another connected client
    are dismissed locally (previously the ack event was ignored).
  • Keyboard operation: a = approve, d = deny, t = trust session (when the
    class allows it); modifier combos and text inputs are respected, and
    the friction gate applies to keyboard approvals too. Keys are shown as
    kbd hints on the buttons and documented in the shortcuts dialog.
  • Accessibility: role="alertdialog" with aria-labelledby/describedby,
    focus moves to the card on show; DOM built with textContent throughout
    (no innerHTML with command data).
  • Risk badge bug fixed: the server sends the class string (system_write,
    destructive, ...) but the old CSS keyed on emoji classes
    (.approval-risk.X), so the badge rendered unstyled. Badges now use
    data-level attributes (warn/danger/ok) driven by a client-side
    risk-class map that also provides a plain-language "why this needs
    approval" line per class.
  • Friction mode rebuilt with stylesheet classes instead of inline
    cssText; the dead .approval-dialog fallback branch is gone (it could
    never fire - the HTML used an id).
  • Session switches (new/load) clear the approval queue so a stale card
    can never linger in a wiped message list.
  • All card content uses the new token scales (--space-, --r-, --fs-*).

Verified: node --check, go vet, full cmd/odek test suite. UI logic
reviewed for queue/ack races (single-threaded ordering guarantees local
shift happens before the ack is processed; dismiss is idempotent).

…cards

Second PR of the WebUI modernization roadmap (Phase 2b: approval UX).
Stacked on #109 (feat/webui-modernization-1).

Replaces the blocking approval modal with an inline decision card pinned
at the bottom of the message stream (position: sticky), so the operator
can scroll back through the transcript while deciding. During an approval
the agent is mid-turn (busy), so nothing is lost vs the modal; the gate
itself is untouched - every decision still goes to the server as an
explicit approval_response, and Escape no longer closes the prompt.

- Queue: multiple approval requests (parallel tool calls) render one at a
  time with a "request 1 of N" indicator instead of stacking modals.
- approval_ack handling: requests answered from another connected client
  are dismissed locally (previously the ack event was ignored).
- Keyboard operation: a = approve, d = deny, t = trust session (when the
  class allows it); modifier combos and text inputs are respected, and
  the friction gate applies to keyboard approvals too. Keys are shown as
  kbd hints on the buttons and documented in the shortcuts dialog.
- Accessibility: role="alertdialog" with aria-labelledby/describedby,
  focus moves to the card on show; DOM built with textContent throughout
  (no innerHTML with command data).
- Risk badge bug fixed: the server sends the class string (system_write,
  destructive, ...) but the old CSS keyed on emoji classes
  (.approval-risk.X), so the badge rendered unstyled. Badges now use
  data-level attributes (warn/danger/ok) driven by a client-side
  risk-class map that also provides a plain-language "why this needs
  approval" line per class.
- Friction mode rebuilt with stylesheet classes instead of inline
  cssText; the dead .approval-dialog fallback branch is gone (it could
  never fire - the HTML used an id).
- Session switches (new/load) clear the approval queue so a stale card
  can never linger in a wiped message list.
- All card content uses the new token scales (--space-*, --r-*, --fs-*).

Verified: node --check, go vet, full cmd/odek test suite. UI logic
reviewed for queue/ack races (single-threaded ordering guarantees local
shift happens before the ack is processed; dismiss is idempotent).
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 26, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
odek a122d29 Commit Preview URL

Branch Preview URL
Jul 26 2026, 12:32 PM

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