feat(ui): unify async button handlers with Action lifecycle - #14
Merged
Conversation
…button handlers Unify all asynchronous button handlers across UI surfaces (InspectorPanel, ProjectTree, SidebarPanel, WorkbenchControls) into the Action lifecycle (READY -> BLOCKED -> RUNNING -> SUCCEEDED/FAILED -> READY). Changes: - Add ActionLifecycleContext for global action state management - Add useActionLifecycle hook for state transitions and feedback - Extend UI_ACTION_GRAPH with comprehensive action definitions - Integrate lifecycle into HistoryTab, RagTab, PreviewTab - Integrate lifecycle into ProjectTree file operations - Integrate lifecycle into SidebarPanel session actions - Integrate lifecycle into WorkbenchControls top-bar actions - Fix useActionState subscription to actionStates changes - Fix useCapabilities to use browser fallback during loading state Refs: architecture.md Frontend UI Design Graph
…iles - Add ui-action-graph.js, ActionLifecycleContext.jsx, useActionLifecycle.js to Section 14 implementation index - Update Closed interaction loop anchor to reference new implementation - Add new files to architecture-contract.test.js existence checks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
将 Frontend UI Design Graph 中所有异步按钮处理器统一接入 Action lifecycle,使 pending、success、failure 和 recovery 在所有 UI Surface 上完全落地。
Changes
useActionState订阅actionStates变化以触发重新渲染useCapabilities在 loading 状态使用 browser fallbackTest