Commit Graph

174 Commits

Author SHA1 Message Date
Cita 7d91823f6c Add site filters for manual connection selection (#328) 2026-03-30 16:32:48 +08:00
Cita 0d2c4501c2 make proxy trace panel collapsible (#327) 2026-03-30 16:32:26 +08:00
Cita 26d87db2cb [codex] tighten update center and proxy debug UX (#325)
* tighten update center and proxy debug UX

* Address update center review feedback
2026-03-30 13:39:20 +08:00
Cita d47c3c4a29 Support digest-aware update center rollbacks (#318) 2026-03-29 22:16:39 +08:00
Cita 11583c51b9 [codex] add K3s update center (#314)
* add k3s update center

* fix update center status timeouts

* Polish update center settings UI

* Document k3s update center

* Refocus update center docs for users

* Clarify k3s migration path in docs
2026-03-29 17:43:49 +08:00
Cita dcfd45ea65 Fix proxy debug trace truncation previews (#313) 2026-03-29 15:08:37 +08:00
Cita 7092e2f129 [codex] refine proxy logs debug UI follow-ups (#312)
* Refine proxy logs debug page layout

* Align proxy logs debug UI with page patterns

* Prevent proxy trace detail refresh flicker

* Polish proxy trace detail modal
2026-03-29 13:39:25 +08:00
Cita ab8640c8c3 [daily] reset oauth proxy form after start (#311) 2026-03-29 13:37:40 +08:00
Cita ed44e7f925 Refine proxy logs debug trace UI (#309) 2026-03-29 11:50:16 +08:00
Cita 03ca1154a0 Add OAuth account proxy controls (#307)
* Add oauth account proxy controls

* Refine oauth proxy review fixes

* Fix oauth clear-proxy exchange fallback
2026-03-29 00:35:45 +08:00
Cita 4d4684a39b [codex] add proxy debug tracing (#299)
* add proxy debug tracing

* fix proxy debug response header typing

* extend proxy debug tracing to side paths

* Refine proxy debug trace review fixes

* Stabilize proxy debug attempt indexing

* Tighten proxy debug trace accuracy
2026-03-28 20:05:48 +08:00
Sean Lee 3bf3cd1622 feat: 新增路由批量禁用/启用功能 (#295)
* feat: Preserve manual models during discovery and refresh, and add Claude configuration files and project documentation.feat: Preserve manual models during discovery and refresh, and add Claude configuration and project documentation files.

* fix: fix Feishu and Larksuite webhook support to the notification service with updated UI and tests.

* feat: 新增路由批量禁用/启用功能

- 后端新增 POST /api/routes/batch 接口,支持批量 enable/disable
- 前端新增批量操作模式,支持 checkbox 选择路由
- 浮动操作栏显示选中数量,支持全选/取消全选
- 批量操作完成后自动退出选择模式并刷新列表

* fix: complete route batch actions on mobile

---------

Co-authored-by: Xiang Li <xiangli>
Co-authored-by: cita-777 <juricek.chen@gmail.com>
2026-03-28 16:54:09 +08:00
Cita 7e1fb8eb1b [codex] HTTP-first Codex upstream websocket settings (#280)
* http-first codex upstream websocket settings

* address websocket runtime review comments

---------

Co-authored-by: apple <apple@appledeMacBook-Pro.local>
2026-03-25 21:01:01 +08:00
Cita 5d2596285b fix: truncate collapsed route group regex badge (#279)
Co-authored-by: apple <apple@appledeMacBook-Pro.local>
2026-03-25 20:37:53 +08:00
Sean Lee 9ba4369a83 fix: auto-detect Feishu webhook format and validate response body (#271)
* feat: Preserve manual models during discovery and refresh, and add Claude configuration files and project documentation.feat: Preserve manual models during discovery and refresh, and add Claude configuration and project documentation files.

* fix: fix Feishu and Larksuite webhook support to the notification service with updated UI and tests.

---------

Co-authored-by: Xiang Li <xiangli>
2026-03-25 18:30:32 +08:00
Cita 5b9c83f830 fix: default downstream key access selections to all (#263)
* fix: default downstream key access selections to all

* test: fix downstream keys test renderer typing
2026-03-23 22:48:15 +08:00
Bainily 1449f08e6c fix: stabilize Codex continuation and proxy retry recovery / 修复 Codex 续传与代理重试稳定性 (#257)
* wip: preserve local changes before upstream merge

* Improve proxy routing stability and add stable-first strategy

* Sync explicit-group routing strategy to eligible source routes

* Fix proxy retry and runtime health review issues

* fix: make proxy channel retry attempts configurable

* fix: harden proxy retry recovery and bookkeeping

* fix: address pr 257 review comments

---------

Co-authored-by: Cita <juricek.chen@gmail.com>
2026-03-23 19:17:22 +08:00
Cita 653b7557a7 fix: address review followups 2026-03-23 16:24:31 +08:00
Cita 4b903fdd3b fix: tighten ci typecheck coverage 2026-03-23 16:02:13 +08:00
Cita 764b9aa0e6 fix: address latest coderabbit review findings 2026-03-23 15:24:00 +08:00
Cita 426d9a538d test: relax token selection count assertion 2026-03-23 14:51:57 +08:00
Cita 4686c558aa Merge origin/main into codex/single-source-consolidation 2026-03-23 14:44:52 +08:00
Cita 7cc0a04b8b refactor: share responsive filter panel scaffold 2026-03-23 14:29:11 +08:00
Cita dd914b327c refactor: extract downstream key drawer 2026-03-23 14:28:37 +08:00
Cita 8e001508bf refactor: extract model tester composer and tighten shared types 2026-03-23 13:44:52 +08:00
Cita 8f14540549 refactor: extract model tester debug panel 2026-03-23 13:35:42 +08:00
Cita 9b21ed3fed refactor: extract account model management modal 2026-03-23 13:32:55 +08:00
Cita c3e3985b6e refactor: extract remaining settings modals 2026-03-23 13:29:39 +08:00
Cita 62eca41bc2 refactor: extract settings portal modals 2026-03-23 13:18:37 +08:00
Cita f7a7084278 refactor: share responsive batch actions across admin pages 2026-03-23 13:12:06 +08:00
Cita 90e9140c70 fix: preserve site disabled models on partial load failure 2026-03-22 23:58:43 +08:00
Cita 29c9fcbd29 fix: resolve remaining review follow-ups 2026-03-22 23:53:41 +08:00
Cita 5d78658af9 fix: address review feedback and code scanning alerts 2026-03-22 23:41:45 +08:00
Hureru 9a5e2bbc60 fix: prevent brand list loading indicator from hanging on API failure 2026-03-22 23:13:51 +08:00
Cita 32d7037629 refactor: share platform file and route helpers 2026-03-22 22:17:50 +08:00
Cita 9290e51ecc refactor: consolidate single-source routing and protocol helpers 2026-03-22 21:27:09 +08:00
Hureru d278b41be2 fix: address review issues in brand filter sync, model guard, route counts, and candidate loading
- Sync blockedBrands local state after save to prevent stale chips
- Defer getBrandList from blocking Settings bootstrap
- Guard model management UI on brandGroups instead of availableModels
- Deduplicate single-model add in disabled models
- Skip read-only/zero-channel routes in enabledCounts and filter
- Add sequence counter to loadCandidates to prevent force race condition
- Use stableAddChannel for mobile add-channel button
2026-03-22 20:44:55 +08:00
Hureru b8ad89d1ab fix: use ref-based stale guard for site disabled-models fetch
Replace closure-captured editor check with loadingModelsSiteIdRef so the
stale-response guard works correctly across rapid site switches. Also
gate setDisabledModelsLoading(false) behind the same ref check.
2026-03-22 20:26:45 +08:00
Hureru 26be7c024a fix: address review issues across settings, sites, brand matcher, and token routes
- settings.ts: trigger route rebuild after globalBlockedBrands changes in both
  import and PUT handler; reject non-array payloads with 400 instead of silently
  defaulting to empty array
- sites.ts: trim model names before deduplication so whitespace variants merge
- brandMatcher.ts: align boundary regex with frontend delimiter class [/:_\-\s]
- Settings.tsx: add role="switch" and aria-checked to brand filter chips; make
  getBrandList best-effort so its failure doesn't block page load
- Sites.tsx: build brandGroups from union of availableModels and disabledModels
  so legacy/removed models remain visible; add stale-response guard and error
  logging for disabled/available model fetches
- TokenRoutes.tsx: use baseFilteredRoutes.length for totalRouteCount to keep
  enabled/disabled counts in sync with status filter; add candidatesVersionRef
  to invalidate lazy caches on payload change; add per-channel in-flight guard
  on toggle; invalidate channel cache after rebuild and site-block operations
2026-03-22 20:18:50 +08:00
Hureru 911d76fa08 fix: add channel toggle and site-block buttons to mobile channel row 2026-03-22 19:27:43 +08:00
Hureru 2f8dae70c2 fix: add missing onToggleChannelEnabled and onSiteBlockModel props to mobile RouteCard 2026-03-22 19:18:44 +08:00
Hureru 3195282c4e fix: address review issues in TokenRoutes performance optimization
- Escape modelName/siteName in innerHTML to prevent XSS
- Use content-based routePatternsKey for cache invalidation instead of
  length-only keys that miss content changes
- Extract shared baseFilteredRoutes to eliminate duplicated filter logic
  between enabledCounts and filteredRoutes
- Add candidatesPromiseRef to deduplicate concurrent loadCandidates calls
2026-03-22 19:12:50 +08:00
Hureru 92fd5e034d perf: defer token-candidates loading and lazy-compute heavy route indices
The routes page loaded ~924KB of API data upfront (summary 366KB +
token-candidates 558KB), but token-candidates was only needed when
expanding cards, opening panels, or using filters. This caused a ~3s
element render delay blocking LCP.

Changes:
- Split load() so first paint only fetches routesSummary (366KB)
- Preload token-candidates in background via requestIdleCallback
- Wrap candidates state updates in startTransition to avoid UI jank
- Convert 3 heavy O(routes×models) useMemo indices to lazy per-route
  computation with ref-based cache (candidateIndex, missingTokenIndex,
  missingTokenGroupIndex)
- Guard 4 ManualRoutePanel-only useMemos with showManual check
- Convert 2 derived useMemos to per-route getter functions
- Add loadCandidates() calls at 7 interaction trigger points
2026-03-22 19:00:03 +08:00
Hureru d2db989b98 fix: add bottom border to channel rows for clearer separation 2026-03-22 19:00:02 +08:00
Hureru 835fccb4f5 fix: align site-block and delete buttons in channel row grid layout
Wrap site-block and delete buttons in a flex container and expand grid
to 4 columns so all action buttons stay on the same row.
2026-03-22 18:59:04 +08:00
Hureru 4415317bdc fix: align brand matcher with frontend logic and remove manual model input
- brandMatcher: port collectBrandCandidates + buildMatchContext from
  frontend BrandIcon.tsx so matching is identical between route display
  and rebuild filtering; segments now split on /,:,\s only (not - or _),
  and candidates are recursively generated from /,:,, splits
- Sites.tsx: remove manual model name input and handleAddDisabledModel;
  the checkbox-based batch selection UI fully replaces it
2026-03-22 18:55:40 +08:00
Hureru f14ffd7dc9 fix: address review issues in model filter system
- brandMatcher: split keywords into includes/startsWith/segment/boundary
  modes to align with frontend BrandIcon.tsx matching semantics, preventing
  false-positive blocking from short keywords like o1, tts, command
- handleSiteBlockModel: reject wildcard route patterns (e.g. gpt-*) from
  being written to site disabled list; only allow exact model names
- Sites.tsx: extract brand grouping to useMemo, convert disabledModels
  to Set for O(1) lookup, remove duplicate IIFE computations in JSX
- handleSiteBlockModel: replace window.confirm with project-style DOM
  dialog for visual consistency
- enabledCounts: compute from filtered scope (excluding enabled filter
  itself) so counts reflect current brand/site/search filters
- Fix declaration order: move enabledCounts after sortedRoutes to avoid
  ReferenceError
2026-03-22 18:55:40 +08:00
Hureru cf6ed7db91 feat: add model filter system with site-level batch disable, global brand filter, route status filter, and channel site-block shortcut
- Route status filter: add enabled/disabled filter chips to RouteFilterBar
- Channel site-block: add "站点屏蔽" button on channel rows to quickly
  add a model to a site's disabled list and trigger rebuild
- Site batch selection: new GET /api/sites/:id/available-models endpoint;
  Sites.tsx now shows a brand-grouped checkbox list for batch model disable
- Global brand filter: new brandMatcher.ts service; settings API and UI
  for blocking entire brands from route generation
- Fix infinite scroll race condition when sentinel ref is null during
  IntersectionObserver effect setup after filter changes
2026-03-22 18:55:40 +08:00
Cita 09fbf258e2 feat: overhaul mobile management layouts 2026-03-21 20:42:25 +08:00
ciat-777 89d0aba497 fix: refine config backup import semantics 2026-03-21 16:55:32 +08:00