feat(home): 展示常用订阅账号 - #504
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: QUIET Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 4 remain after this review. 📝 WalkthroughWalkthrough新增首页订阅账户读取接口。后端按 24 小时活动聚合账户,并使用一分钟缓存。接口仅允许管理员访问。前端校验响应数据,并在首页显示最多四个只读订阅账户卡片。卡片显示账户组总数、可用组数和订阅凭据状态。 Merge Risk: 🔵 Low · up to The PR adds a read-only administrator homepage section for recently active subscription accounts. It is mergeable with explicit owner follow-up for the malformed English label on single-group accounts and the bounded cache-isolation concern. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Note
Quiet mode is enabled, so only the most important comments were posted inline. Other review comments are grouped below.
🟡 Other comments (1)
web/src/i18n/locales/en-US/core.ts-294-294 (1)
294-294: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win修正单分组账号的英文文案。
当
count为 1 时,当前文案显示为1 Groups。请改用不依赖单复数的文本,例如Groups: {count}。
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: QUIET
Plan: Pro Plus
Run ID: f4414a3a-1e3a-4a91-9f86-a8ea5ef0c218
📒 Files selected for processing (14)
internal/control/home_subscription_accounts.gointernal/control/home_subscription_accounts_test.gointernal/control/http_routes.gointernal/control/server_test.gointernal/control/service.goweb/src/app/query-keys.tsweb/src/app/resources/home.tsweb/src/app/router.tsweb/src/features/groups/credentials/SubscriptionAccountCard.vueweb/src/features/home/HomeSubscriptionAccounts.vueweb/src/features/home/HomeView.vueweb/src/i18n/locales/en-US/core.tsweb/src/i18n/locales/ja-JP/core.tsweb/src/i18n/locales/zh-CN/core.ts
Included review availability: Your plan provides up to 8 included reviews per hour; 5 remain after this review.
关联 Issue / Related Issue
无 / None
变更内容 / Change Content
Bug 修复 / Bug fix
新功能 / New feature
其他改动 / Other changes
新增管理员首页活跃订阅账号接口,基于 credential_attempt_stats 最近 24 小时成功记录排序,跨分组按账号身份去重并限制最多 4 张卡片
使用一分钟进程缓存并批量读取持久化额度快照;不查询请求日志、不新增聚合表或数据库迁移,也不触发上游同步
首页复用现有订阅账号卡片的只读变体,保留主要信息与排版,隐藏多选、刷新、菜单、重置和展开详情;查询结果为空时不渲染板块
AccessKey 登录前端不查询、不渲染,后端接口拒绝访问
自查清单 / Checklist
验证:make check 已通过。
兼容性:新增只读管理接口,无数据库迁移;现有分组页订阅账号卡片交互保持不变。本次不需要公开文档或发布说明。
Summary by CodeRabbit