fix(docs): correct stale settings keys, wrong defaults, and missing commands - #4969
Conversation
…ommands - overview.md: fix Node.js version requirement from 20 to 22 (matches package.json engines) - approval-mode.md: replace nonexistent permissions.defaultMode with tools.approvalMode; remove nonexistent confirmShellCommands/confirmFileEdits settings - settings.md: remove nonexistent ui.hideFooter and ui.showMemoryUsage; fix ui.showCitations default (true→false); fix enableWelcomeBack path (add ui. prefix); fix ui.enableFollowupSuggestions default (true→false) - commands.md: add 18 missing slash commands (branch, fork, rewind, delete, export, rename, hooks, permissions, agents, arena, goal, tasks, lsp, trust, diff, doctor, docs, ide, insight, setup-github, statusline, terminal-setup); fix showSessionRecap default (true→false)
|
Thanks for the PR! Template looks good ✓ On direction: Docs drift is a real problem — users following stale examples silently hit config keys that don't exist, which wastes time and erodes trust. Fixing incorrect settings keys ( On approach: Scope feels right. Three files, focused changes, each verifiable against the schema. The additions to I've verified every claim against the codebase — all 10 are accurate. Moving on to code review. 🔍 中文说明感谢贡献! 模板完整 ✓ 方向:文档偏差是个真实问题——用户按照过时的示例操作会遇到不存在的配置键,浪费时间且损害信任。修正错误的设置键( 方案:范围合理。三个文件,聚焦修改,每项都可以通过 schema 验证。 已逐条对照代码库验证所有修改——全部正确。进入代码审查 🔍 — Qwen Code · qwen3.7-max |
Code ReviewVerified every change against the source: approval-mode.md — settings.md — Removed commands.md — All 21 newly documented commands ( No issues found. The changes are accurate, minimal, and well-sourced. Real-Scenario TestingN/A — docs-only changes, no runtime behavior affected. 中文说明代码审查逐条对照源码验证: approval-mode.md — settings.md — 移除了 commands.md — 全部 21 个新增文档命令(含别名)在 未发现问题。修改准确、最小化、有据可查。 真实场景测试不适用——仅文档变更,不影响运行时行为。 — Qwen Code · qwen3.7-max |
|
This PR does exactly what it says — fixes documentation that drifted out of sync with the codebase. Every claim is backed by verifiable source: settings keys match the schema, defaults match the code, and every newly documented command exists in the loader. The scope is tight: three files, no code changes, no scope creep. The contributor clearly did the homework — the reviewer test plan even points to exact schema line numbers. If I had to maintain this in six months, I'd thank the author. No reservations. Approving. ✅ 中文说明这个 PR 准确完成了其描述的工作——修复与代码库不同步的文档。每项修改都可追溯到源码验证:设置键匹配 schema,默认值匹配代码,每个新文档化的命令都存在于 loader 中。 范围紧凑:三个文件,无代码修改,无范围蔓延。贡献者显然做了充分调研——审查计划甚至标注了 schema 的具体行号。如果六个月后维护这些内容,我会感谢作者。 没有顾虑。批准。✅ — Qwen Code · qwen3.7-max |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
LGTM, looks ready to ship. ✅
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
[Suggestion] docs/users/features/followup-suggestions.md:39 still states "enabled by default" for ui.enableFollowupSuggestions, but the schema has default: false. This PR corrected settings.md to false but didn't update the feature page, creating a cross-file inconsistency. Consider fixing in the same PR.
— qwen3.7-max via Qwen Code /review
…p /diff dup - commands.md: list all four /export formats (html, md, json, jsonl) per exportCommand.ts - commands.md: remove the duplicate /diff row in section 1.4 (already documented in 1.2 and the dedicated 1.8 Diff Viewer section) - approval-mode.md: include the omitted "default" ApprovalMode value in the persistent-config comment
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
[Suggestion] docs/users/features/followup-suggestions.md:75,86 — This PR correctly fixed ui.enableFollowupSuggestions default from true to false in settings.md, but the cross-referenced feature page still shows true (line 75 table default, line 86 JSON example). The schema confirms default: false. The two pages are now inconsistent — users reading followup-suggestions.md will believe the feature is on by default. Consider updating lines 75 and 86 in that file to match.
— qwen3.7-max via Qwen Code /review
On main, /fork is a distinct command (forkCommand.ts, name: 'fork', argumentHint '<directive>') that spawns a background agent inheriting the full conversation; branchCommand.ts has no altNames and its test asserts /branch no longer aliases /fork. Split them into separate rows instead of documenting /fork as an alias of /branch.
Clean merge — brings in main's yaml-parser pin-test fix so this docs PR's Test suite is green against current main.
followup-suggestions.md still described the feature as enabled by default (line 35) and listed Default `true` in the settings table (line 75), but the schema default is `false` (settingsSchema.ts). Align both with the settings.md fix. The enabling example keeps `true` intentionally (it shows how to turn the opt-in feature on).
DragonnZhang
left a comment
There was a problem hiding this comment.
Code Review
Docs-only PR. Verified every change against the source code:
- approval-mode.md:
permissions.defaultMode→tools.approvalModeis correct (settingsSchema.ts:1881). Removal ofconfirmShellCommands/confirmFileEditsis correct — neither exists in the schema. All four JSON examples use the right keys. - settings.md:
ui.hideFooterandui.showMemoryUsagecorrectly removed (not in schema).showCitationsdefault corrected tofalse(schema:741).enableFollowupSuggestionsdefault corrected tofalse(schema:779).enableWelcomeBackcorrectly moved underui.prefix (schema:754). - commands.md: All newly documented commands (
/delete,/branch,/fork,/rewind,/export,/rename,/terminal-setup,/hooks,/permissions,/agents,/arena,/goal,/tasks,/lsp,/trust,/doctor,/docs,/ide,/insight,/setup-github) confirmed present inBuiltinCommandLoader.ts.showSessionRecapdefault corrected tofalse(schema:385)./restoredescription update accurately summarizes the code. - followup-suggestions.md: Default change and "disabled by default" text consistent with settings.md and schema.
Verdict: APPROVE — No issues found. Accurate, well-researched documentation fix.
The recap tip told users to set general.showSessionRecap to `false` to opt out of the auto-trigger, but the schema default is already `false` (off by default). Invert it: set to `true` to enable the auto-trigger; manual /recap always works regardless.
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
[Suggestion] Missing auto mode in documentation — 2 locations
docs/users/features/approval-mode.md:365— The Shift+Tab cycle says "four modes" and listsAsk Permissions → Auto-Edit → YOLO → Plan, but the PR's own persistent config comment on line 382 lists five values ("plan", "default", "auto", "yolo"plusauto-edit). This creates an internal inconsistency within the same file.docs/users/features/commands.md:78-81— The/approval-modesub-table lists only 4 modes (plan, default, auto-edit, yolo), missing theautorow.
Suggested fix: Update the cycle description to "five modes" including Auto Mode; add the auto row to the sub-table between auto-edit and yolo.
— qwen3.7-max via Qwen Code /review
"Restore a tool call to state before it was suggested" read as if the tool call itself is re-invoked. /restore actually reverts project files to the checkpoint taken before a tool call ran (FileHistoryService.rewind). Reword to match.
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
[Suggestion] docs/users/features/approval-mode.md:366-368 — The "Keyboard Shortcut Switching" section says "cycle through the four modes" and shows Ask Permissions Mode → Auto-Edit Mode → YOLO Mode → Plan Mode → Ask Permissions Mode, which omits Auto mode entirely. The ApprovalMode enum defines 5 values (plan, default, auto-edit, auto, yolo), and line 33 of the same file correctly states the cycle as plan → default → auto-edit → auto → yolo → plan. The PR adds "auto" to the JSON comment at line 377, making this internal contradiction more visible.
Consider changing "four" to "five" and updating the cycle to:
Plan Mode → Ask Permissions Mode → Auto-Edit Mode → Auto Mode → YOLO Mode → Plan Mode
[Suggestion] docs/users/features/commands.md:78-81 — The /approval-mode sub-table lists only 4 modes (plan, default, auto-edit, yolo) but omits auto. The PR added auto as a valid value elsewhere in approval-mode.md and added 8 new commands to this same section, but the auto row is missing.
Consider adding between →auto-edit and →yolo:
| →`auto` | Classifier-evaluated approval | Autonomous sessions with safety guardrails |
— qwen3.7-max via Qwen Code /review
The 'Keyboard Shortcut Switching' section said 'cycle through the four modes' and showed a diagram omitting Auto mode, contradicting line 33 of the same file and the ApprovalMode enum (plan, default, auto-edit, auto, yolo). Update to 'five modes' and reorder the diagram to match: Plan -> Ask Permissions -> Auto-Edit -> Auto -> YOLO -> Plan.
The /approval-mode sub-table listed plan, default, auto-edit, yolo but omitted auto, which the ApprovalMode enum defines between auto-edit and yolo. Add the auto row to match the enum and the rest of the docs.
|
Both suggestions fixed:
Verified the enum ( |
DragonnZhang
left a comment
There was a problem hiding this comment.
Verified every change against source code -- all corrections are accurate:
ui.showCitationsdefaultfalsematchessettingsSchema.ts:739ui.enableFollowupSuggestionsdefaultfalsematchessettingsSchema.ts:779general.showSessionRecapdefaultfalsematchessettingsSchema.ts:386ui.enableWelcomeBackkey path correct (nested underuiin schema, used assettings.ui?.enableWelcomeBackinuseWelcomeBack.ts)tools.approvalModekey path correct (nested undertoolsin schema at line 1882)ui.hideFooter/ui.showMemoryUsagecorrectly removed (not in schema)confirmShellCommands/confirmFileEditscorrectly removed (not in schema)- 5 approval modes (PLAN, DEFAULT, AUTO_EDIT, AUTO, YOLO) match
ApprovalModeenum incore/src/config/config.ts:195 - Cycling order matches
Object.values(ApprovalMode)used by Shift+Tab handler - All 20 newly documented commands verified present in
packages/cli/src/ui/commands/
No issues found. LGTM.
…-audit # Conflicts: # docs/users/features/commands.md
DragonnZhang
left a comment
There was a problem hiding this comment.
Review: All corrections verified against source code. showCitations, enableFollowupSuggestions, and showSessionRecap defaults correctly changed to false; enableWelcomeBack correctly moved under ui namespace; stale hideFooter/showMemoryUsage entries properly removed; permissions.defaultMode → tools.approvalMode rename is accurate; the five approval modes match the ApprovalMode enum (PLAN, DEFAULT, AUTO_EDIT, AUTO, YOLO); and newly listed commands exist in the codebase. No issues found.
DragonnZhang
left a comment
There was a problem hiding this comment.
Reviewed all changes against the source code. Every correction is verified accurate:
ui.hideFooterandui.showMemoryUsagecorrectly removed (not in settingsSchema.ts)ui.showCitationsdefaultfalseconfirmed (settingsSchema.ts:742)ui.enableFollowupSuggestionsdefaultfalseconfirmed (settingsSchema.ts:780)general.showSessionRecapdefaultfalseconfirmed (settingsSchema.ts:386)enableWelcomeBackcorrectly placed underuinamespace (settingsSchema.ts:755)tools.approvalModecorrectly replaces stalepermissions.defaultMode(settingsSchema.ts:1882)confirmShellCommands/confirmFileEditscorrectly removed (not in schema)- Five approval modes (plan, default, auto-edit, auto, yolo) confirmed via ApprovalMode enum and APPROVAL_MODES array order
- Shift+Tab cycle order matches APPROVAL_MODES iteration in useAutoAcceptIndicator.ts
- All newly listed commands exist with matching descriptions
- /rewind alias /rollback and /rename alias /tag confirmed via altNames
- Export formats (html, md, json, jsonl) confirmed in exportCommand.ts
Well-researched documentation fix. LGTM.
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
No review findings. Downgraded from Approve to Comment: CI still running. All documentation changes verified against source code — settings keys, defaults, command registrations, and mode cycle order all match the codebase. LGTM! ✅ — qwen3.7-max via Qwen Code /review
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
No issues found. LGTM! ✅ All documentation changes verified against source code — settings keys, default values, command descriptions, and usage examples are all accurate. — qwen3.7-max via Qwen Code /review
✅ Verification report — built & ran the real CLI from this PR's headI built the actual Method
Results — every claim holdsSettings precedence (the highest-impact fix) — proven at runtime:
The Schema keys & defaults — all match
Approval modes — dialog + Shift+Tab cycle verified live:
Newly documented commands — all real & registered in
Reverse-audit (did the PR introduce anything wrong?)No. New command descriptions match the in-code Minor follow-ups (non-blocking, not caused by this PR)
VerdictLooks good to merge. Docs-only; every correction is verified against the shipping code and live runtime; the fix is complete with no regressions. 中文版验证报告(点击展开)✅ 验证报告 —— 从本 PR HEAD 构建并运行了真实 CLI我从本 PR 的 HEAD( 方法
结果 —— 每条声明均成立设置项优先级(影响最大的修复)—— 运行时实证:
schema 中 Schema 键与默认值 —— 全部与
审批模式 —— 对话框 + Shift+Tab 循环实测:
新文档化命令 —— 全部真实存在并注册于
反向审计(PR 是否引入了新错误?)没有。新命令描述与代码中的 次要后续项(不阻塞合并,且非本 PR 造成)
结论可以合并。 仅文档改动;每条修正都已对照真实代码与运行时核验;修复完整、无回归。 |
What this PR does
Fixes documentation drift found during an automated audit of
docs/against the current codebase. Three user-facing pages had incorrect or stale content: settings keys that don't exist in the schema, wrong default values, and missing slash commands in the command reference.Why it's needed
Users following the docs would encounter configuration examples that silently fail (e.g.,
permissions.defaultModeis not a valid setting — the correct key istools.approvalMode), wrong default values that don't match actual behavior, and an incomplete command reference that makes it harder to discover available features.Reviewer Test Plan
How to verify
Each fix can be verified against the codebase:
packages/cli/src/config/settingsSchema.tshastools.approvalModebut nopermissions.defaultMode,confirmShellCommands, orconfirmFileEditssettingsSchema.tshas noui.hideFooterorui.showMemoryUsage;showCitationsdefault isfalse(nottrue);enableFollowupSuggestionsdefault isfalse(nottrue);enableWelcomeBackis nested underuipackages/cli/src/services/BuiltinCommandLoader.tsfor the newly documented commands;general.showSessionRecapdefault isfalse(nottrue)Evidence (Before & After)
N/A (docs-only changes)
Tested on
Risk & Scope
中文说明
此 PR 做了什么
修复了在对
docs/与当前代码库进行自动审计时发现的文档偏差。三个面向用户的页面包含不正确或过时的内容:schema 中不存在的设置键、错误的默认值,以及缺失的斜杠命令。为什么需要这个
按照文档操作的用户会遇到静默失败的配置示例(例如,
permissions.defaultMode不是有效设置——正确的键是tools.approvalMode)、与实际行为不符的错误默认值,以及不完整的命令参考。风险与范围
🤖 Generated with Qwen Code