Repository navigation
perf(threads): limit history loading and reuse unchanged views - #1049
Merged
Merged
Conversation
Page older work when the reader requests it. Keep a current live watch open, and replay from the page checkpoint when a concurrent edit wins. Bound expanded output and desktop history writes. Reuse measured cache sizes and skip rebuilding the timeline for unchanged or header-only updates. Fixes: #300 Fixes: #302 Fixes: #541 Fixes: #556 Fixes: #672 Fixes: #687
nixuuu
enabled auto-merge (squash)
November 20, 2026 05:47
nixuuu
added a commit
that referenced
this pull request
Nov 20, 2026
…1050) ## Change This update preserves existing access when gateways and workers upgrade and tightens how Canopy issues new credentials, approves connector actions and serves private files. - New desktop clients pair with an owner invitation. Previously paired phones, desktops and workers keep their credentials and certificate pins. Revoking a device closes its active streams. - MCP approvals bind to the saved account, tool and arguments. Slack deliveries and linked-computer reports check which conversation supplied the data. An older approval with incomplete arguments requires a new decision. - Worker file changes and previews are scoped to the thread. Migrations 0180–0184 preserve each owner's existing valid image previews, including historical images with only a saved path and hash. They also migrate connector approvals and confirmed computer redirects. - Compose isolates the worker network and runs database migrations separately from the gateway's restricted PostgreSQL login. Web, Android and SSH worker enrollment accept the one-use token through a prompt or stdin. - Release jobs check the source revision before using signing or publication credentials. The updater checks the official manifest's repository and tag. Independent manifest signatures still require a publisher key. ## Rollout Update the Compose file together with the gateway and worker images. Existing remote workers using plain HTTP need HTTPS or an explicitly trusted bootstrap origin. Desktop installations that only ever held a worker credential need an owner invitation for UI access. Configure the protected GitHub environments `release-automation`, `release-signing` and `release-publication` before using the updated release workflows. Move the existing deployment and signing credentials as documented. At PR creation the repository listed only `github-pages`. [Release setup](https://github.com/itsoltech/canopy/blob/189be6983213442471579b2c2aceb0ded8a40fa0/docs/release.md) ## Verification - At `189be698`, 238 targeted tests passed across 46 files on top of the merged #1049. Six scoped typechecks and lint on the overlapping changes passed. - Upgraded the final Linux packages from schema 178 directly and from 179 after a PostgreSQL dump and restore. The original phone and desktop sessions, pin and unused invitation remained usable. Revoked access stayed revoked. Separate upgrade checks verified the worker credential, saved OAuth login, connector grants and both peers of a paired gateway link. With the worker offline, the phone retrieved the original GIF and path-only PNG with identical bytes and MIME types. - Compared production Chromium builds using 2,160 items and 19 subagents, with 48 measured openings per revision across two widths and both themes. Median time to the visible last answer was 476.3 → 480.2 ms at 1280 px and 415.8 → 415.4 ms at 390 px. Both revisions requested zero older pages on open, one on scroll and eight for the selected multi-page turn, keeping the same SSE connection. The 10,000-row header update measured 4.49 → 4.53 µs. Inactive expanded content retained 7.5 MiB on both revisions. - Native Android kept the existing pairing after a cold start. A send reached the worker once and the app resumed from its saved checkpoint after returning from the background. Twelve pairs of unchanged controls and heartbeats produced zero React commits on both revisions. - Copy audit (§8) covered the enrollment instructions and image fallback. The wizard now labels the separate token and tells the user when to paste it. Inspected the web wizard with short, typical and 200-character names at desktop and phone widths in both themes and exercised the same flow in the native Android app. For the CI fixes on `0878d0e7`, 34 targeted tests passed across worker Git reads, process limits, the thread file panel and subagent permissions. A Git trace of 100 simultaneous status requests across 30 worktrees showed one filter lookup and one status process per worktree, with up to four scans in flight. A subsequent cache hit spawned zero processes. Forcing a refresh read the current filter configuration and ran status again. An idle parent can still pass its default permissions to a child or narrow them. An explicitly unknown turn ID is rejected. Local coverage used Linux, Chromium and an Android emulator. Signed packages, native Windows/macOS and iOS remain outside these results. GitHub CI runs the full repository checks. Fixes: #68 Related: #1049
This was referenced Nov 20, 2026
nixuuu
added a commit
that referenced
this pull request
Nov 28, 2026
## Change A fast jump through a thread could leave several “Show earlier work” buttons on screen until the next upward gesture. Web and desktop now fetch a page when a gap or the start of the loaded history comes within 240 CSS pixels of the reading area. The feed waits for its initial position, then rechecks the current window after each page. Failed reads expose the existing retry action. When older rows turn out shorter than their estimates, the feed restores the reading anchor before it decides whether to follow the end. This keeps the same message on screen across consecutive reads. ## Verification - Exercised the real thread route in Chromium with 96 turns and 1,112 items. After Home, five sequential reads filled all six visible gaps with the first prompt moving less than one pixel. Also checked a fast wheel gesture at 390 px wide. - Approached a gap from each direction. Requests started with the gap still offscreen and stopped outside the margin. A short thread with a visible gap loaded on opening. An HTTP 503 paused automatic reads until Retry. - Kept an answer within half a CSS pixel of its position through four pages of a 540-command turn. Closing the last work fold still resumed following at the end. - Web typecheck, lint on changed files and 15 existing history and scroll tests passed locally. Repository-wide checks and selected builds run in CI. Fixes: #1049 Fixes: #781
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.
Change
Verification
Fixes: #300
Fixes: #302
Fixes: #541
Fixes: #556
Fixes: #672
Fixes: #687