Skip to content

Release v2.2.3#5381

Merged
tig merged 8 commits into
mainfrom
release/v2.2.3
May 23, 2026
Merged

Release v2.2.3#5381
tig merged 8 commits into
mainfrom
release/v2.2.3

Conversation

@tig

@tig tig commented May 23, 2026

Copy link
Copy Markdown
Member

Release v2.2.3

Version: 2.2.3
NuGet Package: Terminal.Gui 2.2.3

What happens when this PR is merged

  1. ✅ The Finalize Release workflow will automatically create tag v2.2.3
  2. ✅ The Publish workflow will build and push to NuGet.org
  3. ✅ A GitHub Release will be created with auto-generated notes
  4. ✅ A back-merge PR from maindevelop will be opened

Checklist

  • CI passes on this PR
  • Version looks correct: 2.2.3
  • Release notes reviewed (will be auto-generated on merge)

harder and others added 8 commits May 21, 2026 09:19
Adds TabsFanOutDiagnosticTests with seven parallelizable tests that
observe SubViewsLaidOut, DrawComplete, ClearedViewport, DrawingContent,
and FrameChanged events per tab to measure layout/draw fan-out when an
active TextView inside Tabs scrolls.

Captures the current #4973 behavior so that future fixes can be verified
and silent regressions caught:

- Active tab vs. inactive tab layout work
- Active tab vs. inactive tab draw work (DrawComplete, ClearedViewport,
  DrawingContent)
- A comparable single-TextView baseline vs. tabbed scenario fan-out ratio
- ViewportSettings.Transparent does not mask the diagnostic
- Shadow margin does not mask active-tab activity
- IOutput-level output (not Driver.Contents) is observed
- Layout and draw counters reported separately so regressions can be
  localized to one pipeline

The tests are instrumentation-only and do not change rendering or
invalidation semantics.
TextView is being deprecated in favor of Code (read-only) and Editor
(editable). The fan-out behavior lives in the View base class layout/draw
pipeline, so any scrollable view inside Tabs reproduces it — swap to Code
so the diagnostic survives the deprecation.

Adjusts assertions to use only widget-agnostic signals (DrawComplete on
each tab, ClearedViewport on the Tabs container). Code overrides
OnClearingViewport/OnDrawingContent and returns true, which suppresses
the ClearedViewport/DrawingContent events on the Code instances. The
per-Code data is still reported but no longer asserted at that level.

Adds Tests/IntegrationTests/TabsFanOutIntegrationTests.cs that drives
the active tab via a real Key.PageDown through the input processor →
command dispatch → main-loop LayoutAndDraw path (rather than mutating
Viewport directly). Runs against all registered drivers. Confirms the
fan-out is observable end-to-end:

  Driver: <each>
  Active tab Viewport.Y after 3 PageDowns: 3
    Tabs             3             3                3
    Code1 (active)   3             3                0
    Code2-4 (inact)  3             3                0
  Sum inactive DrawComplete = 9
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Fixes #5356. Add tab fan-out layout/draw diagnostic tests
* Fixes #5367. Include Terminal.Gui.Editor in DocFX API reference

Add a minimal EditorRef project that restores the Terminal.Gui.Editor
NuGet package so its DLL is available at a predictable path. Update
docfx.json with a metadata entry for the Editor assembly.

NOTE: .github/workflows/api-docs.yml also needs a build step for
EditorRef before docfx runs. That change requires workflow scope and
must be applied separately by a maintainer.

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

* Add EditorRef build step to api-docs workflow

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

* Remove --no-restore from EditorRef build step

EditorRef.csproj is not in Terminal.sln so the repo-level restore
does not cover it. Let dotnet build handle its own restore.

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

---------

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

* Add a surrogate pair and a ZWJ emoji
…b nav (#5370)

* Fixes #5365. Prevent Markdown table links from auto-focusing on initial render

MarkdownTable.BuildLinkRegions() was setting CanFocus = true during layout,
which caused View.AddAt() to auto-focus the table when the parent Markdown
view had focus. This scrolled the viewport to the last table with links.

Fix: Remove CanFocus assignment from BuildLinkRegions (keep TabStop only).
The parent Markdown view now sets CanFocus on tables after Add() completes,
then clears any auto-focused table to prevent unwanted viewport scrolling.

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

* Add Home/End key support to Markdown; fix Deepdives Tab navigation

- Markdown: Add Command.LeftStart/RightEnd handlers so Home/End keys
  scroll to top/bottom (Ctrl+Home/End already worked via Command.Start/End)
- Deepdives: Set TabStop = TabBehavior.TabStop on both FrameViews so Tab
  navigates between the list and markdown viewer (FrameView defaults to
  TabGroup which requires F6/Ctrl+Tab)

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

* Prevent CursorDown/Up from escaping Docs list in Deepdives

When the ListView is at the bottom/top and CursorDown/Up is not handled,
it propagates to the Application level where it maps to NextTabStop,
shifting focus to the markdown viewer. Add KeyDownNotHandled handler to
consume arrow keys at boundaries.

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

* Restore CanFocus in MarkdownTable.BuildLinkRegions for standalone use

When MarkdownTable is used outside of a Markdown parent, BuildLinkRegions
must set CanFocus = hasLinks so that tables with links are keyboard-
navigable. The Markdown parent's OnSubViewLayout already handles clearing
unwanted auto-focus that results from this.

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

* Fix focus theft when Markdown content changes while another view has focus

Root cause: OnSubViewLayout set table.CanFocus=true AFTER tables were
already in the hierarchy. The CanFocus setter's auto-focus guard
(SuperView is { Focused: null }) fired because the Markdown view had no
focused child, calling SetFocus and stealing focus from the ListView.

Additionally, when the Markdown view gains focus, SetHasFocusTrue calls
AdvanceFocus(Forward, null) which auto-focuses the first focusable table.

Fix:
- Set CanFocus in BuildLinkRegions (before Add, when SuperView is null -
  the setter's guard doesn't fire)
- Remove redundant CanFocus loop from OnSubViewLayout
- Cancel auto-advance (behavior==null) in OnAdvancingFocus so gaining
  focus doesn't drill into table SubViews; only Tab navigation does
- Remove incorrect KeyDownNotHandled workaround from Deepdives

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

* Address CR: prevent table auto-focus during layout with two-phase approach

- BuildRenderedLines: set CanFocus=false before Add() to prevent AddAt
  auto-focus, then re-enable with HasFocusChanging cancel handler after
  all tables are added (prevents CanFocus setter's auto-focus guard)
- OnSubViewLayout: keep cleanup as safety net for edge cases where a
  table still gets focused; reset _activeLinkIndex to avoid link nav
  state leaking from layout
- MarkdownTable.BuildLinkRegions: updated comment to accurately describe
  the CanFocus behavior for standalone vs hosted usage
- Added 3 regression tests covering: multiple layout cycles, content
  change while focused, and multi-table cascade prevention
- Strengthened original regression test with multiple layout/draw cycles

All 17,076 parallel tests pass (96 MarkdownView + 38 MarkdownTable).

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…amespace (#5378)

* Fixes #5369. Move Bind and PlatformKeyBinding to Terminal.Gui.Input namespace

Move both types from namespace Terminal.Gui to namespace Terminal.Gui.Input to
match their sibling types (Key, KeyBinding, KeyBindings, ModifierKey, etc.)
in the same directory.

To break the circular dependency with the published Terminal.Gui.Editor NuGet
package (which had compiled IL referencing Terminal.Gui.Bind), a local Editor
package (2.2.6-local) is built against the namespace-fixed Terminal.Gui and
placed in local_packages/.

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

* Include Terminal.Gui.2.2.2-local.nupkg so Editor dependency resolves

The local Editor package (2.2.6-local) depends on Terminal.Gui 2.2.2-local.
Include that package in local_packages/ so restore succeeds for all projects.

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

---------

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: 9c43575342

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

Comment thread Terminal.Gui/Input/Keyboard/PlatformKeyBinding.cs
@tig tig merged commit bf8a0c5 into main May 23, 2026
35 of 36 checks passed
@tig tig deleted the release/v2.2.3 branch May 23, 2026 18:54
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.

3 participants