agent-orchestrator/packages/web
prateek cd9003a7db
fix: improve 'Ask Agent to Fix' button UX (#61)
* fix: improve "Ask Agent to Fix" button UX and remove outdated TODO

Replaced browser alerts with proper visual feedback:
- Added loading state ("Sending...") with disabled button during request
- Show success state ("Sent!") in green for 3 seconds
- Show error state ("Failed") in red for 3 seconds
- Prevent multiple clicks while processing

Also removed outdated TODO comment - the API endpoint is already implemented.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* fix: prevent race condition in concurrent "Ask Agent to Fix" clicks

Changed state tracking from single values to Sets to properly handle
multiple concurrent button clicks:

- `sendingComments: Set<string>` - tracks all in-flight requests
- `sentComments: Set<string>` - tracks successful completions
- `errorComments: Set<string>` - tracks failures
- `timersRef: Map<string, Timeout>` - per-comment cleanup timers

This ensures that:
- Each button correctly shows its own loading/success/error state
- Buttons remain disabled only while their specific request is pending
- Callbacks from different requests don't overwrite each other's state

Fixes the race condition identified by Cursor Bugbot.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-16 20:29:51 +05:30
..
e2e feat: implement web dashboard with attention-zone UI and API routes (#1) 2026-02-14 14:26:59 +05:30
screenshots feat: implement web dashboard with attention-zone UI and API routes (#1) 2026-02-14 14:26:59 +05:30
server feat: implement DirectTerminal with XDA clipboard support (#55) 2026-02-16 04:34:15 +05:30
src fix: improve 'Ask Agent to Fix' button UX (#61) 2026-02-16 20:29:51 +05:30
.env.local.example feat: implement DirectTerminal with XDA clipboard support (#55) 2026-02-16 04:34:15 +05:30
.gitignore feat: implement DirectTerminal with XDA clipboard support (#55) 2026-02-16 04:34:15 +05:30
next-env.d.ts feat: implement web dashboard with attention-zone UI and API routes (#1) 2026-02-14 14:26:59 +05:30
next.config.js feat: publish to npm under @composio scope (#32) 2026-02-15 04:28:57 +05:30
package.json feat: implement DirectTerminal with XDA clipboard support (#55) 2026-02-16 04:34:15 +05:30
postcss.config.mjs feat: implement web dashboard with attention-zone UI and API routes (#1) 2026-02-14 14:26:59 +05:30
tsconfig.json fix: resolve dashboard GitHub API rate limiting and PR enrichment (#37) 2026-02-15 04:14:54 +05:30
vitest.config.ts feat: implement web dashboard with attention-zone UI and API routes (#1) 2026-02-14 14:26:59 +05:30