【已审核】fix(automation): 自动任务会话始终留在自动任务区,毕业时 toast 提示#918
Merged
ErlichLiu merged 2 commits intoJun 25, 2026
Merged
Conversation
added 2 commits
June 24, 2026 02:32
…mation session graduates When a user sends a message to an automation session, the session is marked as 'graduated' (automationGraduated=true) and moves from the automation group to the workspace's normal session list. Previously this happened silently, causing confusion. Changes: - Emit 'automation_graduated' proma_event via EventBus after graduation - Show a toast notification explaining the session has moved - Refresh session list immediately so the sidebar updates - Also refresh sessions when automation changed events fire (AutomationInitializer), ensuring new automation sessions appear in the sidebar automation group promptly
Remove graduation from sidebar filters — automation sessions now always stay in the '自动任务' group even after user interaction. Previously, sending a message would cause the session to silently move from the automation group to the workspace project list. The scheduler still uses automationGraduated internally to prevent reusing user-interacted sessions for future automated runs.
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.
概述
自动任务会话之前有"毕业"机制:用户发消息后
automationGraduated=true,会话从「自动任务」组静默移到普通工作区项目列表——用户困惑"自动任务去哪了"。本 PR 修复两个问题:
isHiddenAutomationSession和automationGroup中对automationGraduated的过滤,自动任务会话无论是否被用户互动过,始终归属自动任务区broadcastChanged刷新会话列表 — 自动任务运行完成时同步刷新侧边栏会话列表,确保新会话及时出现automationGraduated字段保留且仍由agent-service.ts设置,调度器用它阻止向已被用户接管的会话注入新的定时运行。改动
packages/shared/src/types/agent.ts(+2) — PromaEvent 新增automation_graduated类型apps/electron/src/main/lib/agent-service.ts(+5) — 毕业时通过 eventBus 发送 proma_eventapps/electron/src/renderer/hooks/useGlobalAgentListeners.ts(+6) — 处理毕业事件显示 toastapps/electron/src/renderer/main.tsx(+5/-1) — AutomationInitializer 同步刷新会话列表apps/electron/src/renderer/components/app-shell/LeftSidebar.tsx(+5/-8) — 移除automationGraduated过滤,会话始终留在自动任务组测试
bun run typecheck)紧急度
低 — UX 改进。