Release v2.4.2#5426
Conversation
Pin the new SetNeedsLayout contract: changed view + own subtree + adornment subviews + ancestors are marked, but unaffected sibling subtrees stay clean. Three tests currently fail and will pass after the split lands. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…validation SetNeedsLayout previously did downward subtree marking AND upward propagation via SuperView?.SetNeedsLayout, which re-entered the same downward cascade and re-marked every sibling subtree. In overlapping Tabs this meant activity in the active tab page dirtied every inactive page. Extract the downward subtree pass into MarkSubtreeNeedsLayout, the adornment subview helper into MarkAdornmentSubViewTrees, and the upward walk into MarkAncestorsNeedLayout. The ancestor walk marks each ancestor (and its adornment subview trees) without descending into the ancestor's regular SubViews tree. Sibling-dependent layout still works because TopologicalSort in LayoutSubViews already calls Layout on every child in dependency order regardless of NeedsLayout, so siblings that actually reference the changed view via Pos/Dim still recompute their frames. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pin the new SetNeedsLayout contract: changed view + own subtree + adornment subviews + ancestors are marked, but unaffected sibling subtrees stay clean. Three tests currently fail and will pass after the split lands. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…validation SetNeedsLayout previously did downward subtree marking AND upward propagation via SuperView?.SetNeedsLayout, which re-entered the same downward cascade and re-marked every sibling subtree. In overlapping Tabs this meant activity in the active tab page dirtied every inactive page. Extract the downward subtree pass into MarkSubtreeNeedsLayout, the adornment subview helper into MarkAdornmentSubViewTrees, and the upward walk into MarkAncestorsNeedLayout. The ancestor walk marks each ancestor (and its adornment subview trees) without descending into the ancestor's regular SubViews tree. Sibling-dependent layout still works because TopologicalSort in LayoutSubViews already calls Layout on every child in dependency order regardless of NeedsLayout, so siblings that actually reference the changed view via Pos/Dim still recompute their frames. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…n' into fix-5357-split-layout-propagation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/7113b76f-a6aa-4ba6-a74f-c5cdbaf39f4a Co-authored-by: tig <585482+tig@users.noreply.github.com>
Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/8f20c41f-e3ce-4e4a-a667-bdf8cfbeaabd Co-authored-by: tig <585482+tig@users.noreply.github.com>
Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/f35cf387-5838-43a1-8bd9-28c882fe97af Co-authored-by: tig <585482+tig@users.noreply.github.com>
Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/b17a0837-992b-4a05-92f2-b1d8b62b83f2 Co-authored-by: tig <585482+tig@users.noreply.github.com>
Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/588b85ed-beb4-452b-9967-f8f75eac4f93 Co-authored-by: tig <585482+tig@users.noreply.github.com>
Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/e51b923f-3781-4315-8458-2ffa6138ea61 Co-authored-by: tig <585482+tig@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add SpectreMarkupBridge.ToSpectreStyle() for TG->Spectre conversion - Add NuGet package metadata to interop project - Add project to Terminal.sln - Add tests for round-trip, Markup IRenderable, default/none colors - Rename scenario to 'Spectre' / 'Demonstrates Spectre.Console integration' Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Cycles through Table, Panel, Rule, Tree, BarChart, Calendar, Figlet, Markup. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…l console - Skip Segment.IsControlCode segments to prevent ANSI escapes in output - Use ref col parameter in DrawSegment for consistent column tracking - Replace global AnsiConsole.Console with dedicated null-output console - Add GitVersion.MsBuild for consistent package versioning - Add tests for control code skipping and zero-width character alignment Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
….ps1 - Pin Terminal.Gui.Editor to 2.5.0 in EditorRef.csproj so docfx picks up the correct namespace docs (NamespaceDoc classes added in 2.5.0). - Widen TOC sidebar from 360px to 420px to prevent long namespace names (e.g., Terminal.Gui.Editor.Highlighting.Xshd) from wrapping. - Add Terminal.Gui and EditorRef Release builds to build.ps1 so local docfx --serve works without manual pre-build steps. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The previous commit used Version= which conflicts with Central Package Management. VersionOverride=* bypasses CPM and always resolves the latest stable Terminal.Gui.Editor from NuGet — no manual bumps needed on new releases. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add apispec override files for all 9 Terminal.Gui.Editor.* namespaces so docfx renders namespace summaries on the API reference pages. - Switch TOC sidebar from monospace to sans-serif font and reduce size to 0.75rem so long namespace names fit without wrapping. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Since GetViewsUnderLocation returns views ordered by depth (deepest last), we can walk backwards and break on first MenuItem found instead of scanning the entire list. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fixes #5176 - Prevent popup submenu hover fall-through
…etter (#5404) * Initial plan * Fix duplicate ScreenChanged event from Screen setter Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/7c2215a2-9496-4b1e-96cd-f025e1298332 Co-authored-by: tig <585482+tig@users.noreply.github.com> * Add test for Screen setter before Driver init; fix XML doc Add a test verifying that ScreenChanged fires correctly when Screen is set before Driver is initialized (Driver is null). Update the XML doc remark on IApplication.Screen to accurately document the Driver != null guard behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix CS1574 XML doc warning: correct Init cref signature The cref referenced Init(string?,string?) but the actual signature is Init(string?). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: tig <585482+tig@users.noreply.github.com> Co-authored-by: Tig <tig@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…rt commands (#5410) * Initial plan * Add configurable mouse binding combos for selection commands Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/a408b5e4-7fbf-4ebb-8dfc-8a4b71314b8b Co-authored-by: tig <585482+tig@users.noreply.github.com> * Address review: move enum members to tail, fix Context command routing, add ApplyMouseBindings tests - Move StartSelection and StartRectangleSelection to the end of the Command enum to avoid renumbering existing members. - Fix Command.Context default handler: delegate to DefaultCommandNotBoundHandler instead of a handler that returns false. This keeps Context as a supported command (needed for mouse binding) while properly raising CommandNotBound for views that don't override it. - Add null-guard in ApplyMouseBindings for when params array is null. - Add comprehensive tests for all three review items: - CommandEnumOrderTests: verifies enum ordering invariants - CommandContextNotBoundTests: verifies Command.Context routes through NotBound - ApplyMouseBindingsTests: covers supported-command filtering, non-overwrite semantics, ViewMouseBindings type-name lookup, null layers, and None flags - Update CommandInsertCaretEnumTests to account for new tail members. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Port Arranger to configurable mouse bindings Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Support configured Arranger drag buttons Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix SGR shift mouse modifier decoding Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add mouse binding layering tests Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: tig <585482+tig@users.noreply.github.com> Co-authored-by: Tig <tig@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… files (#5413) * Fixes #5412. Migrate from .sln to .slnx and remove redundant solution files - Convert Terminal.sln (520 lines) to Terminal.slnx (~125 lines of clean XML) - Remove stale x64/x86 platform configurations (all mapped to Any CPU) - Remove redundant single-project solutions: - Terminal.Gui/Terminal.Gui.sln - Tests/UnitTests.Legacy/UnitTests.Legacy.sln - Examples/FSharpExample/FSharpExample.sln - docfx/scripts/OutputView/OutputView.sln The .slnx format (supported since .NET 9 SDK) eliminates opaque GUIDs, reduces merge conflicts, and makes the solution human-readable XML. All projects are already in the main solution; the removed files were redundant subsets not used by CI. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update all Terminal.sln references to Terminal.slnx - Update Scripts/CleanupAgent.ps1 (4 references) - Update Scripts/Terminal.Gui.PowerShell.Core.psm1 - Update .claude/agents/cleanup-agent.md - Update CONTRIBUTING.md - Update docfx/docs/getting-started.md - Update Examples/UICatalog/Scenarios/Notepad.cs (repo root detection) - Remove obsolete .slnf files (NoSamples.slnf, Release.slnf) These referenced the old Terminal.sln and contained stale project paths Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add OutputView.slnx for standalone docfx tooling use Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
#5403) * Initial plan * Fix initial OpenDialog allowed type filtering Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/38f439b3-b6ec-4949-bdad-e74a47ddada3 Co-authored-by: tig <585482+tig@users.noreply.github.com> * Use c.Name instead of c.FileSystemInfo!.Name in test Address review comment: FileSystemInfoStats already exposes a safe Name property, so avoid the null-forgiving operator on FileSystemInfo which can legitimately be null for virtual entries. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: tig <585482+tig@users.noreply.github.com> Co-authored-by: Tig <tig@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ore AOT validation via Tests (#5402) * Initial plan * Move non-UICatalog examples out of Terminal.Gui repo Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/01a4446d-af40-4ac8-83d3-b36596f94b7f Co-authored-by: tig <585482+tig@users.noreply.github.com> * Add in-repo NativeAotSmoke test app and CI validation Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/2b32e021-8645-44f5-b2dd-446cf253840f Co-authored-by: tig <585482+tig@users.noreply.github.com> * Document optional project reference support in gui-cs/Examples Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chore: whitespace to trigger CI after merge Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: tig <585482+tig@users.noreply.github.com> Co-authored-by: Tig <tig@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fixes #5357 - Avoid redraw fan-out from ancestor-only layout propagation
* Regenerate view docs during API publish Regenerate docfx view docs and GIF assets from metadata, update the API docs workflow to install tuirec and rebuild views docs before docfx build, and remove the stray artifacts GIF. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Allow branch testing for API docs workflow Move the Pages environment onto a deploy-only job so workflow_dispatch runs on feature branches can exercise the docs build without attempting a protected Pages deployment. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Use wider captures for file dialog docs Allow OutputView and the views-doc generator to record selected views at larger terminal dimensions, then regenerate the file dialog GIFs at 120x30 so the dialogs are not constrained by the default 80x20 capture. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Tighten file dialog docs captures Update the docs recording runner to let file dialog views fill the recording frame and skip the baseline frame, then regenerate the file dialog GIFs with a tight 94x23 capture. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Refresh generated view docs assets Regenerate view docs assets and make API docs publish skip view GIF regeneration unless relevant view docs sources changed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Add CI workflow to regenerate view GIF assets Adds a manual GitHub Actions workflow that regenerates docfx view metadata/assets using tuirec and commits docfx/docs/views.md plus docfx/images/views/* back to the branch.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Make api-docs workflow commit regenerated GIF assets Updates workflow_dispatch runs to commit regenerated docfx views assets directly from CI/CD and grants contents:write for the bot commit.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Regenerate docfx view GIF assets via CI * Move docs auto-commit after DocFX build Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Audit and fix inaccuracies in AI guidance files Correct claims in CLAUDE.md and .claude/rules that drifted from the actual codebase/config: - CLAUDE.md: use MTP filter flags (--filter-method/--filter-class) for single-test runs; drop dangling scenario-modernization.md reference; list the existing unicode-graphemes.md rule. - event-patterns.md: local functions use PascalCase, matching the .editorconfig local_functions_rule (upper_camel_case_style). - testing-patterns.md: point non-parallel tests at the real Tests/UnitTests.NonParallelizable project; reference UnitTests.Legacy as the do-not-add project; replace the phantom coverlet.runsettings with the actual coverage/setup mechanism. https://claude.ai/code/session_01Msd5RHe9K8JR55YXTZEtdn * Address review: make testing-patterns guidance self-consistent - Drop the "Includes --diagnostic flag" characteristic from the non-parallel section; the example command omits it and CI uses --diagnostic for the parallelizable runs too, so it was misleading. - Reword the coverage note so it no longer conflicts with the "Code Coverage" section: the coverlet.collector package is referenced, but coverage is not actively collected in CI yet. https://claude.ai/code/session_01Msd5RHe9K8JR55YXTZEtdn --------- Co-authored-by: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5846f04a78
ℹ️ 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".
| 66 or 68 or 72 or 80 => MouseFlags.WheeledLeft, | ||
| 67 or 69 or 73 or 81 => MouseFlags.WheeledRight, |
There was a problem hiding this comment.
Preserve exact horizontal wheel flags
When ANSI reports horizontal/shift-wheel as button codes 68/69, GetFlags now ORs in GetModifierFlags before this switch, so these cases return Shift | WheeledLeft/Right instead of the plain MouseFlags.WheeledLeft/Right. Several consumers bind or compare the exact flags (for example the default MouseBindings.ReplaceCommands(MouseFlags.WheeledLeft, ...) in list-like views and exact equality checks in TextView), so those wheel events no longer trigger horizontal scrolling when they come through the ANSI parser/encoder path.
Useful? React with 👍 / 👎.
Release v2.4.2
Version:
2.4.2NuGet Package:
Terminal.Gui 2.4.2What happens when this PR is merged
v2.4.2main→developwill be openedChecklist
2.4.2