fix: restore file I/O + TUI status fixes + v1.6.0 #102 - #104
Merged
Merged
Conversation
- Restore getBrainStatusFile + file write in status.ts (opencode Worker architecture) - TUI polls file every 200ms alongside event bus (fast-path) - TUI idle handler uses data.statusText instead of hardcoded 'ready' - 16 updateStatus calls now include text: alongside toast: - Version bumped to 1.6.0 (minor, event bus functionality) - ROADMAP A2.1 updated with architecture note
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.
Closes #102
Root Cause
opencode runs server plugins in a Bun Worker thread and TUI in the main thread — separate JS contexts. ESM singletons are NOT shared. File I/O is the only reliable cross-context channel.
Changes
getBrainStatusFile()in shared.ts, file write in status.tswrite(), file polling in tui.tsx alongside event bus subscriptionsetStatus(data.statusText || 'ready')instead of hardcoded'ready'updateStatus()calls now includetext:(status bar) alongsidetoast:(notification)home_footer, keephome_bottomonlySummary by cubic
Restores reliable cross-context status updates by bringing back file-based I/O as a fallback alongside the event bus, fixing missing/incorrect TUI status text. Bumps
@four-bytes/four-opencode-brainto v1.6.0.Bug Fixes
getBrainStatusFile(), while keeping the event bus as fast-path.statusTextfor init and idle states (no more hardcoded "ready").updateStatus()calls to include bothtext(status bar) andtoast(notification).Refactors
BrainStatusBarfor custom slot registration; removed duplicatehome_footerslot (kepthome_bottom).Written for commit 14552f9. Summary will update on new commits.