Release v0.3.0#34
Conversation
- HelpCommand.RunAsync launches a TUI Markdown viewer (Runnable + Markdown + StatusBar) matching clet's pattern, instead of returning raw text in CommandResult - MetadataHelpProvider.GetRootHelp emits markdown (tables, headers) instead of plain text - CliHost.WriteRootFlag passes --help output through MarkdownRenderer.RenderToAnsi for ANSI-styled stdout - Rename examples/Terminal.Gui.Cli.ExampleApp to examples/greet with AssemblyName=greet - Add README.md for the greet example app - Add visual UI tests (CommandUiHarness + golden-file assertions) ported from clet's CletUiHarness pattern - Add MetadataHelpProviderTests and CliHost help rendering tests Closes #5 Co-authored-by: Copilot <[email protected]>
- Port clet's MarkdownHelpRenderer approach: set Console.OutputEncoding to UTF-8 before rendering, use a full TG ANSI driver with proper layout/draw cycle, and restore encoding afterward. Fixes garbled box-drawing chars. - Add FarewellCommand with --until option for navigation testing - Add embedded markdown help files (help.md, greet.md, farewell.md, info.md) - Configure EmbeddedMarkdownHelpProvider in greet example - Fix InfoCommand to properly launch TUI viewer (was returning text without calling app.RunAsync, causing terminal to hang until Enter pressed) Co-authored-by: Copilot <[email protected]>
… args - Add DefaultCommand option to CliHostOptions so bare args/options are retried as the default command (e.g. 'greet World' == 'greet greet World') - Refactor CliHost.RunAsync into DispatchCommandAsync/ExecuteCommandAsync - Add help:topic link navigation in HelpCommand via Markdown.LinkClicked - Add 'Back to main help' links in all sub-topic help files - Add help:command anchors in root help.md for topic navigation - Make GreetCommand and FarewellCommand accept positional args for name - Set greet example DefaultCommand = 'greet' Co-authored-by: Copilot <[email protected]>
- Add BrowseBar (ported from clet) with back/forward history stacks, Ctrl+Left/Right shortcuts, and proper statusbar styling - Rewrite HelpCommand.RunAsync to match clet's HelpClet pattern: BrowseBar, LinkClicked handler, NavigateTo, viewport reset - Add TextMateSyntaxHighlighter for code block coloring - Add horizontal scrollbar to markdown view - Update golden file for new status bar layout Co-authored-by: Copilot <[email protected]>
- HelpBrowserUiTests: proves BrowseBar back/forward arrows render, embedded help content displays, subcommand view shows options, and golden file assertion for the browser layout - GreetExampleTests: proves every documented example in the help files actually works (greet World, --formal Alice, farewell Bob, farewell --until tomorrow Bob, default command dispatch, etc.) - Add embedded help.md resource to integration test assembly - Total: 24 integration tests, 17 unit tests (41 total, all passing) Co-authored-by: Copilot <[email protected]>
Pipe characters and newlines in command/option descriptions would break the generated markdown table structure. Add EscapeCell helper that replaces | with \| and collapses newlines to spaces. Co-authored-by: Copilot <[email protected]>
ReSharper cannot infer target type for 'new' inside collection expressions, so use explicit 'new CommandOptionDescriptor(...)' instead of 'new (...)'. Co-authored-by: Copilot <[email protected]>
…ple-app feat: help TUI viewer, markdown rendering, rename ExampleApp to greet
Expand README and add hero GIF
Enable source debugging and .snupkg generation for NuGet consumers. Co-authored-by: Copilot <[email protected]>
* Plan: help command and --help flag should render markdown Co-authored-by: Copilot <[email protected]> * Fix help command and --help flag to render markdown - Convert MetadataHelpProvider.GetRootHelp to generate markdown with ## headings, bullet lists, and backtick formatting - Fix CliHost.WriteRootFlag to render via MarkdownRenderer.RenderToAnsi instead of plain stdout.WriteLine - Fix HelpCommand.RunAsync to display markdown in a fullscreen Terminal.Gui Markdown viewer using RunnableWrapper - Add tests for --help ANSI output, help --cat, and MetadataHelpProvider markdown generation Fixes #5 Co-authored-by: Copilot <[email protected]> * Fix help TUI: set Markdown.Text in Initialized handler, add integration tests The help command's TUI viewer rendered empty content because Markdown.Text was set before the view was initialized/laid out. Following the pattern from gui-cs/clet's MarkdownClet, set the text inside the Initialized event handler on the containing Runnable. Also switches from RunnableWrapper to a plain Runnable with an embedded Markdown view — the help viewer is read-only and needs no result extraction. Adds integration tests using Application.Create()/Init(ansi) with StopAfterFirstIteration to verify: - The TUI renders without hanging - Driver contents contain expected command text - Subcommand help renders correctly - RenderCatAsync produces ANSI output Co-authored-by: Copilot <[email protected]> * Add hero GIF recording and polish README - Re-record docs/images/hero.gif using tuirec v0.4.0 with the example app - Rewrite README for clarity: add badges, a Why section, feature table, real JSON output example, contributing pointer, and cleaner structure Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
* Plan: help command and --help flag should render markdown Co-authored-by: Copilot <[email protected]> * Fix help command and --help flag to render markdown - Convert MetadataHelpProvider.GetRootHelp to generate markdown with ## headings, bullet lists, and backtick formatting - Fix CliHost.WriteRootFlag to render via MarkdownRenderer.RenderToAnsi instead of plain stdout.WriteLine - Fix HelpCommand.RunAsync to display markdown in a fullscreen Terminal.Gui Markdown viewer using RunnableWrapper - Add tests for --help ANSI output, help --cat, and MetadataHelpProvider markdown generation Fixes #5 Co-authored-by: Copilot <[email protected]> * Fix help TUI: set Markdown.Text in Initialized handler, add integration tests The help command's TUI viewer rendered empty content because Markdown.Text was set before the view was initialized/laid out. Following the pattern from gui-cs/clet's MarkdownClet, set the text inside the Initialized event handler on the containing Runnable. Also switches from RunnableWrapper to a plain Runnable with an embedded Markdown view — the help viewer is read-only and needs no result extraction. Adds integration tests using Application.Create()/Init(ansi) with StopAfterFirstIteration to verify: - The TUI renders without hanging - Driver contents contain expected command text - Subcommand help renders correctly - RenderCatAsync produces ANSI output Co-authored-by: Copilot <[email protected]> * Add hero GIF recording and polish README - Re-record docs/images/hero.gif using tuirec v0.4.0 with the example app - Rewrite README for clarity: add badges, a Why section, feature table, real JSON output example, contributing pointer, and cleaner structure Co-authored-by: Copilot <[email protected]> * Fix MarkdownRenderer global state leaks - Save and restore DisableRealDriverIO env var in finally block - Move app.Init inside try/finally so cleanup runs if Init throws - Add MarkdownRendererTests verifying env var restoration - Disable test parallelization (Terminal.Gui uses global state) Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
…ands (#16) RunWithTerminalGuiAsync previously always called Init() regardless of whether the command actually uses the TUI. For inline input commands, Init() modifies terminal state (cursor save/scroll), and if the command returns without running the TUI event loop (e.g. greet hello), Dispose() restores the cursor to the wrong position, causing output to appear at incorrect rows. Fix: - Set app.AppModel on the IApplication instance (not the process-wide static) - Only call Init() upfront for fullscreen commands (viewers, --fullscreen) - For inline input commands, defer Init() to InputCommandRunner where the TUI is actually started via app.RunAsync() - Commands that compute and return without TUI (like greet) never trigger Init(), so terminal state is never modified Fixes #15 Co-authored-by: Copilot <[email protected]>
…g in CliHost (C1) (#22) * fix: centralize Terminal.Gui lifecycle for headless markdown rendering in CliHost MarkdownRenderer.RenderToAnsi previously called Application.Create()/Init()/Dispose() directly, violating constitution C1 (only CliHost may call Terminal.Gui lifecycle APIs). This path is reachable from help --cat, root --help, and viewer --cat rendering. Move the headless ANSI-driver create/init/dispose block (including the DisableRealDriverIO scope) into an internal CliHost.RunHeadlessRender(width, height, render) helper. MarkdownRenderer keeps its public signature and now only performs view layout and drawing inside the callback, so lifecycle ownership is centralized again. No public API change; rendering behavior is unchanged. Note: InputCommandRunner still carries a defensive app.Init() that exists only because CliHost skips Init() for inline input commands; PR #9 fixes that root cause, after which the defensive call can be removed. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * style: apply ReSharper cleanup normalizations Pre-existing deviations surfaced by the pinned 'dotnet jb cleanupcode' pass: space before parens in generic 'new ()' constraints and after 'unchecked'. Committed so the CI cleanup + clean-diff gate passes. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * Revert "style: apply ReSharper cleanup normalizations" This reverts commit 25921ba. --------- Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
* feat: library improvements extracted from survey example work (#9) Non-survey changes split out of #9 (the survey example itself is destined for spectre-console/Examples and will not merge here): CliHost: - Route non-success viewer --cat results through ResultWriter so diagnostics reach stderr (or the --json error envelope) instead of exiting silently - Force UTF-8 and re-acquire Console.Out/Error after a Terminal.Gui session so post-TUI Unicode output renders correctly - Always call app.Init() before command.RunAsync (restores the ICliCommand.RunAsync contract for inline input commands); set Application.AppModel before Create() - Run DefaultCommand when args are empty instead of falling through to root help JSON envelope (constitution C4): - Add CliHostOptions.ResultJsonResolver so consumer result types serialize through source-generated contexts; threaded through JsonEnvelope.ToJson and ResultWriter.Write via JsonTypeInfoResolver.Combine InputCommandRunner: - Remove defensive app.Init() — dead now that CliHost always initializes, and itself a C1 violation Docs/specs (constitution C2): - Document ResultJsonResolver and DefaultCommand dispatch in specs/library-spec.md - Fix stale example project paths in README.md and examples/greet/README.md Tests/infra: - Add envelope resolver round-trip test - Make HelpCommand integration tests CI-stable (drop nondeterministic driver-buffer assertions) - Bump Terminal.Gui to 2.4.3 release Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix: preserve caller-supplied writers after TUI shutdown (Codex P2) The post-TUI console refresh used `stdout is not StringWriter` to decide whether to re-acquire Console.Out/Error, so any caller-supplied writer that was not a StringWriter (e.g. a StreamWriter over a stream or file) was silently replaced and the result went to the process console. Capture whether each writer is the real console (by reference) before Terminal.Gui runs - the comparison is only valid then, since changing Console.OutputEncoding replaces Console.Out/Error - and refresh each writer independently, leaving caller-supplied writers untouched. Adds an integration regression test that routes the TUI path through a StreamWriter-over-MemoryStream stdout. Co-Authored-By: Claude Fable 5 <[email protected]> --------- Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
Co-Authored-By: Claude Fable 5 <[email protected]>
* Plan: help command and --help flag should render markdown Co-authored-by: Copilot <[email protected]> * Fix help command and --help flag to render markdown - Convert MetadataHelpProvider.GetRootHelp to generate markdown with ## headings, bullet lists, and backtick formatting - Fix CliHost.WriteRootFlag to render via MarkdownRenderer.RenderToAnsi instead of plain stdout.WriteLine - Fix HelpCommand.RunAsync to display markdown in a fullscreen Terminal.Gui Markdown viewer using RunnableWrapper - Add tests for --help ANSI output, help --cat, and MetadataHelpProvider markdown generation Fixes #5 Co-authored-by: Copilot <[email protected]> * Fix help TUI: set Markdown.Text in Initialized handler, add integration tests The help command's TUI viewer rendered empty content because Markdown.Text was set before the view was initialized/laid out. Following the pattern from gui-cs/clet's MarkdownClet, set the text inside the Initialized event handler on the containing Runnable. Also switches from RunnableWrapper to a plain Runnable with an embedded Markdown view — the help viewer is read-only and needs no result extraction. Adds integration tests using Application.Create()/Init(ansi) with StopAfterFirstIteration to verify: - The TUI renders without hanging - Driver contents contain expected command text - Subcommand help renders correctly - RenderCatAsync produces ANSI output Co-authored-by: Copilot <[email protected]> * Add hero GIF recording and polish README - Re-record docs/images/hero.gif using tuirec v0.4.0 with the example app - Rewrite README for clarity: add badges, a Why section, feature table, real JSON output example, contributing pointer, and cleaner structure Co-authored-by: Copilot <[email protected]> * Release v0.1.0-beta.1 (#17) * feat: help TUI viewer, markdown rendering, rename ExampleApp to greet - HelpCommand.RunAsync launches a TUI Markdown viewer (Runnable + Markdown + StatusBar) matching clet's pattern, instead of returning raw text in CommandResult - MetadataHelpProvider.GetRootHelp emits markdown (tables, headers) instead of plain text - CliHost.WriteRootFlag passes --help output through MarkdownRenderer.RenderToAnsi for ANSI-styled stdout - Rename examples/Terminal.Gui.Cli.ExampleApp to examples/greet with AssemblyName=greet - Add README.md for the greet example app - Add visual UI tests (CommandUiHarness + golden-file assertions) ported from clet's CletUiHarness pattern - Add MetadataHelpProviderTests and CliHost help rendering tests Closes #5 Co-authored-by: Copilot <[email protected]> * Fix terminal encoding for ANSI rendering and add multiple help topics - Port clet's MarkdownHelpRenderer approach: set Console.OutputEncoding to UTF-8 before rendering, use a full TG ANSI driver with proper layout/draw cycle, and restore encoding afterward. Fixes garbled box-drawing chars. - Add FarewellCommand with --until option for navigation testing - Add embedded markdown help files (help.md, greet.md, farewell.md, info.md) - Configure EmbeddedMarkdownHelpProvider in greet example - Fix InfoCommand to properly launch TUI viewer (was returning text without calling app.RunAsync, causing terminal to hang until Enter pressed) Co-authored-by: Copilot <[email protected]> * Add default command support, help link navigation, and fix positional args - Add DefaultCommand option to CliHostOptions so bare args/options are retried as the default command (e.g. 'greet World' == 'greet greet World') - Refactor CliHost.RunAsync into DispatchCommandAsync/ExecuteCommandAsync - Add help:topic link navigation in HelpCommand via Markdown.LinkClicked - Add 'Back to main help' links in all sub-topic help files - Add help:command anchors in root help.md for topic navigation - Make GreetCommand and FarewellCommand accept positional args for name - Set greet example DefaultCommand = 'greet' Co-authored-by: Copilot <[email protected]> * Port clet's BrowseBar with back/forward nav and syntax highlighting - Add BrowseBar (ported from clet) with back/forward history stacks, Ctrl+Left/Right shortcuts, and proper statusbar styling - Rewrite HelpCommand.RunAsync to match clet's HelpClet pattern: BrowseBar, LinkClicked handler, NavigateTo, viewport reset - Add TextMateSyntaxHighlighter for code block coloring - Add horizontal scrollbar to markdown view - Update golden file for new status bar layout Co-authored-by: Copilot <[email protected]> * Add visual help browser tests and greet example execution tests - HelpBrowserUiTests: proves BrowseBar back/forward arrows render, embedded help content displays, subcommand view shows options, and golden file assertion for the browser layout - GreetExampleTests: proves every documented example in the help files actually works (greet World, --formal Alice, farewell Bob, farewell --until tomorrow Bob, default command dispatch, etc.) - Add embedded help.md resource to integration test assembly - Total: 24 integration tests, 17 unit tests (41 total, all passing) Co-authored-by: Copilot <[email protected]> * Escape markdown table cells in MetadataHelpProvider Pipe characters and newlines in command/option descriptions would break the generated markdown table structure. Add EscapeCell helper that replaces | with \| and collapses newlines to spaces. Co-authored-by: Copilot <[email protected]> * fix: use explicit type in collection expression for ReSharper compliance ReSharper cannot infer target type for 'new' inside collection expressions, so use explicit 'new CommandOptionDescriptor(...)' instead of 'new (...)'. Co-authored-by: Copilot <[email protected]> * Add SourceLink and symbol package support (#11) Enable source debugging and .snupkg generation for NuGet consumers. Co-authored-by: Copilot <[email protected]> * Back-merge main into develop (#13) * Plan: help command and --help flag should render markdown Co-authored-by: Copilot <[email protected]> * Fix help command and --help flag to render markdown - Convert MetadataHelpProvider.GetRootHelp to generate markdown with ## headings, bullet lists, and backtick formatting - Fix CliHost.WriteRootFlag to render via MarkdownRenderer.RenderToAnsi instead of plain stdout.WriteLine - Fix HelpCommand.RunAsync to display markdown in a fullscreen Terminal.Gui Markdown viewer using RunnableWrapper - Add tests for --help ANSI output, help --cat, and MetadataHelpProvider markdown generation Fixes #5 Co-authored-by: Copilot <[email protected]> * Fix help TUI: set Markdown.Text in Initialized handler, add integration tests The help command's TUI viewer rendered empty content because Markdown.Text was set before the view was initialized/laid out. Following the pattern from gui-cs/clet's MarkdownClet, set the text inside the Initialized event handler on the containing Runnable. Also switches from RunnableWrapper to a plain Runnable with an embedded Markdown view — the help viewer is read-only and needs no result extraction. Adds integration tests using Application.Create()/Init(ansi) with StopAfterFirstIteration to verify: - The TUI renders without hanging - Driver contents contain expected command text - Subcommand help renders correctly - RenderCatAsync produces ANSI output Co-authored-by: Copilot <[email protected]> * Add hero GIF recording and polish README - Re-record docs/images/hero.gif using tuirec v0.4.0 with the example app - Rewrite README for clarity: add badges, a Why section, feature table, real JSON output example, contributing pointer, and cleaner structure Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> * Fix MarkdownRenderer global state leaks (#14) * Plan: help command and --help flag should render markdown Co-authored-by: Copilot <[email protected]> * Fix help command and --help flag to render markdown - Convert MetadataHelpProvider.GetRootHelp to generate markdown with ## headings, bullet lists, and backtick formatting - Fix CliHost.WriteRootFlag to render via MarkdownRenderer.RenderToAnsi instead of plain stdout.WriteLine - Fix HelpCommand.RunAsync to display markdown in a fullscreen Terminal.Gui Markdown viewer using RunnableWrapper - Add tests for --help ANSI output, help --cat, and MetadataHelpProvider markdown generation Fixes #5 Co-authored-by: Copilot <[email protected]> * Fix help TUI: set Markdown.Text in Initialized handler, add integration tests The help command's TUI viewer rendered empty content because Markdown.Text was set before the view was initialized/laid out. Following the pattern from gui-cs/clet's MarkdownClet, set the text inside the Initialized event handler on the containing Runnable. Also switches from RunnableWrapper to a plain Runnable with an embedded Markdown view — the help viewer is read-only and needs no result extraction. Adds integration tests using Application.Create()/Init(ansi) with StopAfterFirstIteration to verify: - The TUI renders without hanging - Driver contents contain expected command text - Subcommand help renders correctly - RenderCatAsync produces ANSI output Co-authored-by: Copilot <[email protected]> * Add hero GIF recording and polish README - Re-record docs/images/hero.gif using tuirec v0.4.0 with the example app - Rewrite README for clarity: add badges, a Why section, feature table, real JSON output example, contributing pointer, and cleaner structure Co-authored-by: Copilot <[email protected]> * Fix MarkdownRenderer global state leaks - Save and restore DisableRealDriverIO env var in finally block - Move app.Init inside try/finally so cleanup runs if Init throws - Add MarkdownRendererTests verifying env var restoration - Disable test parallelization (Terminal.Gui uses global state) Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> * fix: set IApplication.AppModel and defer Init() for inline input commands (#16) RunWithTerminalGuiAsync previously always called Init() regardless of whether the command actually uses the TUI. For inline input commands, Init() modifies terminal state (cursor save/scroll), and if the command returns without running the TUI event loop (e.g. greet hello), Dispose() restores the cursor to the wrong position, causing output to appear at incorrect rows. Fix: - Set app.AppModel on the IApplication instance (not the process-wide static) - Only call Init() upfront for fullscreen commands (viewers, --fullscreen) - For inline input commands, defer Init() to InputCommandRunner where the TUI is actually started via app.RunAsync() - Commands that compute and return without TUI (like greet) never trigger Init(), so terminal state is never modified Fixes #15 Co-authored-by: Copilot <[email protected]> * fix: remove duplicate TestSetup class introduced by merge --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: copilot-swe-agent[bot] <[email protected]> * Release v0.1.0 (#19) * feat: help TUI viewer, markdown rendering, rename ExampleApp to greet - HelpCommand.RunAsync launches a TUI Markdown viewer (Runnable + Markdown + StatusBar) matching clet's pattern, instead of returning raw text in CommandResult - MetadataHelpProvider.GetRootHelp emits markdown (tables, headers) instead of plain text - CliHost.WriteRootFlag passes --help output through MarkdownRenderer.RenderToAnsi for ANSI-styled stdout - Rename examples/Terminal.Gui.Cli.ExampleApp to examples/greet with AssemblyName=greet - Add README.md for the greet example app - Add visual UI tests (CommandUiHarness + golden-file assertions) ported from clet's CletUiHarness pattern - Add MetadataHelpProviderTests and CliHost help rendering tests Closes #5 Co-authored-by: Copilot <[email protected]> * Fix terminal encoding for ANSI rendering and add multiple help topics - Port clet's MarkdownHelpRenderer approach: set Console.OutputEncoding to UTF-8 before rendering, use a full TG ANSI driver with proper layout/draw cycle, and restore encoding afterward. Fixes garbled box-drawing chars. - Add FarewellCommand with --until option for navigation testing - Add embedded markdown help files (help.md, greet.md, farewell.md, info.md) - Configure EmbeddedMarkdownHelpProvider in greet example - Fix InfoCommand to properly launch TUI viewer (was returning text without calling app.RunAsync, causing terminal to hang until Enter pressed) Co-authored-by: Copilot <[email protected]> * Add default command support, help link navigation, and fix positional args - Add DefaultCommand option to CliHostOptions so bare args/options are retried as the default command (e.g. 'greet World' == 'greet greet World') - Refactor CliHost.RunAsync into DispatchCommandAsync/ExecuteCommandAsync - Add help:topic link navigation in HelpCommand via Markdown.LinkClicked - Add 'Back to main help' links in all sub-topic help files - Add help:command anchors in root help.md for topic navigation - Make GreetCommand and FarewellCommand accept positional args for name - Set greet example DefaultCommand = 'greet' Co-authored-by: Copilot <[email protected]> * Port clet's BrowseBar with back/forward nav and syntax highlighting - Add BrowseBar (ported from clet) with back/forward history stacks, Ctrl+Left/Right shortcuts, and proper statusbar styling - Rewrite HelpCommand.RunAsync to match clet's HelpClet pattern: BrowseBar, LinkClicked handler, NavigateTo, viewport reset - Add TextMateSyntaxHighlighter for code block coloring - Add horizontal scrollbar to markdown view - Update golden file for new status bar layout Co-authored-by: Copilot <[email protected]> * Add visual help browser tests and greet example execution tests - HelpBrowserUiTests: proves BrowseBar back/forward arrows render, embedded help content displays, subcommand view shows options, and golden file assertion for the browser layout - GreetExampleTests: proves every documented example in the help files actually works (greet World, --formal Alice, farewell Bob, farewell --until tomorrow Bob, default command dispatch, etc.) - Add embedded help.md resource to integration test assembly - Total: 24 integration tests, 17 unit tests (41 total, all passing) Co-authored-by: Copilot <[email protected]> * Escape markdown table cells in MetadataHelpProvider Pipe characters and newlines in command/option descriptions would break the generated markdown table structure. Add EscapeCell helper that replaces | with \| and collapses newlines to spaces. Co-authored-by: Copilot <[email protected]> * fix: use explicit type in collection expression for ReSharper compliance ReSharper cannot infer target type for 'new' inside collection expressions, so use explicit 'new CommandOptionDescriptor(...)' instead of 'new (...)'. Co-authored-by: Copilot <[email protected]> * Add SourceLink and symbol package support (#11) Enable source debugging and .snupkg generation for NuGet consumers. Co-authored-by: Copilot <[email protected]> * Back-merge main into develop (#13) * Plan: help command and --help flag should render markdown Co-authored-by: Copilot <[email protected]> * Fix help command and --help flag to render markdown - Convert MetadataHelpProvider.GetRootHelp to generate markdown with ## headings, bullet lists, and backtick formatting - Fix CliHost.WriteRootFlag to render via MarkdownRenderer.RenderToAnsi instead of plain stdout.WriteLine - Fix HelpCommand.RunAsync to display markdown in a fullscreen Terminal.Gui Markdown viewer using RunnableWrapper - Add tests for --help ANSI output, help --cat, and MetadataHelpProvider markdown generation Fixes #5 Co-authored-by: Copilot <[email protected]> * Fix help TUI: set Markdown.Text in Initialized handler, add integration tests The help command's TUI viewer rendered empty content because Markdown.Text was set before the view was initialized/laid out. Following the pattern from gui-cs/clet's MarkdownClet, set the text inside the Initialized event handler on the containing Runnable. Also switches from RunnableWrapper to a plain Runnable with an embedded Markdown view — the help viewer is read-only and needs no result extraction. Adds integration tests using Application.Create()/Init(ansi) with StopAfterFirstIteration to verify: - The TUI renders without hanging - Driver contents contain expected command text - Subcommand help renders correctly - RenderCatAsync produces ANSI output Co-authored-by: Copilot <[email protected]> * Add hero GIF recording and polish README - Re-record docs/images/hero.gif using tuirec v0.4.0 with the example app - Rewrite README for clarity: add badges, a Why section, feature table, real JSON output example, contributing pointer, and cleaner structure Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> * Fix MarkdownRenderer global state leaks (#14) * Plan: help command and --help flag should render markdown Co-authored-by: Copilot <[email protected]> * Fix help command and --help flag to render markdown - Convert MetadataHelpProvider.GetRootHelp to generate markdown with ## headings, bullet lists, and backtick formatting - Fix CliHost.WriteRootFlag to render via MarkdownRenderer.RenderToAnsi instead of plain stdout.WriteLine - Fix HelpCommand.RunAsync to display markdown in a fullscreen Terminal.Gui Markdown viewer using RunnableWrapper - Add tests for --help ANSI output, help --cat, and MetadataHelpProvider markdown generation Fixes #5 Co-authored-by: Copilot <[email protected]> * Fix help TUI: set Markdown.Text in Initialized handler, add integration tests The help command's TUI viewer rendered empty content because Markdown.Text was set before the view was initialized/laid out. Following the pattern from gui-cs/clet's MarkdownClet, set the text inside the Initialized event handler on the containing Runnable. Also switches from RunnableWrapper to a plain Runnable with an embedded Markdown view — the help viewer is read-only and needs no result extraction. Adds integration tests using Application.Create()/Init(ansi) with StopAfterFirstIteration to verify: - The TUI renders without hanging - Driver contents contain expected command text - Subcommand help renders correctly - RenderCatAsync produces ANSI output Co-authored-by: Copilot <[email protected]> * Add hero GIF recording and polish README - Re-record docs/images/hero.gif using tuirec v0.4.0 with the example app - Rewrite README for clarity: add badges, a Why section, feature table, real JSON output example, contributing pointer, and cleaner structure Co-authored-by: Copilot <[email protected]> * Fix MarkdownRenderer global state leaks - Save and restore DisableRealDriverIO env var in finally block - Move app.Init inside try/finally so cleanup runs if Init throws - Add MarkdownRendererTests verifying env var restoration - Disable test parallelization (Terminal.Gui uses global state) Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> * fix: set IApplication.AppModel and defer Init() for inline input commands (#16) RunWithTerminalGuiAsync previously always called Init() regardless of whether the command actually uses the TUI. For inline input commands, Init() modifies terminal state (cursor save/scroll), and if the command returns without running the TUI event loop (e.g. greet hello), Dispose() restores the cursor to the wrong position, causing output to appear at incorrect rows. Fix: - Set app.AppModel on the IApplication instance (not the process-wide static) - Only call Init() upfront for fullscreen commands (viewers, --fullscreen) - For inline input commands, defer Init() to InputCommandRunner where the TUI is actually started via app.RunAsync() - Commands that compute and return without TUI (like greet) never trigger Init(), so terminal state is never modified Fixes #15 Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> * Release v0.2.0 (#24) * feat: help TUI viewer, markdown rendering, rename ExampleApp to greet - HelpCommand.RunAsync launches a TUI Markdown viewer (Runnable + Markdown + StatusBar) matching clet's pattern, instead of returning raw text in CommandResult - MetadataHelpProvider.GetRootHelp emits markdown (tables, headers) instead of plain text - CliHost.WriteRootFlag passes --help output through MarkdownRenderer.RenderToAnsi for ANSI-styled stdout - Rename examples/Terminal.Gui.Cli.ExampleApp to examples/greet with AssemblyName=greet - Add README.md for the greet example app - Add visual UI tests (CommandUiHarness + golden-file assertions) ported from clet's CletUiHarness pattern - Add MetadataHelpProviderTests and CliHost help rendering tests Closes #5 Co-authored-by: Copilot <[email protected]> * Fix terminal encoding for ANSI rendering and add multiple help topics - Port clet's MarkdownHelpRenderer approach: set Console.OutputEncoding to UTF-8 before rendering, use a full TG ANSI driver with proper layout/draw cycle, and restore encoding afterward. Fixes garbled box-drawing chars. - Add FarewellCommand with --until option for navigation testing - Add embedded markdown help files (help.md, greet.md, farewell.md, info.md) - Configure EmbeddedMarkdownHelpProvider in greet example - Fix InfoCommand to properly launch TUI viewer (was returning text without calling app.RunAsync, causing terminal to hang until Enter pressed) Co-authored-by: Copilot <[email protected]> * Add default command support, help link navigation, and fix positional args - Add DefaultCommand option to CliHostOptions so bare args/options are retried as the default command (e.g. 'greet World' == 'greet greet World') - Refactor CliHost.RunAsync into DispatchCommandAsync/ExecuteCommandAsync - Add help:topic link navigation in HelpCommand via Markdown.LinkClicked - Add 'Back to main help' links in all sub-topic help files - Add help:command anchors in root help.md for topic navigation - Make GreetCommand and FarewellCommand accept positional args for name - Set greet example DefaultCommand = 'greet' Co-authored-by: Copilot <[email protected]> * Port clet's BrowseBar with back/forward nav and syntax highlighting - Add BrowseBar (ported from clet) with back/forward history stacks, Ctrl+Left/Right shortcuts, and proper statusbar styling - Rewrite HelpCommand.RunAsync to match clet's HelpClet pattern: BrowseBar, LinkClicked handler, NavigateTo, viewport reset - Add TextMateSyntaxHighlighter for code block coloring - Add horizontal scrollbar to markdown view - Update golden file for new status bar layout Co-authored-by: Copilot <[email protected]> * Add visual help browser tests and greet example execution tests - HelpBrowserUiTests: proves BrowseBar back/forward arrows render, embedded help content displays, subcommand view shows options, and golden file assertion for the browser layout - GreetExampleTests: proves every documented example in the help files actually works (greet World, --formal Alice, farewell Bob, farewell --until tomorrow Bob, default command dispatch, etc.) - Add embedded help.md resource to integration test assembly - Total: 24 integration tests, 17 unit tests (41 total, all passing) Co-authored-by: Copilot <[email protected]> * Escape markdown table cells in MetadataHelpProvider Pipe characters and newlines in command/option descriptions would break the generated markdown table structure. Add EscapeCell helper that replaces | with \| and collapses newlines to spaces. Co-authored-by: Copilot <[email protected]> * fix: use explicit type in collection expression for ReSharper compliance ReSharper cannot infer target type for 'new' inside collection expressions, so use explicit 'new CommandOptionDescriptor(...)' instead of 'new (...)'. Co-authored-by: Copilot <[email protected]> * Add SourceLink and symbol package support (#11) Enable source debugging and .snupkg generation for NuGet consumers. Co-authored-by: Copilot <[email protected]> * Back-merge main into develop (#13) * Plan: help command and --help flag should render markdown Co-authored-by: Copilot <[email protected]> * Fix help command and --help flag to render markdown - Convert MetadataHelpProvider.GetRootHelp to generate markdown with ## headings, bullet lists, and backtick formatting - Fix CliHost.WriteRootFlag to render via MarkdownRenderer.RenderToAnsi instead of plain stdout.WriteLine - Fix HelpCommand.RunAsync to display markdown in a fullscreen Terminal.Gui Markdown viewer using RunnableWrapper - Add tests for --help ANSI output, help --cat, and MetadataHelpProvider markdown generation Fixes #5 Co-authored-by: Copilot <[email protected]> * Fix help TUI: set Markdown.Text in Initialized handler, add integration tests The help command's TUI viewer rendered empty content because Markdown.Text was set before the view was initialized/laid out. Following the pattern from gui-cs/clet's MarkdownClet, set the text inside the Initialized event handler on the containing Runnable. Also switches from RunnableWrapper to a plain Runnable with an embedded Markdown view — the help viewer is read-only and needs no result extraction. Adds integration tests using Application.Create()/Init(ansi) with StopAfterFirstIteration to verify: - The TUI renders without hanging - Driver contents contain expected command text - Subcommand help renders correctly - RenderCatAsync produces ANSI output Co-authored-by: Copilot <[email protected]> * Add hero GIF recording and polish README - Re-record docs/images/hero.gif using tuirec v0.4.0 with the example app - Rewrite README for clarity: add badges, a Why section, feature table, real JSON output example, contributing pointer, and cleaner structure Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> * Fix MarkdownRenderer global state leaks (#14) * Plan: help command and --help flag should render markdown Co-authored-by: Copilot <[email protected]> * Fix help command and --help flag to render markdown - Convert MetadataHelpProvider.GetRootHelp to generate markdown with ## headings, bullet lists, and backtick formatting - Fix CliHost.WriteRootFlag to render via MarkdownRenderer.RenderToAnsi instead of plain stdout.WriteLine - Fix HelpCommand.RunAsync to display markdown in a fullscreen Terminal.Gui Markdown viewer using RunnableWrapper - Add tests for --help ANSI output, help --cat, and MetadataHelpProvider markdown generation Fixes #5 Co-authored-by: Copilot <[email protected]> * Fix help TUI: set Markdown.Text in Initialized handler, add integration tests The help command's TUI viewer rendered empty content because Markdown.Text was set before the view was initialized/laid out. Following the pattern from gui-cs/clet's MarkdownClet, set the text inside the Initialized event handler on the containing Runnable. Also switches from RunnableWrapper to a plain Runnable with an embedded Markdown view — the help viewer is read-only and needs no result extraction. Adds integration tests using Application.Create()/Init(ansi) with StopAfterFirstIteration to verify: - The TUI renders without hanging - Driver contents contain expected command text - Subcommand help renders correctly - RenderCatAsync produces ANSI output Co-authored-by: Copilot <[email protected]> * Add hero GIF recording and polish README - Re-record docs/images/hero.gif using tuirec v0.4.0 with the example app - Rewrite README for clarity: add badges, a Why section, feature table, real JSON output example, contributing pointer, and cleaner structure Co-authored-by: Copilot <[email protected]> * Fix MarkdownRenderer global state leaks - Save and restore DisableRealDriverIO env var in finally block - Move app.Init inside try/finally so cleanup runs if Init throws - Add MarkdownRendererTests verifying env var restoration - Disable test parallelization (Terminal.Gui uses global state) Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> * fix: set IApplication.AppModel and defer Init() for inline input commands (#16) RunWithTerminalGuiAsync previously always called Init() regardless of whether the command actually uses the TUI. For inline input commands, Init() modifies terminal state (cursor save/scroll), and if the command returns without running the TUI event loop (e.g. greet hello), Dispose() restores the cursor to the wrong position, causing output to appear at incorrect rows. Fix: - Set app.AppModel on the IApplication instance (not the process-wide static) - Only call Init() upfront for fullscreen commands (viewers, --fullscreen) - For inline input commands, defer Init() to InputCommandRunner where the TUI is actually started via app.RunAsync() - Commands that compute and return without TUI (like greet) never trigger Init(), so terminal state is never modified Fixes #15 Co-authored-by: Copilot <[email protected]> * fix: centralize Terminal.Gui lifecycle for headless markdown rendering in CliHost (C1) (#22) * fix: centralize Terminal.Gui lifecycle for headless markdown rendering in CliHost MarkdownRenderer.RenderToAnsi previously called Application.Create()/Init()/Dispose() directly, violating constitution C1 (only CliHost may call Terminal.Gui lifecycle APIs). This path is reachable from help --cat, root --help, and viewer --cat rendering. Move the headless ANSI-driver create/init/dispose block (including the DisableRealDriverIO scope) into an internal CliHost.RunHeadlessRender(width, height, render) helper. MarkdownRenderer keeps its public signature and now only performs view layout and drawing inside the callback, so lifecycle ownership is centralized again. No public API change; rendering behavior is unchanged. Note: InputCommandRunner still carries a defensive app.Init() that exists only because CliHost skips Init() for inline input commands; PR #9 fixes that root cause, after which the defensive call can be removed. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * style: apply ReSharper cleanup normalizations Pre-existing deviations surfaced by the pinned 'dotnet jb cleanupcode' pass: space before parens in generic 'new ()' constraints and after 'unchecked'. Committed so the CI cleanup + clean-diff gate passes. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * Revert "style: apply ReSharper cleanup normalizations" This reverts commit 25921ba. --------- Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> * Library improvements extracted from survey example work (#23) * feat: library improvements extracted from survey example work (#9) Non-survey changes split out of #9 (the survey example itself is destined for spectre-console/Examples and will not merge here): CliHost: - Route non-success viewer --cat results through ResultWriter so diagnostics reach stderr (or the --json error envelope) instead of exiting silently - Force UTF-8 and re-acquire Console.Out/Error after a Terminal.Gui session so post-TUI Unicode output renders correctly - Always call app.Init() before command.RunAsync (restores the ICliCommand.RunAsync contract for inline input commands); set Application.AppModel before Create() - Run DefaultCommand when args are empty instead of falling through to root help JSON envelope (constitution C4): - Add CliHostOptions.ResultJsonResolver so consumer result types serialize through source-generated contexts; threaded through JsonEnvelope.ToJson and ResultWriter.Write via JsonTypeInfoResolver.Combine InputCommandRunner: - Remove defensive app.Init() — dead now that CliHost always initializes, and itself a C1 violation Docs/specs (constitution C2): - Document ResultJsonResolver and DefaultCommand dispatch in specs/library-spec.md - Fix stale example project paths in README.md and examples/greet/README.md Tests/infra: - Add envelope resolver round-trip test - Make HelpCommand integration tests CI-stable (drop nondeterministic driver-buffer assertions) - Bump Terminal.Gui to 2.4.3 release Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix: preserve caller-supplied writers after TUI shutdown (Codex P2) The post-TUI console refresh used `stdout is not StringWriter` to decide whether to re-acquire Console.Out/Error, so any caller-supplied writer that was not a StringWriter (e.g. a StreamWriter over a stream or file) was silently replaced and the result went to the process console. Capture whether each writer is the real console (by reference) before Terminal.Gui runs - the comparison is only valid then, since changing Console.OutputEncoding replaces Console.Out/Error - and refresh each writer independently, leaving caller-supplied writers untouched. Adds an integration regression test that routes the TUI path through a StreamWriter-over-MemoryStream stdout. Co-Authored-By: Claude Fable 5 <[email protected]> --------- Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> * chore: bump version to 0.2.0-develop for upcoming release Co-Authored-By: Claude Fable 5 <[email protected]> --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
…tract (#27) Application.AppModel is process-wide static state. RunWithTerminalGuiAsync left it set to the dispatched command's app model (e.g. Inline), so later Terminal.Gui sessions in the same process - embedding scenarios, headless MarkdownRenderer rendering - inherited the wrong model. Save the previous value and restore it in a finally block (issue #26). Adds regression tests written first: - InputCommand_Inline_RestoresAppModelAfterDispatch and InputCommand_ThrowsCancellation_RestoresAppModel failed before the fix. - InputCommand_Inline_ReceivesInitializedApplication locks in the ICliCommand.RunAsync init contract for the inline path (issue #18, already fixed by the always-Init change in #23). Fixes #18 Fixes #26 Co-authored-by: Claude Fable 5 <[email protected]>
Co-Authored-By: Claude Fable 5 <[email protected]>
* Plan: help command and --help flag should render markdown Co-authored-by: Copilot <[email protected]> * Fix help command and --help flag to render markdown - Convert MetadataHelpProvider.GetRootHelp to generate markdown with ## headings, bullet lists, and backtick formatting - Fix CliHost.WriteRootFlag to render via MarkdownRenderer.RenderToAnsi instead of plain stdout.WriteLine - Fix HelpCommand.RunAsync to display markdown in a fullscreen Terminal.Gui Markdown viewer using RunnableWrapper - Add tests for --help ANSI output, help --cat, and MetadataHelpProvider markdown generation Fixes #5 Co-authored-by: Copilot <[email protected]> * Fix help TUI: set Markdown.Text in Initialized handler, add integration tests The help command's TUI viewer rendered empty content because Markdown.Text was set before the view was initialized/laid out. Following the pattern from gui-cs/clet's MarkdownClet, set the text inside the Initialized event handler on the containing Runnable. Also switches from RunnableWrapper to a plain Runnable with an embedded Markdown view — the help viewer is read-only and needs no result extraction. Adds integration tests using Application.Create()/Init(ansi) with StopAfterFirstIteration to verify: - The TUI renders without hanging - Driver contents contain expected command text - Subcommand help renders correctly - RenderCatAsync produces ANSI output Co-authored-by: Copilot <[email protected]> * Add hero GIF recording and polish README - Re-record docs/images/hero.gif using tuirec v0.4.0 with the example app - Rewrite README for clarity: add badges, a Why section, feature table, real JSON output example, contributing pointer, and cleaner structure Co-authored-by: Copilot <[email protected]> * Release v0.1.0-beta.1 (#17) * feat: help TUI viewer, markdown rendering, rename ExampleApp to greet - HelpCommand.RunAsync launches a TUI Markdown viewer (Runnable + Markdown + StatusBar) matching clet's pattern, instead of returning raw text in CommandResult - MetadataHelpProvider.GetRootHelp emits markdown (tables, headers) instead of plain text - CliHost.WriteRootFlag passes --help output through MarkdownRenderer.RenderToAnsi for ANSI-styled stdout - Rename examples/Terminal.Gui.Cli.ExampleApp to examples/greet with AssemblyName=greet - Add README.md for the greet example app - Add visual UI tests (CommandUiHarness + golden-file assertions) ported from clet's CletUiHarness pattern - Add MetadataHelpProviderTests and CliHost help rendering tests Closes #5 Co-authored-by: Copilot <[email protected]> * Fix terminal encoding for ANSI rendering and add multiple help topics - Port clet's MarkdownHelpRenderer approach: set Console.OutputEncoding to UTF-8 before rendering, use a full TG ANSI driver with proper layout/draw cycle, and restore encoding afterward. Fixes garbled box-drawing chars. - Add FarewellCommand with --until option for navigation testing - Add embedded markdown help files (help.md, greet.md, farewell.md, info.md) - Configure EmbeddedMarkdownHelpProvider in greet example - Fix InfoCommand to properly launch TUI viewer (was returning text without calling app.RunAsync, causing terminal to hang until Enter pressed) Co-authored-by: Copilot <[email protected]> * Add default command support, help link navigation, and fix positional args - Add DefaultCommand option to CliHostOptions so bare args/options are retried as the default command (e.g. 'greet World' == 'greet greet World') - Refactor CliHost.RunAsync into DispatchCommandAsync/ExecuteCommandAsync - Add help:topic link navigation in HelpCommand via Markdown.LinkClicked - Add 'Back to main help' links in all sub-topic help files - Add help:command anchors in root help.md for topic navigation - Make GreetCommand and FarewellCommand accept positional args for name - Set greet example DefaultCommand = 'greet' Co-authored-by: Copilot <[email protected]> * Port clet's BrowseBar with back/forward nav and syntax highlighting - Add BrowseBar (ported from clet) with back/forward history stacks, Ctrl+Left/Right shortcuts, and proper statusbar styling - Rewrite HelpCommand.RunAsync to match clet's HelpClet pattern: BrowseBar, LinkClicked handler, NavigateTo, viewport reset - Add TextMateSyntaxHighlighter for code block coloring - Add horizontal scrollbar to markdown view - Update golden file for new status bar layout Co-authored-by: Copilot <[email protected]> * Add visual help browser tests and greet example execution tests - HelpBrowserUiTests: proves BrowseBar back/forward arrows render, embedded help content displays, subcommand view shows options, and golden file assertion for the browser layout - GreetExampleTests: proves every documented example in the help files actually works (greet World, --formal Alice, farewell Bob, farewell --until tomorrow Bob, default command dispatch, etc.) - Add embedded help.md resource to integration test assembly - Total: 24 integration tests, 17 unit tests (41 total, all passing) Co-authored-by: Copilot <[email protected]> * Escape markdown table cells in MetadataHelpProvider Pipe characters and newlines in command/option descriptions would break the generated markdown table structure. Add EscapeCell helper that replaces | with \| and collapses newlines to spaces. Co-authored-by: Copilot <[email protected]> * fix: use explicit type in collection expression for ReSharper compliance ReSharper cannot infer target type for 'new' inside collection expressions, so use explicit 'new CommandOptionDescriptor(...)' instead of 'new (...)'. Co-authored-by: Copilot <[email protected]> * Add SourceLink and symbol package support (#11) Enable source debugging and .snupkg generation for NuGet consumers. Co-authored-by: Copilot <[email protected]> * Back-merge main into develop (#13) * Plan: help command and --help flag should render markdown Co-authored-by: Copilot <[email protected]> * Fix help command and --help flag to render markdown - Convert MetadataHelpProvider.GetRootHelp to generate markdown with ## headings, bullet lists, and backtick formatting - Fix CliHost.WriteRootFlag to render via MarkdownRenderer.RenderToAnsi instead of plain stdout.WriteLine - Fix HelpCommand.RunAsync to display markdown in a fullscreen Terminal.Gui Markdown viewer using RunnableWrapper - Add tests for --help ANSI output, help --cat, and MetadataHelpProvider markdown generation Fixes #5 Co-authored-by: Copilot <[email protected]> * Fix help TUI: set Markdown.Text in Initialized handler, add integration tests The help command's TUI viewer rendered empty content because Markdown.Text was set before the view was initialized/laid out. Following the pattern from gui-cs/clet's MarkdownClet, set the text inside the Initialized event handler on the containing Runnable. Also switches from RunnableWrapper to a plain Runnable with an embedded Markdown view — the help viewer is read-only and needs no result extraction. Adds integration tests using Application.Create()/Init(ansi) with StopAfterFirstIteration to verify: - The TUI renders without hanging - Driver contents contain expected command text - Subcommand help renders correctly - RenderCatAsync produces ANSI output Co-authored-by: Copilot <[email protected]> * Add hero GIF recording and polish README - Re-record docs/images/hero.gif using tuirec v0.4.0 with the example app - Rewrite README for clarity: add badges, a Why section, feature table, real JSON output example, contributing pointer, and cleaner structure Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> * Fix MarkdownRenderer global state leaks (#14) * Plan: help command and --help flag should render markdown Co-authored-by: Copilot <[email protected]> * Fix help command and --help flag to render markdown - Convert MetadataHelpProvider.GetRootHelp to generate markdown with ## headings, bullet lists, and backtick formatting - Fix CliHost.WriteRootFlag to render via MarkdownRenderer.RenderToAnsi instead of plain stdout.WriteLine - Fix HelpCommand.RunAsync to display markdown in a fullscreen Terminal.Gui Markdown viewer using RunnableWrapper - Add tests for --help ANSI output, help --cat, and MetadataHelpProvider markdown generation Fixes #5 Co-authored-by: Copilot <[email protected]> * Fix help TUI: set Markdown.Text in Initialized handler, add integration tests The help command's TUI viewer rendered empty content because Markdown.Text was set before the view was initialized/laid out. Following the pattern from gui-cs/clet's MarkdownClet, set the text inside the Initialized event handler on the containing Runnable. Also switches from RunnableWrapper to a plain Runnable with an embedded Markdown view — the help viewer is read-only and needs no result extraction. Adds integration tests using Application.Create()/Init(ansi) with StopAfterFirstIteration to verify: - The TUI renders without hanging - Driver contents contain expected command text - Subcommand help renders correctly - RenderCatAsync produces ANSI output Co-authored-by: Copilot <[email protected]> * Add hero GIF recording and polish README - Re-record docs/images/hero.gif using tuirec v0.4.0 with the example app - Rewrite README for clarity: add badges, a Why section, feature table, real JSON output example, contributing pointer, and cleaner structure Co-authored-by: Copilot <[email protected]> * Fix MarkdownRenderer global state leaks - Save and restore DisableRealDriverIO env var in finally block - Move app.Init inside try/finally so cleanup runs if Init throws - Add MarkdownRendererTests verifying env var restoration - Disable test parallelization (Terminal.Gui uses global state) Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> * fix: set IApplication.AppModel and defer Init() for inline input commands (#16) RunWithTerminalGuiAsync previously always called Init() regardless of whether the command actually uses the TUI. For inline input commands, Init() modifies terminal state (cursor save/scroll), and if the command returns without running the TUI event loop (e.g. greet hello), Dispose() restores the cursor to the wrong position, causing output to appear at incorrect rows. Fix: - Set app.AppModel on the IApplication instance (not the process-wide static) - Only call Init() upfront for fullscreen commands (viewers, --fullscreen) - For inline input commands, defer Init() to InputCommandRunner where the TUI is actually started via app.RunAsync() - Commands that compute and return without TUI (like greet) never trigger Init(), so terminal state is never modified Fixes #15 Co-authored-by: Copilot <[email protected]> * fix: remove duplicate TestSetup class introduced by merge --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: copilot-swe-agent[bot] <[email protected]> * Release v0.1.0 (#19) * feat: help TUI viewer, markdown rendering, rename ExampleApp to greet - HelpCommand.RunAsync launches a TUI Markdown viewer (Runnable + Markdown + StatusBar) matching clet's pattern, instead of returning raw text in CommandResult - MetadataHelpProvider.GetRootHelp emits markdown (tables, headers) instead of plain text - CliHost.WriteRootFlag passes --help output through MarkdownRenderer.RenderToAnsi for ANSI-styled stdout - Rename examples/Terminal.Gui.Cli.ExampleApp to examples/greet with AssemblyName=greet - Add README.md for the greet example app - Add visual UI tests (CommandUiHarness + golden-file assertions) ported from clet's CletUiHarness pattern - Add MetadataHelpProviderTests and CliHost help rendering tests Closes #5 Co-authored-by: Copilot <[email protected]> * Fix terminal encoding for ANSI rendering and add multiple help topics - Port clet's MarkdownHelpRenderer approach: set Console.OutputEncoding to UTF-8 before rendering, use a full TG ANSI driver with proper layout/draw cycle, and restore encoding afterward. Fixes garbled box-drawing chars. - Add FarewellCommand with --until option for navigation testing - Add embedded markdown help files (help.md, greet.md, farewell.md, info.md) - Configure EmbeddedMarkdownHelpProvider in greet example - Fix InfoCommand to properly launch TUI viewer (was returning text without calling app.RunAsync, causing terminal to hang until Enter pressed) Co-authored-by: Copilot <[email protected]> * Add default command support, help link navigation, and fix positional args - Add DefaultCommand option to CliHostOptions so bare args/options are retried as the default command (e.g. 'greet World' == 'greet greet World') - Refactor CliHost.RunAsync into DispatchCommandAsync/ExecuteCommandAsync - Add help:topic link navigation in HelpCommand via Markdown.LinkClicked - Add 'Back to main help' links in all sub-topic help files - Add help:command anchors in root help.md for topic navigation - Make GreetCommand and FarewellCommand accept positional args for name - Set greet example DefaultCommand = 'greet' Co-authored-by: Copilot <[email protected]> * Port clet's BrowseBar with back/forward nav and syntax highlighting - Add BrowseBar (ported from clet) with back/forward history stacks, Ctrl+Left/Right shortcuts, and proper statusbar styling - Rewrite HelpCommand.RunAsync to match clet's HelpClet pattern: BrowseBar, LinkClicked handler, NavigateTo, viewport reset - Add TextMateSyntaxHighlighter for code block coloring - Add horizontal scrollbar to markdown view - Update golden file for new status bar layout Co-authored-by: Copilot <[email protected]> * Add visual help browser tests and greet example execution tests - HelpBrowserUiTests: proves BrowseBar back/forward arrows render, embedded help content displays, subcommand view shows options, and golden file assertion for the browser layout - GreetExampleTests: proves every documented example in the help files actually works (greet World, --formal Alice, farewell Bob, farewell --until tomorrow Bob, default command dispatch, etc.) - Add embedded help.md resource to integration test assembly - Total: 24 integration tests, 17 unit tests (41 total, all passing) Co-authored-by: Copilot <[email protected]> * Escape markdown table cells in MetadataHelpProvider Pipe characters and newlines in command/option descriptions would break the generated markdown table structure. Add EscapeCell helper that replaces | with \| and collapses newlines to spaces. Co-authored-by: Copilot <[email protected]> * fix: use explicit type in collection expression for ReSharper compliance ReSharper cannot infer target type for 'new' inside collection expressions, so use explicit 'new CommandOptionDescriptor(...)' instead of 'new (...)'. Co-authored-by: Copilot <[email protected]> * Add SourceLink and symbol package support (#11) Enable source debugging and .snupkg generation for NuGet consumers. Co-authored-by: Copilot <[email protected]> * Back-merge main into develop (#13) * Plan: help command and --help flag should render markdown Co-authored-by: Copilot <[email protected]> * Fix help command and --help flag to render markdown - Convert MetadataHelpProvider.GetRootHelp to generate markdown with ## headings, bullet lists, and backtick formatting - Fix CliHost.WriteRootFlag to render via MarkdownRenderer.RenderToAnsi instead of plain stdout.WriteLine - Fix HelpCommand.RunAsync to display markdown in a fullscreen Terminal.Gui Markdown viewer using RunnableWrapper - Add tests for --help ANSI output, help --cat, and MetadataHelpProvider markdown generation Fixes #5 Co-authored-by: Copilot <[email protected]> * Fix help TUI: set Markdown.Text in Initialized handler, add integration tests The help command's TUI viewer rendered empty content because Markdown.Text was set before the view was initialized/laid out. Following the pattern from gui-cs/clet's MarkdownClet, set the text inside the Initialized event handler on the containing Runnable. Also switches from RunnableWrapper to a plain Runnable with an embedded Markdown view — the help viewer is read-only and needs no result extraction. Adds integration tests using Application.Create()/Init(ansi) with StopAfterFirstIteration to verify: - The TUI renders without hanging - Driver contents contain expected command text - Subcommand help renders correctly - RenderCatAsync produces ANSI output Co-authored-by: Copilot <[email protected]> * Add hero GIF recording and polish README - Re-record docs/images/hero.gif using tuirec v0.4.0 with the example app - Rewrite README for clarity: add badges, a Why section, feature table, real JSON output example, contributing pointer, and cleaner structure Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> * Fix MarkdownRenderer global state leaks (#14) * Plan: help command and --help flag should render markdown Co-authored-by: Copilot <[email protected]> * Fix help command and --help flag to render markdown - Convert MetadataHelpProvider.GetRootHelp to generate markdown with ## headings, bullet lists, and backtick formatting - Fix CliHost.WriteRootFlag to render via MarkdownRenderer.RenderToAnsi instead of plain stdout.WriteLine - Fix HelpCommand.RunAsync to display markdown in a fullscreen Terminal.Gui Markdown viewer using RunnableWrapper - Add tests for --help ANSI output, help --cat, and MetadataHelpProvider markdown generation Fixes #5 Co-authored-by: Copilot <[email protected]> * Fix help TUI: set Markdown.Text in Initialized handler, add integration tests The help command's TUI viewer rendered empty content because Markdown.Text was set before the view was initialized/laid out. Following the pattern from gui-cs/clet's MarkdownClet, set the text inside the Initialized event handler on the containing Runnable. Also switches from RunnableWrapper to a plain Runnable with an embedded Markdown view — the help viewer is read-only and needs no result extraction. Adds integration tests using Application.Create()/Init(ansi) with StopAfterFirstIteration to verify: - The TUI renders without hanging - Driver contents contain expected command text - Subcommand help renders correctly - RenderCatAsync produces ANSI output Co-authored-by: Copilot <[email protected]> * Add hero GIF recording and polish README - Re-record docs/images/hero.gif using tuirec v0.4.0 with the example app - Rewrite README for clarity: add badges, a Why section, feature table, real JSON output example, contributing pointer, and cleaner structure Co-authored-by: Copilot <[email protected]> * Fix MarkdownRenderer global state leaks - Save and restore DisableRealDriverIO env var in finally block - Move app.Init inside try/finally so cleanup runs if Init throws - Add MarkdownRendererTests verifying env var restoration - Disable test parallelization (Terminal.Gui uses global state) Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> * fix: set IApplication.AppModel and defer Init() for inline input commands (#16) RunWithTerminalGuiAsync previously always called Init() regardless of whether the command actually uses the TUI. For inline input commands, Init() modifies terminal state (cursor save/scroll), and if the command returns without running the TUI event loop (e.g. greet hello), Dispose() restores the cursor to the wrong position, causing output to appear at incorrect rows. Fix: - Set app.AppModel on the IApplication instance (not the process-wide static) - Only call Init() upfront for fullscreen commands (viewers, --fullscreen) - For inline input commands, defer Init() to InputCommandRunner where the TUI is actually started via app.RunAsync() - Commands that compute and return without TUI (like greet) never trigger Init(), so terminal state is never modified Fixes #15 Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> * Release v0.2.0 (#24) * feat: help TUI viewer, markdown rendering, rename ExampleApp to greet - HelpCommand.RunAsync launches a TUI Markdown viewer (Runnable + Markdown + StatusBar) matching clet's pattern, instead of returning raw text in CommandResult - MetadataHelpProvider.GetRootHelp emits markdown (tables, headers) instead of plain text - CliHost.WriteRootFlag passes --help output through MarkdownRenderer.RenderToAnsi for ANSI-styled stdout - Rename examples/Terminal.Gui.Cli.ExampleApp to examples/greet with AssemblyName=greet - Add README.md for the greet example app - Add visual UI tests (CommandUiHarness + golden-file assertions) ported from clet's CletUiHarness pattern - Add MetadataHelpProviderTests and CliHost help rendering tests Closes #5 Co-authored-by: Copilot <[email protected]> * Fix terminal encoding for ANSI rendering and add multiple help topics - Port clet's MarkdownHelpRenderer approach: set Console.OutputEncoding to UTF-8 before rendering, use a full TG ANSI driver with proper layout/draw cycle, and restore encoding afterward. Fixes garbled box-drawing chars. - Add FarewellCommand with --until option for navigation testing - Add embedded markdown help files (help.md, greet.md, farewell.md, info.md) - Configure EmbeddedMarkdownHelpProvider in greet example - Fix InfoCommand to properly launch TUI viewer (was returning text without calling app.RunAsync, causing terminal to hang until Enter pressed) Co-authored-by: Copilot <[email protected]> * Add default command support, help link navigation, and fix positional args - Add DefaultCommand option to CliHostOptions so bare args/options are retried as the default command (e.g. 'greet World' == 'greet greet World') - Refactor CliHost.RunAsync into DispatchCommandAsync/ExecuteCommandAsync - Add help:topic link navigation in HelpCommand via Markdown.LinkClicked - Add 'Back to main help' links in all sub-topic help files - Add help:command anchors in root help.md for topic navigation - Make GreetCommand and FarewellCommand accept positional args for name - Set greet example DefaultCommand = 'greet' Co-authored-by: Copilot <[email protected]> * Port clet's BrowseBar with back/forward nav and syntax highlighting - Add BrowseBar (ported from clet) with back/forward history stacks, Ctrl+Left/Right shortcuts, and proper statusbar styling - Rewrite HelpCommand.RunAsync to match clet's HelpClet pattern: BrowseBar, LinkClicked handler, NavigateTo, viewport reset - Add TextMateSyntaxHighlighter for code block coloring - Add horizontal scrollbar to markdown view - Update golden file for new status bar layout Co-authored-by: Copilot <[email protected]> * Add visual help browser tests and greet example execution tests - HelpBrowserUiTests: proves BrowseBar back/forward arrows render, embedded help content displays, subcommand view shows options, and golden file assertion for the browser layout - GreetExampleTests: proves every documented example in the help files actually works (greet World, --formal Alice, farewell Bob, farewell --until tomorrow Bob, default command dispatch, etc.) - Add embedded help.md resource to integration test assembly - Total: 24 integration tests, 17 unit tests (41 total, all passing) Co-authored-by: Copilot <[email protected]> * Escape markdown table cells in MetadataHelpProvider Pipe characters and newlines in command/option descriptions would break the generated markdown table structure. Add EscapeCell helper that replaces | with \| and collapses newlines to spaces. Co-authored-by: Copilot <[email protected]> * fix: use explicit type in collection expression for ReSharper compliance ReSharper cannot infer target type for 'new' inside collection expressions, so use explicit 'new CommandOptionDescriptor(...)' instead of 'new (...)'. Co-authored-by: Copilot <[email protected]> * Add SourceLink and symbol package support (#11) Enable source debugging and .snupkg generation for NuGet consumers. Co-authored-by: Copilot <[email protected]> * Back-merge main into develop (#13) * Plan: help command and --help flag should render markdown Co-authored-by: Copilot <[email protected]> * Fix help command and --help flag to render markdown - Convert MetadataHelpProvider.GetRootHelp to generate markdown with ## headings, bullet lists, and backtick formatting - Fix CliHost.WriteRootFlag to render via MarkdownRenderer.RenderToAnsi instead of plain stdout.WriteLine - Fix HelpCommand.RunAsync to display markdown in a fullscreen Terminal.Gui Markdown viewer using RunnableWrapper - Add tests for --help ANSI output, help --cat, and MetadataHelpProvider markdown generation Fixes #5 Co-authored-by: Copilot <[email protected]> * Fix help TUI: set Markdown.Text in Initialized handler, add integration tests The help command's TUI viewer rendered empty content because Markdown.Text was set before the view was initialized/laid out. Following the pattern from gui-cs/clet's MarkdownClet, set the text inside the Initialized event handler on the containing Runnable. Also switches from RunnableWrapper to a plain Runnable with an embedded Markdown view — the help viewer is read-only and needs no result extraction. Adds integration tests using Application.Create()/Init(ansi) with StopAfterFirstIteration to verify: - The TUI renders without hanging - Driver contents contain expected command text - Subcommand help renders correctly - RenderCatAsync produces ANSI output Co-authored-by: Copilot <[email protected]> * Add hero GIF recording and polish README - Re-record docs/images/hero.gif using tuirec v0.4.0 with the example app - Rewrite README for clarity: add badges, a Why section, feature table, real JSON output example, contributing pointer, and cleaner structure Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> * Fix MarkdownRenderer global state leaks (#14) * Plan: help command and --help flag should render markdown Co-authored-by: Copilot <[email protected]> * Fix help command and --help flag to render markdown - Convert MetadataHelpProvider.GetRootHelp to generate markdown with ## headings, bullet lists, and backtick formatting - Fix CliHost.WriteRootFlag to render via MarkdownRenderer.RenderToAnsi instead of plain stdout.WriteLine - Fix HelpCommand.RunAsync to display markdown in a fullscreen Terminal.Gui Markdown viewer using RunnableWrapper - Add tests for --help ANSI output, help --cat, and MetadataHelpProvider markdown generation Fixes #5 Co-authored-by: Copilot <[email protected]> * Fix help TUI: set Markdown.Text in Initialized handler, add integration tests The help command's TUI viewer rendered empty content because Markdown.Text was set before the view was initialized/laid out. Following the pattern from gui-cs/clet's MarkdownClet, set the text inside the Initialized event handler on the containing Runnable. Also switches from RunnableWrapper to a plain Runnable with an embedded Markdown view — the help viewer is read-only and needs no result extraction. Adds integration tests using Application.Create()/Init(ansi) with StopAfterFirstIteration to verify: - The TUI renders without hanging - Driver contents contain expected command text - Subcommand help renders correctly - RenderCatAsync produces ANSI output Co-authored-by: Copilot <[email protected]> * Add hero GIF recording and polish README - Re-record docs/images/hero.gif using tuirec v0.4.0 with the example app - Rewrite README for clarity: add badges, a Why section, feature table, real JSON output example, contributing pointer, and cleaner structure Co-authored-by: Copilot <[email protected]> * Fix MarkdownRenderer global state leaks - Save and restore DisableRealDriverIO env var in finally block - Move app.Init inside try/finally so cleanup runs if Init throws - Add MarkdownRendererTests verifying env var restoration - Disable test parallelization (Terminal.Gui uses global state) Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> * fix: set IApplication.AppModel and defer Init() for inline input commands (#16) RunWithTerminalGuiAsync previously always called Init() regardless of whether the command actually uses the TUI. For inline input commands, Init() modifies terminal state (cursor save/scroll), and if the command returns without running the TUI event loop (e.g. greet hello), Dispose() restores the cursor to the wrong position, causing output to appear at incorrect rows. Fix: - Set app.AppModel on the IApplication instance (not the process-wide static) - Only call Init() upfront for fullscreen commands (viewers, --fullscreen) - For inline input commands, defer Init() to InputCommandRunner where the TUI is actually started via app.RunAsync() - Commands that compute and return without TUI (like greet) never trigger Init(), so terminal state is never modified Fixes #15 Co-authored-by: Copilot <[email protected]> * fix: centralize Terminal.Gui lifecycle for headless markdown rendering in CliHost (C1) (#22) * fix: centralize Terminal.Gui lifecycle for headless markdown rendering in CliHost MarkdownRenderer.RenderToAnsi previously called Application.Create()/Init()/Dispose() directly, violating constitution C1 (only CliHost may call Terminal.Gui lifecycle APIs). This path is reachable from help --cat, root --help, and viewer --cat rendering. Move the headless ANSI-driver create/init/dispose block (including the DisableRealDriverIO scope) into an internal CliHost.RunHeadlessRender(width, height, render) helper. MarkdownRenderer keeps its public signature and now only performs view layout and drawing inside the callback, so lifecycle ownership is centralized again. No public API change; rendering behavior is unchanged. Note: InputCommandRunner still carries a defensive app.Init() that exists only because CliHost skips Init() for inline input commands; PR #9 fixes that root cause, after which the defensive call can be removed. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * style: apply ReSharper cleanup normalizations Pre-existing deviations surfaced by the pinned 'dotnet jb cleanupcode' pass: space before parens in generic 'new ()' constraints and after 'unchecked'. Committed so the CI cleanup + clean-diff gate passes. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * Revert "style: apply ReSharper cleanup normalizations" This reverts commit 25921ba2e94cb5bd699c766a8b81f84bc9e2df8d. --------- Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> * Library improvements extracted from survey example work (#23) * feat: library improvements extracted from survey example work (#9) Non-survey changes split out of #9 (the survey example itself is destined for spectre-console/Examples and will not merge here): CliHost: - Route non-success viewer --cat results through ResultWriter so diagnostics reach stderr (or the --json error envelope) instead of exiting silently - Force UTF-8 and re-acquire Console.Out/Error after a Terminal.Gui session so post-TUI Unicode output renders correctly - Always call app.Init() before command.RunAsync (restores the ICliCommand.RunAsync contract for inline input commands); set Application.AppModel before Create() - Run DefaultCommand when args are empty instead of falling through to root help JSON envelope (constitution C4): - Add CliHostOptions.ResultJsonResolver so consumer result types serialize through source-generated contexts; threaded through JsonEnvelope.ToJson and ResultWriter.Write via JsonTypeInfoResolver.Combine InputCommandRunner: - Remove defensive app.Init() — dead now that CliHost always initializes, and itself a C1 violation Docs/specs (constitution C2): - Document ResultJsonResolver and DefaultCommand dispatch in specs/library-spec.md - Fix stale example project paths in README.md and examples/greet/README.md Tests/infra: - Add envelope resolver round-trip test - Make HelpCommand integration tests CI-stable (drop nondeterministic driver-buffer assertions) - Bump Terminal.Gui to 2.4.3 release Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix: preserve caller-supplied writers after TUI shutdown (Codex P2) The post-TUI console refresh used `stdout is not StringWriter` to decide whether to re-acquire Console.Out/Error, so any caller-supplied writer that was not a StringWriter (e.g. a StreamWriter over a stream or file) was silently replaced and the result went to the process console. Capture whether each writer is the real console (by reference) before Terminal.Gui runs - the comparison is only valid then, since changing Console.OutputEncoding replaces Console.Out/Error - and refresh each writer independently, leaving caller-supplied writers untouched. Adds an integration regression test that routes the TUI path through a StreamWriter-over-MemoryStream stdout. Co-Authored-By: Claude Fable 5 <[email protected]> --------- Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> * chore: bump version to 0.2.0-develop for upcoming release Co-Authored-By: Claude Fable 5 <[email protected]> --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> * Release v0.2.1 (#28) * feat: help TUI viewer, markdown rendering, rename ExampleApp to greet - HelpCommand.RunAsync launches a TUI Markdown viewer (Runnable + Markdown + StatusBar) matching clet's pattern, instead of returning raw text in CommandResult - MetadataHelpProvider.GetRootHelp emits markdown (tables, headers) instead of plain text - CliHost.WriteRootFlag passes --help output through MarkdownRenderer.RenderToAnsi for ANSI-styled stdout - Rename examples/Terminal.Gui.Cli.ExampleApp to examples/greet with AssemblyName=greet - Add README.md for the greet example app - Add visual UI tests (CommandUiHarness + golden-file assertions) ported from clet's CletUiHarness pattern - Add MetadataHelpProviderTests and CliHost help rendering tests Closes #5 Co-authored-by: Copilot <[email protected]> * Fix terminal encoding for ANSI rendering and add multiple help topics - Port clet's MarkdownHelpRenderer approach: set Console.OutputEncoding to UTF-8 before rendering, use a full TG ANSI driver with proper layout/draw cycle, and restore encoding afterward. Fixes garbled box-drawing chars. - Add FarewellCommand with --until option for navigation testing - Add embedded markdown help files (help.md, greet.md, farewell.md, info.md) - Configure EmbeddedMarkdownHelpProvider in greet example - Fix InfoCommand to properly launch TUI viewer (was returning text without calling app.RunAsync, causing terminal to hang until Enter pressed) Co-authored-by: Copilot <[email protected]> * Add default command support, help link navigation, and fix positional args - Add DefaultCommand option to CliHostOptions so bare args/options are retried as the default command (e.g. 'greet World' == 'greet greet World') - Refactor CliHost.RunAsync into DispatchCommandAsync/ExecuteCommandAsync - Add help:topic link navigation in HelpCommand via Markdown.LinkClicked - Add 'Back to main help' links in all sub-topic help files - Add help:command anchors in root help.md for topic navigation - Make GreetCommand and FarewellCommand accept positional args for name - Set greet example DefaultCommand = 'greet' Co-authored-by: Copilot <[email protected]> * Port clet's BrowseBar with back/forward nav and syntax highlighting - Add BrowseBar (ported from clet) with back/forward history stacks, Ctrl+Left/Right shortcuts, and proper statusbar styling - Rewrite HelpCommand.RunAsync to match clet's HelpClet pattern: BrowseBar, LinkClicked handler, NavigateTo, viewport reset - Add TextMateSyntaxHighlighter for code block coloring - Add horizontal scrollbar to markdown view - Update golden file for new status bar layout Co-authored-by: Copilot <[email protected]> * Add visual help browser tests and greet example execution tests - HelpBrowserUiTests: proves BrowseBar back/forward arrows render, embedded help content displays, subcommand view shows options, and golden file assertion for the browser layout - GreetExampleTests: proves every documented example in the help files actually works (greet World, --formal Alice, farewell Bob, farewell --until tomorrow Bob, default command dispatch, etc.) - Add embedded help.md resource to integration test assembly - Total: 24 integration tests, 17 unit tests (41 total, all passing) Co-authored-by: Copilot <[email protected]> * Escape markdown table cells in MetadataHelpProvider Pipe characters and newlines in command/option descriptions would break the generated markdown table structure. Add EscapeCell helper that replaces | with \| and collapses newlines to spaces. Co-authored-by: Copilot <[email protected]> * fix: use explicit type in collection expression for ReSharper compliance ReSharper cannot infer target type for 'new' inside collection expressions, so use explicit 'new CommandOptionDescriptor(...)' instead of 'new (...)'. Co-authored-by: Copilot <[email protected]> * Add SourceLink and symbol package support (#11) Enable source debugging and .snupkg generation for NuGet consumers. Co-authored-by: Copilot <[email protected]> * Back-merge main into develop (#13) * Plan: help command and --help flag should render markdown Co-authored-by: Copilot <[email protected]> * Fix help command and --help flag to render markdown - Convert MetadataHelpProvider.GetRootHelp to generate markdown with ## headings, bullet lists, and backtick formatting - Fix CliHost.WriteRootFlag to render via MarkdownRenderer.RenderToAnsi instead of plain stdout.WriteLine - Fix HelpCommand.RunAsync to display markdown in a fullscreen Terminal.Gui Markdown viewer using RunnableWrapper - Add tests for --help ANSI output, help --cat, and MetadataHelpProvider markdown generation Fixes #5 Co-authored-by: Copilot <[email protected]> * Fix help TUI: set Markdown.Text in Initialized handler, add integration tests The help command's TUI viewer rendered empty content because Markdown.Text was set before the view was initialized/laid out. Following the pattern from gui-cs/clet's MarkdownClet, set the text inside the Initialized event handler on the containing Runnable. Also switches from RunnableWrapper to a plain Runnable with an embedded Markdown view — the help viewer is read-only and needs no result extraction. Adds integration tests using Application.Create()/Init(ansi) with StopAfterFirstIteration to verify: - The TUI renders without hanging - Driver contents contain expected command text - Subcommand help renders correctly - RenderCatAsync produces ANSI output Co-authored-by: Copilot <[email protected]> * Add hero GIF recording and polish README - Re-record docs/images/hero.gif using tuirec v0.4.0 with the example app - Rewrite README for clarity: add badges, a Why section, feature table, real JSON output example, contributing pointer, and cleaner structure Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> * Fix MarkdownRenderer global state leaks (#14) * Plan: help command and --help flag should render markdown Co-authored-by: Copilot <[email protected]> * Fix help command and --help flag to render markdown - Convert MetadataHelpProvider.GetRootHelp to generate markdown with ## headings, bullet lists, and backtick formatting - Fix CliHost.WriteRootFlag to render via MarkdownRenderer.RenderToAnsi instead of plain stdout.WriteLine - Fix HelpCommand.RunAsync to display markdown in a fullscreen Terminal.Gui Markdown viewer using RunnableWrapper - Add tests for --help ANSI output, help --cat, and MetadataHelpProvider markdown generation Fixes #5 Co-authored-by: Copilot <[email protected]> * Fix help TUI: set Markdown.Text in Initialized handler, add integration tests The help command's TUI viewer rendered empty content because Markdown.Text was set before the view was initialized/laid out. Following the pattern from gui-cs/clet's MarkdownClet, set the text inside the Initialized event handler on the containing Runnable. Also switches from RunnableWrapper to a plain Runnable with an embedded Markdown view — the help viewer is read-only and needs no result extraction. Adds integration tests using Application.Create()/Init(ansi) with StopAfterFirstIteration to verify: - The TUI renders without hanging - Driver contents contain expected command text - Subcommand help renders correctly - RenderCatAsync produces ANSI output Co-authored-by: Copilot <[email protected]> * Add hero GIF recording and polish README - Re-record docs/images/hero.gif using tuirec v0.4.0 with the example app - Rewrite README for clarity: add badges, a Why section, feature table, real JSON output example, contributing pointer, and cleaner structure Co-authored-by: Copilot <[email protected]> * Fix MarkdownRenderer global state leaks - Save and restore DisableRealDriverIO env var in finally block - Move app.Init inside try/finally so cleanup runs if Init throws - Add MarkdownRendererTests verifying env var restoration - Disable test parallelization (Terminal.Gui uses global state) Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> * fix: set IApplication.AppModel and defer Init() for inline input commands (#16) RunWithTerminalGuiAsync previously always called Init() regardless of whether the command actually uses the TUI. For inline input commands, Init() modifies terminal state (cursor save/scroll), and if the command returns without running the TUI event loop (e.g. greet hello), Dispose() restores the cursor to the wrong position, causing output to appear at incorrect rows. Fix: - Set app.AppModel on the IApplication instance (not the process-wide static) - Only call Init() upfront for fullscreen commands (viewers, --fullscreen) - For inline input commands, defer Init() to InputCommandRunner where the TUI is actually started via app.RunAsync() - Commands that compute and return without TUI (like greet) never trigger Init(), so terminal state is never modified Fixes #15 Co-authored-by: Copilot <[email protected]> * fix: centralize Terminal.Gui lifecycle for headless markdown rendering in CliHost (C1) (#22) * fix: centralize Terminal.Gui lifecycle for headless markdown rendering in CliHost MarkdownRenderer.RenderToAnsi previously called Application.Create()/Init()/Dispose() directly, violating constitution C1 (only CliHost may call Terminal.Gui lifecycle APIs). This path is reachable from help --cat, root --help, and viewer --cat rendering. Move the headless ANSI-driver create/init/dispose block (including the DisableRealDriverIO scope) into an internal CliHost.RunHeadlessRender(width, height, render) helper. MarkdownRenderer keeps its public signature and now only performs view layout and drawing inside the callback, so lifecycle ownership is centralized again. No public API change; rendering behavior is unchanged. Note: InputCommandRunner still carries a defensive app.Init() that exists only because CliHost skips Init() for inline input commands; PR #9 fixes that root cause, after which the defensive call can be removed. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * style: apply ReSharper cleanup normalizations Pre-existing deviations surfaced by the pinned 'dotnet jb cleanupcode' pass: space before parens in generic 'new ()' constraints and after 'unchecked'. Committed so the CI cleanup + clean-diff gate passes. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * Revert "style: apply ReSharper cleanup normalizations" This reverts commit 25921ba2e94cb5bd699c766a8b81f84bc9e2df8d. --------- Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> * Library improvements extracted from survey example work (#23) * feat: library improvements extracted from survey example work (#9) Non-survey changes split out of #9 (the survey example itself is destined for spectre-console/Examples and will not merge here): CliHost: - Route non-success viewer --cat results through ResultWriter so diagnostics reach stderr (or the --json error envelope) instead of exiting silently - Force UTF-8 and re-acquire Console.Out/Error after a Terminal.Gui session so post-TUI Unicode output renders correctly - Always call app.Init() before command.RunAsync (restores the ICliCommand.RunAsync contract for inline input commands); set Application.AppModel before Create() - Run DefaultCommand when args are empty instead of falling through to root help JSON envelope (constitution C4): - Add CliHostOptions.ResultJsonResolver so consumer result types serialize through source-generated contexts; threaded through JsonEnvelope.ToJson and ResultWriter.Write via JsonTypeInfoResolver.Combine InputCommandRunner: - Remove defensive app.Init() — dead now that CliHost always initializes, and itself a C1 violation Docs/specs (constitution C2): - Document ResultJsonResolver and DefaultCommand dispatch in specs/library-spec.md - Fix stale example project paths in README.md and examples/greet/README.md Tests/infra: - Add envelope resolver round-trip test - Make HelpCommand integration tests CI-stable (drop nondeterministic driver-buffer assertions) - Bump Terminal.Gui to 2.4.3 release Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix: preserve caller-supplied writers after TUI shutdown (Codex P2) The post-TUI console refresh used `stdout is not StringWriter` to decide whether to re-acquire Console.Out/Error, so any caller-supplied writer that was not a StringWriter (e.g. a StreamWriter over a stream or file) was silently replaced and the result went to the process console. Capture whether each writer is the real console (by reference) before Terminal.Gui runs - the comparison is only valid then, since changing Console.OutputEncoding replaces Console.Out/Error - and refresh each writer independently, leaving caller-supplied writers untouched. Adds an integration regression test that routes the TUI path through a StreamWriter-over-MemoryStream stdout. Co-Authored-By: Claude Fable 5 <[email protected]> --------- Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> * chore: bump version to 0.2.0-develop for upcoming release Co-Authored-By: Claude Fable 5 <[email protected]> * Back-merge v0.2.0 from main into develop (#25) * Plan: help command and --help flag should render markdown Co-authored-by: Copilot <[email protected]> * Fix help command and --help flag to render markdown - Convert MetadataHelpProvider.GetRootHelp to generate markdown with ## headings, bullet lists, and backtick formatting - Fix CliHost.WriteRootFlag to render via MarkdownRenderer.RenderToAnsi instead of plain stdout.WriteLine - Fix HelpCommand.RunAsync to display markdown in a fullscreen Terminal.Gui Markdown viewer using RunnableWrapper - Add tests for --help ANSI output, help --cat, and MetadataHelpProvider markdown generation Fixes #5 Co-authored-by: Copilot <[email protected]> * Fix help TUI: set Markdown.Text in Initialized handler, add integration tests The help command's TUI viewer rendered empty content because Markdown.Text was set before the view was initialized/laid out. Following the pattern from gui-cs/clet's MarkdownClet, set the text inside the Initialized event handler on the containing Runnable. Also switches from RunnableWrapper to a plain Runnable with an embedded Markdown view — the help viewer is read-only and needs no result extraction. Adds integration tests using Application.Create()/Init(ansi) with StopAfterFirstIteration to verify: - The TUI renders without hanging - Driver contents contain expected command text - Subcommand help renders correctly - RenderCatAsync produces ANSI output Co-authored-by: Copilot <[email protected]> * Add hero GIF recording and polish README - Re-record docs/images/hero.gif using tuirec v0.4.0 with the example app - Rewrite README for clarity: add badges, a Why section, feature table, real JSON output example, contributing pointer, and cleaner structure Co-authored-by: Copilot <[email protected]> * Release v0.1.0-beta.1 (#17) * feat: help TUI viewer, markdown rendering, rename ExampleApp to greet - HelpCommand.RunAsync launches a TUI Markdown viewer (Runnable + Markdown + StatusBar) matching clet's pattern, instead of returning raw text in CommandResult - MetadataHelpProvider.GetRootHelp emits markdown (tables, headers) instead of plain text - CliHost.WriteRootFlag passes --help output through MarkdownRenderer.RenderToAnsi for ANSI-styled stdout - Rename examples/Terminal.Gui.Cli.ExampleApp to examples/greet with AssemblyName=greet - Add README.md for the greet example app - Add visual UI tests (CommandUiHarness + golden-file assertions) ported from clet's CletUiHarness pattern - Add MetadataHelpProviderTests and CliHost help rendering tests Closes #5 Co-authored-by: Copilot <[email protected]> * Fix terminal encoding for ANSI rendering and add multiple help topics - Port clet's MarkdownHelpRenderer approach: set Console.OutputEncoding to UTF-8 before rendering, use a full TG ANSI driver with proper layout/draw cycle, and restore encoding afterward. Fixes garbled box-drawing chars. - Add FarewellCommand with --until option for navigation testing - Add embedded markdown help files (help.md, greet.md, farewell.md, info.md) - Configure EmbeddedMarkdownHelpProvider in greet example - Fix InfoCommand to properly launch TUI viewer (was returning text without calling app.RunAsync, causing terminal to hang until Enter pressed) Co-authored-by: Copilot <[email protected]> * Add default command support, help link navigation, and fix positional args - Add DefaultCommand option to CliHostOptions so bare args/options are retried as the default command (e.g. 'greet World' == 'greet greet World') - Refactor CliHost.RunAsync into DispatchCommandAsync/ExecuteCommandAsync - Add help:topic link navigation in HelpCommand via Markdown.LinkClicked - Add 'Back to main help' links in all sub-topic help files - Add help:command anchors in root help.md for topic navigation - Make GreetCommand and FarewellCommand accept positional args for name - Set greet example DefaultCommand = 'greet' Co-authored-by: Copilot <[email protected]> * Port clet's BrowseBar with back/forward nav and syntax highlighting - Add BrowseBar (ported from clet) with back/forward history stacks, Ctrl+Left/Right shortcuts, and proper statusbar styling - Rewrite HelpCommand.RunAsync to match clet's HelpClet pattern: BrowseBar, LinkClicked handler, NavigateTo, viewport reset - Add TextMateSyntaxHighlighter for code block coloring - Add horizontal scrollbar to markdown view - Update golden file for new status bar layout Co-authored-by: Copilot <[email protected]> * Add visual help browser tests and greet example execution tests - HelpBrowserUiTests: proves BrowseBar back/forward arrows render, embedded help content displays, subcommand view shows options, and golden file assertion for the browser layout - GreetExampleTests: proves every documented example in the help files actually works (greet World, --formal Alice, farewell Bob, farewell --until tomorrow Bob, default command dispatch, etc.) - Add embedded help.md resource to integration test assembly - Total: 24 integration tests, 17 unit tests (41 total, all passing) Co-authored-by: Copilot <[email protected]> * Escape markdown table cells in MetadataHelpProvider Pipe characters and newlines in command/option descriptions would break the generated markdown table structure. Add EscapeCell helper that replaces | with \| and collapses newlines to spaces. Co-authored-by: Copilot <[email protected]> * fix: use explicit type in collection expression for ReSharper compliance ReSharper cannot infer target type for 'new' inside collection expressions, so use explicit 'new CommandOptionDescriptor(...)' instead of 'new (...)'. Co-authored-by: Copilot <[email protected]> * Add SourceLink and symbol package support (#11) Enable source debugging and .snupkg generation for NuGet consumers. Co-authored-by: Copilot <[email protected]> * Back-merge main into develop (#13) * Plan: help command and --help flag should render markdown Co-authored-by: Copilot <[email protected]> * Fix help command and --help flag to render markdown - Convert MetadataHelpProvider.GetRootHelp to generate markdown with ## headings, bullet lists, and backtick formatting - Fix CliHost.WriteRootFlag to render via MarkdownRenderer.RenderToAnsi instead of plain stdout.WriteLine - Fix HelpCommand.RunAsync to display markdown in a fullscreen Terminal.Gui Markdown viewer using RunnableWrapper - Add tests for --help ANSI output, help --cat, and MetadataHelpProvider markdown generation Fixes #5 Co-authored-by: Copilot <[email protected]> * Fix help TUI: set Markdown.Text in Initialized handler, add integration tests The help command's TUI viewer rendered empty content because Markdown.Text was set before the view was initialized/laid out. Following the pattern from gui-cs/clet's MarkdownClet, set the text inside the Initialized event handler on the containing Runnable. Also switches from RunnableWrapper to a plain Runnable with an embedded Markdown view — the help viewer is read-only and needs no result extraction. Adds integration tests using Application.Create()/Init(ansi) with StopAfterFirstIteration to verify: - The TUI renders without hanging - Driver contents contain expected command text - Subcommand help renders correctly - RenderCatAsync produces ANSI output Co-authored-by: Copilot <[email protected]> * Add hero GIF recording and polish README - Re-record docs/images/hero.gif using tuirec v0.4.0 with the example app - Rewrite README for clarity: add badges, a Why section, feature table, real JSON output example, contributing pointer, and cleaner structure Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> * Fix MarkdownRenderer global state leaks (#14) * Plan: help command and --help flag should render markdown Co-authored-by: Copilot <[email protected]> * Fix help command and --help flag to render markdown - Convert MetadataHelpProvider.GetRootHelp to generate markdown with ## headings, bullet lists, and backtick formatting - Fix CliHost.WriteRootFlag to render via MarkdownRenderer.RenderToAnsi instead of plain stdout.WriteLine - Fix HelpCommand.RunAsync to display markdown in a fullscreen Terminal.Gui Markdown viewer using RunnableWrapper - Add tests for --help ANSI output, help --cat, and MetadataHelpProvider markdown generation Fixes #5 Co-authored-by: Copilot <[email protected]> * Fix help TUI: set Markdown.Text in Initialized handler, add integration tests The help command's TUI viewer rendered empty content because Markdown.Text was set before the view was initialized/laid out. Following the pattern from gui-cs/clet's MarkdownClet, set the text inside the Initialized event handler on the containing Runnable. Also switches from RunnableWrapper to a plain Runnable with an embedded Markdown view — the help viewer is read-only and needs no result extraction. Adds integration tests using Application.Create()/Init(ansi) with StopAfterFirstIteration to verify: - The TUI renders without hanging - Driver contents contain expected command text - Subcommand help renders correctly - RenderCatAsync produces ANSI output Co-authored-by: Copilot <[email protected]> * Add hero GIF recording and polish README - Re-record docs/images/hero.gif using tuirec v0.4.0 with the example app - Rewrite README for clarity: add badges, a Why section, feature table, real JSON output example, contributing pointer, and cleaner structure Co-authored-by: Copilot <[email protected]> * Fix MarkdownRenderer global state leaks - Save and restore DisableRealDriverIO env var in finally block - Move app.Init inside try/finally so cleanup runs if Init throws - Add MarkdownRendererTests verifying env var restoration - Disable test parallelization (Terminal.Gui uses global state) Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> * fix: set IApplication.AppModel and defer Init() for inline input commands (#16) RunWithTerminalGuiAsync previously always called Init() regardless of whether the command actually uses the TUI. For inline input commands, Init() modifies terminal state (cursor save/scroll), and if the command returns without running the TUI event loop (e.g. greet hello), Dispose() restores the cursor to the wrong position, causing output to appear at incorrect rows. Fix: - Set app.AppModel on the IApplication instance (not the process-wide static) - Only call Init() upfront for fullscreen commands (viewers, --fullscreen) - For inline input commands, defer Init() to InputCommandRunner where the TUI is actually started via app.RunAsync() - Commands that compute and return without TUI (like greet) never trigger Init(), so terminal state is never modified Fixes #15 Co-authored-by: Copilot <[email protected]> * fix: remove duplicate TestSetup class introduced by merge --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: copilot-swe-agent[bot] <[email protected]> * Release v0.1.0 (#19) * feat: help TUI viewer, markdown rendering, rename ExampleApp to greet - HelpCommand.RunAsync launches a TUI Markdown viewer (Runnable + Markdown + StatusBar) matching clet's pattern, instead of returning raw text in CommandResult - MetadataHelpProvider.GetRootHelp emits markdown (tables, headers) instead of plain text - CliHost.WriteRootFlag passes --help output through MarkdownRenderer.RenderToAnsi for ANSI-styled stdout - Rename examples/Terminal.Gui.Cli.ExampleApp to examples/greet with AssemblyName=greet - Add README.md for the greet example app - Add visual UI tests (CommandUiHarness + golden-file assertions) ported from clet's CletUiHarness pattern - Add MetadataHelpProviderTests and CliHost help rendering tests Closes #5 Co-authored-by: Copilot <[email protected]> * Fix terminal encoding for ANSI rendering and add multiple help topics - Port clet's MarkdownHelpRenderer approach: set Console.OutputEncoding to UTF-8 before rendering, use a full TG ANSI driver with proper layout/draw cycle, and restore encoding afterward. Fixes garbled box-drawing chars. - Add FarewellCommand with --until option for navigation testing - Add embedded markdown help files (help.md, greet.md, farewell.md, info.md) - Configure EmbeddedMarkdownHelpProvider in greet example - Fix InfoCommand to properly launch TUI viewer (was returning text without calling app.RunAsync, causing terminal to hang until Enter pressed) Co-authored-by: Copilot <[email protected]> * Add default command support, help link navigation, and fix positional args - Add DefaultCommand option to CliHostOptions so bare args/options are retried as the default command (e.g. 'greet World' == 'greet greet World') - Refactor CliHost.RunAsync into DispatchCommandAsync/ExecuteCommandAsync - Add help:topic link navigation in HelpCommand via Markdown.LinkClicked - Add 'Back to main help' links in all sub-topic help files - Add help:command anchors in root help.md for topic navigation - Make GreetCommand and FarewellCommand accept positional args for name - Set greet example DefaultCommand = 'greet' Co-authored-by: Copilot <[email protected]> * Port clet's BrowseBar with back/forward nav and syntax highlighting - Add BrowseBar (ported from clet) with back/forward history stacks, Ctrl+Left/Right shortcuts, and proper statusbar styling - Rewrite HelpCommand.RunAsync to match clet's HelpClet pattern: BrowseBar, LinkClicked handler, NavigateTo, viewport reset - Add TextMateSyntaxHighlighter for code block coloring - Add horizontal scrollbar to markdown view - Update golden file for new status bar layout Co-authored-by: Copilot <[email protected]> * Add visual help browser tests and greet example execution tests - HelpBrowserUiTests: proves BrowseBar back/forward arrows render, embedded help content displays, subcommand view shows options, and golden file assertion for the browser layout - GreetExampleTests: proves every documented example in the help files actually works (greet World, --formal Alice, farewell Bob, farewell --until tomorrow Bob, default command dispatch, etc.) - Add embedded help.md resource to integration test assembly - Total: 24 integration tests, 17 unit tests (41 total, all passing) Co-authored-by: Copilot <[email protected]> * Escape markdown table cells in MetadataHelpProvider Pipe characters and newlines in command/option descriptions would break the generated markdown table structure. Add EscapeCell helper that replaces | with \| and collapses newlines to spaces. Co-authored-by: Copilot <[email protected]> * fix: use explicit type in collection expression for ReSharper compliance ReSharper cannot infer target type for 'new' inside collection expressions, so use explicit 'new CommandOptionDescriptor(...)' instead of 'new (...)'. Co-authored-by: Copilot <[email protected]> * Add SourceLink and symbol package support (#11) Enable source debugging and .snupkg generation for NuGet consumers. Co-authored-by: Copilot <[email protected]> * Back-merge main into develop (#13) * Plan: help command and --help flag should render markdown Co-authored-by: Copilot <[email protected]> * Fix help command and --help flag to render markdown - Convert MetadataHelpProvider.GetRootHelp to generate markdown with ## headings, bullet lists, and backtick formatting - Fix CliHost.WriteRootFlag to render via MarkdownRenderer.RenderToAnsi instead of plain stdout.WriteLine - Fix HelpCommand.RunAsync to display markdown in a fullscreen Terminal.Gui Markdown viewer using RunnableWrapper - Add tests for --help ANSI output, help --cat, and MetadataHelpProvider markdown generation Fixes #5 Co-authored-by: Copilot <[email protected]>…
* fix: preserve dash-prefixed tokens in DefaultCommand fallback (#30) When the default-command fallback re-parsed [DefaultCommand, ..args], dash-prefixed tokens that weren't declared options still failed with 'Unknown option' — e.g. 'app --literal' or 'app Alice --suffix' — contradicting the DefaultCommand contract that unrecognized options are retried as args. Add ArgParser.Parse(args, command, unknownOptionsAsArguments) which passes unknown dash-prefixed tokens through verbatim as positional arguments while recognized framework/global/command options still parse normally. The fallback path in CliHost.RunWithDefaultCommandAsync opts in; the default parse behavior is unchanged. Commands that reject positional args still produce the usual usage error. Test-first: added failing integration tests (greet host: '--literal', 'Alice --suffix', and 'Alice --formal' for the recognized-option case) and ArgParser unit tests covering the new mode, default-mode rejection, and the no-positionals guard, then implemented the fix. Spec updated per constitution C2. Fixes #30 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix: restore two-argument ArgParser.Parse overload for binary compatibility Optional parameters bind at compile time, so widening the existing public Parse(string[], ICliCommand?) to three parameters removed the old CLR method and would throw MissingMethodException for already-compiled consumers. Keep the original overload delegating to the new three-argument implementation. Addresses Codex P2 review feedback on #31. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
Org rename gui-cs → tui-cs. GitHub auto-redirects all github.com/gui-cs/* URLs; this updates internal references so the repo is self-consistent. Mechanical: every `gui-cs` (hyphen, the org login) → `tui-cs`. The historical brand `gui.cs` (dot) is left as-is. Machine-local absolute paths left untouched. Part of the org-wide gui-cs → tui-cs rename. Merge AFTER the org rename. Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
# Conflicts: # Directory.Build.props # README.md # specs/library-spec.md # src/Terminal.Gui.Cli/CliHost.cs # tests/Terminal.Gui.Cli.IntegrationTests/GreetExampleTests.cs
💡 Codex ReviewLine 15 in 8a91b43 This commit deletes
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Release v0.3.0
Version:
0.3.0NuGet Package:
Terminal.Gui.Cli 0.3.0What happens when this PR is merged
v0.3.0Terminal.Gui.Cli 0.3.0to NuGet.orgmain->developis openedChecklist
0.3.0