Repository navigation
fix(cli): list --port in --help for promptargs ui (#374) - #375
Conversation
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
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>
|
hive/awaiting-ci: CI pending — sweep will merge when green. (Second commit adds the 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
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>
There was a problem hiding this comment.
Looks correct to me — read against the tree at 8170bc2, not just the diff.
src/cli.ts:77-78only acceptsportforui(assertOnlyFlags(flags, ['port'], 'ui')) andsrc/flags.ts:102-110parsePorttakes--port=Nwith an integer 0–65535, so the new help wordingpromptargs ui [--port=N]/--port=N Port for "promptargs ui" (default 3700)matches the actual parser andsrc/ui.ts:10(DEFAULT_PORT = 3700).dist/cli.jscarries 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
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Closes #374
Problem
promptargs --helpomitted the--portflag, which is the only flagpromptargs uiaccepts. Users whose default port 3700 was in use had no way to discover the--portoption from the help text — they would only learn about it after hitting a port-in-use error.Solution
Added
--port=Nto the help output in two places:uisubcommand usage line to:promptargs ui [--port=N] Open the builder UI in your browser--port=N Port for "promptargs ui" (default 3700)in the Flags blockThe README already documented this flag at lines 457-460 ("Use
--port=Nif 3700 is taken:promptargs ui --port=4000"), and the error handler insrc/ui.tstells users to use--port=…, so this fix ensures the flag is discoverable from--help.Implementation Details
src/cli.tsHELP template literal with both changesdist/cli.js(tsc copies template literals verbatim, so hand-mirroring the literal satisfies the dist-sync CI gate)src/cli.test.tsand mirrored todist/cli.test.jsto verify--port=Nappears in help outputchangelog.d/fixed-374-help-port-flag.mdFiles changed:
src/cli.ts: 2 changes (usage line + flag entry)dist/cli.js: 2 changes (mirrored by hand)src/cli.test.ts: 1 assertion addeddist/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