fix(frontend): make workflow-list failures visible and independent
WHY THIS MATTERS Four failure paths in the rewritten WorkflowList were invisible or worse: 1. The initial load used Promise.all over the user's workflows AND the new add-on catalog, so a failing /workflow-addons endpoint blanked the whole workflows page - data that loaded fine before this feature existed. 2. importAddon() had no error handling at all: a failed import flipped the button back from "Importing..." with zero feedback, leaving the user to wonder whether they now own a copy (an unhandled promise rejection in the console was the only trace). 3. Bulk delete/import wrote "Some selected ... could not be ..." into loadError, which only renders inside the table's EMPTY state - invisible while rows exist, then leaking into the empty state much later. 4. openAddon() set the preview modal from a fetch with no staleness check: close the modal while the request is in flight and it pops back open; open A then B quickly and the modal can swap back to A's content. WHAT IS THE PATTERN HERE? Every fetch needs an answer to "what does the user see when this fails or resolves late?" Promise.allSettled loads independent datasets independently; a ref that records which add-on is currently open lets late responses be recognized as stale and dropped; action errors get a dedicated, dismissible banner that renders regardless of table contents. HOW THE FIX WORKS - Load: allSettled over (workflows, add-ons); each dataset renders or reports its own error (loadError for workflows, addonsError shown in the Add-ons tab). - importAddon: in-flight guard (second click is a no-op), try/catch, and a visible "Could not import ..." banner on failure. - Bulk actions report into the new actionError banner above the table. - openAddon/closeAddon track the open add-on id in a ref and ignore stale responses. Found by review of PR #309. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E4PXCdenNH5Mqhm5Sre9Zs
| Repository | open-legal-products/mike |
|---|---|
| Author | Amal <mamalanand3@gmail.com> |
| Authored | |
| Committed | |
| Parents | bdb2b4b6 |
| Stats | 1 file changed , +41 , -7 |
| Part of | Refactor workflows into defaults, add-ons, and quick actions |
Capture this commit into my fork
Download a Markdown prompt that tells Claude how to port this
exact commit into your working tree. Run it via
claude -p < capture-commit-ed735ea1.md
from inside the repo you want the change in.