Repository navigation
Move TuiCode to Terminal.Gui 2.5 and MentalDesk.Tui 0.2.0 #442
Copy link
Copy link
Closed
Labels
a-team:devClaimed by the a-team DevClaimed by the a-team Deva-team:skippedThe Lead found nothing to pitch here; comment on it to put it back in the runningThe Lead found nothing to pitch here; comment on it to put it back in the runningdependenciesPull requests that update a dependency filePull requests that update a dependency file
Description
Context
TuiCode is on Terminal.Gui 2.1.0. The shared library moved to 2.5 in MentalDesk.Tui 0.2.0 (mentaldesk/tui-style-guide#11), and a-team followed (mentaldesk/a-team#346). So TuiCode can't take any library release until it moves too. Dependabot's #440 makes the version bump and shows what breaks.
#40's paste task also needs 2.5, because bracketed paste arrived in 2.4. That pitch planned the upgrade as part of its fourth task; it's split out here so it can land on its own, as a change that alters nothing.
What 2.5 changes, from the two upgrades already done (the library's Themes.cs and a-team's BundledThemes.cs are worked examples):
ConfigurationManageris gone, replaced byTuiConfigurationBuilder(migration guide). Bump MentalDesk.Tui and Terminal.Gui #440's build errors are all inDefaultSettingsService.cs. The 2.5 calls areTuiConfigurationBuilder.Shared.RuntimeConfig,ApplyToStaticFacades(),ThemeManager.ThemeandThemeManager.GetThemeNames().- Config JSON must be nested:
ThemesandSchemeskeyed by name, and no dotted keys such asDialog.DefaultShadow. 2.5 skips an old-shape file with only a log warning. Sosrc/TuiCode.Workbench/Themes/themes.jsonneeds converting, and anything TuiCode writes to~/.tuineeds checking. TextViewis obsolete in favour of Terminal.Gui.Editor.EditorTextViewderives from it. That only means CS0618 warnings here, since CI doesn't treat warnings as errors.- A theme switch no longer re-applies key bindings. Check whether
WorkbenchHost.NeutralizeBuiltinQuitKeystill needs to run after one. - Tests that fake an open menu need its popover visible as well as enabled before an item takes its letter.
- The real risk is at runtime, where TuiCode reaches into 2.1 internals: the copied draw loop, the content-width cache (
[UnsafeAccessor]plus reflection), and the other places AGENTS.md marks "TG 2.1.0".
Acceptance criteria
- TuiCode looks and works as it did: opening and editing files, multiple cursors, undo, soft wrap, find and replace, diff and review tabs, settings, and keybindings.
- Every bundled theme shows as before, and switching between them works.
- A theme and keybindings saved by the current release still load.
- Esc still doesn't quit.
Tests
- Before the version moves, a test for each place TuiCode reaches into Terminal.Gui 2.1 internals, as Make native OS shortcuts (Cmd+C/V/X etc.) work across different terminal emulators #40 planned, so a regression fails a test rather than turning up in use.
EditorTextViewDrawTestsandEditorTextViewContentWidthTestscover some already. - Re-diff
TextView.Drawing.csagainst the editor's copy, as AGENTS.md says to on an upgrade, and drop the copy if 2.5 bounds the loop upstream. - Theme loading from the converted
themes.json: every bundled theme registers and applies. - CI's AOT smokes (
--smoke,--smoke-syntax) on every platform.
Out of scope
- Bracketed paste and the
Pasteevent (Make native OS shortcuts (Cmd+C/V/X etc.) work across different terminal emulators #40). - Moving the editor off
TextViewonto Terminal.Gui.Editor. - Using more of
MentalDesk.Tuithan TuiCode already does.
🤖 Generated with Claude Code
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
a-team:devClaimed by the a-team DevClaimed by the a-team Deva-team:skippedThe Lead found nothing to pitch here; comment on it to put it back in the runningThe Lead found nothing to pitch here; comment on it to put it back in the runningdependenciesPull requests that update a dependency filePull requests that update a dependency file
Activity
a-team-app commentedon Oct 6, 2026
Not pitching this: it's already a buildable task (criteria, tests, out of scope), and a pitch would only add an approval round before an Urgent change.
The board won't let me move an Idea to Ready, so please move it there yourself; the Dev will take it next at Urgent. #446 (paste, #40) is blocked on it.
a-team-app commentedon Oct 8, 2026
From reading #440's release notes, two things this task should know about. Neither needs a new task.
EditorTextViewwon't compile either. Bump MentalDesk.Tui and Terminal.Gui #440's build stops atDefaultSettingsServicebecause it only bumps Workbench. Once the Editor project moves,public override string TextinEditorTextView.History.csfails:View.Textisn't virtual in 2.5. That setter resets undo history, extra carets and auto-indents when a file is reloaded. It needs to move toOnTextChanged, with a test that reloading a file clears undo.NumericUpDownaccepts typed numbers. Indent size and sidebar width get that for free. Check that a typed value outside the allowed range is still refused.Driver names (
windows,dotnet,ansi) are the same in 2.5, so the Windows default inProgram.csstays as it is.a-team-app commentedon Oct 8, 2026
Draft PR #472 is up.
jamescrosswell commentedon Oct 8, 2026
#472 is failing in CI. I made multiple comments on that PR that have been ignored.
Pin the screen size in host tests that depend on it
a-team-app commentedon Oct 8, 2026
Answered on #472: the Windows failures are fixed in 38c892c (four tests didn't pin a screen size, and TG 2.5 takes it from the console), and CI is running again.
Move TuiCode to Terminal.Gui 2.5 and MentalDesk.Tui 0.2.0 (#472)