Skip to content

Show unreads for channels after access changes - #1550

Merged
morgmart merged 1 commit into
mainfrom
morganm/unread-refetch-returning-channels
Oct 22, 2026
Merged

morgmart merged 1 commit into
mainfrom
morganm/unread-refetch-returning-channels

Conversation

@morgmart

Copy link
Copy Markdown
Contributor

What

If you lost and then regained access to a channel, or your channel list changed while unreads were first loading, that channel's unread history was never fetched again for the rest of the session. The channel never showed as unread, and the Unreads filter hid it.

The app now loads unreads again when a channel becomes newly accessible, and restarts the first load when a membership change interrupts it. Results from the interrupted load are still thrown away, so nothing stale leaks in.

This is likely what makes the Unreads sidebar browser test flaky on #1446.

Tests

  • New: a channel that drops out of the list and comes back shows its unreads again.
  • Updated: the existing "late result" tests still prove an interrupted read can't publish. They now also check that a fresh read follows, scoped to the current channels. Before, they asserted that no new read happens, which is the bug.

Screenshots

None. This changes background loading only and has no visual change of its own.

🤖 Generated with Claude Code

@morgmart
morgmart requested a review from a team as a code owner October 22, 2026 16:33

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Star Lord automated source review via Wes’s account, integrating independent Rocket (lifecycle/performance), Mantis (correctness/security/concurrency), and Groot (product/accessibility) reviews.

No actionable source findings. Source assessment: 9/10 for minimalness, ownership and correctness. The change reuses the existing repair/epoch machinery to observe newly accessible channels and retry an observation interrupted by membership changes, while preserving stale-result rejection, cache-clear/disposal fences and sequential bounded reads. Supported sidebar/Inbox consumers and error/retry focus behavior were inspected. A full-roster reread on access changes is intentional; live cost was not measured.

Reviewed head: bc0d546
Base: 73c40e4

Coverage: both changed files, relevant session/consumer lifecycle, regression-test source, public PR description and commit metadata. No image attachments were present; no evident public-material disclosure found. The added regrant case and revised interruption assertions use the existing service test layer; no browser cases were added or removed. Tests and fail-before/pass-after behavior were not executed or reproduced in this source-only review.

Validation limits: no builds, app launches, live relay tests, native acceptance or rendered accessibility checks. A single hosted-check snapshot at 2026-10-22 17:19 UTC showed CI required failing, with Chromium 3/9 and WebKit 2/12 and 4/12 failed; causes were not investigated. JavaScript and Vitest flake checks passed in that snapshot; this is not a CI-green or runtime-correctness claim. No GitHub approval or merge authorization.

When the viewer regained access to a channel, or a membership change
abandoned the startup read mid-flight, unread evidence was never fetched
again for the session, so the channel never showed as unread.

Restart the observation when a channel becomes newly accessible or when
an access change discards an in-flight read. Stale results from the
abandoned read still cannot publish.

Co-authored-by: Carl <c217fe6b9d958f41c3a5e030dccc7f626775a923089cb6491305eade75ea1f1b@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: morgmart <[email protected]>
@morgmart
morgmart force-pushed the morganm/unread-refetch-returning-channels branch from bc0d546 to 8e7356f Compare October 22, 2026 18:26

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Carl, an automated reviewer, commenting via Wes's GitHub account.

No blockers. Reviewed head 8e7356f (base 05a91d2).

The bug is real on main: purge() bumps the access epoch on any membership change, so an in-flight repair() returns early without settling, and the follow-up read was only scheduled for the cached-to-fresh (confirmed) case. A revoke or join during the first load, or a lost-then-regained channel, left that channel unobserved for the session. Rerunning when a channel is gained or a read was abandoned (refresh set) closes both gaps, and the existing epoch, clear() and dispose() fences still reject stale results. The updated interruption tests now assert the fresh read is scoped to the current roster, which is the right contract.

Validation: source review of both files and the repair()/purge()/clear() paths. Tests not run locally; CI was still in progress at review time. The Chromium 3/9 and WebKit 2/12, 4/12 failures seen on earlier runs also failed on main (settings.spec.mjs:1123 plugin catalog scroll), so they are not caused by this change.

Merge criteria: CI green.

@morgmart
morgmart merged commit d92bfb2 into main Oct 22, 2026
69 of 71 checks passed
@morgmart
morgmart deleted the morganm/unread-refetch-returning-channels branch October 22, 2026 19:53
johnmatthewtennant added a commit that referenced this pull request Oct 23, 2026
…e-skip-archived-channels

* origin/main:
  Bump tokio to 1.53.3 for RUSTSEC-2026-0386 (#1581)
  Unify attachment cards with neutral icon tiles (#1548)
  Polish edit context, channel join and profile actions (#1545)
  fix(claude-code): keep context across channel threads (#1516)
  fix(builderlab): let Create agent cancel a pending browser sign-in (#1526)
  test(sidebar-filters): start the focus journey on General (#1555)
  Add opt-in native MCP for macOS tests (#1528)
  Show unreads for channels after access changes (#1550)
  Deliver artifact changes through shared live routes (#1480)
  condense photo and video attachments into a compact grid (#1549)

Signed-off-by: John Tennant <[email protected]>
morgmart added a commit that referenced this pull request Oct 23, 2026
Signed-off-by: morgmart <[email protected]>
Co-authored-by: Carl <c217fe6b9d958f41c3a5e030dccc7f626775a923089cb6491305eade75ea1f1b@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <[email protected]>

* origin/main: (24 commits)
  Unify chat and channel access, tidy the Solo chat menu (#1446)
  fix(todos): render nested TODOs with collapsible hierarchy and Markdown (#1483)
  fix(agents): Allow agents to propose updates to agents (#1478)
  fix(composer): prevent plugins from updating the recipient on a WIP draft message (#1497)
  fix(agents): can't delete an agent belonging to an archived channel (#1560)
  Bump tokio to 1.53.3 for RUSTSEC-2026-0386 (#1581)
  Unify attachment cards with neutral icon tiles (#1548)
  Polish edit context, channel join and profile actions (#1545)
  fix(claude-code): keep context across channel threads (#1516)
  fix(builderlab): let Create agent cancel a pending browser sign-in (#1526)
  test(sidebar-filters): start the focus journey on General (#1555)
  Add opt-in native MCP for macOS tests (#1528)
  Show unreads for channels after access changes (#1550)
  Deliver artifact changes through shared live routes (#1480)
  condense photo and video attachments into a compact grid (#1549)
  Add page-owned sidebar contributions (#844)
  fix(channels): confirm a requested member when the relay stores bot (#1519)
  test(browser): settle dialog motion and startup errors before strict checks (#1492)
  perf(messages): measure read-tracking rows once per frame (#1527)
  fix(settings): keep the chosen plugin row in place when details open or close (#1551)
  ...
joelrobotham pushed a commit to joelrobotham/buzz-app that referenced this pull request Oct 24, 2026
…ocus

* origin/main: (35 commits)
  fix(goose): say a provider isn't set up instead of offering placeholder models (block#1543)
  fix(agent-activity): note under a message when its agent was stopped (block#1544)
  feat(messages): show whose agent wrote a message (block#1502)
  feat(agents): put main agent choice in the card's actions menu (block#1530)
  fix(relay): let live dev connections save config artifacts (block#1583)
  feat(builderlab): let local agents create, deploy, share and open Builderlab apps (block#1340)
  Unify chat and channel access, tidy the Solo chat menu (block#1446)
  fix(todos): render nested TODOs with collapsible hierarchy and Markdown (block#1483)
  fix(agents): Allow agents to propose updates to agents (block#1478)
  fix(composer): prevent plugins from updating the recipient on a WIP draft message (block#1497)
  fix(agents): can't delete an agent belonging to an archived channel (block#1560)
  Bump tokio to 1.53.3 for RUSTSEC-2026-0386 (block#1581)
  Unify attachment cards with neutral icon tiles (block#1548)
  Polish edit context, channel join and profile actions (block#1545)
  fix(claude-code): keep context across channel threads (block#1516)
  fix(builderlab): let Create agent cancel a pending browser sign-in (block#1526)
  test(sidebar-filters): start the focus journey on General (block#1555)
  Add opt-in native MCP for macOS tests (block#1528)
  Show unreads for channels after access changes (block#1550)
  Deliver artifact changes through shared live routes (block#1480)
  ...

Signed-off-by: user-kWN3CIVowEvEo3RM <[email protected]>

# Conflicts:
#	tests/browser/github-body.spec.mjs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants