Skip to content

チャンネル既読の同期#15977

Open
fruitriin wants to merge 1 commit intomisskey-dev:developfrom
fruitriin:sync-channel-lastread
Open

チャンネル既読の同期#15977
fruitriin wants to merge 1 commit intomisskey-dev:developfrom
fruitriin:sync-channel-lastread

Conversation

@fruitriin
Copy link
Copy Markdown
Contributor

@fruitriin fruitriin commented May 7, 2025

What

チャンネルの既読状態をlocalstorageとともにレジストリを使って同期するようにしました

#related #15976

Why

端末をまたぐと既読情報が維持されないのはユーザーのメンタルモデルに反します

Additional info (optional)

  • データの書き込み先にレジストリを使っています よりベターな方法があるかもしれませんがとりあえず動きます。頻度的に他の操作より大した問題ではないと判断
  • チャンネル既読のデータ構造が 1チャンネルにつきlocalstorage 1レコードを使用していたのに対して、チャンネル既読そのものを1レコードとしてjsonに格納しています
  • このPRを導入するとチャンネルの既読情報が一度リセットされてすべて未読状態ではじまります。初期状態は既読状態で始まるほうがUX的にはよいのでは(チカチカしてると消しにいきたくなる)という話もちらほら

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2025

Codecov Report

❌ Patch coverage is 5.88235% with 32 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.71%. Comparing base (b1479ab) to head (b697ca0).
⚠️ Report is 618 commits behind head on develop.

Files with missing lines Patch % Lines
packages/frontend/src/pages/channel.vue 0.00% 14 Missing ⚠️
packages/frontend/src/registry-item.ts 6.66% 14 Missing ⚠️
packages/frontend/src/boot/main-boot.ts 0.00% 3 Missing ⚠️
...kages/frontend/src/components/MkChannelPreview.vue 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           develop   #15977       +/-   ##
============================================
- Coverage    46.06%   17.71%   -28.35%     
============================================
  Files         1780      869      -911     
  Lines       182901    79834   -103067     
  Branches      5482     1343     -4139     
============================================
- Hits         84255    14144    -70111     
+ Misses       98597    65683    -32914     
+ Partials        49        7       -42     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kakkokari-gtyih
Copy link
Copy Markdown
Contributor

わざわざ別のものを用意せずともstore管理でいい気がします
(その前にチャンネル既読の同期の是非を考える必要はありますが)

@fruitriin
Copy link
Copy Markdown
Contributor Author

目的が達成できれば細かい実装方面はお任せできるとうれし
既読の同期は、あると、とても便利です

@fruitriin fruitriin force-pushed the sync-channel-lastread branch from 8b61f1a to 5f0756a Compare September 1, 2025 05:29
@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Sep 1, 2025
@fruitriin fruitriin force-pushed the sync-channel-lastread branch from 5f0756a to b697ca0 Compare September 1, 2025 05:50
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Sep 1, 2025
@fruitriin
Copy link
Copy Markdown
Contributor Author

チャンネルの既読の是非でいうと、端末間で既読を同期できないと既読管理してるうまみが7割減だと思うのでぜひ
Storeで管理っていうのはどの辺のコードのものを使うということですか?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

packages/frontend Client side specific issue/PR size:M This PR changes 30-99 lines, ignoring generated files.

Projects

Development

Successfully merging this pull request may close these issues.

2 participants