Skip to content

feat: improve terminal test ergonomics and task workflow cleanup#20

Closed
StevenTCramer wants to merge 16 commits into
masterfrom
Cramer/2025-12-22/dev
Closed

feat: improve terminal test ergonomics and task workflow cleanup#20
StevenTCramer wants to merge 16 commits into
masterfrom
Cramer/2025-12-22/dev

Conversation

@StevenTCramer
Copy link
Copy Markdown
Contributor

Summary

  • Add CancelKeyPress support to ITerminal/TimeWarpTerminal/TestTerminal so Ctrl+C handling is testable without direct System.Console usage.
  • Refactor TestTerminalContext to explicit lifecycle APIs (SetCurrent, ClearCurrent) and add Use(TestTerminal) scoped restoration to make terminal swapping intentional and easier to reason about.
  • Complete related task-board cleanup and docs updates (move finished tasks out of to-do, archive obsolete task, add release-readiness review note).

Validation

  • dev check-version (1.0.0-beta.8 available; no bump required)
  • dotnet run tests/cancel-key-press-01-basic.cs
  • dotnet run tests/test-terminal-context-01-integration.cs
  • dotnet run tests/terminal-static-01-basic.cs
  • dotnet build source/timewarp-terminal/timewarp-terminal.csproj

Notes

  • Compared branch changes from last merged PR merge commit 3df1972a8a94748a1b4f5d553b79552ea4fdc091 forward before creating this PR.

StevenTCramer and others added 16 commits March 19, 2026 00:45
🤖 Generated with [opencode](https://opencode.ai)

Co-Authored-By: opencode <noreply@opencode.ai>
- Add CancelKeyPress event to ITerminal interface
- Implement in TimeWarpTerminal (delegates to Console.CancelKeyPress)
- Implement in TestTerminal with SimulateCancelKeyPress for testing
- Add test file cancel-key-press-01-basic.cs

Closes #18
- TestTerminalContext.Current setter now syncs with Terminal.Instance
- Saves previous Terminal.Instance and restores on clear
- TestTerminal.Dispose clears context if it's the current terminal
- Added Terminal property for direct access to current test terminal
- Added integration tests

Closes #11
Tasks moved to done or archived:
- 005: dev-cli runfile conversion (archived)
- 011: TestTerminalContext integration (done)
- 015: dev-cli self-install (done)
🤖 Generated with [opencode](https://opencode.ai)

Co-Authored-By: opencode <noreply@opencode.ai>
Move Terminal.Instance synchronization out of the Current setter into explicit SetCurrent/ClearCurrent APIs and add Use() for scoped restoration, so context changes are intentional and easier to reason about in tests.
feat: improve terminal test ergonomics and task workflow cleanup
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.

1 participant