feat(ui): add main_cli_help.sh — clap option-ordering test#188
Merged
Conversation
1404266 to
3c990d3
Compare
Collaborator
|
We decided to keep things as currently. |
Contributor
Author
|
We did decide that. But I am adjusting the UI scripts so the testing/validation can stay in the repo. |
2 tasks
Contributor
Author
|
Outputs from the UI tests can be viewed here https://alx.dev.a2-ai.cloud/artifact/a0d5be27-7c84-4572-9a40-cff60ea50a88 |
CGMossa
commented
May 5, 2026
Contributor
Author
|
The help command isn't a problem. I'm removing this |
CGMossa
added a commit
that referenced
this pull request
May 5, 2026
Collapse the multi-line `#[clap(...)]` attribute on `Cli` into one line. Fixes the `cargo fmt --all --check` step on CI for #188. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
CGMossa
added a commit
that referenced
this pull request
May 16, 2026
Collapse the multi-line `#[clap(...)]` attribute on `Cli` into one line. Fixes the `cargo fmt --all --check` step on CI for #188. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Adds `ui/main_cli_help.sh` (139 lines) capturing the full `--help`
output for `dvs init / add / get / status` so the option-ordering
behavior of the current clap layout is pinned down and visible in
the published UI HTML. Anyone refactoring `CommonOpts` /
`Cli` / per-command structs has an obvious diff to compare against.
Supporting changes:
- dvs-cli/src/main.rs:
- `#[command(next_display_order = 100)]` on each subcommand so
per-command options render in a stable order regardless of
insertion order.
- `display_order = 0/1` on the two global flags (`--json`,
`--threads`) so they appear at the top of every command's
options block.
- justfile:
- Register `cli_help` in `ui_names` so `just ui-run` /
`ui-render` / `ui-publish` pick the new script up.
- `ui-publish-only`: conditionally include `ui/helpers.sh` as a
source attachment only when the target script actually sources
it (`main_cli_help.sh` doesn't).
Squashed from 10 commits (multiple reverts of an abandoned
CommonOpts flatten experiment + 2 cargo-fmt commits + doc churn
moved to #189) — the net diff is small and stands on its own.
Contributor
Author
|
The original PR post has changed substantially, and the conversation here is not on the latest proposal. Merging, as it is innocuous as is. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AI-written details
Summary
Adds
ui/main_cli_help.sh(139 lines) — a UI regression test that captures the full--helpoutput fordvs init / add / get / statusso the clap option-ordering layout is pinned down and visible in the published HTML. Anyone refactoringCommonOpts/Cli/ per-command structs has an obvious diff to compare against.Supporting changes:
dvs-cli/src/main.rs(+6/−2):#[command(next_display_order = 100)]on each subcommand variant (Init,Add,Status,Get) so per-command options render in a stable order regardless of insertion order.display_order = 0/display_order = 1on the two global flags (--json,--threads) so they appear at the top of every command's Options section.justfile(+4/−2):cli_helpinui_namessojust ui-run/ui-render/ui-publishpick the new script up.ui-publish-only: conditionally includeui/helpers.shas a source attachment only when the target script actually sources it.main_cli_help.shdeliberately doesn't sourcehelpers.sh(noset -x, nosay) so the published log has no xtrace noise.History note
Squashed from 10 commits into 1. The intermediate history contained: two abandoned
CommonOpts-flatten attempts that mutually reverted, adisable_help_subcommand = truechange that was reverted (the help subcommand row is back), 2 cargo-fmt commits, and a doc-refresh churn that moved to #189. The net diff is small and self-contained.Rejected approaches (kept here for posterity)
help_heading = "Global Options": arbitrary heading text.next_display_order = 1000on a top-levelGlobalOptsflatten: arbitrary magic number, restructures globals.CommonOpts#[derive(Args)]flattened into each variant: turns globals from pre-subcommand-allowed into subcommand-only.Test plan
just install-all && bash ui/main_cli_help.shruns to completion (exit 0)just ui-publishpublishesui-cli_helpto alx without errordvs --json <sub>anddvs <sub> --jsonboth work (globals still global)ui/main_*.shscripts continue to passNotes
specs.mdanddvs-rpkg/CLAUDE.mdwas split off into docs: refresh CLI help blocks + fix dvs_status R signature #189.Drafted by Claude (claude-opus-4-7). Reviewed by the author.