fix(web): verify-ui-states 在干净 main 上三条真红——shell-ambient 门控过期 + /chat 组员/观察者待判(卡 F34/F50)
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- Avg merge
- 1h 7m
- Merged PRs (30d)
- 969
Description
## 现象
`bash apps/web/scripts/verify-ui-states.sh` 在**未修改的 `origin/main`** 上就失败(实测 SHA `142adbb7`,工作树零 diff):
```
✗ /chat as=member → 期望项目层含「组员」
✗ /chat as=observer → 期望项目层含「观察者」
✓ /projects/p1/canvas as=facilitator → 引导师
==> 骨架完整性
✗ 缺 shell-ambient
❌ UI 状态门控失败
```
它是 **F34** 与 **F50**(均 `in_progress`)的 verification 命令,也是 sprint-02 里「3 个未通过」中除 F158 之外的两个。
⚠️ 这是**真红,不是 flaky**——与 #1010 那条负载性假红是两回事,别混为一谈。多次运行结果稳定一致。
## 根因一:`shell-ambient` 已被删除,门控没跟着改(可直接修)
脚本 `apps/web/scripts/verify-ui-states.sh:147` 仍在断言这个 testid 存在:
```bash
for t in app-shell shell-rail shell-topbar shell-main shell-left-panel shell-right-panel shell-ambient org-switcher role-bar-org; do
```
但 `apps/web/components/shell/app-shell.tsx:29` 逐字写着它**已于 #752 被移除**,且是**有意移除、不留占位符**:
> 「底部环境态条」(`AmbientBar`,2026-07-30 起 `shell-ambient`)已于 #752 移除:它曾是全局硬编码假数据(固定「28:14」/固定发言人/固定 agent 进度)……壳层这一级拿不到「当前是否有活跃录音/agent run」的真实信号,所以不再在这一层渲染任何等价内容,**也不留占位符**。
⇒ **修法:把 `shell-ambient` 从第 147 行的骨架清单里删掉。** 组件侧不需要改——#752 的移除是正确的产品决策,反而是门控成了「同一事实第二处声明」的陈旧副本。
⚠️ **不要为了让门变绿而把 `AmbientBar` 加回来**——那会把 #752 明确删掉的硬编码假数据请回产品里。
## 根因二:`/chat` 的「组员 / 观察者」两条待查(需要该线判断)
同一组断言里 `facilitator`(引导师)与 `groupLead`(组长)**通过**,只有 `member`(组员)与 `observer`(观察者)失败(`verify-ui-states.sh:105-109`):
```bash
assert_in_project chat facilitator 引导师 # ✓
assert_in_project chat groupLead 组长 # ✓
assert_in_project chat member 组员 # ✗
assert_in_project chat observer 观察者 # ✗
```
两种可能,**我没有继续深挖(不在我的模块范围)**:
- (a) `/chat` 对这两种角色**确实不渲染项目层角色标签**——那是实现缺口,要补;
- (b) 产品上这两种角色本就不该显示项目层——那是**门控过期**,断言该删。
⇒ 需要 chat 线或 UI 架构线判断走哪条。**在判断出来之前不要动脚本让它变绿**——两种修法方向相反,猜错就是把真缺口盖掉。
## 影响
F34 与 F50 卡在这里升不了 passing。它们的 owner 分别是 `w2-files2` 和 `w2-model`。
## 复现
```bash
bash apps/web/scripts/verify-ui-states.sh
```
(脚本自带独立端口的 dev 实例,可与常驻 dev 并存。)
---
发现来源:dev-project 在收口 F158 时跑 `harness verify --sprint 01/02` 撞到,**不属于 F158 的问题**,按 coord-main 要求单独开出,不混进 F158 的叙事。
/cc @coord-main
Contributor guide
No contributing guide indexed for this repository
Research direction
Run bash apps/web/scripts/verify-ui-states.sh and inspect its assertions around lines 105-109 and 147. Read apps/web/components/shell/app-shell.tsx alongside the /chat role rendering to determine whether member and observer labels are required at the project level. Done means the gate matches the intended UI and passes on a clean main without restoring the removed ambient bar.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash, typescript
- Domain
- frontend, testing, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 39/100