1
0
forked from boos/BoosAPI
Commit Graph

205 Commits

Author SHA1 Message Date
cita b35e9fcc7a docs: add live demo section to README files 2026-03-11 16:05:38 +08:00
Hureru f5fcf5d707 fix: address code review findings
- fix(api): use effectiveTokenId in route channel insert to match duplicate detection logic
- fix(css): rename keyframes to kebab-case (filter-bar-slide-down/up)
- fix(web): wrap "保存中..." text with tr() in ManualRoutePanel
- fix(web): use ref for fresh cache check and add error handling in useRouteChannels
2026-03-11 15:51:10 +08:00
Hureru 8128d6e036 fix(web): remove outdated decision auto-skip hint from info tip 2026-03-11 14:58:33 +08:00
cita 921c551a3a feat: Implement default API site seeding, add a dialect-aware setting upsert utility, and introduce check-in API routes with background task processing. 2026-03-11 14:31:23 +08:00
Hureru a0e474c561 perf(web): optimize TokenRoutes rendering and add infinite scroll
Rendering optimization:
- Extract stable routePatterns derived value to avoid expensive useMemo
  recomputation on enable/disable toggle (only recompute when patterns change)
- Stabilize all RouteCard callback props with useCallback+useRef pattern
- Pre-compute missingTokenSiteItems as useMemo index instead of per-render call
- Add EMPTY_MISSING_ITEMS constant for stable empty array reference

Infinite scroll:
- Replace manual "load more" button with IntersectionObserver sentinel
- Auto-load next chunk when scrolling within 200px of bottom
2026-03-11 14:06:23 +08:00
Hureru 47064ba7af perf(web): cache matchesModelPattern regex compilation and results
- Cache compiled glob RegExp objects to avoid repeated new RegExp()
- Cache model+pattern match results (up to 4000 entries)
- Significantly reduces CPU cost of pattern matching in route computations
2026-03-11 14:05:00 +08:00
Hureru 49dbaf3c6a fix(web): fix route card title overflow and optimize with React.memo
Layout fixes:
- Title uses flex:1 + text-overflow:ellipsis, badges always right-aligned
- Enable button has minWidth for cross-card vertical alignment
- Icon and badges use flexShrink:0 to prevent compression

Performance:
- Wrap RouteCard with React.memo to skip re-renders for unchanged routes
- Change callback props to accept routeId for stable reference compatibility
2026-03-11 14:04:04 +08:00
Hureru 69cc491d3a fix(web): fix AddChannelModal checkbox toggle and click area
- Move onClick handler to outer card div for full-area click support
- Set checkbox to readOnly with pointerEvents:none to prevent double-toggle
- Add stopPropagation on token select section to avoid unintended toggling
2026-03-11 14:01:45 +08:00
cita f43247e91d feat: add multi-dialect database schema compatibility logic for proxy files. 2026-03-11 13:51:13 +08:00
cita 2773b835a9 feat: set PORT environment variable to 4000 2026-03-11 13:40:02 +08:00
cita c640b36c96 feat: add deployment documentation and disable automatic PORT value generation in render.yaml 2026-03-11 13:37:31 +08:00
cita 742581efaa feat: Add Render deployment configuration and documentation, including a deploy button in README. 2026-03-11 13:21:19 +08:00
Hureru 90f92711fd fix(web): wire AddChannelModal with missing token hints and channel context
Pass missingTokenHints, onCreateTokenForMissing, and
existingChannelAccountIds to AddChannelModal so users can see
accounts that need token creation and identify already-added channels.
2026-03-11 12:00:07 +08:00
Hureru d2e1e7765d fix(web): add missing token hints and existing channel badge to AddChannelModal
- Display accounts that have model availability but lack tokens,
  with a "create token" action button for each
- Mark already-added channel accounts with a badge
- Improve empty state message to guide users on next steps
- Search now filters both available accounts and missing-token accounts
2026-03-11 11:53:26 +08:00
Hureru 5c026df760 fix(db): add schema compatibility for account_tokens.token_group column
Existing databases created before the token_group column was added would
fail on data import. Add accountTokenSchemaCompatibility module to
ALTER TABLE add the missing column, following the established pattern.
2026-03-11 01:15:11 +08:00
Hureru 457b4915da test: update TokenRoutes tests for summary-based data loading
Adapt all 3 test files to mock getRoutesSummary instead of getRoutes,
use summary-format data structures, and expand cards before asserting
channel-level content.
2026-03-11 01:15:02 +08:00
Hureru 1183d7fde0 refactor(web): rewrite TokenRoutes with grid layout and layered loading
Replace full-data loading with summary-first approach. Implement CSS Grid
multi-column card layout, collapsible filter panel, and collapsed-by-default
route cards that load channels on demand when expanded.
2026-03-11 01:14:52 +08:00
Hureru fa232950b9 refactor(web): extract TokenRoutes into modular sub-components
Split the 2447-line TokenRoutes.tsx into focused modules:
- types.ts: shared type definitions
- utils.ts: pure helper functions
- SortableChannelRow.tsx: DnD channel row component
- ManualRoutePanel.tsx: route create/edit form
- RouteFilterBar.tsx: collapsible filter panel with chip layout
- RouteCard.tsx: collapsed/expanded route card
- AddChannelModal.tsx: batch add channel modal
- useRouteChannels.ts: on-demand channel loading hook
2026-03-11 01:14:42 +08:00
Hureru bb7ea90f0b feat(api): add layered route loading endpoints
Add GET /api/routes/summary for lightweight first-screen data,
GET /api/routes/:id/channels for on-demand channel loading,
and POST /api/routes/:id/channels/batch for bulk channel creation.
Extract fetchChannelsForRoutes() as reusable helper.
2026-03-11 01:14:31 +08:00
Hureru 2343383729 feat: add lightweight /api/routes/lite endpoint for route selectors
Avoid loading full route data (channels, decision snapshots) when Settings
page only needs basic route info for selectors.
2026-03-10 23:06:56 +08:00
cita 5e14c2282f feat: Add MobileDrawer component and About page, and update package version. 2026-03-10 17:16:12 +08:00
cita 2268641759 Merge branch 'main' of https://github.com/cita-777/metapi 2026-03-10 16:59:43 +08:00
cita 521b5bf391 feat: Implement core web application with routing, user authentication, theme settings, user profiles, and mobile navigation. 2026-03-10 16:59:39 +08:00
Cita a60adf4e26 Merge pull request #50 from cita-777/codex/model-refresh-health
Codex/model refresh health
2026-03-10 16:55:47 +08:00
cita 747b985513 feat: refine model refresh toasts and failure handling 2026-03-10 16:44:10 +08:00
cita 803c01f308 Merge branch 'main' of https://github.com/cita-777/metapi 2026-03-10 16:38:26 +08:00
cita 15ea4db4d9 Refactor code structure for improved readability and maintainability 2026-03-10 16:38:21 +08:00
Cita 601f3bf407 Merge pull request #49 from cita-777/codex/mobile-responsive
Codex/mobile responsive
2026-03-10 16:29:52 +08:00
cita 01bf2212f8 fix: reset health on model discovery success 2026-03-10 16:27:10 +08:00
cita ab2220bc09 fix: export MobileDrawer 2026-03-10 16:25:44 +08:00
cita ab4033c1fa fix: avoid brandList TDZ in TokenRoutes 2026-03-10 16:18:44 +08:00
cita 1dbde9346a fix: guard useIsMobile in non-browser 2026-03-10 16:14:37 +08:00
cita d5cd8292eb test: cover model refresh early returns 2026-03-10 16:12:38 +08:00
cita 715a2dba9b feat: add mobile actions and CSS 2026-03-10 16:05:24 +08:00
cita e1b4452c82 feat: classify model refresh failures and update health 2026-03-10 16:02:45 +08:00
cita 3acba86edf test: expand model refresh failure contract 2026-03-10 15:55:33 +08:00
cita f01379f7a3 feat: convert logs and routes pages to mobile cards 2026-03-10 15:48:10 +08:00
cita 21cb2ddc62 test: cover model refresh failure health 2026-03-10 15:37:51 +08:00
cita b8ebf98b68 fix: add account mobile hints 2026-03-10 15:35:13 +08:00
cita 8a3ab0f625 docs: add model refresh health design 2026-03-10 15:28:57 +08:00
cita b23c5ece83 feat: convert core pages to mobile cards 2026-03-10 15:27:28 +08:00
cita 37e325d3cf feat: add mobile card components 2026-03-10 15:09:41 +08:00
cita d91a160455 feat: add mobile nav drawer 2026-03-10 15:00:43 +08:00
cita 2d8e1b9019 feat: add mobile drawer shell 2026-03-10 14:55:21 +08:00
cita ed830563d2 test: assert mobile layout attribute 2026-03-10 14:49:22 +08:00
cita 4e3d82aae1 feat: add mobile layout detection 2026-03-10 14:39:57 +08:00
cita dbf828467b chore: ignore local worktrees 2026-03-10 14:32:10 +08:00
cita 8ea7be68c1 Refactor code structure for improved readability and maintainability 2026-03-10 14:22:55 +08:00
cita 9a976232e2 feat: add validation for streaming requests on compact responses and include serialization mode in response 2026-03-10 13:01:47 +08:00
cita cd031b732f feat: enhance response serialization for compact mode
- Added support for preserving native response.compaction payloads when compact serialization is requested in `serializeResponsesFinalPayload`.
- Implemented serialization of compact mode as `response.compaction` instead of an ordinary response object.
- Introduced a new type `ResponsesFinalSerializationMode` to manage serialization modes.
- Refactored `serializeResponsesFinalPayload` to handle different serialization modes and usage payloads.
- Added tests to ensure correct behavior for compact serialization and preservation of upstream payloads.
- Updated favicon assets and documentation configuration for VitePress.
2026-03-10 01:28:34 +08:00