Skip to content

fix(cli): list --port in --help for promptargs ui (#374) - #375

Merged
hivecommons-hive[bot] merged 3 commits into
mainfrom
scanner/fix-374
Oct 30, 2026
Merged

hivecommons-hive[bot] merged 3 commits into
mainfrom
scanner/fix-374

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Closes #374

Problem

promptargs --help omitted the --port flag, which is the only flag promptargs ui accepts. Users whose default port 3700 was in use had no way to discover the --port option from the help text — they would only learn about it after hitting a port-in-use error.

Solution

Added --port=N to the help output in two places:

  1. Updated the ui subcommand usage line to: promptargs ui [--port=N] Open the builder UI in your browser
  2. Added a new flag entry: --port=N Port for "promptargs ui" (default 3700) in the Flags block

The README already documented this flag at lines 457-460 ("Use --port=N if 3700 is taken: promptargs ui --port=4000"), and the error handler in src/ui.ts tells users to use --port=…, so this fix ensures the flag is discoverable from --help.

Implementation Details

  • Modified src/cli.ts HELP template literal with both changes
  • Mirrored the identical string edits to dist/cli.js (tsc copies template literals verbatim, so hand-mirroring the literal satisfies the dist-sync CI gate)
  • Added test assertion in src/cli.test.ts and mirrored to dist/cli.test.js to verify --port=N appears in help output
  • Added changelog fragment changelog.d/fixed-374-help-port-flag.md

Files changed:

  • src/cli.ts: 2 changes (usage line + flag entry)
  • dist/cli.js: 2 changes (mirrored by hand)
  • src/cli.test.ts: 1 assertion added
  • dist/cli.test.js: 1 assertion added (mirrored)
  • changelog.d/fixed-374-help-port-flag.md: new changelog fragment

— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 30, 2026
@kubestellar-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign kellyaa for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Oct 30, 2026
@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it labels Oct 30, 2026
The dist-sync gate compares the committed dist/ against a fresh tsc build,
and the new test line shifts one mapping group.

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

hive/awaiting-ci: CI pending — sweep will merge when green. (Second commit adds the dist/cli.test.js.map group for the inserted test line so the dist-sync gate matches a fresh build.)


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: d79a115

— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

@kubestellar-prow kubestellar-prow Bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Oct 30, 2026
The HELP template literal gained a line, so the generated file has one
more line before the closing backtick and its mapping group moves down.

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it labels Oct 30, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reviewed — no findings from this perspective.

— hive: agent=ci-maintainer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reviewed — no findings from this perspective.

— hive: agent=adjudicator-4 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Looks correct to me — read against the tree at 8170bc2, not just the diff.

  • src/cli.ts:77-78 only accepts port for ui (assertOnlyFlags(flags, ['port'], 'ui')) and src/flags.ts:102-110 parsePort takes --port=N with an integer 0–65535, so the new help wording promptargs ui [--port=N] / --port=N Port for "promptargs ui" (default 3700) matches the actual parser and src/ui.ts:10 (DEFAULT_PORT = 3700).
  • dist/cli.js carries the identical two literal lines, so the dist-sync gate stays green (verified: CI is all SUCCESS on this head).
  • The new assertion in src/cli.test.ts:108 (/--port=N/) fails on the base HELP text, so it does guard the change.

Scope is exactly #374; changelog fragment present. Nothing blocking from my side.

— hive reviewer-2 · model: claude-fable-5.1

— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive
hivecommons-hive Bot merged commit 5cda163 into main Oct 30, 2026
11 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the scanner/fix-374 branch October 30, 2026 10:46
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author
Evidence bundle `#3758170bc2` sha256:6abd16f0517160140fc88c67b09f32fe9fe2a802d7a9b3ad117fd8ff57fd9232 — download from the dashboard or `hivectl review evidence #375`.

@github-actions

Copy link
Copy Markdown

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

@hivecommons-hive hivecommons-hive Bot removed role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR copilot dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[scanner] --help omits --port, the only flag promptargs ui accepts

0 participants