feat(security): TUI security indicators, event log, and metrics display (Phase 5, #1195)#1248
Merged
feat(security): TUI security indicators, event log, and metrics display (Phase 5, #1195)#1248
Conversation
This was
linked to
issues
Mar 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 5 of Untrusted Content Isolation epic (#1195): TUI integration for security visibility.
security:eventscommand outputs full security event history as system message (command palette only, no slash shortcut).SecurityEvent+SecurityEventCategoryenum in zeph-core (unconditional, not feature-gated). Ring buffer (VecDeque, cap 100) in MetricsSnapshot, transported via existing watch channel.floor_char_boundary()for detail (128 chars) and source (64 chars), ASCII control char stripping on source field.Key files
crates/zeph-core/src/metrics.rs— SecurityEvent, SecurityEventCategory, ring buffercrates/zeph-core/src/agent/utils.rs— Agent::push_security_event()crates/zeph-tui/src/widgets/security.rs— security side panel widget (new)crates/zeph-tui/src/widgets/status.rs— status bar SEC indicatorcrates/zeph-tui/src/command.rs— SecurityEvents command palette entrycrates/zeph-tui/src/app.rs— format_security_report(), panel toggle, event handlingTest delta
4064 -> 4088 (+24 new tests)
Test plan
cargo +nightly fmt --checkcargo clippy --workspace --features full -- -D warningscargo nextest run --workspace --features full --lib --bins(4088 passed):security:eventsin command palette shows event historyCloses phase 5 of #1195.