test(tutorial-shell): cover OSC 633 shell-integration reporting - #330
Merged
Conversation
The playground shell's OSC 633;A/B/E/C/D emission drives the alert tutorial's WATCHING and command-exit demos (docs/specs/tutorial.md) but had no test. Cover the prompt markers, command-line/start reports, exit 0 and 127 finishes, and reportRunningCommand's re-announce and prompt no-op.
Deploying mouseterm with
|
| Latest commit: |
698e52f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://be875899.mouseterm.pages.dev |
| Branch Preview URL: | https://test-tutorial-shell-osc633.mouseterm.pages.dev |
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.
Adds regression coverage for the tutorial shell's OSC 633 shell-integration reporting. Test-only — no production change.
Why
62383e4dmade the playground's fake shell (website/src/lib/tutorial-shell.ts) emitOSC 633;A/B/E/C/Dand addedreportRunningCommand(), anddocs/specs/tutorial.mdmakes these reports load-bearing: the alert tutorial's WATCHING and command-exit demos are driven entirely by them. Buttutorial-shell.test.tsonly asserted dispatch/echo/history — no test touched a single OSC 633 byte or the127exit code. A refactor that dropped or malformed the633;Ecommand-line report or the633;Dfinish would silently break every playground alert demo (panes showing "nothing is running") while the suite stayed green.Coverage added
Six cases in a new
OSC 633 shell integrationblock:633;A/633;B633;E;<command line>+633;C, no633;Dwhile running, then633;D;0on program exit633;D;127runCommandauto-launch emits633;D;127reportRunningCommand()re-announces633;E+633;Cfor the running commandreportRunningCommand()is a no-op at a promptEach assertion fails if the corresponding emission is removed. Found during the nightly code-quality sweep.