Skip to content

v1.0.215

Choose a tag to compare

@github-actions github-actions released this 26 May 09:47
· 67 commits to main since this release

✨ New: cockpit codegraph — unified entry for all 10 graph endpoints

v1.0.214 shipped 10 CodeGraph HTTP endpoints but only exposed cock affected at the CLI surface. That asymmetry is gone — every endpoint now has a CLI subcommand under a single dispatcher:

cockpit codegraph search   callers  callees  impact  file  coedit
                  context   related  risk     affected

Each subcommand has full --help with Usage / Purpose / Flags / Output / Stderr / Exit codes / Examples, so an LLM agent can pre-construct grep / awk pipelines without trial-and-error. --as-jest was renamed to the generic --as-cmd <runner> (jest / "vitest run" / "pytest -v" / …) so the binary doesn't lie about being Jest-specific in mixed-language projects.

✨ New: /cc slash mode — drive the cockpit CLI from chat

Sister to /cg. Teaches the agent what cockpit / cock / cockpit-dev can do, pointing at each subcommand's --help as the canonical reference (no prompt drift). Trailing user text gets labeled 任务: / Task: to prime the action-execution mindset. Typical usage:

/cc cockpit terminal bmfb 看错误日志
/cc cockpit browser vxvk 给我截屏并描述页面

Type / in the chat to see it in the autocomplete dropdown, between /cg and /skill-name.

✨ New: cockpit-dev binary + setup-dev selective symlink

cock-dev is renamed to cockpit-dev everywhere — symmetry with the prod cockpit / cock pair (no short alias on purpose; production stability wants the prod/dev split to be loud). For CLI development, npm run setup-dev selectively symlinks only cockpit-dev to local source, leaving the npm-installed prod cockpit untouched. Unlike npm link (which clobbers both bins), this lets you edit bin/*.mjs live and still npm install -g @surething/cockpit@latest to upgrade prod without disturbing the dev symlink. No more npm unlink / install -g dance.

🐛 Fix: cockpit browser type no longer silently no-ops on React SPAs

cockpit browser <id> type <ref> "text" used to report success on contenteditable / React-controlled inputs (tiptap, ProseMirror, Lexical) even when CDP Input.dispatchKeyEvent was a no-op against the React state machine. Two fixes:

  1. Post-type verification. After the type call returns, the CLI evaluates document.activeElement and checks that the live .value / .textContent actually contains what was typed. Mismatch → exit 1 with a copy-pasteable evaluate template tailored to the input's shape (contenteditable insertText / React setter + input event dispatch / etc.).
  2. Cheat sheet upfront. cockpit browser <id> (no args) now opens with a "React / SPA gotchas" section + 3 evaluate templates ready to copy, and the type / click / fill lines carry inline ⚠ markers. The same task that took 15 bash calls to debug across two earlier sessions now lands in 5.

🐛 Fix: cockpit terminal <id> --help no longer rejected

cockpit terminal <id> --help used to error with Unknown flag: --help because the meta-page handler whitelisted only --json. The meta page is the help for that bubble, so <id> and <id> --help (and -h) now behave identically.

🐛 Fix: markdown — fenced blocks preserved + Prism token classes isolated

Two related fixes for chat-rendered markdown that mishandled mixed content:

  • The GFM table-pipe escape pass used to run across the entire input, including ```markdown / ~~~ fenced examples. A snippet showing literal | col1 | \a|b` |` would get its inner `|` silently rewritten — corrupting the verbatim source the user clearly meant to display. Fenced blocks are now masked before substitution and restored after.
  • react-syntax-highlighter's Prism markdown grammar emits class names literally — <span class="token table table-header-row"> — and Tailwind ships a .table { display: table } utility class with the same name. Inside language-markdown blocks, every Prism token (table, code, list, title, …) was getting forced to display: table, breaking each cell onto its own line. A scoped reset (code[class*="language-"] .token { display: inline }) keeps Prism tokens inline without affecting other places that use Tailwind's .table utility.

📚 Docs

README + README.zh.md were still advertising the v1.0.213-retired /review / /commit slash commands and 6 CodeGraph endpoints (v1.0.214 shipped 10). Pulled both into sync: slash-mode list is /qa /fx /ex /go /cg /cc, the CodeGraph section names the 4 new analytics endpoints (context / related / risk / affected, powered by PageRank · PPR · TF-IDF · Louvain, zero training), and ~/.claude/commands/*.md references are replaced with the current "drop a SKILL.md via the Skills sidebar" convention.

🌐 Site

opencockpit.dev got an SEO pass:

  • Homepage meta description trimmed from 339 → 157 chars so it fits Google SERP without truncation; introduced a separate hero.metaDescription field so the visible Hero copy stays untouched.
  • /docs page gained a real description + OpenGraph + Twitter card (was bare).
  • All per-locale routes now mirror og:locale via og:locale:alternate (en_US ↔ zh_CN).
  • hreflang="x-default" added on blog list / blog post / changelog / docs.
  • Keywords expanded 26 → 72: CodeGraph / Code Map / per-engine GUI long-tails (Codex / DeepSeek / Kimi / Ollama) / Cline alternative / Windsurf alternative / GitHub Copilot alternative + the corresponding ZH variants (代码图谱 / 智能气泡 / AI 编辑器 / Codex 中文 / …).