Skip to content

Keep list navigation stable and preserve terminal failure diagnostics - #44

Merged
harder merged 1 commit into
mainfrom
codex/list-navigation-safety
Oct 14, 2026
Merged

harder merged 1 commit into
mainfrom
codex/list-navigation-safety

Conversation

@harder

@harder harder commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

Repeated navigation past list endpoints lets Terminal.Gui keys reach parent focus handlers; dialog lists can move focus to action buttons. Scout's j/k and filter-input cursor changes also selected rows without scrolling them into view, and Home/End used column movement despite the row-navigation help.

This keeps endpoint navigation in package tables and related dialog lists while preserving Tab, scrolls programmatic cursor moves, maps Home/End to table start/end, and permits an empty version picker. Direct window disposal now stops UI callback admission before child disposal. Cancellation callback failures are retained, and startup/run/shutdown/disposal exceptions keep their stack traces and inner exceptions, printed after independent terminal cleanup attempts.

Validation:

  • Verified Terminal.Gui 2.5.1-develop.44 against its recorded upstream source commit. No AGENTS.md exists in this checkout or its parent directories; followed CONTRIBUTING and CI gates.
  • 365 Release tests passed, including 47 new cases using the actual application keyboard/event pipeline and failure injection.
  • Locked restore and both Release application builds passed with no warnings/errors.
  • Portable and Identity Native AOT publishes/mock smokes passed for Windows ARM64 and x64, with required companion files verified.
  • Live Windows ConPTY checks used mock data and the production window with 80 harmless rows: repeated endpoints, aliases, paging, Tab, filtering, sorting, refresh, source widening, and 140×32/100×24 resize. Separate actual run-loop plus child-disposal failures exited with code 1, retained full diagnostics, and restored terminal modes.
  • Dependency-monitor test, site build, and whitespace check passed.

Widening source/local filters and late inventory/detail responses passed without additional production fixes. The reported macOS crash and leaked mouse escape codes were not reproduced; macOS/Linux interactive validation was not run.

Copilot AI 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.

🟢 Approval recommended

The implementation is internally consistent and its lifecycle and interactive navigation behavior are covered by focused regression tests.

0 open findings

What changed in this PR

Improves Terminal.Gui navigation stability and ensures lifecycle failures retain complete diagnostics after terminal cleanup.

Changes:

  • Keeps list navigation focused and visible at endpoints.
  • Adds orderly shutdown, disposal, and exception reporting.
  • Adds comprehensive navigation and lifecycle regression tests.
File Description
Program.cs Uses centralized application lifecycle handling.
src/​App.cs Stabilizes navigation, scrolling, cancellation, and disposal.
src/​ApplicationLifetime.cs Coordinates startup, shutdown, cleanup, and diagnostics.
src/​BackgroundTaskTracker.cs Exposes failure recording for cancellation errors.
src/​PackageListView.cs Prevents endpoint navigation from escaping lists.
src/​Ui.cs Supports empty version lists safely.
src/​WorkflowDialogs.cs Applies stable navigation to dialog lists.
tests/​ApplicationLifetimeTests.cs Tests independent cleanup and diagnostic preservation.
tests/​ListNavigationTests.cs Tests navigation, filtering, refresh races, and callbacks.
docs/​architecture.md Documents lifecycle ownership and cleanup behavior.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Base automatically changed from codex/docs-cleanup to main October 14, 2026 00:33
@harder
harder force-pushed the codex/list-navigation-safety branch from 2935b0d to 5823fa9 Compare October 14, 2026 00:36
@harder
harder merged commit 777f048 into main Oct 14, 2026
10 checks passed
@harder
harder deleted the codex/list-navigation-safety branch October 14, 2026 00:47
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.

2 participants