Fix mobile review pane scrolling and improve delta colors#49
Fix mobile review pane scrolling and improve delta colors#49friuns2 wants to merge 6 commits intofriuns2:mainfrom
Conversation
Review Summary by QodoSync auth state, fix mobile scrolling, and improve GitHub API reliability
WalkthroughsDescription• Sync active account state with runtime authentication on account queries • Fix mobile review pane scrolling with flexbox layout and touch scrolling • Replace Node fetch with curl for GitHub tree API to prevent hangs • Improve delta color styling in file change summaries • Update version to 1.0.18 Diagramflowchart LR
A["Account Routes"] -->|"syncStoredActiveAccountWithAuth"| B["Auth State Sync"]
B -->|"Update active account"| C["Stored State"]
D["Skills Routes"] -->|"fetchGitHubJsonWithCurl"| E["GitHub Tree API"]
E -->|"Fallback to fetch"| F["Tree Cache"]
G["Review Pane"] -->|"Flexbox + touch scroll"| H["Mobile Scrolling Fix"]
I["Thread Conversation"] -->|"Color styling"| J["Delta Colors"]
File Changes1. src/server/accountRoutes.ts
|
Code Review by Qodo
|
| if (req.method === 'GET' && url.pathname === '/codex-api/accounts') { | ||
| await syncStoredActiveAccountWithAuth() | ||
| const state = await scheduleAccountsBackgroundRefresh() | ||
| setJson(res, 200, { | ||
| data: { |
There was a problem hiding this comment.
1. Accounts get can 502 🐞 Bug ☼ Reliability
/codex-api/accounts and /codex-api/accounts/active now await syncStoredActiveAccountWithAuth() without handling potential filesystem write failures from writeSnapshot()/writeStoredAccountsState(). If those writes fail (permissions, disk full, etc.), the request throws and is converted to a 502 by the bridge middleware, breaking account loading in the UI.
Agent Prompt
## Issue description
Account listing endpoints now perform best-effort “active auth -> stored state” synchronization, but any filesystem write failure currently throws and turns the endpoint into a 502.
## Issue Context
- `syncStoredActiveAccountWithAuth()` can call `writeSnapshot()` and `writeStoredAccountsState()`.
- `/codex-api/accounts` and `/codex-api/accounts/active` call it without guarding errors.
- Unhandled errors are converted to 502 by the bridge middleware.
## Fix Focus Areas
- src/server/accountRoutes.ts[696-759]
- src/server/accountRoutes.ts[769-789]
## Suggested fix
Make the sync non-fatal for GET endpoints:
- Option A (preferred): catch and swallow write errors inside `syncStoredActiveAccountWithAuth()` (return the previously-read `state` if snapshot/state persistence fails).
- Option B: wrap the `await syncStoredActiveAccountWithAuth()` calls in try/catch in the GET handlers and proceed with `readStoredAccountsState()`/`scheduleAccountsBackgroundRefresh()`.
If you want observability without breaking UX, add a minimal log (server-side) when persistence fails, but do not fail the GET response.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
No description provided.