githubnext/chopinPublic

Let's compose rich plans together

Resynchronize conflicting sidebar totals, align touch counts, and refresh unwatched projects

The review of #378 (#345) left three findings open.

- A dropped stale frame or a discarded HTTP total no longer leaves the project
  total wrong. Totals carry no ordering key, so the client now re-watches the
  repository with no documents; the server already answers a watched
  repository with a fresh snapshot ordered after every earlier frame. Requests
  are coalesced to one per repository each second, and only repositories this
  connection watches are asked. The protocol and channel docs describe it.
- On touch, document and child counts take the project row's gap before the
  always-shown action, so all counts share one trailing edge.
- The watch cap now covers the open document's project first, then projects
  in sidebar order. Projects past the cap reload their first catalogue page in
  rotating batches of 10 on focus, on becoming visible, and every minute.
- The raw initial JavaScript budget grows by 2 KB for the new client code; the
  gzip budget is unchanged. The navigation-shell design-contract owner hash is
  renewed after reviewing that its motion classes did not change.

Assistant-model: Claude Opus 5.5 (fast)
Assistant-workflow: inline (follow-up to issue-to-pr run 9e295d5f-ce88-404b-8711-e7d1cfc6bbba)
Assistant-verification: bun run fix passed: formatting only, no lint fixes in changed files
Assistant-verification: bun run types passed: all packages and e2e
Assistant-verification: bun run ci passed: dprint, oxlint, tokens, design contract after hash renewal, design record, impeccable
Assistant-verification: bun test passed: 4112 pass, 3 skip, 0 fail with commit signing disabled
Assistant-verification: bun run e2e e2e/sidebar-decision-counts.e2e.ts e2e/smoke.e2e.ts passed: 29 passed
Assistant-verification: revert check passed: the conflict and touch-alignment E2E tests fail with the HEAD use-project-documents.ts and navigation.css
Co-authored-by: Alex Lavaee <lavaman131@github.com>
ALAlex Lavaee authored
4ac8297Patch
Parent1d25117
12 files changed+553-43
StackedSplit
apps/web/bundle-budget.ts+2 โˆ’1
apps/web/src/document-actions.tsx+72 โˆ’6
apps/web/src/navigation-shell.tsx+51 โˆ’9
apps/web/src/navigation.css+17 โˆ’0
apps/web/src/sidebar-decision-counts.test.ts+68 โˆ’2
apps/web/src/sidebar-decision-watch.test.ts+48 โˆ’0
apps/web/src/sidebar-decision-watch.ts+63 โˆ’0
apps/web/src/use-project-documents.ts+30 โˆ’8
apps/web/src/use-sidebar-decisions.ts+45 โˆ’4
docs/channels.md+21 โˆ’11
e2e/sidebar-decision-counts.e2e.ts+132 โˆ’1
packages/protocol/index.d.ts+4 โˆ’1