Skip to content

feat(cli): organize help around common tasks - #6500

Merged
lidge-jun merged 4 commits into
devfrom
codex/cli-ux-navigation
Oct 3, 2026
Merged

lidge-jun merged 4 commits into
devfrom
codex/cli-ux-navigation

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Replace the 92-line default help with a 26-line task-oriented index. ocx help --all retains the full reference, including advanced recovery commands.
  • Family help exposes declared topics and canonical alias navigation. Provider help now has one registry-owned description for both normal help and error guidance, preserving stdout/stderr and exit behavior.
  • Stack: depends on feat(cli): add explicit help paths and complete reference #6498. This layer targets codex/cli-ux-help-foundation; review only this layer's diff. Contextual recovery follows in the third layer.

Manual stack (bottom to top)

Order PR Layer
1 #6506 Restart deadline prerequisite
2 #6498 Explicit help paths and full reference
3 #6500 Compact root and family navigation
4 #6503 Contextual recovery

Integration proceeds bottom-up under the owner's explicit merge request. Local full-suite limitations remain disclosed below.

Verification

  • Five meaningful navigation regressions failed before implementation; final focused suites: 135 passed, 0 failed across nine files.
  • bun run test:changed: 1,097 passed, 1 skipped, 0 failed across 46 files. The existing complete-reference invariant was migrated from compact output to full output without removing any assertions.
  • Typecheck, structure, generated skill surface, privacy, and 18 test-layout guards passed. Docs build: 561 pages and 77,929 internal links.
  • Eighteen real isolated-home CLI scenarios plus a 40×24 PTY invocation verified output, exit codes, help equivalence, plain text and no state writes. Root output is 26 logical lines, maximum 80 columns.
  • Independent review: 16/16 changed files reviewed, no actionable findings. Full-reference template and capability JSON remain unchanged.
  • Hosted CI also found the subprocess-only restore-help assertion; it now reads full help without removing assertions. The exact-layer fix passed all 5 restore tests and independent review.
  • Draft: the full local suite run on the first layer had four failures, three also reproduced on untouched baseline and one unresolved snapshot failure. This layer does not claim a passing full local suite; see 011_verification.md and 021_verification.md in the CLI UX plan unit. Current-head hosted checks are tracked separately for each PR.

Final publication verification: head 13c0e829df104bc46082b06e2c29d37e89917cc6; Cross-platform CI run 37116382613 (pull_request, attempt 1) completed successfully with all four Linux test shards and ci. The checkout tested by shard 1 was 33d0a8bb9078826c164b40811c442364d1afef8f. Policy-skipped platform jobs are not claimed as passing platform validation.
The cancelled duplicate run 37116382554 is superseded by successful run 37116382613; its cancelled jobs are not passing evidence.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

Integration status

The owner explicitly requested merging the complete manual stack. This PR will be retargeted to dev after its predecessor lands; any refreshed head must pass hosted CI before integration. The prior local full-suite failures remain disclosed and are not claimed as a pass.

Local-suite failure attribution

All four previously recorded local-suite failures now reproduce on untouched baseline 4b98328dca. The three restart-lease failures were already baseline-confirmed. The remaining EISDIR is in tests/codex-integration/injection-model-suggest-routes.test.ts:100, before the tested request: setup calls the bundled Codex catalog probe, whose codex debug models --bundled subprocess creates CODEX_HOME/tmp; the shallow snapshot attempts to read that directory as a file. The unchanged baseline test reproduced the identical failure in an isolated home. A controlled inherited-home / redirected-home / inherited-home experiment produced tmp only in the selected subprocess home. The baseline fixture matches Git blob ef0dafba8dfe2cff3b7519453502d95a46b64925; the fixture and direct catalog producer are unchanged by this stack.

This closes the previously unexplained attribution gap; it does not turn the failed full local run into a pass. No test skip, quarantine or retry-as-fix was added. Merge still requires successful current-head hosted CI and resolution of actionable reviews.

Codex review correction: c89341793f changes the provider usage header to the explicitly non-exhaustive ocx provider <subcommand>, so valid resets and keychain actions are no longer contradicted. bun test tests/cli/cli-help-navigation.test.ts: 9 pass, 0 fail, 208 assertions; bun run typecheck: passed.

Maintainer integration

The owner explicitly requested completion through merge. Integrating into dev under MAINTAINERS.md as authenticated current maintainer lidge-jun with live admin permission; this is not a self-approval. The diagnosed baseline failures remain disclosed. Original draft-only publication notes are superseded by this integration decision. The provider-usage finding was fixed and independently reviewed at the final head.

Final head c89341793f39b11e3719841b3ae994de0d4364ea passed Cross-platform CI 37126906934 (pull_request, attempt 1), including all four Linux shards and aggregate ci. Tested checkout 875828735615bb1daa77645048991fa2b4d78ce1 has tree 29f1c305005339d2397d9bcee7d497399c259853, identical to the conflict-free prospective merge with dev b82b39018b48ad489110b4165ee2cd9ba30433d5 after #6498. Superseded canceled CI runs do not provide passing evidence. Policy-skipped platform jobs are not counted as passes.

Summary by CodeRabbit

  • New Features
    • Root CLI help now provides a compact command index, with links to command families, aliases, and curated help topics. Use --all for the full command reference.
    • Family and alias help now guide you to declared subcommands and canonical command details.
    • Provider help includes subcommands and examples, with clearer output for help requests and unknown actions.
  • Documentation
    • Updated the CLI reference to explain help formats, navigation, and provider commands.

@coderabbitai

coderabbitai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: lidge-jun/opencodex/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 34c01eeb-7737-43fa-a6bf-f2da4cec142a
📥 Commits

Reviewing files that changed from the base of the PR and between b82b390 and c893417.

📒 Files selected for processing (18)
  • devlog/_plan/261003_cli_help_ux/000_plan.md
  • devlog/_plan/261003_cli_help_ux/020_help_navigation.md
  • devlog/_plan/261003_cli_help_ux/021_verification.md
  • docs-site/src/content/docs/reference/cli.md
  • scripts/test-layout/layout.json
  • src/cli/help-catalog.ts
  • src/cli/help-navigation.ts
  • src/cli/help.ts
  • src/cli/provider.ts
  • src/cli/registry.ts
  • structure/runtime.md
  • tests/cli/cli-help-navigation.test.ts
  • tests/cli/cli-help-paths.test.ts
  • tests/cli/cli-help.test.ts
  • tests/cli/cli-registry.test.ts
  • tests/cli/cli-restore-back.test.ts
  • tests/fixtures/test-layout-expected.json
  • tests/gui/integrations-invariants.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

Root CLI help now displays a compact, grouped command index, while --all selects the full reference. Nested help shows declared child paths and canonical family links. Provider help uses registry details and shared output handling. Tests and documentation cover these help forms and their output behavior.

Changes

CLI Help Navigation

Layer / File(s) Summary
Root and family help
src/cli/help-catalog.ts, src/cli/help-navigation.ts, src/cli/help.ts, src/cli/registry.ts, docs-site/src/content/docs/reference/cli.md, structure/runtime.md, tests/cli/cli-help-navigation.test.ts, scripts/test-layout/layout.json, tests/fixtures/test-layout-expected.json
Help resolution now returns canonical command names and declared child capabilities. Root help renders grouped command summaries, while nested help shows declared child paths, alias-specific details with canonical-family links, and a separate models-context reference. Tests cover compact root output, family navigation, aliases, and registry-backed listings.
Shared provider help
src/cli/provider.ts, src/cli/registry.ts, src/cli/help.ts, docs-site/src/content/docs/reference/cli.md, tests/cli/cli-help-navigation.test.ts
Provider usage and examples are defined in registry details and rendered through printSubcommandUsage. Successful help writes to stdout and exits 0. Unknown actions retain their diagnostic, write usage to stderr, and exit 1.
Full-reference coverage and verification
tests/cli/cli-help-paths.test.ts, tests/cli/cli-help.test.ts, tests/cli/cli-registry.test.ts, tests/cli/cli-restore-back.test.ts, tests/gui/integrations-invariants.test.ts, devlog/_plan/261003_cli_help_ux/*
Tests that require complete command listings now use full-reference help instead of compact root help. The plan and verification notes record implementation status, test results, and the previously recorded full-suite failures.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant handleProviderCommand
  participant printSubcommandUsage
  participant resolveHelpPath
  participant stdout
  participant stderr
  User->>handleProviderCommand: request provider help or unknown action
  handleProviderCommand->>printSubcommandUsage: request provider usage
  printSubcommandUsage->>resolveHelpPath: resolve registry-backed provider help
  resolveHelpPath-->>printSubcommandUsage: return help details
  printSubcommandUsage->>stdout: write successful help
  printSubcommandUsage->>stderr: write usage for an unknown action
Loading

Merge Risk: ⚪ Minimal · up to c8934

The compact help meets its layout limits, and the full reference remains available through --all. No identified issue prevents merging after normal checks.

Security Architecture Review

Security architecture risk: ⚪ Minimal · up to c8934

The reviewed changes reorganize help and share command descriptions without expanding command authority or weakening security controls. The complete reference remains available separately.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The reviewed entrypoint changes affect local command discovery and help output, not new execution privileges. Help metadata is not converted into executable handlers by the inspected resolver, renderer, or dispatch relationship.

Trust Boundaries and Controls

  • observed — Provider normal help and unknown-subcommand guidance use the shared renderer. Recognized runtime commands retain their separate delegation path; error guidance selects console.error rather than gaining provider execution authority.

Resilience and Maintainability Implications

  • observed — The navigation subprocess helper asserts that isolated configuration directories remain empty. Its own note limits this evidence: bare provider still retains preflight behavior, and the fixtures contain nothing to restore. This does not establish absence of state effects in every pre-existing configuration.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 11 files. (7 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: reorganizing CLI help around common tasks. It is concise and specific.
Full details: Docstring Coverage

Explanation

Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 11 files. (7 skipped: 7 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@lidge-jun
lidge-jun force-pushed the codex/cli-ux-help-foundation branch from de02ff1 to b82c5a9 Compare October 3, 2026 10:25
@lidge-jun
lidge-jun force-pushed the codex/cli-ux-navigation branch from aaf3672 to 13c0e82 Compare October 3, 2026 10:25
@lidge-jun
lidge-jun marked this pull request as ready for review October 3, 2026 13:30
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner October 3, 2026 13:30
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-03T13:35:19.101214Z 13c0e82 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 13c0e829df

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/cli/provider.ts
Base automatically changed from codex/cli-ux-help-foundation to dev October 3, 2026 13:50
@lidge-jun
lidge-jun merged commit cb2d173 into dev Oct 3, 2026
46 checks passed
@lidge-jun
lidge-jun deleted the codex/cli-ux-navigation branch October 3, 2026 13:59
@lidge-jun lidge-jun mentioned this pull request Oct 4, 2026
3 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant