fix: persist rebuild status to survive iframe reloads during remote rebuild - #213
Merged
jeonghun-jj-lee merged 2 commits intoAug 19, 2026
Merged
Conversation
During remote rebuild, git checkout in a watched workspace folder triggers VS Code's file watcher, which can cause the opencode server to restart and the iframe to reload. This wiped the volatile 'rebuilding' signal, making the status indicator vanish prematurely. Fix: write an 'amicode:devtools-rebuilding' flag to localStorage on rebuild start, and restore the Rebuilding... state from it on mount. Clear the flag on done/failed messages. Add a 5-minute safety timeout to prevent stuck state if the extension crashes mid-rebuild.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (19)
📝 WalkthroughWalkthroughThe developer-tools controller now persists rebuild progress across iframe reloads, restores interrupted state, handles completion and failure flags, and applies a five-minute timeout. All supported locale labels now say “Rebuild from Latest”. ChangesDeveloper-tools rebuild flow
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant DeveloperToolsController
participant localStorage
participant iframe
User->>DeveloperToolsController: Start rebuild
DeveloperToolsController->>localStorage: Set rebuilding flag
DeveloperToolsController->>iframe: Post rebuild request
iframe-->>DeveloperToolsController: Completion or failure message
DeveloperToolsController->>localStorage: Clear rebuilding flag
iframe->>iframe: Reload
DeveloperToolsController->>localStorage: Restore rebuild state on mount
Possibly related PRs
Suggested reviewers: ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
jeonghun-jj-lee
marked this pull request as ready for review
August 19, 2026 10:17
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.
Problem
The "Rebuild Remotely" (now "Rebuild from Latest") button's status indicator vanishes prematurely before the window reloads. The local rebuild path doesn't suffer from this.
Root Cause
During remote rebuild,
git checkout local/amicodein the opencode workspace folder triggers VS Code's file watcher on hundreds of changed files. This causes the opencode server to restart, which reloads the iframe serving the settings page — wiping the volatilerebuildStatesignal back to idle.Fix
Persist the "rebuilding" state in
localStorageso it survives iframe reloads:amicode:devtools-rebuildingflag on rebuild startAlso renames the button from "Rebuild Remotely" to "Rebuild from Latest" for clarity.
Changes
packages/app/src/components/settings-v2/developer-tools-controller.ts— localStorage persistence logicpackages/app/src/i18n/*.ts— button label rename (all 18 locales)Summary by CodeRabbit
Bug Fixes
UI & Localization