9router/src/shared/components
Simon Shi 620b59ca0b fix(qoder): address review findings
Correctness:
- testUtils: drop checkExpiry so the userinfo URL probe actually runs (revoked
  tokens used to look "active" until local 30-day expiry passed)
- auth.parseExpiry: handle numeric expiresAt, swap parseInt before Date.parse
  so "2026" doesn't get interpreted as year-2026, treat expires_in:0 as
  already-expired instead of fabricating a 30-day default
- providers.mapTokens: synthesize email from userId when fetchUserInfo fails
  so OAuth dedup works (re-logins no longer accumulate "Account N" rows)

SSE wrapper:
- wrapQoderSSE: add !doneEmitted guard on success branch (chunks could leak
  past [DONE] when an error envelope shared a TCP packet with a valid one)
- flush(): finalize TextDecoder + drain trailing buffer so the chunk carrying
  finish_reason is delivered when upstream closes without a final \n
- sanitize literal \n inside inner OpenAI body so SSE framing stays intact

Robustness:
- executor: wrap buildCosyHeaders in try/catch so a missing accessToken
  returns 401 (re-auth) instead of bubbling as 500
- executor: short-circuit on missing accessToken before signing
- executor: plumb proxyOptions/signal through buildQoderRequestBody so
  proxy-only networks can fetch the model_config catalog
- qoderModels: dedupe concurrent first-time misses with an in-flight Promise
  map (parallel chat windows now do 1 upstream fetch instead of N)
- qoderModels: check signal.aborted before addEventListener so a pre-aborted
  parent signal cancels the inner fetch immediately
- auth: AbortController + 15s timeout on pollDeviceToken / fetchUserInfo to
  prevent hung sockets when openapi.qoder.sh stalls mid-response

UX:
- OAuthModal: derive polling deadline from device-code expires_in (qoder
  publishes 300s; the previous fixed 120s caused timeouts when users took
  more than 2 minutes on the consent page)

Cleanup:
- delete src/lib/oauth/services/qoder.js — referenced removed config fields
  (clientId/clientSecret/tokenUrl/authorizeUrl) and was re-exported from
  services/index.js, so any future caller would TypeError on first use
2026-05-29 17:36:27 +07:00
..
layouts Refactor global styles and enhance MITM functionality 2026-05-03 18:00:35 +07:00
AddCustomEmbeddingModal.js Enhance image and embedding provider support 2026-04-25 16:22:30 +07:00
Avatar.js Initial commit 2026-01-05 09:58:59 +07:00
Badge.js Refactor global styles and enhance MITM functionality 2026-05-03 18:00:35 +07:00
Button.js Refactor global styles and enhance MITM functionality 2026-05-03 18:00:35 +07:00
Card.js Refactor global styles and enhance MITM functionality 2026-05-03 18:00:35 +07:00
ChangelogModal.js Add marked package, update Qwen executor for OAuth handling, and enhance changelog styles 2026-04-17 12:15:10 +07:00
ComboFormModal.js feat(ui): add Done button to ModelSelectModal in combo creation (#1031) 2026-05-12 09:23:51 +07:00
CursorAuthModal.js fix: use better-sqlite3 for Cursor auto-import, drop sqlite3 CLI requirement (closes #395) (#411) 2026-03-27 10:45:11 +07:00
DonateModal.js Fix model check 2026-05-16 12:38:06 +07:00
Drawer.js Refactor global styles and enhance MITM functionality 2026-05-03 18:00:35 +07:00
EditConnectionModal.js Squashed commit of the following: 2026-05-03 15:35:34 +07:00
Footer.js Initial commit 2026-01-05 09:58:59 +07:00
GitLabAuthModal.js feat: add GitLab Duo and CodeBuddy support, update observability settings 2026-03-30 11:28:07 +07:00
Header.js Fix model check 2026-05-16 12:38:06 +07:00
HeaderMenu.js fix(lang): emit selected locale on close (#1234) 2026-05-18 14:55:48 +07:00
IFlowCookieModal.js - Refines the overall structure of the CLI tools and MITM server functionalities. 2026-03-05 11:25:03 +07:00
index.js feat: Added McpMarketplaceModal to the CoworkToolCard for improved plugin management. 2026-05-09 10:15:38 +07:00
Input.js Refactor global styles and enhance MITM functionality 2026-05-03 18:00:35 +07:00
KiroAuthModal.js * feat(kiro): wire aws identity center device flow into provider oauth (#587) 2026-04-15 11:44:46 +07:00
KiroOAuthWrapper.js Added profile ARN handling in OAuth provider mapping and improved polling logic in OAuth modal for better user experience. 2026-03-06 00:21:27 +07:00
KiroSocialOAuthModal.js - Updated Kiro OAuth configuration 2026-01-27 11:35:28 +07:00
LanguageSwitcher.js fix(lang): emit selected locale on close (#1234) 2026-05-18 14:55:48 +07:00
Loading.js Refactor global styles and enhance MITM functionality 2026-05-03 18:00:35 +07:00
ManualConfigModal.js fix: add clipboard fallback for navigator.clipboard unavailable contexts (closes #696) (#699) 2026-04-22 10:12:55 +07:00
McpMarketplaceModal.js feat: Added McpMarketplaceModal to the CoworkToolCard for improved plugin management. 2026-05-09 10:15:38 +07:00
Modal.js feat(ui): enhance model select modal UX and modal traffic lights (#1111) 2026-05-15 09:21:24 +07:00
ModelSelectModal.js feat(ui): enhance model select modal UX and modal traffic lights (#1111) 2026-05-15 09:21:24 +07:00
NineRemoteButton.js Fix Model Price 2026-04-04 14:40:49 +07:00
NineRemotePromoModal.js Refactor global styles and enhance MITM functionality 2026-05-03 18:00:35 +07:00
NoAuthProxyCard.js Add Cloudflare AI provider support and enhance connection management 2026-04-28 11:07:39 +07:00
OAuthModal.js fix(qoder): address review findings 2026-05-29 17:36:27 +07:00
Pagination.js fix: keep usage details pagination inside mobile viewport (#1218) 2026-05-17 15:09:51 +07:00
PricingModal.js feat(ui): add cost tracking to usage dashboard and pricing settings 2026-01-09 17:49:59 +07:00
ProviderIcon.js fix(ui): restore provider assets and model availability endpoint (#367) 2026-03-23 09:16:10 +07:00
ProviderInfoCard.js Update version to 0.4.9, enhance README with Trendshift badge, and add new embedding models to providerModels.js. Refactor TTS handling to support additional providers and improve API key validation for media providers. 2026-04-29 11:34:39 +07:00
RequestLogger.js feat(db): migrate from lowdb to SQLite with repos pattern 2026-05-09 17:48:20 +07:00
SegmentedControl.js Refactor global styles and enhance MITM functionality 2026-05-03 18:00:35 +07:00
Select.js Refactor global styles and enhance MITM functionality 2026-05-03 18:00:35 +07:00
Sidebar.js ## Fixes 2026-05-16 14:06:56 +07:00
ThemeProvider.js Initial commit 2026-01-05 09:58:59 +07:00
ThemeToggle.js Refactor global styles and enhance MITM functionality 2026-05-03 18:00:35 +07:00
Toggle.js Refactor global styles and enhance MITM functionality 2026-05-03 18:00:35 +07:00
Tooltip.js feat(ui): enhance model select modal UX and modal traffic lights (#1111) 2026-05-15 09:21:24 +07:00
UsageStats.js fix(eslint): resolve setState-in-effect errors in dashboard components (#1362) 2026-05-23 09:24:35 +07:00