Skip to content

Update to TG 2.5.x (PR 5416 preview) - #7

Open
tig wants to merge 2 commits into
mainfrom
tg25-port
Open

Update to TG 2.5.x (PR 5416 preview)#7
tig wants to merge 2 commits into
mainfrom
tg25-port

Conversation

@tig

@tig tig commented Aug 22, 2026

Copy link
Copy Markdown
Member

⚠️ DO NOT MERGE with the pre-release pin in place

This PR pins a vendored pre-release build (Terminal.Gui 2.5.0-tig-remove-cm-followup.2, built from tui-cs/Terminal.Gui#5416) so the port can be validated ahead of the v2.5.0 release. Before merging, once a public 2.5.x package is on nuget.org:

  1. Update the Terminal.Gui pin to the public 2.5.x version in: mdv.csproj
  2. Delete local_packages/ and the tgui-pr-5416 package source in nuget.config (delete the file if that source is all it adds)
  3. Revert the .gitignore exception for the vendored packages (if present)
  4. Re-run build and tests and confirm Terminal.Gui restores from nuget.org

Ports mdv to the Terminal.Gui 2.5.0 preview package as part of the v2.5.0 ecosystem-validation gate (tui-cs/Terminal.Gui#5630). Terminal.Gui PR tui-cs/Terminal.Gui#5416 (ConfigurationManager removal) is not yet merged, so this PR vendors a nupkg built from that PR branch — same pattern as tig/winprint#272.

TEMP: vendored package pin

Follow-up: once 2.5.x is published to nuget.org, swap the pin to the public package and delete local_packages/ + the tgui-pr-5416 source.

Code changes (2.5.0 API breaks fixed)

  • ConfigurationManager removalConfigurationManager.Enable (ConfigLocations.All) is gone in 2.5. Replaced with new TuiConfigurationBuilder ().ApplyToStaticFacades (); library defaults, ~/.tui, ./.tui, and TUI_CONFIG are also applied at assembly load via TuiConfigurationBuilder.Shared.
  • TextMateSyntaxHighlighter.GetThemeForBackground is now [Obsolete] (syntax colors resolve from ThemeManager.Theme via VisualRole.Code* roles). Still functional; suppressed CS0618 with a follow-up note to migrate the auto light/dark theme selection.

No other 2.5.0 breaks hit mdv: it does not override View.Text (only assigns it) and does not reference IAcceptTarget, and the repo has no config.json.

Verification

  • dotnet build: 0 warnings, 0 errors.
  • No test projects in this repo (CI is publish-on-release only).
  • Smoke-tested both modes via tuirec (PTY): mdv --print README.md renders the full README with formatting intact; full-screen mdv README.md shows content, StatusBar (Quit / Content Width / Theme / line count), scrolls, and quits cleanly on Esc — the default Quit key from Application.GetDefaultKey (Command.Quit), shown as Esc Quit in the StatusBar. (An earlier revision of this description said Ctrl+Q; Ctrl+Q is not bound — same as rc.3 on main, verified by cast.) No exceptions in either cast.
  • Multi-file mode (mdv README.md second.md): File selector dropdown renders in the StatusBar, opens on click, and selecting the second file loads and renders it; clean alt-screen exit on Esc.
  • Clean-cache restore verified: with an empty NUGET_PACKAGES, dotnet restore --force resolves Terminal.Gui 2.5.0-tig-remove-cm-followup.2 from the vendored ./local_packages feed.
  • Re-vendored to followup.2 (built from 5416 head e8aba423): followup.1 was built from a stale 5416 commit (93c3b3d4) that silently ignored CWD-relative ./.tui config and crashed before Main on malformed config. Verified under .2 that a ./.tui/config.json with {"Theme":"Light"} in the launch CWD now takes effect (tuirec casts show Light-theme colors vs. an identical-config-free baseline).

🤖 Generated with Claude Code

https://claude.ai/code/session_01BVbLXNzbus2MTXmiJDBErL

tig and others added 2 commits August 22, 2026 17:21
Port mdv to the Terminal.Gui 2.5.0 preview built from
tui-cs/Terminal.Gui#5416 (ConfigurationManager removal), as part of the
v2.5.0 ecosystem-validation gate (tui-cs/Terminal.Gui#5630).

- TEMP: vendor Terminal.Gui.2.5.0-tig-remove-cm-followup.1 nupkg/snupkg
  in ./local_packages with a nuget.config source, mirroring
  tig/winprint#272; swap to the public nuget.org package once 2.5.x
  ships.
- Replace deleted ConfigurationManager.Enable (ConfigLocations.All)
  with TuiConfigurationBuilder ().ApplyToStaticFacades ().
- Suppress new CS0618 on TextMateSyntaxHighlighter.GetThemeForBackground
  (obsolete in 2.5; still functional) with a follow-up note.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BVbLXNzbus2MTXmiJDBErL
…ba423

followup.1 was built from a stale 5416 commit (93c3b3d4) with real
config-load defects fixed later on the branch: CWD-relative ./.tui
config was silently ignored, and a malformed config crashed before
Main. Verified with followup.2 that a ./.tui/config.json in the launch
CWD now applies (Theme=Light takes effect).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BVbLXNzbus2MTXmiJDBErL
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