Skip to content

feat: Phase 1 stability and quality baseline#14

Merged
genni613 merged 8 commits into
masterfrom
feat/phase1-stability
Apr 16, 2026
Merged

feat: Phase 1 stability and quality baseline#14
genni613 merged 8 commits into
masterfrom
feat/phase1-stability

Conversation

@TuYv

@TuYv TuYv commented Apr 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • 统一 Bridge 生命周期事件: 移除主题切换时多余的 context 重推,pushJS 丢弃消息时添加 debug 日志,文档化 onFrontendReady 生命周期契约
  • 结构化错误分层: 新增 BridgeErrorPayload(type, message, action?) 通道,ChatService 所有错误站点按 config/network/runtime 分类,前端 ErrorBanner 按类型渲染不同样式和操作按钮
  • UI 状态一致性: bridge 重连时清除残留 ErrorBanner,主题切换不再触发 context file 重推
  • WebView 冻结预防: 注入 async clipboard 键盘拦截器,防止 Ctrl+C/Cmd+C 同步等待系统剪贴板导致 JCEF 冻结(参考 jetbrains-cc-gui #846)
  • 回归测试补全: 新增 6 个测试文件,覆盖 selection 路由、session restore 过滤、commit 两阶段生成、错误 payload 序列化、连接状态推导

Verification

  • ./gradlew test — 全部通过
  • ./gradlew buildPlugin — 构建成功
  • cd webview && npm run build — TypeScript 编译无错误

Test plan

  • IDE 中切换 Light/Dark 主题,确认 context file 标签不闪烁
  • 不配置 Provider 时发消息,确认 ErrorBanner 显示黄色警告 + "打开设置"按钮
  • 配置错误 API Key 发消息,确认 ErrorBanner 显示对应提示
  • 在 WebView 中选中文字按 Ctrl+C/Cmd+C,确认不卡死
  • 重载 WebView 后确认之前的 ErrorBanner 不残留

🤖 Generated with Claude Code

TuYv and others added 8 commits April 16, 2026 18:25
Remove spurious notifyContextFile call from theme-change listener.
Add debug log to pushJS when bridge not ready. Document onFrontendReady lifecycle contract.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ssification

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…n buttons

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add useEffect in App.tsx to clear error state when bridgeReady transitions to true
- Inject async clipboard keydown interceptor in BridgeHandler.register() to prevent JCEF WebView freeze on Ctrl+C/Cmd+C (ref: jetbrains-cc-gui #846)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ession restore

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…, and commit generation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@TuYv TuYv requested a review from genni613 April 16, 2026 11:07
@github-actions

Copy link
Copy Markdown

Failed to generate code suggestions for PR

@genni613 genni613 merged commit 16c767e into master Apr 16, 2026
4 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.

2 participants