Repository navigation
Conversation
Shell pipelines that initialize a version manager or environment via eval "$(...)" (such as fnm env, direnv, brew shellenv, pyenv init, or mise activate) stopped commandProgramName at eval because eval is in TERMINAL_SHELL_PROGRAMS, falling back to a bare "Running command" label. Allow commandProgramName to advance past a single command-substitution eval segment when the inner command is a known environment-setup invocation, while keeping standalone or arbitrary eval segments conservative.
mwolson
force-pushed
the
contrib/command-label-eval-env-setup
branch
from
November 23, 2026 19:21
84033dd to
a8adfb6
Compare
This branch has not been deployed
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.
Problem
Shell pipelines that initialize a version manager or environment with
eval "$(...)"— such ascd /path/to/repo && eval "$(fnm env --shell zsh)" && fnm use 26.13.1 && git commit ...,direnv,brew shellenv,pyenv init, ormise activate— fall back to a bareRunning commandactivity label.commandProgramNameskipscd, then hitseval, which is in bothNON_DESCRIPTIVE_SHELL_PROGRAMSandTERMINAL_SHELL_PROGRAMS, so it stops scanning instead of advancing to the real command.Change
Allow
commandProgramNameto advance past a single command-substitutionevalsegment ($(...)or backticks, with optional--and redirections) when the inner command is a known environment-setup invocation (fnm env,direnv export|hook,brew shellenv,pyenv init|virtualenv-init,mise/rtx,rbenv/nodenv/goenv/jenv,conda shell.*,micromamba shell,opam,atuin/starship/zoxide,ssh-agent,keychain), while keeping standalone or arbitraryevalsegments conservative (null).Scope
Single focused fix in
packages/client-runtime/src/work-log/commandLabel.tsandcommandLabel.test.ts, sparked by@DASungta's observation onpingdotgg/t3code#40687. Planned as an independent upstream PR once#40687lands.Verification
vp test run src/work-log/commandLabel.test.ts src/work-log/presentation.test.tspasses (96 tests), coveringfnm env,brew shellenv,direnv export,pyenv init,mise activate, backtickeval, plus negative cases for standalone, multi-command, and non-env-setupeval.scripts/t3code-gatespasses (check,typecheck,mobile-typecheck,knip,context-budget).