Skip to content

refactor(web): 对齐 PR #655,移除 legacy verification 事件链路#658

Merged
pionxe merged 3 commits into
1024XEngineer:mainfrom
Yumiue:codex/web-verification-cleanup
May 19, 2026
Merged

refactor(web): 对齐 PR #655,移除 legacy verification 事件链路#658
pionxe merged 3 commits into
1024XEngineer:mainfrom
Yumiue:codex/web-verification-cleanup

Conversation

@Yumiue
Copy link
Copy Markdown
Collaborator

@Yumiue Yumiue commented May 18, 2026

背景

PR #655 已在 runtime 侧清理旧的 verification_started / verification_stage_finished / verification_finished 事件链路,Web 端需要同步完成收口,避免继续暴露失效协议和无效 UI 状态。

本 PR 按方案 A 对齐 Web 端实现:彻底移除旧 verification 中间态模型,只保留当前 runtime 仍会发出的最终态事件消费。

本次改动

1. 清理失效协议定义

  • 删除 web/src/api/protocol.ts 中已失效的事件常量和 payload:
    • VerificationStarted
    • VerificationStageFinished
    • VerificationFinished
    • VerificationStartedPayload
    • VerificationStageFinishedPayload
    • VerificationFinishedPayload

2. 收口事件桥接逻辑

  • 删除 web/src/utils/eventBridge.ts 中对旧 verification 中间态事件的处理
  • 删除 verification message 同步逻辑和 _latestVerificationMsgId
  • 保留最终态事件消费:
    • verification_completed
    • verification_failed
    • acceptance_decided

3. 收缩 runtime insight store

  • 删除 web/src/stores/useRuntimeInsightStore.ts 中仅服务于旧 verifier 中间态的状态和 action:
    • verificationRunning
    • verificationStarted
    • verificationStages
    • verificationFinished
    • verificationHistory
    • startVerification
    • upsertVerificationStage
    • finishVerification
  • 保留最终态状态:
    • verificationCompleted
    • verificationFailed
    • acceptanceDecision

4. 删除旧 verification UI 链路

  • 删除 verification chat message 类型和更新逻辑
  • 删除 VerificationMessage 组件及其测试
  • MessageItem 不再渲染 verification 卡片
  • useChatStore 不再维护 verification 相关消息数据

5. 清理注释与残留说明

  • 修复 useChatStore.ts 中的乱码注释
  • 删除过期的 verification 注释描述,保证注释与当前实现一致

影响

  • Web 端不再暴露 runtime 已删除的旧 verification_* 事件
  • 不再保留依赖 VerificationStarted 的中间态 history/message/store 逻辑
  • 验收相关展示仅保留最终态事件驱动的数据:
    • verification_completed
    • verification_failed
    • acceptance_decided

测试

已通过:

  • npm test -- src/utils/eventBridge.test.ts src/stores/useRuntimeInsightStore.test.ts src/components/chat/MessageItem.test.tsx
  • npm run build

备注

这个 PR 不回滚 #655,也不重建新的 acceptance timeline,只完成 Web 端对 runtime 新语义的收口对齐。

close #656

Yumiue added 2 commits May 18, 2026 01:44
# Conflicts:
#	web/src/stores/useRuntimeInsightStore.test.ts
#	web/src/utils/eventBridge.test.ts
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

Copy link
Copy Markdown

@fennoai fennoai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of regressions showed up in the legacy verification cleanup.

Comment thread web/src/components/chat/MessageItem.tsx
Comment thread web/src/stores/useRuntimeInsightStore.ts Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented May 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@pionxe pionxe merged commit f288568 into 1024XEngineer:main May 19, 2026
3 checks passed
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.

Web 端未对齐 PR #655 的验收事件清理,残留失效 verification 协议并保留无效展示链路

2 participants