Skip to content

feat(app): restore the session location missing prompt - #53268

Merged
Brendonovich merged 3 commits into
v2from
location-unavailable-prompt
Oct 5, 2026
Merged

Brendonovich merged 3 commits into
v2from
location-unavailable-prompt

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Brings back the "Session location unavailable" prompt that #46695 removed. When a session's folder is gone, the timeline, docks and side panels still render, but the composer is replaced by a prompt to move the session:

  • Choose worktree: lists the project's other worktrees, plus New worktree, which creates one from the project's canonical checkout because the missing worktree can't resolve itself.
  • Choose directory: opens the directory picker.

Both call session.move; the existing session.moved handling then swaps the composer back in.

The prompt was removed because any failed location sync triggered it. It now appears only when location.get returns the typed LocationNotFoundError (404) for the session's own directory. 500s and other generic failures keep the composer and retry exactly as before; the existing cases in session-location-sync.spec.ts cover that. A not-found answer isn't retried, since retrying can't succeed until the folder changes. Reconnecting or changing location clears the state and checks again.

Frontend only. It uses LocationNotFoundError from the current client and doesn't add the 403/permission-denied error.

Also fixes two UI issues found while testing:

  • The worktree menu no longer shows a Loading row (which shifted the list) while it refreshes a list that is already loaded.
  • The directory picker no longer suspends the screen that opened it, whether it is loading its starting folder, its lazy chunk, or path suggestions as you type. This affected every picker caller, not just this prompt.

How did you verify your code works?

  • bun run typecheck in packages/app.
  • New case in the session-location-sync.spec.ts keeper: a 404 LocationNotFoundError shows the prompt, keeps the history, removes the prompt textbox and makes only one location request; choosing an existing worktree posts session.move, and after session.moved the composer comes back. I confirmed it fails without the source change, and all 9 cases in the suite pass with it.
  • Checked by hand in a browser against a real opencode serve: deleted a session's worktree, saw the prompt, then moved the session to another worktree and got the composer back.
image

Requested by: @Brendonovich (Brendan via Slack)

Brendonovich and others added 2 commits October 5, 2026 16:45
Keep the worktree list visible while it refreshes, and stop the directory picker from suspending the screen that opened it.

Co-authored-by: OpeOginni <107570612+OpeOginni@users.noreply.github.com>
@Brendonovich
Brendonovich merged commit 4fb8007 into v2 Oct 5, 2026
9 checks passed
@Brendonovich
Brendonovich deleted the location-unavailable-prompt branch October 5, 2026 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant