Repository navigation
fix(worktree): count a tmux pane by where it started as well - #28
Merged
Merged
Conversation
On tmux 3.6 (GitHub's ubuntu-26.04 runner) a pane read within ~10 ms of
`new-session -c <dir>` reports the tmux server's cwd as its current path.
The listener reconciles worktrees right when a session appears, so a
clean, pushed worktree whose session was just restarted could be taken
for abandoned and removed under it.
readPaneCwds now reads #{pane_start_path} as well, resolved like the
worktree paths it is compared with. With that, the real-tmux worktree test
passes on ubuntu-latest again, so the ubuntu-24.04 pin from #27 is undone.
|
🎉 This PR is included in version 0.1.13 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
요약
tmux 3.6(GitHub ubuntu-26.04 runner)에서는
new-session -c <dir>직후 약 10ms 동안#{pane_current_path}가 pane 의 디렉터리가 아니라 tmux 서버의 cwd 를 돌려준다. listener 는 세션이 막 생긴 시점에 worktree 를 정리하기 때문에, 이 창에 걸리면 세션을 재시작한 worktree 가 비어 있다고 판정될 수 있었다. 그 worktree 가 깨끗하고 푸시까지 끝난 상태면 세션이 도는 도중에 지워진다. 데이터는 잃지 않는다.변경
readPaneCwds가#{pane_start_path}도 같이 읽는다. 이 값은-c로 준 경로 그대로라서realOrSelf로 실제 경로로 바꾼 뒤 비교한다(src/worktree.ts).src/worktree.test.ts). 수정 전 코드에서는 실패하는 것을 확인했다.ubuntu-24.04고정을 풀어ubuntu-latest로 되돌렸다(test.yml,publish.yml).검증
npm run build통과.vitest208 파일, 5555 테스트 통과.src/http-proxy.test.ts는 깨끗한 main 에서도 실패하는 로컬 환경 문제라 제외했다.🤖 Generated with Claude Code