feat: improve terminal test ergonomics and task workflow cleanup#20
Closed
StevenTCramer wants to merge 16 commits into
Closed
feat: improve terminal test ergonomics and task workflow cleanup#20StevenTCramer wants to merge 16 commits into
StevenTCramer wants to merge 16 commits into
Conversation
🤖 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CancelKeyPresssupport toITerminal/TimeWarpTerminal/TestTerminalso Ctrl+C handling is testable without directSystem.Consoleusage.TestTerminalContextto explicit lifecycle APIs (SetCurrent,ClearCurrent) and addUse(TestTerminal)scoped restoration to make terminal swapping intentional and easier to reason about.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.csdotnet run tests/test-terminal-context-01-integration.csdotnet run tests/terminal-static-01-basic.csdotnet build source/timewarp-terminal/timewarp-terminal.csprojNotes
3df1972a8a94748a1b4f5d553b79552ea4fdc091forward before creating this PR.