Skip to content

feat(activity): E6 · origin kill-switch + home waiting strip (#186) - #195

Merged
hellno merged 1 commit into
mainfrom
hellno/e6-activity-waiting
Jul 6, 2026
Merged

feat(activity): E6 · origin kill-switch + home waiting strip (#186)#195
hellno merged 1 commit into
mainfrom
hellno/e6-activity-waiting

Conversation

@hellno

@hellno hellno commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Summary

Finishes the two remaining Activity/home gaps in the v4 request-origin epic and wires the stop_brake widget E1 left dead-coded for exactly this. The Activity STOP is reframed to the shared three-state kill-switch driven by whether an agent is live (disabled grey No agents running → amber Stop all agents → red Confirm STOP…), the Activity header becomes the quiet uppercase ACTIVITY label with no hero title/subtitle, and the wallet home gains a one-line "Waiting on you" strip (N waiting for you · Review → amber when pending, else Nothing waiting for you.). One shared Shell::has_active_agent() predicate now backs both the kill-switch and the home agent-presence acting/idle label so they can never contradict, and brake_state() is a pure, unit-tested mapping. STOP stays reachable via ⌘K from every surface even when the header shows the disabled idle marker, and no approval/zeroize path is touched.

Linked issue

Closes #186

Definition of Done

  • cargo fmt --all --check is clean
  • just check is green — clippy -D warnings on both the default config and --features tray
  • cargo test --workspace is green
  • No new or changed dependencies in Cargo.toml / Cargo.lock
  • Visual/UI change follows DESIGN.md (amber = human, cyan = agent; matches the deckard-v4.html golden ref for .acthead / .killswitch / .waitstrip)
  • Secrets stay in Zeroizing and are never logged or Debug-printed (no secret-handling code touched; STOP zeroize logic unchanged)
Evidence (paste command output here)
$ cargo fmt --all --check
# clean (exit 0, no output)

$ just check
cargo clippy --locked -p deckard-app --all-targets -- -D warnings
    Finished `dev` profile [unoptimized + debuginfo] target(s)
cargo clippy --locked -p deckard-app --all-targets --features tray -- -D warnings
    Finished `dev` profile [unoptimized + debuginfo] target(s)
cargo clippy --locked -p deckard-signerd --all-targets --features dev-signerd-bin -- -D warnings
    Finished `dev` profile [unoptimized + debuginfo] target(s)
# exit 0, no warnings

$ TMPDIR=/tmp cargo test --workspace
# 418 passed, 2 ignored across 38 suites (exit 0)
# incl. new widgets::tests::brake_state_arm_beats_agent_state ... ok

CI: all 5 checks green (linux, macos, quick, cargo-deny-advisories, cargo-deny-supply-chain).

Notes for reviewers

  • Trust: STOP is never gated to the header — ⌘K revoke-all (aliases stop/panic/kill/halt/emergency/freeze) fires stop_revoke_all unconditionally from every surface, and the agent surface keeps its own always-live STOP. The idle header marker is disabled presentation only.
  • Adversarial review: codex (GPT-5, xhigh) cross-model pass returned ACHIEVED (0 P0/P1) — verified the daemon makes revoked && pending unreachable (lock() denies all pending + sets revoked atomically), so the kill-switch can't falsely read "No agents running" mid-flight. Its one actionable P2 (kill-switch vs agent-presence predicate mismatch) is fixed here via the shared has_active_agent().
  • Deliberate follow-up (not a blocker): the home strip count — like the existing sidebar needs-you badge it mirrors — only refreshes while on the Activity surface (seeded at unlock). Making the pending count globally live is a separate change that also touches the shipped sidebar badge.
  • ⚠️ Screenshots PENDING: E6 is a GUI change and the views sit behind the unlock gate, which this agent shell can't drive (documented macOS input limitation). Capture from a foreground just demo (or just qa, passphrase deckard-qa): Home strip empty + pending; Activity header STOP in Idle / Ready (just demo-agent) / Armed.

Wire the pre-built stop_brake widget into the Activity header (E1 left it
dead-coded for E6) and finish the two remaining v4 gaps on the Activity/home
surfaces:

- STOP kill-switch reframed to the shared three-state treatment, driven by
  whether an agent is live: disabled "No agents running" when idle, amber
  "Stop all agents" while an agent runs, red "Confirm STOP..." once armed
  (matches golden ref .killswitch / .killswitch.idle). STOP stays reachable
  via ⌘K regardless; the zeroize / deny-in-flight logic is untouched.
- Activity header is now the quiet uppercase ACTIVITY label + killswitch, with
  no hero title and no explainer subtitle (golden ref .acthead).
- New one-line "Waiting on you" home strip: amber "N waiting for you · Review →"
  (opens Activity) when requests are pending, else a calm "Nothing waiting for
  you." (golden ref .waitstrip). The count reuses activity_pending — the same
  source as the sidebar needs-you badge, so they always agree.

One shared Shell::has_active_agent() predicate now backs both the Activity
kill-switch and the wallet-home agent-presence "acting/idle" label so they can
never contradict (a revoked policy reads not-live on both). brake_state() is a
pure, unit-tested mapping (arming beats agent state).

Verified: fmt clean · just check green (both configs) · cargo test --workspace
green (+ a brake_state precedence test). Codex adversarial review: ACHIEVED,
0 P0/P1 — no trust regression (STOP reachable via ⌘K + the agent surface; the
daemon makes revoked&&pending unreachable; no approval path touched).

Screenshots PENDING: the E6 views sit behind the unlock gate, which needs a
foreground unlock this agent shell can't synthesize (documented macOS limit).
@hellno
hellno merged commit f684f1b into main Jul 6, 2026
5 checks passed
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.

E6 · Origin-attributed Activity + "Waiting on you"

1 participant