Skip to content

feat(app): add instance reload action#29267

Open
c-w-xiaohei wants to merge 1 commit into
anomalyco:devfrom
c-w-xiaohei:feat/instance-reload-action
Open

feat(app): add instance reload action#29267
c-w-xiaohei wants to merge 1 commit into
anomalyco:devfrom
c-w-xiaohei:feat/instance-reload-action

Conversation

@c-w-xiaohei
Copy link
Copy Markdown

@c-w-xiaohei c-w-xiaohei commented May 25, 2026

Issue for this PR

Closes #29266

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds a WebUI action for manually reloading the currently routed project/worktree instance.

The new POST /instance/reload endpoint uses the existing workspace/directory routing, reloads the current instance, and waits for the replacement instance to boot. On success it returns true; on failure it returns a typed InstanceReloadError so the app can show useful feedback instead of discovering bootstrap failures on a later request.

The status popover now exposes this as a small Reload instance action and shows success/failure toasts based on the endpoint response.

This is intentionally not automatic hot reload. It does not watch files, change config update behavior, or guarantee active runs in the same instance continue uninterrupted.

How did you verify your code works?

  • cd packages/opencode && bun test test/project/instance.test.ts test/server/httpapi-instance-reload.test.ts test/server/httpapi-config.test.ts --timeout 30000 --max-concurrency=1
  • cd packages/opencode && bun typecheck
  • cd packages/app && bun typecheck
  • cd packages/ui && bun typecheck
  • Regenerated the JS SDK with ./packages/sdk/js/script/build.ts; the generated types diff was then minimized to the functional /instance/reload additions to avoid unrelated declaration reordering.

Screenshots / recordings

image

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@c-w-xiaohei c-w-xiaohei requested a review from adamdotdevin as a code owner May 25, 2026 20:33
@c-w-xiaohei c-w-xiaohei changed the title feat(opencode): add instance reload action feat: add instance reload action May 25, 2026
@c-w-xiaohei c-w-xiaohei changed the title feat: add instance reload action feat(app): add instance reload action May 25, 2026
@c-w-xiaohei c-w-xiaohei force-pushed the feat/instance-reload-action branch from 7495b56 to 59ce6f7 Compare May 26, 2026 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Add a manual reload action for the current project instance in webui

1 participant