Skip to content

[Bug]: An open macOS thread can be marked read when its turn finishes in a background window #42070

Done

Description

@keeson

Area

apps/desktop (shared web conversation visit tracking)

Steps to reproduce

  1. Open a thread in the macOS desktop app and send a prompt that takes long enough to finish in the background.
  2. Switch to a different macOS app without navigating away from the T3 thread.
  3. Wait for the turn to finish. Return to T3 without opening that thread again, and check its sidebar row. For a control, try leaving the thread for a different thread before switching apps. If other T3 clients are connected, close or navigate away from this thread there to isolate the desktop client.

Expected behavior

A completion that arrives while the thread is in an unfocused window should remain unread until the thread is viewed in the foreground. Returning to another thread should leave the sidebar's Done indicator in place. This report is about sidebar read state, not the intentional Dock badge reset on app focus.

Actual behavior

On my install, a completed thread showed Just now instead of Done, even though I had not reopened the thread to read the reply. A local read-only event check showed the run completed at 01:37:38.757Z, followed 146 ms later by thread.visit-recorded with lastVisitedAt set to the exact completion time. The sidebar considers a completion unread only if it is strictly newer than lastVisitedAt.

The published desktop/web visit component mounts the shared visit tracker, which treats a mounted view as being viewed and advances the visit on updates, without checking the foreground window. That matches the observed timestamps, although the saved event does not identify which client sent the visit. The single-client control above is suggested for reproduction, not a claim that I ran it.

Impact

Unread completions can disappear from the sidebar, so I have to reopen threads to tell which replies I have missed.

Version and environment

T3 Code Desktop (Beta) 0.1.11 (59651c1761f6), macOS 27.2.1, Apple silicon. The two visit-tracking source files are unchanged on main at a326dea2 (source comparison only, not a runtime test).

Related

#30877 described the background visit behavior, but combined it with a Dock badge change and was closed unmerged. #28193 targets the mobile resume path. This report is limited to unintended read-state advancement in the desktop client.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions