Bug Description
The server status bar in OpenCode desktop app persistently shows a red dot indicator pointing to `http://127.0.0.1:45549\`, even after restarting the application multiple times.
Expected Behavior
The server status indicator should either:
- Show a green/connected state when the local server is running properly, OR
- Not show a red dot if the server is working correctly
Actual Behavior
- A red dot appears next to `http://127.0.0.1:45549\` in the server status bar
- The port 45549 is no longer in use (the actual server runs on a different port after restart)
- The red dot persists across multiple application restarts
Environment
- Installation method: deb package from official website
- OS: Linux (Ubuntu)
- OpenCode version: Latest stable
Technical Details
After investigation:
- The `opencode-cli` process runs on a dynamically assigned port (e.g., 42431, 42875) after each restart
- Port 45549 is never reused, suggesting the status bar caches an old port number
- No configuration file was found that stores this port value
Steps to Reproduce
- Start OpenCode desktop application
- Leave it running for some time
- Restart the OpenCode application
- Observe the server status bar showing red dot on `http://127.0.0.1:45549\`
Possible Root Cause
The server status bar appears to cache the previously used port (45549) and does not update when OpenCode restarts with a new dynamically assigned port.
Additional Context
This bug appears to be a port tracking issue in the desktop client's status bar component. The local server itself works fine — it's just the status indicator that shows incorrect state.
Bug Description
The server status bar in OpenCode desktop app persistently shows a red dot indicator pointing to `http://127.0.0.1:45549\`, even after restarting the application multiple times.
Expected Behavior
The server status indicator should either:
Actual Behavior
Environment
Technical Details
After investigation:
Steps to Reproduce
Possible Root Cause
The server status bar appears to cache the previously used port (45549) and does not update when OpenCode restarts with a new dynamically assigned port.
Additional Context
This bug appears to be a port tracking issue in the desktop client's status bar component. The local server itself works fine — it's just the status indicator that shows incorrect state.