This was generated by AI during triage.
Summary
Pressing r (refresh selected PR) does not refresh worktree status. After deleting a PR's worktree outside the app, r still shows the PR as having a worktree; the stale entry stays until something re-lists worktrees.
Reproduction (maintainer report + code trace)
- Create a worktree for a PR (
w).
- Delete that worktree on disk / via
git worktree remove.
- Select the PR and press
r.
- The PR still shows worktree status as if the worktree exists.
Code trace
Cmd::ListWorktrees is only dispatched from list_worktree_cmds (src/app/update.rs:93), which is called in exactly two places:
Msg::ConfigLoaded (src/app/update.rs:984)
- after a successful worktree creation (
src/app/update.rs:1184)
r → Msg::RefreshSelected → refresh_selected_cmds → begin_refresh (src/app/update/refresh.rs:29,159) only dispatches Cmd::RefreshPr (GitHub enrichment). It never re-lists worktrees, so model.worktrees_by_repo keeps the deleted entry.
R notices deletions only incidentally: refresh_all_cmds (src/app/update/refresh.rs:49) dispatches Cmd::LoadConfig, whose ConfigLoaded re-lists worktrees.
Expected
r on a PR should also refresh that PR's (or its repo's) worktree listing, so a deleted worktree disappears from the UI. Arguably R's worktree re-list should also be explicit rather than a side effect of the config reload.
Summary
Pressing
r(refresh selected PR) does not refresh worktree status. After deleting a PR's worktree outside the app,rstill shows the PR as having a worktree; the stale entry stays until something re-lists worktrees.Reproduction (maintainer report + code trace)
w).git worktree remove.r.Code trace
Cmd::ListWorktreesis only dispatched fromlist_worktree_cmds(src/app/update.rs:93), which is called in exactly two places:Msg::ConfigLoaded(src/app/update.rs:984)src/app/update.rs:1184)r→Msg::RefreshSelected→refresh_selected_cmds→begin_refresh(src/app/update/refresh.rs:29,159) only dispatchesCmd::RefreshPr(GitHub enrichment). It never re-lists worktrees, somodel.worktrees_by_repokeeps the deleted entry.Rnotices deletions only incidentally:refresh_all_cmds(src/app/update/refresh.rs:49) dispatchesCmd::LoadConfig, whoseConfigLoadedre-lists worktrees.Expected
ron a PR should also refresh that PR's (or its repo's) worktree listing, so a deleted worktree disappears from the UI. ArguablyR's worktree re-list should also be explicit rather than a side effect of the config reload.