Skip to content

Notes: show an unseen-notes indicator beside post titles on the post list screen #81948

Description

@adamsilverstein

Claude drafted this companion to #81940 from my outline:

What problem does this address?

Sibling to #81940, which adds an unseen-notes count badge inside the editor. That badge only helps once you have already opened a post. On the post list screen there is still no way to tell which posts have new notes waiting - you have to open each post to find out.

Google Docs has the equivalent affordance one level up: in Drive, files with unread comment activity are marked so you know which documents need attention before opening them.

Prior work

Proposed solution

Mark posts that have unseen note activity for the current user on the post list screen (edit.php) with an indicator rendered inline after the post title and its post states (where "— Draft" appears), following #71743's avatar placement: a blue dot, or a blue dot within a small note bubble (design input welcome). The indicator reuses the exact counting logic, persistence, and number treatment from #81940 - same per-user last-seen timestamp, same "own activity never counts" rule, same "9+" cap.

Placement: inline after the title and post states

Render the indicator in the title cell, immediately after the post states - the same spot #71743 put its avatars. A dedicated slim column beside the title was considered and set aside: that approach was tried and did not work well in practice.

To get there without #71743's list-table subclass, append the indicator through the display_post_states filter, which outputs inside the title cell right where the avatars rendered:

  • No core class is replaced, so it coexists with plugins that also filter wp_list_table_class_name or the columns.
  • The title string itself is never modified, so plugins filtering the_title or the title column are unaffected.
  • Post states already accept markup from plugins (Elementor and others render icons there), so an inline badge is established practice.

If the post-states filter proves too constraining for the interactive markup (see requirement 3), the fallback is #71743's subclass with the render kept to one injected call - but the filter should be exhausted first.

Requirements

  1. Same semantics as Show an unseen-notes count badge on the Notes toggle, like Google Docs #81940: count unresolved note threads with activity newer than the user's last-seen timestamp for that post, excluding the user's own activity.
  2. Same number treatment: show the count in the badge, cap the display at "9+", announce the exact count to assistive tech (e.g. "3 unseen notes").
  3. Interaction: clicking the indicator opens the post in the editor with the Notes sidebar open (deep link), so the badge is an entry point, not just a marker.
  4. Performance: unseen state for a page of posts must come from a single query (latest note activity per post id compared against the user's timestamps) - no per-row queries, unlike Show open discussion indicators on posts page #71743's per-row get_comments().
  5. Scope: only post types where notes are enabled, only for users who can read the post's notes.
  6. Clearing: opening the post's notes clears the indicator through the shared timestamp from Show an unseen-notes count badge on the Notes toggle, like Google Docs #81940 - no separate state.

Acceptance criteria

  • A post with note activity since my last visit shows the indicator with the correct count inline after its title and post states on edit.php.
  • Posts with no unseen activity (including only my own activity) show nothing.
  • Counts of 10+ display as "9+"; the accessible name carries the exact number.
  • Clicking the indicator lands in the editor with the Notes sidebar open.
  • Opening a post's notes clears its indicator on the next list view, with no separate bookkeeping beyond the Show an unseen-notes count badge on the Notes toggle, like Google Docs #81940 timestamp.
  • The list screen issues no additional query per row, verified against a screen of 20+ posts.
  • A plugin filtering the title column (e.g. appending to the_title) or adding its own post states does not disturb the indicator, and vice versa.

Proposed implementation plan

  1. Shared logic: land after (or with) Show an unseen-notes count badge on the Notes toggle, like Google Docs #81940's persistence; expose a helper that returns unseen counts for an array of post ids for the current user in one query.
  2. Indicator: PHP in lib/compat/ hooking display_post_states for notes-enabled post types, appending the badge markup with the count and the deep link; bulk-prime the counts once per screen.
  3. Styles: small stylesheet for the badge treatment (blue dot / bubble per the design outcome), enqueued only on list screens for enabled post types.
  4. Tests: PHPUnit coverage for the count helper (bulk query, permission checks, own-activity exclusion) and an e2e verifying the indicator, the deep link, and clearing.

Out of scope

  • The DataViews-based lists in the site editor and dashboard - worth a follow-up so the two list surfaces stay in sync, but the classic list table is the target here.
  • Avatars of note authors in the list (Show Discussions outside Editor #71622's original design) - the badge position could host that treatment later.

Open questions

  1. Blue dot alone, or dot-in-bubble with the count? A bare dot matches Drive; a counted bubble matches the in-editor badge from Show an unseen-notes count badge on the Notes toggle, like Google Docs #81940.
  2. Should a "has notes, all seen" state render anything (e.g. a muted bubble), or stay strictly new-activity-only (proposed)?

AI Use

The description came out of a back and forth with 🤖 Claude Code; no code in this issue.

Activity

  1. yashjawale commented on Oct 13, 2026

    @yashjawale
    Contributor

    Attached an implementation for this at #84620, building upon the timestamp in #81951 toggle badge PR.

    Perhaps its better to wait till that one lands.

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

Metadata

Metadata

Labels

[Feature] NotesPhase 3 of the Gutenberg roadmap around block commenting[Status] In ProgressTracking issues with work in progress[Type] EnhancementA suggestion for improvement.

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions