Skip to content

spec(1.25): CC interaction parity chrome (D-1..D-8) — impl complete, awaiting CI + review#90

Merged
sqlrush merged 10 commits into
mainfrom
spec-1.25-cc-interaction-parity
Jun 2, 2026
Merged

spec(1.25): CC interaction parity chrome (D-1..D-8) — impl complete, awaiting CI + review#90
sqlrush merged 10 commits into
mainfrom
spec-1.25-cc-interaction-parity

Conversation

@sqlrush

@sqlrush sqlrush commented Jun 2, 2026

Copy link
Copy Markdown
Owner

spec-1.25 CC Interaction Parity — implementation (D-1..D-8)

Remediation for spec-1.24 Stage-1 acceptance Layer-5 ❌ FAIL ("和 cc 的交互完全不像"). Implements the first-impression CC chrome that does NOT depend on a slash registry. Spec: spec-1.25-cc-interaction-parity.md (APPROVED @ R2, dual-repo).

Deliverables

  • D-3 Layout 3-row top/bottom-rule input box (CC PromptInput.tsx:2268 borderLeft/Right=false parity, no side walls). Layout.InputBox* API (concrete, NOT the dead LayoutPlugin — R2 CRIT-B). N=5 correctness floor; Rows<5 graceful single-row fallback (ScrollbackSize never negative).
  • D-1 block.Welcome (renamed from the Banner spec-0.13 stub; grep-confirmed 0 production callers). Boxed ╭─ ✻ Welcome to opendbx ─╮ + version/cwd/tip/? for shortcuts. Narrow-terminal single-line fallback. MeasureOnly.
  • D-2 option-gated startup seed (llmapp.Options.Welcome) — only the interactive bootstrap path seeds it; headless / error-fallback / test constructions do not (canary test).
  • D-4 rich status bar model · cwd · git-branch · mode (StatusSegments reads cached fields, zero per-frame FS IO; statusinfo.go cwd-abbrev + .git/HEAD branch walk, stdlib only, no shell/go-git, branch-only no dirty). No fake token/context values (原则 3).
  • D-5 (CRIT-A) assistant speaker bullet injected at the llmapp drain boundary, marking only the first content node per turn (CC per-message, not per-line); render/streaming stays neutral render-only. User echo drops the > prefix (SpeakerUser plain). Platform glyph /.
  • D-6 ToolResult connector + hanging-indent (composite-buffer; content wrapped at Cols-4, connector in row-0 gutter; narrow-terminal flush-left fallback).
  • D-7 /report prepends a SpeakerAssistant ⏺ 诊断报告 header before the Markdown node.
  • D-8 (CRIT-C) offset/perf regression surface corrected to llmapp.Model.View (plain-slice bottom-up loop; VirtualScrollback is never instantiated in production). Welcome head clips off-screen on tall scrollback via the y>=0 short-circuit.

规则 21 — shared-component callers verified

program.Layout / paintInputBox (was paintInputRow) / paintStatusLine / block.Message (+ Speaker, default SpeakerNone → zero behavior change) / block.ToolResult / block.Welcome (was Banner) / llmapp.New+Options / bootstrap.tui_launcher.go / render/streaming (NOT changed — bullet is post-drain in llmapp). All block.Message{ sites grep-verified SpeakerNone.

规则 20 — 5-layer visual review status

  • Layer 1 (unit invariants: row-width ≤ cols @ 80/120/CJK, graceful degradation, per-turn bullet, connector/indent) — ✅ in this PR.
  • Layer 2-3 (PTY cell golden + freeze pixel-diff) — fixtures parked (env-gated, skip-when-absent; the known 1.24 state). Capture during the visual-review phase.
  • Layer 4 (Qwen2.5-VL AI review) — pending (area:render label).
  • Layer 5 (3-terminal manual) — = the spec-1.24 Layer-5 re-run (user, real terminal; flips C-6/C-7/C-8/C-10 → ✅).

Status

  • ✅ local make gate green (race + gofmt + vet + gosec + coverage + import-rules + dep-allowlist + registry-drift).
  • awaiting CI + three-route post-impl review + Layer-4/5 visual. Do NOT FROZEN/tag until those close.
  • LLM benchmark (规则 18): N-A — no LLM wire / function-calling / streaming-semantics change (bullet is post-drain render-only; chrome never enters the wire).

🤖 Generated with Claude Code

sqlrush added 10 commits June 2, 2026 17:15
Layout 3-zone → box mode (Rows>=5): top rule (Rows-4) / content (Rows-3)
/ bottom rule (Rows-2) + status (Rows-1); scrollback [0,Rows-4). N=5 是
correctness 闸,Rows<5 graceful 退化为 spec-1.16 单行 (ScrollbackSize 永不
负)。paintInputBox 复用 paintInputRow 内容逻辑 (无侧墙/无 Cols-4 内宽数学,
CC PromptInput.tsx:2268 borderLeft/Right=false parity);bottom rule 嵌
"? for shortcuts" borderText。LayoutPlugin 仍 dead (forward-link),用具体
Layout.InputBox* API (R2 CRIT-B)。offset 表 §4.1 冻结 + 6 input 测读 content
行 (规则 21 caller 校正)。

Spec: spec-1.25-cc-interaction-parity.md
D-1 block.Welcome (rename Banner→Welcome,无生产调用方;boxed
╭─ ✻ Welcome to opendbx ─╮ + version/cwd/tip/? for shortcuts;窄终端单行
graceful;MeasureOnly)。D-2 option-gated startup seed (llmapp.Options.Welcome,
仅 interactive bootstrap;headless/error-fallback/test 不 seed — canary 守)。
D-4 富状态条 model · cwd · git-branch (StatusSegments 读 cache 字段零 hot-path
IO;statusinfo.go AbbrevCwd + GitBranch walk .git/HEAD,stdlib only 无 shell/
go-git,只 branch 不 dirty;无伪 token/context 值 原则 3)。

Spec: spec-1.25-cc-interaction-parity.md
D-5 (CRIT-A): block.Message.Speaker enum;assistant ⏺ bullet 注入在 llmapp
drain 边界 (markAssistantBullet 标本 turn 首个 content 节点,per-turn 非
per-line;render/streaming 保持中性 render-only);去 user "> " 前缀
(SpeakerUser plain echo)。bullet glyph 平台分 ⏺/● (figures.ts:4)。
D-6: ToolResult "  ⎿ " 连接线 + hanging-indent (content wrap 至 Cols-4 +
composite blit at x=4 + ⎿ 落首行 gutter;窄终端 flush-left fallback;
GrepTool/UI.tsx:66 parity)。D-7: /report Markdown 前置 SpeakerAssistant
header (⏺ 诊断报告)。D-8 (CRIT-C): View offset/large-scrollback 回归 —
真 surface 是 Model.View plain-slice bottom-up loop (非 VirtualScrollback,
从不生产实例化);welcome head 在长 scrollback 被 y>=0 短路 clip。

Spec: spec-1.25-cc-interaction-parity.md
statusinfo.go git-metadata reads 标 #nosec G304(路径源自 cwd discovery walk
非用户输入,同 config/logger 既有 pattern)。git-hooks/spec-registry.txt
sync 自 opendbrb SSOT(49 entries,含 1.25=49)。bullet_test.go gofmt。
make gate 全绿(race + lint + gosec + coverage + import-rules + registry-drift)。

Spec: spec-1.25-cc-interaction-parity.md
三路 post-impl review absorb(claude code-reviewer APPROVE-WITH-FIXES /
go-reviewer APPROVE-WITH-FIXES 1H / codex REQUEST-CHANGES 1H):
- codex D5-HIGH-1: handleControl 在 append ToolUse 前 drainPendingInto 刷
  pending assistant text(carry ⏺ bullet)→ 文本先于工具节点排序。drain 仅
  限 ToolUse 分支(ToolResult 分支会拉到下一轮 raced-ahead 文本;Thinking/
  Finish drain 破 thinking-only filter timing)+ contentNodesOnly 丢 Empty
  占位(turn-end artifact 不入工具边界)。+ 回归测 DrainsTextBeforeToolUse。
- go-reviewer H-1 / code-reviewer MED-1: dispatchReport 改 functional(返
  nodes+Cmd,caller append),消 in-place receiver mutation。
- go-reviewer M-3 / code-reviewer MED-2: renderWithBullet Empty 早返回(防
  orphan bullet on (no output))+ Empty:true 测。
- codex D4-MED-1: paintStatusLine 段间 dim " · " separator(非尾随空格)。
- codex D1-LOW-1: welcome titleMin+6(top rule 保留尾随 ─)。
- codex D6-LOW-1: ⎿ hanging-indent wrapping 测(续行 col 4 无 connector)。
- M-2: 新测加 t.Parallel;LOW 注释(welcome margin / AbbrevCwd 平台)。
make gate 全绿。

Spec: spec-1.25-cc-interaction-parity.md
codex D5-HIGH-1 的 drain-at-tool-boundary 修法在 shared-TokenStream +
async-control 架构下是 racy:loop goroutine 可 race 完整个多轮,boundary
drain 会拉到 FUTURE-turn 文本排到工具节点前(CI timing 下 TestModel_
LoopAppendsToolBlocks 失败暴露;本地 darwin 没抓到 = 规则 10 case)。
正确修法需 producer-side ordering(per-turn stream boundary 或 text-via-
ordered-channel)= spec-1.21 架构改动,超 1.25 范围 → DEFER + tracked
follow-up。⏺ bullet 经 View/streamDoneMsg drain 的 markAssistantBullet 仍
正确 attach。移除 drainPendingInto/contentNodesOnly + 失效回归测。
5x -race 确定性绿。

Spec: spec-1.25-cc-interaction-parity.md
用户 Layer-5 反馈 boxed welcome 与 CC 不像(CC 当前 WelcomeV2 是 ASCII-art
logo)→ path 3/3 拍板复刻 logo 形态。welcome.go 从 boxed `╭─ ✻ ─╮` 改为
opendbx 原创 3-row block-mark(▛▀▜/▌▒▐/▙▄▟,非 Claude 品牌 logo,§3.2)左 +
文本右(opendbx vX / ✻ Welcome to opendbx! / cwd: ~/path)+ tip 行;? for
shortcuts 移除(输入框 bottom rule 已有)。mechanics 不变(MeasureOnly /
graceful 窄退化单行 / width≤cols 不变量 / 全 width-1 glyph)。测改 logo 断言。

Spec: spec-1.25-cc-interaction-parity.md
用户 path 3/3 拍板:测试阶段 welcome 1:1 照搬 CC WelcomeV2 dark-variant
(含 Claude/clawd 吉祥物 ASCII-art),验 render 引擎保真 + CC UX parity。
welcome.go 复刻 CC 58-wide mascot(sunset rays ░ + clawd body █▓▒ + 星 *,
verbatim 自 WelcomeV2.tsx t1..t15)+ 标题 Welcome to opendbx vX(orange +
dim version)+ cwd/tip footer;per-glyph 上色(body=#D97757,rays=dim)。
Cols<58 graceful 单行。

!!! TEST-PHASE ONLY — 吉祥物是 Anthropic 品牌资产,商业化 1.0 前必须换
opendbx 原创(file 头 + spec §10 + roadmap pre-1.0 gate 挂 tracked 义务;§3.2)。

Spec: spec-1.25-cc-interaction-parity.md
用户给了 CC v2.1.160 真实 welcome(双栏圆角框)→ 复刻该结构(我之前逆向的
WelcomeV2.tsx 是旧组件,错了)。welcome.go 重写为双栏框:标题嵌顶边框
(opendbx vX,orange)/ 左栏居中(Welcome to opendbx! + ▗ ▗ ▖ ▖ / ▘▘ ▝▝
星点吉祥物 + model + cwd)/ 右栏(Tips for getting started + tip + divider +
What's new + 命令提示)。Cols<90 graceful 单行。+ Welcome.Model 字段,seed
透传 opts.ModelName。

TEST-PHASE ONLY — 布局+星点 mirror CC,1.0 前必换 opendbx 原创(file 头 +
spec §10 + roadmap gate)。

Spec: spec-1.25-cc-interaction-parity.md
用户决定不再纠结 CC-identical welcome,回退到最初干净的 boxed welcome
(╭─ ✻ Welcome to opendbx ─╮ + 版本/cwd/tip/? for shortcuts,含 codex
D1-LOW-1 titleMin+6 fix),继续往下收口。撤销 errata R3(block-mark logo)
+ R4(CC clawd mascot / 双栏框):CC-identical welcome 作为 future polish 推迟
(boxed 是 opendbx 原创,无 1.0 品牌替换义务)。

Spec: spec-1.25-cc-interaction-parity.md
@sqlrush sqlrush merged commit 3302224 into main Jun 2, 2026
12 checks passed
@sqlrush sqlrush deleted the spec-1.25-cc-interaction-parity branch June 2, 2026 15:37
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