Repository navigation
POC: snapshot watchRoster stub is only a stop function - #4794
Closed
cursor[bot] wants to merge 3 commits into
Closed
cursor[bot] wants to merge 3 commits into
cursor[bot] wants to merge 3 commits into
Conversation
…ter (fix main) Main's CI went red at 335b846 (PR #4747). That merge brought in 79b03fc (FIX-2412), which moved useRoster from workforce.roster() to workforce.watchRoster(...) and updated the workforce fakes on its branch. 243a14a (FIX-2409) had meanwhile landed snapshot-subscribe.test.tsx on main with a fake carrying only roster(). The two merged with no textual conflict; the Sidebar's roster effect then threw "watchRoster is not a function", React unmounted the root, and the as-of line and its refresh link were gone. Give the fake the same watchRoster connection.test.tsx uses. No assertion changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t (BP-006) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
joinWatch only stores what watchRoster returns. This screen never calls roster(), and a watch that has not reported draws the same workers as an empty delivery. Co-authored-by: Jake Hoffner <jhoffner@users.noreply.github.com>
cursor
Bot
force-pushed
the
poc/snapshot-watch-stop
branch
from
November 5, 2026 19:19
183590f to
a6f3e9b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this subtracts
From #4793's workforce fake in
packages/shift-manager/test/snapshot-subscribe.test.tsx:roster(), which this screen never calls (the inventory is empty, so Talk does not mount)watchRosterthat deliversPromise.resolve([])joinWatchstores the functionwatchRosterreturns and calls it when the last view leaves.withRosterdraws no workers while that watch has not reported, the same drawing as an empty list.Against
main, the whole fix is one line:const workforce = { watchRoster: () => () => {} }.What still passes
pnpm exec vitest run test/snapshot-subscribe.test.tsxinpackages/shift-manager: 11/11. eslint on that file passed. A call log on the longer fake recordedwatchtwice androsternever.This PR does not merge
Demonstration of the smaller stub. Fold the subtraction into #4793, then close this PR unmerged.