Preserve archived thread project paths after worktree removal (#53893)

When a thread created in a git worktree is archived, the archive flow
removes the linked worktree from the project. If a subsequent thread
event fires after this (e.g. an async title-generation task completing),
`handle_thread_event` recalculates `worktree_paths` from the project's
current state — which no longer includes the removed worktree — and
overwrites the archived thread's stored paths with empty ones.

This causes restoring the thread to prompt the user to re-associate a
project, instead of restoring it directly.

**Fix:** return early from `handle_thread_event` when the thread is
already archived, so the stored paths are never overwritten.

Release Notes:

- Fixed archived threads in git worktrees losing their project
association.
bf0fcfbbacRichard Feldman committed on 4/14/2026, 7:05:34 PM· committed by GitHubparente8c6f29
1 file changedLine totals unavailable