Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2025.3.2-alpha.8] 2025.3.1からアップデートすると一部設定値のマイグレーションが行われないケースがある #15656

Closed
1 task
samunohito opened this issue Mar 12, 2025 · 2 comments
Labels
🐛Bug Unexpected behavior [Feat] Boot related to the boot process 🔥high priority packages/frontend Client side specific issue/PR

Comments

@samunohito
Copy link
Member

💡 Summary

2025.3.2-alphaからフロントエンド側のデータ保持方式が見直されました。それに伴い、以前の方式から新しい方式へ設定値の移行を行うマイグレーション処理が実装されています。
しかし、このマイグレーション処理の作動条件に不備があるようです。アップデート後にMisskeyを表示しても処理がうまく作動せず、デッキ表示のカラム設定をはじめ様々な設定が初期状態に戻ります。

🥰 Expected Behavior

マイグレーションされる

🤬 Actual Behavior

されない

📝 Steps to Reproduce

  1. 2025.3.1など以前の環境でデッキ表示にし、カラムをいくつか作る
  2. 2025.3.2-alpha最新にする
  3. ブラウザをリロードしてマイグレーション処理を起動する

💻 Frontend Environment

* Misskey: 2025.3.2-alpha.8

🛰 Backend Environment (for server admin)

-

Do you want to address this bug yourself?

  • Yes, I will patch the bug myself and send a pull request
@samunohito samunohito added [Feat] Boot related to the boot process packages/frontend Client side specific issue/PR 🐛Bug Unexpected behavior 🔥high priority labels Mar 12, 2025
@samunohito
Copy link
Member Author

if (store.s.menu.length > 0) {

ここの条件がまずそうです。

  • store.s.menuというのはナビゲーションバーの項目を格納しているもの
  • 移行前のデフォルト値はこれ
  • 以降後のデフォルト値はこれ
  • menuの中身が空か否かを持ってバージョンの差異を検知しマイグレーションの要否を判断している
  • ナビゲーションバーの項目を設定する画面で明示的に保存しない限りpizzaxのデータとしてIndexedDBに保存されない(データが無い場合は常にデフォルト値にフォールバックされる)
  • 2025.3.1→alphaでデフォルト値が空に変更されるのでデータが無いときは空配列が帰りマイグレーションのブロックに入らない
  • ナビゲーションバーの項目を変更している等明示的に保存操作が行われていた場合はその値が帰るのでマイグレーションのブロックに入る

@samunohito
Copy link
Member Author

あと、

misskeyApi('i/registry/keys', {
scope: ['client', 'deck', 'profiles'],
}).then(async keys => {
const profiles: DeckProfile[] = [];
for (const key of keys) {
const deck = await misskeyApi('i/registry/get', {
scope: ['client', 'deck', 'profiles'],
key: key,
});
profiles.push({
id: uuid(),
name: key,
columns: deck.columns,
layout: deck.layout,
});
}
prefer.commit('deck.profiles', profiles);
});

↑はawaitして確実に終了するのを待ち、マイグレーションがすべて終わったらブラウザを再読み込みさせた方が安定しそうです。
マイグレーションの完了前にデッキの初期画面が表示されてしまい、マイグレーションされたカラムの構成が反映されませんでした(リロードしたら復帰した)

@syuilo syuilo closed this as completed in bdf80c4 Mar 13, 2025
@github-project-automation github-project-automation bot moved this from Todo to Done in [実験中] 管理用 Mar 13, 2025
DA-TENSHI pushed a commit to SHINANOSKEY-Projekt/SHINANOSKEY that referenced this issue Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛Bug Unexpected behavior [Feat] Boot related to the boot process 🔥high priority packages/frontend Client side specific issue/PR
Projects
Development

No branches or pull requests

1 participant