What does this PR do?
When launched without an internet connection, the TUI shows a blank screen and hangs indefinitely. The user sees no UI, no error message, and no way to proceed.
Type of change
Issue for this PR
N/A — discovered during testing.
Steps to Reproduce
- Disconnect from the internet (Wi-Fi off or airplane mode)
- Run
altimate-code (TUI mode)
- Observe: blank screen, no UI rendered, process hangs
Expected Behavior
The TUI should render immediately and show a warning that it's offline. Core functionality that doesn't require internet (local file operations, cached models) should still work.
Root Cause (likely)
The startup flow likely blocks on one or more network calls:
models.dev API fetch for model list
- Update check (
upgrade)
- Provider authentication validation
These calls should have short timeouts and fail gracefully, allowing the TUI to render with cached/fallback data.
Suggested Fix
- Add timeouts (3-5s) to all startup network calls
- Use cached model data when fetch fails
- Render the TUI immediately, then populate model data asynchronously
- Show a toast/warning when offline: "No internet — using cached data"
Checklist
What does this PR do?
When launched without an internet connection, the TUI shows a blank screen and hangs indefinitely. The user sees no UI, no error message, and no way to proceed.
Type of change
Issue for this PR
N/A — discovered during testing.
Steps to Reproduce
altimate-code(TUI mode)Expected Behavior
The TUI should render immediately and show a warning that it's offline. Core functionality that doesn't require internet (local file operations, cached models) should still work.
Root Cause (likely)
The startup flow likely blocks on one or more network calls:
models.devAPI fetch for model listupgrade)These calls should have short timeouts and fail gracefully, allowing the TUI to render with cached/fallback data.
Suggested Fix
Checklist