Skip to content

fix(dashboard): restore release usage-progress readiness - #4722

Merged
huangruiteng merged 2 commits into
mainfrom
codex/fix-release-usage-progress-20260919
Sep 19, 2026
Merged

huangruiteng merged 2 commits into
mainfrom
codex/fix-release-usage-progress-20260919

Conversation

@huangruiteng

@huangruiteng huangruiteng commented Sep 19, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • keep the collaboration readback type in the import-meta-free chat model so Personal Workspace model tests can load it in Node
  • restore the current browser smoke contract for real chat session/turn/SSE behavior, localized Goal tabs, drawer focus, outputs, and live-status retry behavior
  • keep mobile inspector drawers below the global top bar and rebuild the packaged dashboard assets

Changed surfaces

  • Dashboard Personal Workspace model and mobile drawer CSS
  • Dashboard home Playwright readiness smoke
  • packaged loopx/web/chat assets and retention manifest

Validation

  • npm run build
  • npm run smoke:usage-progress
  • npm run smoke:demo-readiness
  • npm run smoke:personal-workspace
  • npm run smoke:personal-workspace-packaged
  • npm run smoke:home-browser
  • npm run test:dashboard:coverage
  • python examples/semantic-vocabulary-drift-smoke.py
  • loopx canary premerge --from-git-diff --goal-id loopx-meta — 8/8 selected checks passed, 0 failures, 0 skips
  • public/private boundary scan — 10 files scanned, 0 hits

The first local attempt ran several fixed-port Playwright smokes concurrently and hit port contention. This was test-harness contention rather than a product failure; every port-owning browser command was then rerun sequentially and passed.

Failures / skips / holds

  • no remaining local validation failures or skips
  • maintainer merge required because this changes apps/**; the agent will not self-merge it

Future-facing review

The bounded type move removes an accidental runtime dependency while preserving the existing chat.ts compatibility export. No broader refactor is needed for this release fix.

Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com>
Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com>

@huangruiteng huangruiteng left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

评审精确 head:520895bb31360f6c8913b5aeb384aa5b5c3c8ff0

动机

这组改动解决 v1.0.6 发布资格检查在当前主干上暴露的三个具体问题:Personal Workspace 的纯模型编译被 chat.ts 中仅适用于 Vite 的 import.meta.env 连带破坏;首页浏览器 smoke 仍等待已经移除的旧快捷操作并未覆盖真实 Turn/SSE 流程;窄屏 inspector 的层级又被更高 specificity 的桌面规则覆盖。基线 da6d79778 上,同一 smoke:usage-progress 稳定报 TS1343/TS2339,smoke:home-browser 稳定在旧选择器超时;本 head 将两条既有发布入口恢复为可执行、能观察真实交互的验证,同时修正窄屏抽屉层级,因此完成了本次发布修复的独立闭环。

改动思路

改动继续复用现有所有权边界:chat-model.ts 保存无运行时依赖的共享模型类型,chat.ts 继续负责浏览器传输并保留兼容导出;Personal Workspace 组件/CSS 负责 UI 呈现;既有 home Playwright smoke 继续作为发布浏览器证据的唯一入口。正向路径覆盖 manager 快捷操作立即发送、创建 Session、接受 Turn、消费 answer.delta 与 turn.completed、呈现回答,以及 Goal 标签、outputs、桌面/移动抽屉和 title focus。负向/恢复路径覆盖 active Turn 恢复和 live status 缺失后的重试,不由 fixture 偷渡合成成功状态。没有增加协议、持久化状态、权限、激活开关或第二套测试框架。

具体改动

  • 源码:在 chat-model.ts 定义 CollaborationReadback,由 chat.ts 兼容性 re-export,并让 collaboration-card.tsx 与 personal-workspace-model.ts 直接使用纯模型边界。
  • UI:在 personal-workspace.css 的窄屏、特定 inspector 选择器上显式设置 z-index: 30,覆盖桌面层级而不改变其他 drawer。
  • 验证:dashboard-home-browser-smoke.mjs 更新为当前中文 tabs、即时发送、完整 Session → Turn → SSE fixture、drawer 标题聚焦、outputs testid 和状态重试契约。
  • 打包:重新生成 loopx/web/chat 的 CSS/JS、index.html 与 asset-retention.json;exact-head 再构建后工作树无差异。

关键代码讲解

  1. CollaborationReadback:类型形状及既有导入兼容性不变,但 model-only CommonJS 编译不再加载含 import.meta 的浏览器传输模块。
  2. installChatApiFixture:按当前客户端契约返回 Session summary、接受 /turns,并输出终态 SSE;测试失败时不会绕过真实客户端路径直接注入回答。
  3. assertDrawerTitleFocus:验证打开 context drawer 后 document.activeElement.id 为 personal-drawer-title,与当前可访问性实现一致。
  4. 窄屏 inspector stacking rule:用足够 specificity 的规则把 inspector 提升到 drawer 层 30,同时仍低于全局 top bar。

对主干的风险

生产代码风险较小:运行时仅有一个响应式 CSS 层级修正,类型移动在运行时被擦除且保留原导出;其余主要变化是现有 smoke 和确定性打包资产。最强回归场景是 smoke 只渲染静态 fixture、未真正走 Session → Turn → 终态 SSE,从而漏掉 manager 交互失败;本 head 通过等待流式回答、active Turn 恢复、缺失状态重试以及 source/package 浏览器路径覆盖该风险。真实外部 Agent backend 不在本 PR 的改动范围内,fixture 只证明现有客户端协议。

验证结果:npm run build、smoke:usage-progress、smoke:home-browser、smoke:personal-workspace、smoke:personal-workspace-packaged、smoke:demo-readiness、Dashboard coverage、semantic vocabulary、public/private scan、严格 change-quality receipt 与 premerge canary 均通过;GitHub exact-head ruleset 必需检查全部通过,发布/部署和 presentation path-selector 的 skip 属于工作流预期,显式 non-blocking 的 SonarCloud analysis 在评审发布时仍在运行。第一次本地运行曾并发启动多个占用固定端口的 Playwright smoke,产生端口争用;之后所有端口型命令均按支持的串行模式重跑通过。

语义与 CI 对齐

本 PR 没有新增或修改共享状态、权限、持久化、控制面义务或公共词汇;CollaborationReadback 的名称和 schema 仅移动所有权位置。CI 义务未放宽,旧默认选择器被当前产品契约取代并在 PR 说明中披露。

我的整体评价

结论为 APPROVE:该 exact head 对发布阻塞具有可重复的 base/head 证据,复用了最接近的模型、传输、UI 和 smoke 所有者,改动规模与问题相称,也没有发现阻塞项或非阻塞 finding。相关未来向重构已在本次完成为最小的模型边界整理;继续抽象会扩大发布修复范围,当前无需追加。残余风险仅限未连接真实外部 Agent backend,以及浏览器 smoke 固定端口不能安全并行;两者均未被误报为已验证。由于改动涉及 apps/**,按仓库规则必须由维护者合并,本评审不授予 Agent 自合并权限。

English verdict: APPROVE - exact head 520895bb31360f6c8913b5aeb384aa5b5c3c8ff0 restores import-meta-free model compilation, current Session/Turn/SSE browser readiness, and narrow inspector stacking; local validation, quality qualification, premerge canary, and required GitHub checks pass, with non-blocking SonarCloud still running and maintainer merge remaining.

@huangruiteng
huangruiteng merged commit a064de4 into main Sep 19, 2026
31 checks passed
@huangruiteng
huangruiteng deleted the codex/fix-release-usage-progress-20260919 branch September 19, 2026 03:46
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