Skip to content

Fix invisible approval requests in dashboard#713

Open
CastleOneX wants to merge 1 commit intoRightNow-AI:mainfrom
CastleOneX:pr/approvals-visibility
Open

Fix invisible approval requests in dashboard#713
CastleOneX wants to merge 1 commit intoRightNow-AI:mainfrom
CastleOneX:pr/approvals-visibility

Conversation

@CastleOneX
Copy link

Summary

  • keep a bounded recent approval history instead of dropping resolved or timed-out approvals immediately
  • return recent approvals from /api/approvals
  • make the dashboard poll and surface pending approvals with a badge/toast so requests do not disappear before the user sees them

Why

Approval-gated actions such as shell_exec could time out or resolve before the Approvals page was opened. In practice this made requests appear to vanish, which made the security flow feel broken even though the request had existed briefly.

Validation

  • cargo check -p openfang-kernel -p openfang-api -j 1

Keep a bounded recent approval history instead of dropping timed-out or resolved requests on the floor, return recent approvals from /api/approvals, and make the dashboard poll and badge pending approvals so shell_exec prompts do not disappear before the user ever sees them.

(cherry picked from commit 78dd9f99cc835e85e452889bf6cfced5137f8a4a)
Copy link
Member

@jaberjaber23 jaberjaber23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done. ApprovalRecord history with bounded VecDeque, pending badge in nav, toast notifications, 5s polling, expired filter. Tests cover all three decision paths. Clean implementation.

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.

2 participants