fix: notify/new-split/close-surface must ignore stale PROGRAMA_SURFACE_ID when a workspace target resolves - #171
Merged
Merged
Conversation
…MA_WORKSPACE_ID resolves a target
…ACE_ID once a workspace target resolves via env Same precedence bug #148 fixed for send/send-key/read-screen: the PROGRAMA_SURFACE_ID env fallback needs to check whether a workspace target already resolved (explicit --workspace flag OR PROGRAMA_WORKSPACE_ID env), not just the explicit-flag-only variable. notify's structure (preferTTYFallback/explicitWorkspaceArg branching) didn't check workspaceArg at all; new-split and close-surface checked wsArg/csWsFlag (explicit flag only) instead of workspaceArg (flag or env), so an env-only workspace target still let a stale surface id through. Closes #162
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.
What this does
With
PROGRAMA_SURFACE_IDinherited from another app instance's shell,programa notify(andnew-split/close-surface) targeting an explicitPROGRAMA_WORKSPACE_IDcould still resolve against the stale surface id. Now the env surface fallback is suppressed whenever a workspace target resolves (flag or env), matching the #148 fix for send/send-key/read-screen.Commits
tests_v2/test_close_surface_env_precedence.py) — fails without the fixCLI/programa.swiftTest plan
Fixes #162