Skip to content

fix(web): mark newly discovered completed threads unread - #8031

Draft
danieliser wants to merge 2 commits into
pingdotgg:mainfrom
danieliser:agent/first-seen-completed-thread-monitoring
Draft

fix(web): mark newly discovered completed threads unread#8031
danieliser wants to merge 2 commits into
pingdotgg:mainfrom
danieliser:agent/first-seen-completed-thread-monitoring

Conversation

@danieliser

@danieliser danieliser commented Aug 23, 2026

Copy link
Copy Markdown

Supersedes #4501, which GitHub cannot reopen after its head branch was force-pushed.

Rebased onto current main (2026-08-23).

This preserves the focused behavior: after a snapshot environment finishes bootstrap, a thread first discovered already completed is marked unread; initial history remains read.

Note

Mark newly discovered completed threads as unread in EventRouter

  • Adds environmentSnapshotIdsAtom to derive the set of environment IDs that currently have a snapshot present
  • Adds resolveFirstSeenCompletedThreads, a pure function that compares current threads against previously seen thread keys and returns completed threads that are newly visible, plus the next seen-key snapshot
  • Adds useMarkFirstSeenCompletedThreadsUnread hook in __root.tsx which runs resolveFirstSeenCompletedThreads on thread/snapshot changes and calls useUiStateStore.getState().markThreadUnread for each new completed thread
  • On first run per environment the hook seeds seen keys without marking anything unread; running threads and threads outside snapshot environments are ignored
  • Behavioral Change: completed threads that first appear after bootstrap within snapshot environments will now show as unread in the UI

Macroscope summarized 9e60709.

StiensWout and others added 2 commits August 23, 2026 16:34
@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c42d8a17-ec37-4af6-9c51-6e2f94ec70f2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Aug 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants