Skip to content

Fix/agent workspace layout#1526

Open
charmi-reddy wants to merge 10 commits into
TransformerOptimus:mainfrom
charmi-reddy:fix/agent-workspace-layout
Open

Fix/agent workspace layout#1526
charmi-reddy wants to merge 10 commits into
TransformerOptimus:mainfrom
charmi-reddy:fix/agent-workspace-layout

Conversation

@charmi-reddy
Copy link
Copy Markdown

Summary

This PR improves the Agent Workspace action permission flow for better state consistency and safer UI behavior.

What Changed

  • Stabilized action visibility tracking by using action IDs instead of list indexes.
  • Kept local deny/feedback state aligned with refreshed action lists.
  • Fixed pending-permission count updates using safe functional state updates.
  • Added failure rollback so actions are visible again if permission update fails.
  • Prevented duplicate permission submissions while a request is in progress.
  • Normalized optional feedback before submit by trimming input and sending null when empty.
  • Pruned stale hidden/submitting action IDs when actions refresh.

Why

These changes reduce UI desync issues during refreshes, prevent accidental duplicate approvals/denials, and make permission updates more reliable under slow/failing API responses.

Validation

  • Verified frontend file has no lint/syntax errors after each change.
  • Manually validated approve/deny flow behavior for:
    • success response
    • non-200 response
    • request failure
    • repeated fast clicks

Risk

Low to medium. Changes are scoped to Action Console interaction/state logic and do not alter backend APIs.

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