Skip to content

通知を取得しただけで、WebUI 側の未読が消える(markAsRead の既定が true) #1045

Closed

Description

@pooza

#993 層② の A-7。詳細は docs/api-gap-inventory.md §9-2。この枠で最も小さい(1 行)。

症状

capsicum を起動していると、WebUI 側の通知の未読バッジが勝手に消える。capsicum で通知を開いていなくても起きる(バックグラウンドの取得でも消える)。

原因

Misskey の i/notifications は markAsRead の既定が true:

markAsRead: { type: 'boolean', default: true },

capsicum が送っているのは sinceId / untilId / limit だけ(packages/capsicum_backends/lib/src/misskey/client.dart:782-799)。markAsRead を明示していないので既定の true が効き、取得しただけでサーバー側の未読が消える。

capsicum 自身は未読をクライアント側で数えているので自分では困らない。困るのは WebUI や他のクライアントを併用しているユーザー。

⚠ **capsicum の画面では観測できない。**他クライアントの状態が変わるだけなので、報告が来ても原因に辿り着きにくい。実際、症状は「Misskey の Web を開くといつも通知が既読になっている」という形で現れる。

やること

  • getNotifications に 'markAsRead': false を足す

判断が要る点

⚠ **「常に false」でよいかは自明ではない。**capsicum で通知画面を開いて実際に読んだときは、サーバー側も既読にするのが筋。

  • 最小の直し方: 取得は常に false、既読化は別途明示的に行う(Misskey には notifications/mark-all-as-read がある)
  • ⚠ ただし capsicum は未読の概念をクライアント側で持っている(unreadAnnouncementCountProvider 等)ので、サーバー側の既読状態と二重管理になる。どちらを正本にするかを決めてからにしたい

⚠ 関連: Misskey の User には hasUnreadNotification / unreadNotificationsCount があり、サーバーが未読を持っているのに capsicum は使っていない(#993 §9-6)。「サーバーを正本にする」を選ぶなら、そちらも合わせて拾うことになる。

Activity

  1. added this to the v1.63 milestone on Aug 31, 2026
  2. added
    bug
    Misskey
    on Aug 31, 2026
  3. added 2 commits that reference this issue on Aug 31, 2026
  4. pooza commented on Sep 4, 2026

    @pooza
    OwnerAuthor

    v1.63.0 で出荷。markAsRead: false を明示。未読の正本はクライアント側とする判断。

  5. added a commit that references this issue on Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Misskeybug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions