Skip to content

feat(ui): unify async button handlers with Action lifecycle - #14

Merged
novvoo merged 2 commits into
mainfrom
codex/omp-desktop-adaptation
Jul 24, 2026
Merged

feat(ui): unify async button handlers with Action lifecycle#14
novvoo merged 2 commits into
mainfrom
codex/omp-desktop-adaptation

Conversation

@novvoo

@novvoo novvoo commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Summary

将 Frontend UI Design Graph 中所有异步按钮处理器统一接入 Action lifecycle,使 pending、success、failure 和 recovery 在所有 UI Surface 上完全落地。

Changes

  • ActionLifecycleContext + useActionLifecycle: 全局 action 状态管理和 feedback 机制
  • UI_ACTION_GRAPH 扩展: 注册所有异步动作定义(会话/RAG/预览/文件/工具栏)
  • InspectorPanel: HistoryTab、RagTab、PreviewTab 全部接入 lifecycle
  • ProjectTree: 文件操作(创建/删除/重命名/刷新)接入 lifecycle
  • SidebarPanel: 会话管理(新建/切换/删除/清空)接入 lifecycle
  • WorkbenchControls: 顶部工具栏(预览/导出/清空)接入 lifecycle
  • Bug fix: useActionState 订阅 actionStates 变化以触发重新渲染
  • Bug fix: useCapabilities 在 loading 状态使用 browser fallback
  • docs: 同步 architecture.md 实现索引和 ui-action-graph.md 状态

Test

  • ✅ 533 tests pass (1656 assertions)
  • ✅ Vite production build success (360 modules)

novvoo added 2 commits July 24, 2026 17:43
…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
@novvoo
novvoo merged commit c64d58e into main Jul 24, 2026
1 check failed
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