fix: resolve silent deactivation, probe timeout, and stdin swallowing - #636
Open
umran666 wants to merge 1 commit into
Open
fix: resolve silent deactivation, probe timeout, and stdin swallowing#636umran666 wants to merge 1 commit into
umran666 wants to merge 1 commit into
Conversation
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.
This PR cleans up a few minor structural leaks in the background
Silent Deactivation (
pi-extension/index.js): Fixed a bug where typing "stop ponytail" or "normal mode" deactivated the ruleset silently. The input event listener was dropping thectxobject, sosetMode("off")couldn't trigger the UI notification. Wiredctxthrough so the user actually gets a visual confirmation that it turned off.Python Probe Timeout Trap (
benchmarks/correctness.js): The environment probe for the Python command was lazily evaluating its timeout. If a test temporarily dropped the timeout to 1ms before the probe fired, both thepython3andpythonchecks would fail. It would then wrongly fall back topython3, breaking tests on Windows machines where onlypython.exeexists. Hardcoded a 5000ms timeout specifically for the initialization probe so it's immune to test modifications. Also bumped the correctness test timeout from 1s to 5s to stop flakiness on slower Windows machines during pandas startup.Stdin JSON Parse Swallow (
hooks/ponytail-mode-tracker.js): Added a quick guard rail to preventJSON.parse('')from throwing a SyntaxError if stdin receives completely empty input (like from a pipe hiccup or PowerShell swallowing the stream).