Skip to content

fix: stabilize Changes shortcuts and remove flow - #24

Merged
harder merged 3 commits into
mainfrom
fix/v0.3-post-release-ui-crash
Sep 5, 2026
Merged

harder merged 3 commits into
mainfrom
fix/v0.3-post-release-ui-crash

Conversation

@harder

@harder harder commented Sep 2, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • refresh the status-strip shortcuts when switching tabs so Changes shows only its supported actions
  • make removal-safety preflight prominent and keep the advanced removal dialog compact
  • reuse the seeded primary safety evaluation and evaluate alternative scopes only when selected
  • stage background-prepared synchronous modals outside Terminal.Gui timer callbacks, preventing cleanup/remove progress deadlocks

Investigation

Installed removal crash

The macOS crash report captured while the remove wizard was open shows a native SIGSEGV / EXC_BAD_ACCESS on a .NET TP Worker. Because the process ended in a native fault, managed teardown could not restore Terminal.Gui's alternate-screen and mouse-reporting modes, which explains the unusable terminal and raw mouse character codes after the crash.

This change removes redundant eager safety evaluation after the seeded Installed-tab preflight opens the wizard. It does not claim that managed code alone can establish the native fault's exact root cause, but it eliminates the unnecessary concurrent work present in that path.

Cleanup removal hang

A managed stack report was captured from the still-running hung process. The UI thread was running CleanupScreen.Show / the nested modal loop from TimedEvents.RunTimersImpl, while the completed removal worker was blocked in BatchProgressAdapter.CompleteBatch trying to call IApplication.Invoke, which needed the same TimedEvents lock. Escape changed the status to canceling, but cancellation could not publish completion through that deadlocked path.

Background-completed modal launches now use a two-stage owned dispatch: IApplication.Invoke stages the work, returns to release the timer lock, and the synchronous modal starts on the next IApplication.Iteration. Cleanup, Installed removal, and repo discovery use this shared path.

The logs confirmed both selected cleanup targets were refused by validation and remained on disk; the hang did not delete either target.

Changes shortcuts

The Changes tab intentionally supports:

  • Enter — open the selected queue item
  • c — Cleanup
  • d — Doctor
  • ? — Help
  • Ctrl+Q — Quit

The previously displayed f, s, P, G, and x hints belong to Installed and were stale after switching tabs.

Validation

  • dotnet build
  • dotnet test --no-build — 819 passed
  • focused dispatch/UI tests — 66 passed
  • deterministic TimedEvents lock regression reproducing background progress admission while modal work runs
  • dotnet format --verify-no-changes --no-restore
  • sequential Native AOT publishes for SkillView.App and SkillView.GhExtension on osx-arm64
  • version smoke checks for both published hosts as 0.3.0

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.

🟡 Changes recommended

Detail-pane updates can overwrite or indefinitely retain the removal-preflight message in supported interaction and failure paths.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Stabilizes tab shortcuts and asynchronous modal removal workflows.

Changes:

  • Refreshes status shortcuts when tabs change.
  • Stages background-prepared modals outside timer callbacks.
  • Improves removal preflight visibility and avoids redundant evaluations.
File summaries
File Description
AGENTS.md Documents removal and modal lifecycle rules.
agent_docs/ui-lifecycle-and-resource-bounds.md Expands UI lifecycle guidance.
src/SkillView.Core/Ui/InstalledTabView.cs Shows removal preflight in the detail pane.
src/SkillView.Core/Ui/RemoveScreen.cs Compacts wizard and reuses seeded evaluation.
src/SkillView.Core/Ui/SkillViewApp.cs Refreshes shell chrome and stages modal dispatch.
src/SkillView.Core/Ui/SkillViewWorkflowCoordinator.cs Uses owned dispatch for prepared modals.
src/SkillView.Core/Ui/StatusStripView.cs Exposes hints for tests.
tests/SkillView.Tests/Ui/InstalledTabViewTests.cs Verifies prominent preflight feedback.
tests/SkillView.Tests/Ui/RemoveScreenTests.cs Tests sizing and seeded evaluation.
tests/SkillView.Tests/Ui/SkillViewAppTests.cs Tests shortcuts and staged dispatch.
Review details

Suppressed comments (1)

src/SkillView.Core/Ui/Tabs/InstalledTabView.cs:775

  • This restoration is after the _idleStatusMessage early return. If an inventory load fails while removal preflight is active, the failure path keeps this preflight text visible; when preflight ends, RefreshOperationStatus returns after updating only the footer, leaving the stale “Checking removal safety” detail indefinitely. Restore the selected-row detail before handling the idle error footer.
        _detail.Text = _rows.Count == 0
            ? "(no matches)"
            : RenderDetail(_rows[Math.Clamp(_table.GetSelectedRow(), 0, _rows.Count - 1)]);
  • Files reviewed: 10/10 changed files
  • Comments generated: 1
  • Review effort level: Balanced

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

Comment thread src/SkillView.Core/Ui/Tabs/InstalledTabView.cs

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 changes address the reported UI lifecycle failures with focused implementation and regression coverage.

Review details
  • Files reviewed: 10/10 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@harder
harder merged commit b7d7ac3 into main Sep 5, 2026
9 checks passed
@harder
harder deleted the fix/v0.3-post-release-ui-crash branch September 5, 2026 18:37
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