feat(frontend): add SwarmConfirmModal, SwarmToast, useConfirm, useToast - #3
Merged
Conversation
HelloWorldU
force-pushed
the
agent/frontend-components-v2
branch
from
May 14, 2026 06:08
08579ac to
8130f01
Compare
added 2 commits
May 14, 2026 14:08
新增全局确认弹窗和 Toast 通知组件: - SwarmConfirmModal.vue: 类型化确认弹窗(danger/warning/info) - SwarmToast.vue: 自动消失的 Toast 通知(error/success/info/warning) - useConfirm.ts: 命令式 confirm API,Promise 化 - useToast.ts: 命令式 toast API,支持自动定时移除
HelloWorldU
pushed a commit
that referenced
this pull request
May 14, 2026
…gration + animations PR #3 squash merge lost several modifications from PR #1. Restore: - useSwarmStore.ts: integrate useToast for error notifications (createAgent/startAgent/stopAgent/engine errors now show Toast instead of alert) - AgentDashboard.vue: stat cards with gradient backgrounds + progress bars - CreateTaskModal.vue: Vue <Transition> fade/slide animations on open/close - TaskCard.vue: integrate useConfirm for delete action with custom modal Docs synced: COMPONENT_PATTERNS.md / FRONTEND.md / ARCHITECTURE.md
HelloWorldU
pushed a commit
that referenced
this pull request
May 20, 2026
新建表单和 createAgent 命令链不再要求 instruction:用户直接进入聊天 界面发指令更直观,避免「创建时填的一段话」与后续 sendInstruction 流 两套语义并存导致的概念混乱与代码不一致。 state.instruction 字段本身保留——sendInstruction 仍写入它作为 「最后发送的指令」,Browser 降级模式的 token 估算依赖;engine 持久化 JSON 的 instruction 字段保留兼容,fromPersisted 仍读回,老数据不破坏。 - CreateTaskModal.vue: 去 instruction 表单字段与 props - useSwarmStore.createAgent: 签名去 instruction 参数 - agent-engine: types/schemas/engine.ts/agent.ts 命令 payload + 构造 函数同步去 instruction 形参 - 测试同步适配(integration ×6 / unit ×1 / e2e ×1):调用点去掉 instruction 字段,不引入新测试 - docs: ARCHITECTURE / COMPONENT_PATTERNS / FRONTEND 同步表述 接续 backlog #3。原由 agent-mpdwdoczd 在分支 agent/-ocze 完成、本地 mock PR;接管后重写 commit message 以反映实际改动。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
HelloWorldU
added a commit
that referenced
this pull request
May 28, 2026
backlog #3 真根因 2026-05-28 实测确认:agent workspace 是 git clone 出来的,没跑 npm install → setup-hooks.js postinstall 从未执行 → core.hooksPath 没设 → git commit 默认找 .git/hooks/(空)→ 没 hook 可跑,commit 直接通过。ci/hooks/pre-commit 文件存在但没注册到 git config,形同虚设。 之前我误诊为「Windows shell hook 找不到 sh.exe / silent skip」是因 为当时用 kimi 在一个碰巧跑过 npm install 的旧 workspace 测试,hook 能拦——新建 workspace 没装 npm 就不行。 修复:git.ts.cloneRepo 在 clone 完后追加一行 git config core.hooksPath ci/hooks——跟 setup-hooks.js 做的事一样,零开销。所有新 agent workspace 自动注册 pre-commit hook,本地 commit 时 check-docs 等检查就能拦住 「源码改了忘改文档」这类问题,省一轮 CI fix。 backlog 同步:#3 标已修;清理重复条目;底部时间戳更新。Bug F 修复 PR #23 已验证生效(reviewer 失败 3 次正确标 failed),从观察项里移除。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
9 tasks
HelloWorldU
added a commit
that referenced
this pull request
May 28, 2026
删除 6 份历史 exec-plan:均为已实施或自述过期方案,git log 保留可追溯。 保留 backlog.md 作为下次开工入口。 - critical-bugs-resolved.md 历史 bug 记录 - engine-persistence.md 引擎自持久化(已 ship) - pr-workflow-alignment.md PR #1-#3 历史(文中已标"已全部解决") - review-flow-fixes.md review 流程修复(v4 全部决策已实施) - session-resume-migration.md kimi -r 续会话(已上线) - active/task-system.md 任务系统(已完成 2026-05-12,自述归档) 顺手清掉 backlog.md 对 engine-persistence.md 的链接引用。
9 tasks
HelloWorldU
added a commit
that referenced
this pull request
May 28, 2026
…iewer 修订 接管 PR #29 + 应用自审 reviewer 两处修订: PR #29 原内容: - agent.ts submitReview: 补 review.comment = comment || '',解决 fix loop 拿不到具体审阅意见的根因(Bug #1) - agent.ts syncBranchWithMain: 删 merge 成功后多余的 gitCommit/abortMerge,squash merge 场景不再误报「同步提交失败」(Bug #3) - agent.ts: sendInstruction 后增加 stopped 状态检查,最小可行的 stop 级联兜底(Bug #2 增量修,根治仍归并到架构决策项) - github-api.ts getCheckRunLogs: 截断方向从 slice(0, 8000) 改为 slice(-8000)(Bug #5) - 配套文档同步 + AgentDetail/Store 透传 review.comment 字段 reviewer 修订(本次额外): - github-api.ts: '...[truncated]' 标记从尾部挪到头部,避免误导用户以为尾部还有截断 - backlog.md: footer 同步更新(4 个活跃 bug → 1 个 #4 F5 失踪)+ 应用本地删除架构项「风险」段
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.
新增全局确认弹窗和 Toast 通知组件:
全局挂载于 App.vue,配合 useConfirm / useToast composables 提供命令式调用能力。