Skip to content

feat: some improvements#243

Merged
roitium merged 15 commits into
devfrom
fix/some-fixed
Mar 24, 2026
Merged

feat: some improvements#243
roitium merged 15 commits into
devfrom
fix/some-fixed

Conversation

@roitium
Copy link
Copy Markdown
Collaborator

@roitium roitium commented Mar 22, 2026

Summary by CodeRabbit

  • New Features

    • 播放历史热力图与“最近常听”页面(近14天榜单)
    • 日历式按日播放历史页面与“播放全部”功能
    • 首页快捷入口卡片与合并播放列表对话框
    • 捐赠支持新增支付宝二维码
  • Changed

    • 首页重构(加入热力图、快捷入口与近期歌单)
    • 登录改为分步模块化体验
    • 随机播放(Shuffle)重设计,保留当前曲目
  • Bug Fixes

    • 提高歌词、Lottie、加密等解析稳健性,增强播放与歌词覆盖同步逻辑

@roitium roitium added the enhancement New feature or request label Mar 22, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
bbplayer-docs Ready Ready Preview, Comment Mar 24, 2026 9:09am

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 22, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 72939259-ccdb-4331-a0bc-e646cf9f0cee

📥 Commits

Reviewing files that changed from the base of the PR and between 89a5dbe and 63de394.

📒 Files selected for processing (1)
  • apps/mobile/package.json

Walkthrough

将播放历史从 tracks.playHistory JSON 列规范化为新表 play_history,并围绕此新增查询/迁移/页面(历史按日、最近常听、热力图),同时新增 heatmap 包、合并播放列表功能、拆分手机号登录步骤、重构歌词服务与覆盖层流转、扩展 Orpheus 原生模块及多处类型/文档/配置更新。

Changes

Cohort / File(s) Summary
数据库迁移与模式
apps/mobile/drizzle/0018_green_dracula.sql, apps/mobile/drizzle/meta/*, apps/mobile/drizzle/migrations.js
新增规范化 play_history 表与索引,更新 Drizzle 快照与 migrations 注册。
Schema 与数据层重构
apps/mobile/src/lib/db/schema.ts, apps/mobile/src/lib/services/trackService.ts, apps/mobile/src/lib/services/playlistService.ts
移除 tracks.playHistory JSON 列;新增 play_history 表与关系;TrackService 重写 leaderboard→history 聚合查询并新增 getMostPlayedTracksInLastDays;playlist 查询中移除对 playHistory 的列排除。
查询钩子与变异
apps/mobile/src/hooks/queries/playHistory.ts, apps/mobile/src/hooks/queries/db/track.ts, apps/mobile/src/hooks/queries/useRecentPlaylists.ts, apps/mobile/src/hooks/mutations/db/playlist.ts
新增 playHistory 相关 query keys 与 hooks(heatmap、按日/日-of-month、按日范围、最近常听);重命名并替换历史分页 hook;新增 useMergePlaylists 变异。
UI 页面与路由
apps/mobile/src/app/history/[date].tsx, apps/mobile/src/app/history/overall.tsx, apps/mobile/src/app/playlist/recently/index.tsx, apps/mobile/src/app/(tabs)/index.tsx, apps/mobile/src/app/_layout.tsx
新增按日历史页面与最近常听页面;重命名/重构全部统计页;主页集成 WeeklyHeatMap 与“快捷入口”卡片并移除旧搜索历史 chips;路由新增 history/overallhistory/[date]
热力图组件包
packages/heatmap/src/*, packages/heatmap/package.json, packages/heatmap/tsconfig.json, packages/heatmap/README.md
新增工作区包 @bbplayer/heatmap(Weekly/Monthly 组件、类型、主题、日期工具)。
登录流程与步骤组件
apps/mobile/src/components/modals/login/PhoneLoginModal.tsx, .../steps/*.tsx, apps/mobile/src/hooks/auth/usePhoneLogin.ts, apps/mobile/src/hooks/auth/useGeetest.ts
把 PhoneLoginModal 拆为多个步骤组件并引入 usePhoneLoginuseGeetest,移除内联登录/Geetest 逻辑。
播放列表合并与 UI 扩展
apps/mobile/src/components/modals/playlist/MergePlaylistsModal.tsx, apps/mobile/src/features/library/local/LocalPlaylistList.tsx, apps/mobile/src/lib/facades/playlist.ts, apps/mobile/src/hooks/mutations/db/playlist.ts, apps/mobile/src/types/navigation.ts, apps/mobile/src/components/ModalRegistry.tsx
新增合并播放列表模态框、facade 方法与变异;本地播放列表菜单添加合并入口;类型/ModalRegistry 支持新 modal。
歌词服务与覆盖层重构
apps/mobile/src/lib/services/lyricService.ts, apps/mobile/src/lib/player/PlayerSideEffects.ts, apps/mobile/src/utils/player.ts, apps/mobile/src/features/player/*
引入 lyricService 新方法(skip/push/preload)、新增 PlayerSideEffects 单例并在启动注册,移除 utils 中的 pushLyricsToOverlays 导出,重构歌词控制覆盖与动作面板、头部动画 hook。
Orpheus 原生模块扩展(Android/JS)
packages/orpheus/android/.../ExpoOrpheusModule.kt, .../ShuffleManager.kt, .../FloatingLyricsManager.kt, .../GeneralStorage.kt, packages/orpheus/src/ExpoOrpheusModule.ts
新增 onRequestClearLyrics 事件与 clearOverlaysInternal 方法;新增 ShuffleManager 与原队列保存/重置逻辑;FloatingLyrics 支持 soft-hide、Y 持久化与清空回调。
UI 小改动与功能
apps/mobile/src/app/settings/donate.tsx, apps/mobile/src/components/modals/app/DonationQRModal.tsx, apps/mobile/src/app/playlist/remote/toview.tsx
DonationQR 支持支付宝类型;设置页添加支付宝入口;ToView/远程播放页添加“播放全部”队列逻辑。
工具、测试与容错增强
apps/mobile/src/app/test.tsx, apps/mobile/src/utils/lottie.ts, apps/mobile/src/lib/api/netease/crypto.ts
测试页添加数据库/MMKV 导入与按日期查询播放历史工具;lottie 与 eapi 解密增加 JSON parse 容错回退。
文档、配置与项目管理
AGENTS.md, apps/mobile/AGENTS.md, packages/orpheus/AGENTS.md, apps/mobile/CHANGELOG.md, .agent/skills/*, .sisyphus/*, skills-lock.json, tsconfig.json, .syncpackrc, package.json, commitlint.config.js, README.md
新增/更新多处文档、计划、证据与 agent 技能锁;更新 pnpm 版本、syncpack 依赖组、TypeScript project references、commitlint scope 等。

Sequence Diagram(s)

mermaid
sequenceDiagram
rect rgba(200,220,255,0.5)
participant OrpheusNative as 原生 Orpheus
participant PlayerSideEffects as PlayerSideEffects
participant LyricService as LyricService
participant QueryClient as ReactQuery
participant Overlays as Desktop/StatusBar 覆盖层
end
OrpheusNative->>PlayerSideEffects: onRequestClearLyrics { trackId }
PlayerSideEffects->>LyricService: skipLyric(trackId)
LyricService->>QueryClient: invalidateQueries(smartFetchLyrics(trackId))
LyricService->>Overlays: pushLyricsToOverlays(trackId) (debounced; fetch & parse)
Overlays-->>OrpheusNative: 更新/清空覆盖层

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 分钟

Possibly related PRs

诗歌

🐰 新表记录每一秒,热力图里日月鲜,
分步登录更稳健,合并歌单少烦忧;
歌词轻推云端上,原生与 JS 手牵手。

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/some-fixed

@roitium roitium marked this pull request as ready for review March 24, 2026 09:01
@safedep
Copy link
Copy Markdown

safedep Bot commented Mar 24, 2026

SafeDep Report Summary

Green Malicious Packages Badge Green Vulnerable Packages Badge Green Risky License Badge

Package Details
Package Malware Vulnerability Risky License Report
icon dayjs @ 1.11.19
packages/heatmap/package.json pnpm-lock.yaml
ok icon
ok icon
ok icon
🔗
icon react @ 19.2.0
packages/heatmap/package.json pnpm-lock.yaml
ok icon
ok icon
ok icon
🔗
icon react-native @ 0.83.2
packages/heatmap/package.json pnpm-lock.yaml
ok icon
ok icon
ok icon
🔗
icon react-native-svg @ 15.15.3
packages/heatmap/package.json pnpm-lock.yaml
ok icon
ok icon
ok icon
🔗

This report is generated by SafeDep Github App

@roitium
Copy link
Copy Markdown
Collaborator Author

roitium commented Mar 24, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 24, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@roitium roitium merged commit f30fd56 into dev Mar 24, 2026
4 of 5 checks passed
@roitium roitium deleted the fix/some-fixed branch March 24, 2026 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant