Commit Graph
2384 Commits
Author SHA1 Message Date
t0ng7u 149fe5705d fix(web): round usage stats badge to 2 decimals for large amounts 2026-07-11 23:06:57 +08:00
t0ng7u 1a065224ac merge: adopt main unset-price models tab, keep refactor/ui responsive button sizing 2026-07-11 22:52:46 +08:00
t0ng7u d7642769e9 merge: adopt main model search status/sync filters, keep refactor/ui models columns 2026-07-11 22:50:11 +08:00
feitianbubu 8283df169e feat: add unset price models tab to model pricing settings (#6124)
* feat: add unset price models tab to model pricing settings

* feat: add unset price models tab translations
2026-07-11 22:48:02 +08:00
t0ng7u d373b24e4e style(web): apply bun format fixes 2026-07-11 22:40:43 +08:00
t0ng7u 0cf8f58421 fix(web): replace skeleton pulse with smooth GPU-friendly scan shimmer 2026-07-11 22:38:24 +08:00
CaIon 7a2b9d86e8 feat: enhance model search functionality with status and sync filters 2026-07-11 22:36:09 +08:00
CaIon 92d3c9d18f fix: bound uncached remainder by prompt-max(cached,write) and forward compact prompt_cache_key 2026-07-11 22:18:26 +08:00
t0ng7u 26144aa1d6 fix(web): truncate long task IDs so they stay inside their column
The task-log and MJ task ID cells used a w-max wrapper, so long IDs
(and the platform/action subtitle) overflowed the column and rendered
under the adjacent Cost column. Constrain the cell to the column width
and let the badge label ellipsize; the copy button still copies the
full ID.
2026-07-11 22:12:20 +08:00
CaIon 48068ce923 feat: bill OpenAI cache_write_tokens at cache-creation price with zero clamp
Parse OpenAI's native cache_write_tokens (chat prompt_tokens_details /
responses input_tokens_details), bill it at the cache-creation ratio, and
clamp the uncached prompt remainder at zero since cached + cache-write can
exceed prompt_tokens. Propagate the field through chat/responses/claude
format conversions and tiered expression billing (cc variable).
2026-07-11 21:18:49 +08:00
t0ng7u dc0c45713b merge: adopt text protocol conversion feature onto refactor/ui design
Merge origin/main (c36418c86, text protocol conversion and advanced
custom routing). Backend and most frontend changes merged cleanly;
conflicts resolved with refactor/ui as the design source of truth:

- advanced-custom-editor-dialog: keep main new routing/conversion
  feature body, but use our design-system Button/Input imports and
  plain button styling; add the Badge import the new body needs
- details-dialog: adopt main isUsageBillingPathLocal helper for the
  billing path row, keep our muted icon styling
- i18n: union-merge of the new protocol-conversion keys across all
  locales
2026-07-11 20:58:42 +08:00
Calcium-Ion c36418c863 feat: enhance text protocol conversion and advanced custom routing (#5825)
* refactor: consolidate relay protocol converters

* refactor relayconvert text converters

* feat: refine relay converters and advanced custom routing

* refactor: enhance logging and add thought signature handling for Gemini requests

* refactor: enhance channel cache and pricing endpoint handling for advanced custom models

* feat: preserve billing usage semantics

* feat: add protocol-aware billing usage

* Delete useless files

* chore: update action versions in workflow files

* chore: update Docker action versions in workflow files

* fix: harden billing usage settlement and hot-path route matching

- estimate Gemini completion tokens locally when billable usageMetadata is
  prompt-only but output content was received (e.g. client aborts the stream
  before the final chunk), and rebuild the attached billing_usage as estimated
  so settlement does not bill zero output tokens
- guard NewClaudeMessagesBillingUsage against all-zero ClaudeUsage, matching
  the OpenAI/Gemini constructors, so a zero billing_usage cannot override a
  non-zero top-level usage during settlement
- cache compiled advanced-custom route model regexes; they run on the request
  hot path and were recompiled per request
- move the effectiveBillingUsage remap to PostTextConsumeQuota only, and
  document that calculateTextQuotaSummary expects remapped usage
- document the updatePricingLock -> channelSyncLock lock ordering that
  InitChannelCache/CacheUpdateChannel rely on, and the aux-struct pitfall in
  GeminiChatResponse.UnmarshalJSON
2026-07-11 20:44:12 +08:00
t0ng7u d19b6196a5 fix: keep our copy-state styling and port stale-instance button hiding
Amends the merge resolution: drop the duplicated copy icon/tooltip block
that main reintroduced in ApiKeyCell (ours already declares it with the
text-success token), and port the functional change from main e40061965
that hides the Delete all stale button entirely when no stale instances
exist instead of rendering it disabled.
2026-07-11 20:30:15 +08:00
t0ng7u 9232444feb merge: adopt main functional additions onto refactor/ui design system
Merge origin/main while keeping this branch as the source of truth for
UI/UX. The design-system revert (337169e0a) and StatusBadge padding
revert (1b1b23d1d) from main were absorbed without applying them; only
functional additions were ported and re-styled with our primitives:

- usage-logs: Stream/Timing column split with new TimingMetricsCell and
  StreamTpsCell (first-token latency + duration readout, t/s line),
  admin All/Only Mine view scope (useLogsViewScope), and a mobile
  filter-panel collapse toggle in DataTableFilterPanel
- keys: relative timestamps with absolute-time tooltip and stale-access
  highlight via ApiKeyTimestampCell (auto-refreshing now ticker), and
  copy button that resolves the real key on demand
- pricing: ModelBillingModeBadge distinguishing dynamic pricing from
  token/per-request billing in the Type column
- i18n: First token translations for all locales

Rejected from main: icon-badge tones, overview accent theme colors,
bespoke mobile lists (redemptions/keys), and all other styling that
conflicts with the refactor/ui design language.
2026-07-11 20:28:20 +08:00
CaIon 1250fb2eb5 fix: adjust margin for StatusBadge component in logs columns 2026-07-11 20:23:15 +08:00
CaIon e400619656 feat: enhance stale instance handling and update theme colors 2026-07-11 19:37:34 +08:00
t0ng7uandCursor c20682f66e fix(web): densify table rows and soften user avatars
Keep truncated cells single-line across data tables, compact oversized quota figures, and replace loud avatar gradients with identity-tint styling that matches badges.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-11 19:36:32 +08:00
CaIon 162f87925c feat: update theme colors 2026-07-11 19:25:04 +08:00
t0ng7u 2a9e35c93b feat(web): bundle web fonts and refine low-emphasis text colors
- Replace self-hosted @font-face declarations (font-display: optional) with
  direct Fontsource imports (swap), so the UI always settles on bundled
  fonts instead of staying on system fonts after first paint
- Add JetBrains Mono (@fontsource-variable/jetbrains-mono) as the built-in
  monospace face: it backs --font-mono, .font-mono utilities, and code/pre
- Add a "mono" option to the theme font axis (CSS token, ThemeFont type,
  resolver, and config drawer with live preview); default body font stays
  Public Sans, Anthropic preset keeps Lora serif
- Lighten --subtle-foreground/--faint-foreground in light mode to 60%/40%
  translucent mixes of muted-foreground so secondary metadata (log
  sub-labels, placeholders) reads properly grey; declare once since the
  var() reference resolves per light/dark mode on <html>
2026-07-11 18:39:03 +08:00
t0ng7u 7a1e94917f ♻️ refactor(web): make JetBrains Mono the default face and refine identity-colored UI
Switch the default theme typography to JetBrains Mono, wire identity colors through pricing/data views, and polish related layout/i18n.
2026-07-11 18:21:45 +08:00
CaIon 6bbddb1046 feat(timing): add timing metrics display for stream logs and enhance localization 2026-07-11 15:32:35 +08:00
CaIon 1b1b23d1d0 revert: restore StatusBadge horizontal padding
Revert 6869cd94b (perf(web): align table badge spacing).
Restores px padding on status badges so usage-log timing/duration
pills are not flush against the edges.
2026-07-11 15:04:12 +08:00
CaIon 337169e0a4 revert: undo t0ng7u UI design-system refactor
Revert the following commits:
- 308e3e347 feat(web): polish themed data views and add task log details
- b2a890e75 fix: Fontsource asset resolution across workspace layouts
- 9d1ca545e refactor(web): refine data-table cards and pricing page layout
- 0918bdb49 refactor(web): consolidate design-system primitives and responsive data views
- 262ab9312 style(web): unify design system across default frontend
2026-07-11 14:51:54 +08:00
t0ng7u 308e3e347a feat(web): polish themed data views and add task log details 2026-07-11 14:30:06 +08:00
t0ng7u b2a890e755 🐛 fix: Fontsource asset resolution across workspace layouts 2026-07-11 13:02:59 +08:00
Seefs dad57a6bb8 fix: sync codex field (#6018) 2026-07-11 11:04:15 +08:00
ca971413e9 fix(web): allow user-activated top navigation for custom home iframe (#5955)
The custom home page URL iframe only allows allow-forms/allow-popups/
allow-popups-to-escape-sandbox/allow-scripts, without allow-top-navigation*.
As a result, target="_top" nav/menu links inside the (admin-configured,
trusted) embedded page cannot navigate the top-level window on desktop
browsers, while some mobile browsers still allow it via allow-popups —
causing inconsistent behavior rather than an intended restriction.

Add allow-top-navigation-by-user-activation so user-clicked top-level
links work consistently across devices. This token only permits
user-activated top navigation and does NOT grant same-origin access,
so it avoids the security concern of allow-same-origin.

Co-authored-by: 贺. <kuang@M1.local>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-11 10:52:17 +08:00
t0ng7u 9d1ca545e2 ♻️ refactor(web): refine data-table cards and pricing page layout
Replace collapsible card details with always-visible label/value rows, add badge-list full display for cards, and polish pricing/channel toolbars and mobile cards.
2026-07-11 06:02:16 +08:00
t0ng7u 0918bdb49a ♻️ refactor(web): consolidate design-system primitives and responsive data views 2026-07-11 05:13:16 +08:00
t0ng7u 262ab93123 style(web): unify design system across default frontend
🔤 Typography
- Fix --font-sans stack: 'Public Sans Variable' was never applied (wrong family name), add CJK fallbacks (PingFang SC / Microsoft YaHei UI / Noto Sans SC)
- Sync <html lang> with i18n language for correct CJK glyph selection
- Remove dead fake font system (font-provider.tsx, config/fonts.ts, --font-inter/--font-manrope)
- Typography contract: 3-tier headings, arbitrary text-[10px]/[11px] → text-xs (46 files), no uppercase table headers, font-bold → font-semibold
- Numbers use tabular-nums only; font-mono reserved for keys/IDs/code (29 files)

🎨 Color discipline
- Retire StatusBadge string-hash rainbow (autoColor → neutral); all variants resolve to 5 semantic voices
- Add tintedBadgeClassMap as the single tinted-pill recipe
- Replace hardcoded emerald/amber/rose/sky classes with semantic tokens across ~30 files (timing badges, progress bars, system panels, pricing, rankings, log row tints)
- Drop all !important text overrides and [font-family:var(--font-body)] hacks

🧘 Motion restraint
- Remove admin entrance animations: table row stagger, card hover lift/shadow, button press scale, dashboard shimmer line
- Neuter page-transition stagger components into plain wrappers; page transitions reduced to pure opacity fade
- Decorative motion stays landing-only

📐 Shape
- Single radius source: --radius 1rem → 0.625rem
- Sparklines use solid chart tokens instead of decorative gradients
- PanelWrapper: border-only (no shadow), align radius with Card

📏 Guardrails
- Add "Design System Discipline" section (3.10.1) to web/default/AGENTS.md

 Verified: tsgo typecheck clean, rsbuild production build passes
2026-07-11 02:02:11 +08:00
同語 0cb741d8da perf(model-pricing): optimize upstream price sync tables (#6092)
Merge pull request #6092 from QuantumNous/perf/model-pricing-sync-table
2026-07-11 00:49:03 +08:00
QuentinHsu 6869cd94b2 perf(web): align table badge spacing
- remove built-in horizontal padding from status badges so table columns align with headers.
- drop legacy negative-margin compensation from badge cells and affected table renderers.
- clean touched table components to satisfy lint rules around type imports, keys, and JSX flow.
2026-07-11 00:28:21 +08:00
QuentinHsu 43783286e5 fix(model-pricing): polish sync channel dialog layout
- keep input focus and invalid rings inside the shared Input component to avoid clipping in constrained containers.
- make the sync channel selector table use a fixed header, internal body scrolling, and fixed pagination inside the dialog.
- align status cells with their header and translate channel status labels through existing i18n keys.
2026-07-10 23:56:18 +08:00
QuentinHsu 489c045842 perf(model-pricing): optimize upstream price sync table
- batch select and unselect operations into single state updates to reduce lag with large model lists.
- align current price and upstream preset rows by rendering the same ordered field set.
- switch the table to a fixed header, internal body scrolling, and fixed pagination layout with compact upstream header counts.
- hide synthesized preset internal IDs and count only effective selectable resolutions.
2026-07-10 23:37:11 +08:00
同語 d3b01b483d fix: allow adding model names that differ only by case in multi-select (#6061)
Merge pull request #6061 from feitianbubu/pr/c33b40b70
2026-07-10 23:30:15 +08:00
feitianbubu e8596cab7e fix: allow adding custom model names that differ only by case 2026-07-10 10:55:15 +08:00
QuentinHsu 928b475075 feat(playground): add chat parameter settings panel
- expose playground controls for sampling, penalty, token, and seed parameters.
- reuse the existing persisted config and parameter-enabled state so requests only send enabled values.
- add localized parameter copy and keep the panel scrollable on short screens.
2026-07-09 22:10:03 +08:00
QuentinHsu 4645ad9df5 fix(playground): keep model selector lists in sync
- constrain the desktop selector panel so long group and model lists scroll within a shared height.
- make the selected model stand out with stronger row and label styling.
- scroll both lists to the active selections after the popover opens.
2026-07-09 21:47:43 +08:00
CaIon a79f96919e fix(affiliate): update referral message 2026-07-09 16:49:53 +08:00
zuiho df01273b94 fix(web): let resized tables fill available width (#6031)
Signed-off-by: zuiho <2324465096@qq.com>
2026-07-09 16:26:56 +08:00
zuiho 8739c05c0e feat(web): 支持渠道列表手动调整列宽 (#5948)
* 支持渠道表格列宽拖拽

* fix(web): address column resize review feedback

* feat(web): auto-fit resized table columns

* fix(web): reduce column resize persistence work

---------

Signed-off-by: zuiho <2324465096@qq.com>
2026-07-08 16:15:49 +08:00
CaIon 97bbb7c8cd feat(pricing): enhance dynamic pricing calculations with group selection support 2026-07-08 15:11:32 +08:00
Rāna(Bass Ver.) 28e0115a08 fix(web): prevent browser translation from mutating React roots (#5963) 2026-07-08 12:57:31 +08:00
CaIon 6a437a337d feat(oauth): add OAuth callback URL display and copy functionality 2026-07-08 12:50:57 +08:00
CaIon 57865fc1f8 fix: restore default channel connection paste 2026-07-08 12:39:23 +08:00
A_Words 90fa6fe6b6 fix(wallet): honor configured quota units for reward transfers (#5808)
* fix(wallet): honor configured quota units for reward transfers

* fix(i18n): localize quota preview descriptions

* fix(settings): normalize invalid quota input
2026-07-07 21:40:58 +08:00
Seefs a72e5082e9 feat(system-info): add stale instance cleanup actions (#5953) 2026-07-07 21:22:49 +08:00
feitianbubu 394b023dbf fix: keep group ratio input as string draft to allow decimal typing (#5995)
The ratio column normalized input to number on every keystroke, so
typing 0.05 got stuck at 0.0 which Number() collapses to 0. Keep the
value as a string draft like the top-up ratio column and only convert
to number when serializing.

Fixes #5986
2026-07-07 21:12:54 +08:00
CaIon becc18e300 fix(i18n): add language detection mapping for Chinese locales 2026-07-07 14:02:09 +08:00
CaIon 8f31b30598 fix(i18n): standardize locale formatting for Intl APIs 2026-07-07 13:40:06 +08:00