Skip to content

fix: オンゲキNET反映前曲をプレイした場合に全曲取得/履歴取得の切り替えが上手く働かない問題を修正#947

Merged
slime-hatena merged 3 commits intoproject-primera:developfrom
soramame0256:fix/recent-based-uploading
Nov 2, 2025
Merged

fix: オンゲキNET反映前曲をプレイした場合に全曲取得/履歴取得の切り替えが上手く働かない問題を修正#947
slime-hatena merged 3 commits intoproject-primera:developfrom
soramame0256:fix/recent-based-uploading

Conversation

@soramame0256
Copy link
Copy Markdown
Contributor

内容

オンゲキNETにまだ反映されていない曲をプレイした場合その分の履歴が記録されず、結果として履歴件数が50件を下回り、オンゲキの新規ユーザー向けに設定していた履歴件数=50の条件を突破できなかったことで50曲以上プレイしているのにもかかわらず全曲取得が行われない現象を修正。

実装概要

履歴件数=50の条件を削除

結果

上記不具合の修正

これによって起こる可能性のある現象

初めてスコアログにスコアを登録する履歴件数50曲未満のユーザーが登録を行う場合、履歴取得ではなく全件取得が実行される。

@slime-hatena
Copy link
Copy Markdown
Member

slime-hatena commented Jun 1, 2025

50曲未満のユーザーが登録を行う場合、履歴取得ではなく全件取得が実行される

これは許容で良さそうです(スコアツールを使う人はモチベが高いので結構やってるがち)

@soramame0256
Copy link
Copy Markdown
Contributor Author

soramame0256 commented Jun 2, 2025

履歴件数が0である場合に更新履歴の取得タイミングで例外起きる可能性に気づいたので件数0なら全曲取得にする形で変更します。
一応new Date('')との比較はすべての場合においてfalseになり、$innerContainer3.lengthが0であるのでforEachが回らずにsongToUploadが空となった結果全曲取得は行われますが、コード上明示的に回避する形にします。

@slime-hatena slime-hatena requested a review from Copilot November 2, 2025 16:04
@slime-hatena slime-hatena self-requested a review November 2, 2025 16:05
@slime-hatena slime-hatena added Type: Bug Bug or Bug fixes Scope: Bookmarklet Edited bookmarklet files labels Nov 2, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves the logic for handling play history when checking for new scores. The change addresses edge cases where the number of history items may not be exactly 50, and handles the scenario where no history is available.

Key changes:

  • Modified the condition to check if any play history exists (length > 0) instead of checking for exactly 50 items
  • Added logic to handle the case where no play history exists (length = 0), which triggers a full song retrieval

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@slime-hatena
Copy link
Copy Markdown
Member

遅くなってすみません... ちょっとローカルでQAできていないのですが大丈夫そうなのでマージします。
出してからダメならrevertする方向で...

@slime-hatena slime-hatena merged commit 0f548a7 into project-primera:develop Nov 2, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Bookmarklet Edited bookmarklet files Type: Bug Bug or Bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants