feat(b2c): dashboard hero + pricing ratio cleanup + first-call moment - #6
Merged
Merged
Conversation
Sprint 3 — final B2C polish on the three remaining surfaces.
6.B Pricing page ratio cleanup:
- Hide `{ratio}x` multipliers from the per-group pricing table and
pricing breakdown for non-admin users (features/pricing/components/
model-details.tsx). Same useIsAdmin gate pattern as Create Key form
+ Usage Logs. Final per-token prices stay visible — only the
multiplier (operator concept) is hidden.
- pricing-sidebar.tsx filter chips no longer append "x1.2" suffixes
to group names for non-admin viewers.
6.A Dashboard hero:
- summary-cards.tsx hero block: title "Usage at a glance" → "Your AI
usage"; description rewritten in plain language. Credit-remaining
card replaces "Displayed in CNY" technical sub-label with friendly
"≈ 200 chats remaining" estimate (or "Top up to start using AI
models." when balance is zero). Math is inlined since this PR is
branched independently of PR #4's lib/usage-estimate.ts — they'll
produce identical content when both merge.
6.D First-call celebration:
- Pure frontend, no backend `first_call_at` field needed. SummaryCards
useEffect watches user.request_count; when it flips from 0 to 1+ on
any dashboard mount, fires a single sonner toast "🎉 Your first API
call worked!" + sets localStorage flag `dr_first_call_celebrated`
so it never repeats per browser.
- Acknowledges the magic moment regardless of where the user made
the call (Cherry Studio, Cursor, curl, Playground).
6.C Recharge history polish:
- billing-history-dialog.tsx empty state copy differentiates "no
search results" (keyword present) from "you haven't recharged yet"
(first-time user). Friendlier than the generic "No billing records
found".
i18n: 8 new en + zh keys.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
hades217
force-pushed
the
feat/dashboard-pricing-celebration
branch
from
May 16, 2026 12:29
b566a33 to
c4bef48
Compare
hades217
added a commit
that referenced
this pull request
May 18, 2026
…rter Single-file Python script + YAML config + .env template that creates/updates all upstream channels (OpenAI, Anthropic, Gemini, DeepSeek, Moonshot, Qwen, Zhipu, Doubao, ERNIE, Hunyuan, Spark, MiniMax, Yi, xAI, Mistral, Cohere, Perplexity by default; 360, OpenRouter, SiliconFlow, Midjourney, Suno, Sora disabled) via admin API. - channels.yaml: 23 channels, 17 enabled, 147+ models curated to those with pricing in setting/ratio_setting/model_ratio.go - seed.py: stdlib urllib + pyyaml only; idempotent by channel name (upsert); --dry-run, --only KEYWORD, --include-disabled flags; gracefully skips channels whose upstream API key env var is unset - .env.example: all upstream key vars listed - README.md: quick-start, troubleshooting, design rationale Used by docs/onboarding-v2-prd.md sect 11 decision #6 (full model coverage via automated seed rather than hand-curated 14). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Sprint 3 收尾 —— B2C funnel 最后几个 polish。完成 PR #1-#5 之后还剩的最后几个对终端用户体验的小破坏。
6.B Pricing 页隐藏倍率(非 admin)
6.A Dashboard hero
6.D 首次调用庆祝
6.C 充值历史空状态文案
Test plan
文件
修改 (8 file):
🤖 Generated with Claude Code