Repository navigation
fix(core): clear errors for bad --data-dir, config and number flags; wrap tables in narrow terminals (+Claude) - #302
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
…wrap tables in narrow terminals (+Claude) CL-8896. Fixes three of the cross-cutting defects found in section 10 of the Launch CLI V2 manual QA sheet. --data-dir and .cs-launch.json (10.2) - A --data-dir that does not exist now fails with "No folder found at ..." (exit 2) when the CLI needs the config file, instead of a misleading "Missing --org". Commands whose flags already supply everything (for example deployments:create --last-upload) still run without the folder. - A .cs-launch.json that exists but is not valid JSON or not a project config is refused, naming the file, instead of being silently ignored. - The "Using ... from .cs-launch.json" notice goes to stderr, so url=$(csdx launch:site:open ...) captures only the URL. - -c is not added back: it was removed on purpose in 144a862. Invalid flag values (10.6) - --limit and --skip are whole-number flags whose parse throws a FlagValueError, so --limit abc prints one sentence naming the flag and its range instead of oclif's "Parsing --limit / Expected an integer". - functions:serve exits 2, not 1, for a bad --port or --data-dir, like every other bad input. Narrow terminals (10.9) - renderTable shrinks the widest column first, never below a column's minWidth (UID_WIDTH for UID and detail-value columns) or ten characters, and wraps cell text instead of cutting it with an ellipsis. - When the columns cannot fit, each record prints as a stacked "LABEL value" list, wrapping long values under themselves. - The flexible-column argument is gone from renderTable and its callers. Guards: test/guards/whole-number-flags.test.ts (no Flags.integer in src) and test/guards/narrow-terminal.test.ts (real tables at 60/80/100 columns fit, no ellipsis, every UID whole), both listed in AGENTS.md. .talismanrc checksums refreshed for the changed files. #claude_code# 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
ff48a96 to
2a1dfca
Compare
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
tejas-contentstack
left a comment
There was a problem hiding this comment.
Not approved: a high-effort review found 8 issues (1 important, 6 nits, 1 pre-existing), each left as an inline comment. The important one: on narrow terminals, env:get and deployments:get detail tables break labels mid-word at about 45 to 50 columns, and below that they switch to a hard-to-read stacked layout. Checks are green and the PR is not a draft; the findings alone block approval.
— 🤖 Claude review (Opus 5.5, high effort)
Generated by Claude Code
…nfig advice (+Claude) CL-8896. Round 1 of PR #302 review. Critical: - src/core/render.ts: env:get and deployments:get broke field labels mid-word near 45 columns and, narrower, printed each detail row as a FIELD/VALUE record; a label column now never shrinks and a detail table that cannot fit prints plain "<field> <value>" lines. - src/commands/launch/functions/serve.ts: restored exit 1 for a bad --port or --data-dir. AGENTS.md records exit 1 as V1 behaviour kept on the product owner's instruction (bf9a139), so the change to 2 is reverted. Also fixed: - src/core/render.ts: a stacked value that would not fit beside its label goes on its own indented line, so stacked output no longer outgrows the terminal; a wrapped line no longer starts with a space. - src/core/catalog.ts: --limit/--skip reject digit strings that are not safe integers, so a huge --skip no longer reaches the API as Infinity. - src/core/project-config.ts: a broken config file says "pass the missing flags" instead of naming --project, which org-only commands lack. - AGENTS.md: config notice documented as stderr; narrow-terminal guard row updated (30-100 columns, label columns, 26-column floor). Not changed: 2 disputed with reasoning (see the PR summary comment). #claude_code# 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
|
/ship 2b summary (round 1, Fixed: 6 comments, 1 important and 5 nits.
Not changed (reasoned replies posted, threads left open):
General comments: 3 Snyk/security scan reports, all passed, nothing asked. Left for a human: none. Next: waiting for a human approval. |
What
Fixes three of the cross-cutting defects found in section 10 of the Launch CLI V2 manual QA sheet (CL-8896).
10.2:
--data-dirand.cs-launch.json--data-dirthat does not exist now fails withNo folder found at '…'(exit 2) when the CLI needs the config file. It used to fail with a misleading "Missing --org". When the flags already supply everything, the command still runs without the folder (for example,deployments:create --last-upload)..cs-launch.jsonthat exists but is not valid JSON, or is not a project config, is now refused with an error naming the file. It used to be silently ignored.Using … from .cs-launch.jsonnotice now goes to stderr, sourl=$(csdx launch:site:open …)captures only the URL.-cis not added back. It was removed on purpose in 144a862, so the QA sheet needs updating.10.6: Invalid flag values
--limitand--skipare now whole-number flags with their own message, for example:Invalid --limit value "abc". Provide a whole number from 1 to 1000.They no longer print oclif's rawParsing --limit / Expected an integer…text.functions:servekeeps V1's exit 1 for a bad--port. AGENTS.md records that as the product owner's decision (bf9a139), so 10.6'sfunctions:serveitem is by design.10.9: Narrow terminals
renderTablenow shrinks the widest column first. No column goes below itsminWidth:UID_WIDTHfor UID columns and the value column of detail tables, and 10 characters otherwise. Cell text wraps instead of being cut with…, so UIDs are never truncated.LABEL valuelist, and long values wrap under themselves.renderTableand its callers.env:get,deployments:get) never shrinks its field-name column. If it can't fit, it prints plain<field> <value>lines instead.Guards (both listed in AGENTS.md):
test/guards/whole-number-flags.test.tsfails if anyFlags.integerappears insrc.test/guards/narrow-terminal.test.tsdraws the realenv:list,env:get,deployments:list,deployments:get,projects:listandprojects:gettables at 30 to 100 columns. It checks that no line is wider than the terminal, that nothing is cut with…, that every UID appears whole, and that detail tables print every field label whole.Out of scope
cache:purge --hostscross-tenant purge is a management-service issue.Tests
npm run lintis clean.randomBytes, and the.talismanrcchecksums are refreshed.runCommand: missing--data-dir, broken config file, the stderr notice, and--limit abc.#claude_code#
🤖 Generated with Claude Code