Skip to content

Fix web macro page hanging infinitely#2447

Merged
GeorgeNgMsft merged 3 commits into
mainfrom
dev/georgeng/fix_macro_library
Jun 5, 2026
Merged

Fix web macro page hanging infinitely#2447
GeorgeNgMsft merged 3 commits into
mainfrom
dev/georgeng/fix_macro_library

Conversation

@GeorgeNgMsft
Copy link
Copy Markdown
Contributor

Fix infinite hang on Macro Library page

The browser extension's Macro Library page hung forever on the loading spinner even though the agent held dozens of stored web flows. The cause was a three-layer regression:
(1) the agent's discovery handler required an active browser session and instantiated an LLM translator for every action, including pure-store ones like getAllWebFlows that never touch the browser;
(2) the front-end response parser returned the service worker's error envelope as if it were the macros array, crashing on .forEach;
(3) the catch handler referenced a stale element ID left over from when the page was renamed from "actions library" to "macros library", so the error display itself threw and never cleared the spinner.

The fix addresses all three layers: store-only discovery actions short-circuit before the browser-session check, the response parser type-guards the result and throws on error envelopes, and the catch block reuses the already-captured container so future failures surface as a useful error rather than another hang.

@GeorgeNgMsft GeorgeNgMsft marked this pull request as ready for review June 5, 2026 22:35
@GeorgeNgMsft GeorgeNgMsft enabled auto-merge June 5, 2026 23:00
@GeorgeNgMsft GeorgeNgMsft added this pull request to the merge queue Jun 5, 2026
Merged via the queue into main with commit 34c115e Jun 5, 2026
21 of 23 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.

1 participant