Skip to content

Release v0.1.0#12

Closed
tig wants to merge 10 commits into
mainfrom
release/v0.1.0
Closed

Release v0.1.0#12
tig wants to merge 10 commits into
mainfrom
release/v0.1.0

Conversation

@tig

@tig tig commented May 26, 2026

Copy link
Copy Markdown
Member

Release v0.1.0

Version: 0.1.0
NuGet Package: Terminal.Gui.Cli 0.1.0

What happens when this PR is merged

  1. The Finalize Release workflow creates tag v0.1.0
  2. The Release workflow builds and pushes Terminal.Gui.Cli 0.1.0 to NuGet.org
  3. A GitHub Release is created with auto-generated notes
  4. A back-merge PR from main -> develop is opened

Checklist

  • CI passes on this PR
  • Version looks correct: 0.1.0
  • Release notes reviewed

tig and others added 10 commits May 24, 2026 16:11
- 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 <223556219+Copilot@users.noreply.github.com>
- 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 <223556219+Copilot@users.noreply.github.com>
… 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 <223556219+Copilot@users.noreply.github.com>
- 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 <223556219+Copilot@users.noreply.github.com>
- 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 <223556219+Copilot@users.noreply.github.com>
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 <223556219+Copilot@users.noreply.github.com>
ReSharper cannot infer target type for 'new' inside collection expressions,
so use explicit 'new CommandOptionDescriptor(...)' instead of 'new (...)'.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ple-app

feat: help TUI viewer, markdown rendering, rename ExampleApp to greet
Enable source debugging and .snupkg generation for NuGet consumers.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cbec53dff5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

height = 24;
}

Environment.SetEnvironmentVariable ("DisableRealDriverIO", "1");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Restore DisableRealDriverIO after ANSI render

RenderToAnsi sets DisableRealDriverIO and never restores the previous value, which mutates process-global state. Since this helper is called by --help/--cat, any later CliHost.RunAsync invocation in the same process inherits that flag and may run interactive Terminal.Gui sessions with real driver I/O disabled. Capture the prior value and restore it in finally.

Useful? React with 👍 / 👎.


Environment.SetEnvironmentVariable ("DisableRealDriverIO", "1");
IApplication app = Application.Create ();
app.Init (DriverRegistry.Names.ANSI);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Ensure encoding/app cleanup when Init throws

Console.OutputEncoding is changed before app.Init, but the try/finally that restores encoding and disposes the app starts only after Init. If initialization throws (for example when terminal setup fails), the method exits with UTF-8 forced and an undisposed app instance, leaking process state for subsequent commands. Move app.Init inside the protected try/finally so cleanup always runs.

Useful? React with 👍 / 👎.

@tig tig closed this May 26, 2026
@tig tig deleted the release/v0.1.0 branch May 26, 2026 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant