Tags: Eldara-Tech/swarmcli
Tags
fix(stacks): preserve healthcheck in stack inspect and edit (#379) (#380 ) Stack inspect (JSON) and edit (reconstructed Compose) both dropped a service's healthcheck because neither code path had a struct field to hold it. For the edit round-trip this was data-destroying: editing and redeploying a stack silently removed the healthcheck. Add a compose-shaped Healthcheck type (yaml+json tags) plus a converter, capture the healthcheck in the custom service-inspect JSON struct, and populate it in both ReconstructStackCompose and GetStackInspection. Durations render as compose duration strings (e.g. "30s"); test=["NONE"] maps to disable:true; an inherited (empty) healthcheck stays omitted. Add unit tests for the converter and marshaling, a healthcheck fixture on whoami_single in the test stack, and integration assertions covering both inspect and reconstruction. Co-authored-by: clangenb <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
fix(helpbar): bound header to its box so it can't scramble the screen (… …#378) The header layout assumed the helpbar was always exactly systeminfoview.Height (6) lines tall, but View() word-wrapped the help columns at viewport widths ~112-124, rendering 7-8 lines and pushing the body off the alt-screen (scrambled logo + stale-buffer bleed-through). It was also always 2 columns wider than its given width (unaccounted spacer). Rewrite the width budgeting to pack only the help columns that fit, drop columns right-to-left then the logo as the terminal narrows, and clamp the result with MaxWidth/MaxHeight as a hard backstop so the header can never overflow its box. Guard the edition-label slice against panics and remove the now-orphaned minColWidth field/setter. Co-authored-by: clangenb <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
feat(commands): discoverable flags, per-command --help, strict valida… …tion (#373) * feat(commands): discoverable flags, per-command --help, strict validation The `:command` palette had no flag discoverability: `:cmd --help` silently ran the command and unknown/misspelled flags were silently ignored. Add an optional `registry.CommandWithSpec` capability (same type-assertion pattern as `Aliaser`) carrying a declarative `CommandSpec{Usage, Flags, Examples, Passthrough}`. `api.ParseInput` is now the single chokepoint that: short-circuits Passthrough specs, intercepts `--help`/`-h`/`-help` (and `:help <cmd>`) into a per-command help screen reusing the existing detailed help view, then enforces global-strict unknown-flag rejection with a "did you mean --x?" suggestion. Every command declares a spec; the OSS bootstrap stub uses Passthrough so it keeps its Business-Edition notice and no Pro flag internals enter the OSS repo. Docs updated in CLAUDE.md. BREAKING: previously-ignored unknown flags are now rejected. The two parse_test cases that fed `node --verbose` are repointed at the passthrough `bootstrap` command (flag/positional separation still covered; strict rejection covered by new cases). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * fix(help): vertical single-column layout for per-command help The detailed help view renders categories as side-by-side columns with a 15-char key column — built for short keybinding cheat-sheets. Long usage/flag strings overflowed and collided (reported on :bootstrap --help). Add a distinct CommandHelp payload routed to a new vertical renderer: sections stacked top-to-bottom, short-key sections (flags) in an aligned key/description column, long-key sections (usage/examples) stacked with word-wrapped lines. The columnar keybinding cheat-sheet path (NewDetailed / `?`) is untouched — no regression to existing views. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * feat(commands): spec-driven `--flag value` parsing + Detail prose in help Two UX fixes on top of the flag-spec work: 1. The parser only understood `--host=localhost`; `--host localhost` left `host=true` and dropped the value as a positional. parseArgs is now spec-aware: a flag declared TakesValue consumes the next token (`--host localhost`), the `=` form still works, and a value flag with no following token is a clear error. ParseInput resolves the spec before parsing to build the value-flag set. 2. Add an optional CommandSpec.Detail prose field, rendered as a wrapped paragraph under USAGE (author newlines preserved as paragraph breaks). Lets a command explain non-obvious modes — e.g. that running with no flags starts an interactive flow. The USAGE block now always stacks command-line then description as a header. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * feat(help): discoverability hint + Detail prose for every command - :help page header gains a dim second line: "Tip: <command> --help (or -h) for flags, usage & examples". Command-list path only (FrameHeader) — absent from per-command and ? keybinding screens, filter-proof. - Behavior-only Detail added to every OSS command spec (help, quit, contexts, stack, node, network, secret, config). OSS bootstrap stub stays Passthrough (no Detail by design). - Tests: FrameHeader hint placement; guard that every non-passthrough registered command ships a Detail. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * fix(help): keep frame single-line; move tip into list body The two-line FrameHeader broke the box border (ui.RenderFramedBox treats the header as one bordered line; RenderFramedBoxHeight assumes headerLines=1). Revert FrameHeader to the single styled "Available Commands" line and render the discoverability tip as the first body line in the default terminal colour, followed by a blank line before the table header. Filter rebuild keeps the tip. Box border is intact. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> --------- Co-authored-by: clangenb <[email protected]> Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
feat(commands): discoverable flags, per-command --help, strict valida… …tion (#373) * feat(commands): discoverable flags, per-command --help, strict validation The `:command` palette had no flag discoverability: `:cmd --help` silently ran the command and unknown/misspelled flags were silently ignored. Add an optional `registry.CommandWithSpec` capability (same type-assertion pattern as `Aliaser`) carrying a declarative `CommandSpec{Usage, Flags, Examples, Passthrough}`. `api.ParseInput` is now the single chokepoint that: short-circuits Passthrough specs, intercepts `--help`/`-h`/`-help` (and `:help <cmd>`) into a per-command help screen reusing the existing detailed help view, then enforces global-strict unknown-flag rejection with a "did you mean --x?" suggestion. Every command declares a spec; the OSS bootstrap stub uses Passthrough so it keeps its Business-Edition notice and no Pro flag internals enter the OSS repo. Docs updated in CLAUDE.md. BREAKING: previously-ignored unknown flags are now rejected. The two parse_test cases that fed `node --verbose` are repointed at the passthrough `bootstrap` command (flag/positional separation still covered; strict rejection covered by new cases). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * fix(help): vertical single-column layout for per-command help The detailed help view renders categories as side-by-side columns with a 15-char key column — built for short keybinding cheat-sheets. Long usage/flag strings overflowed and collided (reported on :bootstrap --help). Add a distinct CommandHelp payload routed to a new vertical renderer: sections stacked top-to-bottom, short-key sections (flags) in an aligned key/description column, long-key sections (usage/examples) stacked with word-wrapped lines. The columnar keybinding cheat-sheet path (NewDetailed / `?`) is untouched — no regression to existing views. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * feat(commands): spec-driven `--flag value` parsing + Detail prose in help Two UX fixes on top of the flag-spec work: 1. The parser only understood `--host=localhost`; `--host localhost` left `host=true` and dropped the value as a positional. parseArgs is now spec-aware: a flag declared TakesValue consumes the next token (`--host localhost`), the `=` form still works, and a value flag with no following token is a clear error. ParseInput resolves the spec before parsing to build the value-flag set. 2. Add an optional CommandSpec.Detail prose field, rendered as a wrapped paragraph under USAGE (author newlines preserved as paragraph breaks). Lets a command explain non-obvious modes — e.g. that running with no flags starts an interactive flow. The USAGE block now always stacks command-line then description as a header. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * feat(help): discoverability hint + Detail prose for every command - :help page header gains a dim second line: "Tip: <command> --help (or -h) for flags, usage & examples". Command-list path only (FrameHeader) — absent from per-command and ? keybinding screens, filter-proof. - Behavior-only Detail added to every OSS command spec (help, quit, contexts, stack, node, network, secret, config). OSS bootstrap stub stays Passthrough (no Detail by design). - Tests: FrameHeader hint placement; guard that every non-passthrough registered command ships a Detail. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * fix(help): keep frame single-line; move tip into list body The two-line FrameHeader broke the box border (ui.RenderFramedBox treats the header as one bordered line; RenderFramedBoxHeight assumes headerLines=1). Revert FrameHeader to the single styled "Available Commands" line and render the discoverability tip as the first body line in the default terminal colour, followed by a blank line before the table header. Filter rebuild keeps the tip. Box border is intact. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> --------- Co-authored-by: clangenb <[email protected]> Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
Extract BELandingURL constant (swarmcli-be#144) (#368) De-duplicate the hardcoded Business Edition landing-page URL into a single exported constant so the BE module references one source of truth instead of re-hardcoding the string. Value is unchanged (https://swarmcli.io/be); BEUnavailableFormat is now built from it. Co-authored-by: clangenb <[email protected]> Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
fix(systeminfo): prevent header version line wrap on long versions (#347 ) Snapshot/RC version strings combined with the latest-version hint (e.g. "1.4.6-next ⚡v1.5.0") overflowed the 17-cell value zone in the 35-cell systeminfo box, so lipgloss wrapped the hint onto a new line and broke the fixed 6-line header layout. Tighten labelStyle Width 15 → 12 (longest label "Containers:" is 11) and widen the box 35 → 40, raising the available value width to 25 cells. Helpbar accommodates the 5-cell shrink without regression. Refs Eldara-Tech/swarmcli-be#93. Co-authored-by: clangenb <[email protected]> Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
chore(deps): Bump actions/upload-artifact from 7.0.0 to 7.0.1 (#335) Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 7.0.0 to 7.0.1. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@bbbca2d...043fb46) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: 7.0.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
PreviousNext