Repository navigation
fix(threads): recover live updates without retry loops - #673
Merged
Merged
Conversation
nixuuu
force-pushed
the
fix/thread-watch-large-live
branch
from
November 13, 2026 21:15
d27a034 to
3d6b3ca
Compare
nixuuu
force-pushed
the
fix/thread-watch-large-live
branch
from
November 13, 2026 21:26
3d6b3ca to
73ce601
Compare
nixuuu
marked this pull request as ready for review
November 13, 2026 21:43
This was referenced Nov 13, 2026
nixuuu
added a commit
that referenced
this pull request
Nov 13, 2026
Older turn summaries can arrive while their messages are outside the independent 128-item watch window. Web treated those turns as completed empty folds and only paged near the list's beginning, leaving work and answers blank across reloads. This change shows compact loading rows for missing or partial work, prefetches one bounded history page from virtual overscan, and preserves message anchors when earlier steers renumber segments. Fold coverage mismatches expose the source rows and emit diagnostics. Initial positioning has a two-second reveal fallback; diagnostics include earlier-page request-to-render timings. New running turns without their first item do not trigger a scan of older history. History metrics use fixed IDs 450–455, separate from the thread-watch metrics introduced by #673. Gateway responses classify client metrics by their registry group, keeping recovery timings in the Client section and preserving the existing watch-recovery behavior. Fixes: #541 Verified with git bisect: `0c655ca3ba72f2aea48487d7de62642a15a096f2` introduced the independent windows; its parent `e483f4274` passes the same three-turn/600-item reproduction. #639 and #668 steer/group parity tests pass. Shared mobile fold derivation is unchanged. Validation: - Nine focused history/fold regressions pass, including partial cached tails, steers, collapsed groups, nested tools, a running subagent and stable message identities. Real gateway/cache/checkpoint recovery integration passes. - Production browser checks cover desktop and 390px phone widths, light/dark and reduced motion. Prefetch starts up to 572px before missing work reaches the viewport; loading rows measure 44px; reading-anchor drift stays under 0.5px. - Held responses, actual thread switching, cached reload with a simulated desktop persistence bridge, cleared local storage, failed requests/Retry and blocked row measurement all recover visibly. A fresh running turn sends zero history requests; scrolling to older gaps sends one. Recovery and request-to-render diagnostics were captured. - Initial handover gates passed: install, `gen:check`, typecheck, lint, `format:check`, `check:tmp` and the web build. That full local run had 2,793 passed, 166 skipped and zero failures across 523 files; temporary-directory cleanup was clean. - Rebased onto current `dev` (`89f37fea6`), including #670 and #673. Post-rebase checks pass: 34 focused feed/fold tests, 10 diagnostics integration tests, six provider-account integration tests and the bounded-window/cache integration test (51 total), full typecheck, lint, format check and production web build. The provider refresh invalidation regression and forced-refresh race both pass. Diagnostics tests verify distinct watch/history metrics through authenticated ingestion, client-section rendering data and redacted export. Runs were detached with `nice`, with heavy test files run one at a time; each focused `check:tmp` run cleaned its temporary directory. Native Mac/Electron and native phone rendering were unavailable. The desktop renderer and cache contract were checked in Chromium; shared mobile/web steer and group logic tests pass. Copy audit (docs/copy.md §8): “Loading earlier work…” is a concise progress status; existing error and Retry copy is reused. Light/dark desktop and phone widths checked; no new motion or copy in tool/steer rows.
nixuuu
added a commit
that referenced
this pull request
Nov 13, 2026
## Final integration rebase including history/fold recovery Rebased all seven layers of stack #643 onto dev `8e78568c7e86c188039743dde6cb879c34de4a6e`, including #671 provider warnings, #673 reconnect/backoff, #670 connector refresh, #674 deterministic steer recovery and #672 empty-work/history recovery. Two thread-page conflicts were resolved in their introducing stages: preserve the conversation/file tab wrapper together with history loading rows/actions, prefetch, fold synchronization/coverage, diagnostics and scroll anchors. Feed, history and fold implementation files retain the merged dev behavior. Earlier generated-descriptor conflicts were resolved through `bun run gen`; proto additions and field numbers are preserved. The independently confirmed five workspace fixes are unchanged. No pending Git or gh-stack rebase operation. Verification scope on the final heads: install, explicit gen, gen:check, full typecheck, lint, format:check, production web build and focused workspace/feed tests at every stage. Commands run detached with `setsid nohup` and `nice`; heavy files run serially through `check:tmp`. Stage 1 integration files: `thread-file-previews.test.ts`, `thread-scroll.test.ts`. Existing feed logic files: `feed-rows.test.ts`, `work-history-gaps.test.ts`. No UI/component test suite added. All seven PRs remain ready as requested. The maintainer merges the complete stack after CI is green on every head; no merge is performed here. Device check remains pending as previously authorized. No product copy change in this integration rebase. Everything below is historical evidence from before this final integration rebase, including earlier draft statuses and export/fingerprint measurements. ## Change Stage 1 of the approved seven-stage workspace stack. File links in a thread open one replaceable preview tab beside the pinned Thread tab. Edit, Keep tab, double-click or Move keeps it. The shared header handles overflow; native mobile uses a tab switcher sheet. Adds device-local tab metadata, in-memory drafts, close guards, line/range navigation and restoration of file scroll and web editor undo. Existing file RPCs and SHA-256 mutation checks remain in use. Links outside a thread keep their current viewer. Related: #613 ## Current-head rebase verification Rebased onto dev `4bb71c80142e0c1d0616502ce428ca2bf19d8cad`. The workspace wrapper retains dev's thread scroll-memory preparation and loaded-view gates on web and mobile. The existing interrupt request/error handling moved into the thread-command module to keep the page within the code-size limit, with unchanged behavior and UI copy. No manual feed/work-fold changes. Current-head install, gen:check, full typecheck, lint, format:check, production web build and iOS/Android exports passed with `nice`. Both nightly native fingerprints match dev. Current-head CI is green, including all four test shards. Initial thread JS is 765,684 gzip bytes versus dev 756,367: +9.10 KiB, within the 15 KiB budget. The final stack head was reviewed in a production browser on the separate review machine in light/dark at 1440/820/390 px, including short/long names, source ranges, file-tab switching and file-scroll restoration. The merged thread-scroll domain integration passed separately on that head. **Device check pending**. Every implementation PR stays a draft in stack #643. Current full-suite fallback and the serial corrective integrations are recorded in #648; interrupted local runs are not passes. ## Earlier implementation verification (historical) - Passed locally with `nice`: install, gen:check, typecheck, lint, format:check and web production build. - Full `check:tmp`: 2748 passed, 166 skipped, 0 failed; temp directory clean. The newly rebased mobile foreground integration test also passed separately. - Local iOS and Android exports passed with one Metro worker. Fingerprints equal the same `dev` baseline (`bd89660d5`) with `CANOPY_CHANNEL=nightly`: iOS `6ddec9ef559ee0095ac33e94ff9418a942053b17`, Android `5f6eae3ab278f1cd543e9ed763f923a319b65ec9`. No native dependency/configuration changes. - **Device check pending**. Device support reports `Could not communicate with device support. Try refreshing devices.` Refresh did not restore it. The maintainer explicitly authorized continuing later stages with typecheck, both exports and unchanged fingerprints; consolidated iOS/Android device review remains required before the stack is merged. No native performance results are claimed. - Production browser measurements on the separate review machine at `e668c19dc`: thread-route JS +9269 bytes gzip (9.05 KiB, budget 15 KiB); 100 warm switches p50 35.5 ms / p95 41.5 ms with 0 file reads; retained heap +72480 bytes after 20 open/edit/discard/close cycles following warm-up (budget 5 MiB). Earlier exploratory warm p95 ranged 41.3–56.5 ms; these are not omitted from the evidence. - File 100 KiB, 30 cold document opens: first plain paint p50 125.4 ms / p95 139 ms (250 ms budget); DOM p95 92 ms; second-frame stability p95 299.5 ms. The latter includes subsequent syntax work and is not reported as first plain paint. - Three alternating baseline/current two-minute renderer runs completed: handler p95 0.4/0.5 ms, 0.4/0.6 ms and 0.5/0.5 ms. Long-task totals were 3682/3836, 3609/3760 and 3679/3779 ms; runs lasted 120.2–120.9 s. A separate 30-minute renderer run completed 209 cycles / 41,800 messages: handler p95 0.6 ms, 244 long tasks / 54,489 ms total; sampled heap 263,495,772 → 262,438,198 bytes and DOM 19,838 → 19,657 nodes. These are streaming/scroll fixtures, not the complete file-switch/undo/offline resource scenario, which remains for final stack verification. Sampled heap is not retained heap after GC. - No protocol or database migration; no UI test suite added. This PR stays a draft. The maintainer merges the whole stack only after all seven stages are finished and verified. ## Copy audit — docs/copy.md §8 - Repeated modal title → compact file tab with the full path in its tooltip/switcher. Short, sentence-case actions use verbs: Keep tab, Move left/right, Close saved tabs and Go to line. - Unsaved state → Unsaved changes in a reserved slot and accessible tab name. Save/Discard/Keep editing repeat the confirmation's action; deletion names the file and computer. - Limits and storage failures state the problem and a next action. No new humorous copy or inspiration references. - Short, typical and long names checked in the real browser in light/dark at desktop, narrow and phone widths, including 320 px. At 12 tabs the active long name remains reachable with no page overflow; opening another file gives an actionable limit message. Repeated file links reuse their tab. Oversized edits restore the accepted content and cannot save a different draft.
nixuuu
added a commit
that referenced
this pull request
Nov 13, 2026
## Final integration rebase including history/fold recovery Rebased all seven layers of stack #643 onto dev `8e78568c7e86c188039743dde6cb879c34de4a6e`, including #671 provider warnings, #673 reconnect/backoff, #670 connector refresh, #674 deterministic steer recovery and #672 empty-work/history recovery. Two thread-page conflicts were resolved in their introducing stages: preserve the conversation/file tab wrapper together with history loading rows/actions, prefetch, fold synchronization/coverage, diagnostics and scroll anchors. Feed, history and fold implementation files retain the merged dev behavior. Earlier generated-descriptor conflicts were resolved through `bun run gen`; proto additions and field numbers are preserved. The independently confirmed five workspace fixes are unchanged. No pending Git or gh-stack rebase operation. Verification scope on the final heads: install, explicit gen, gen:check, full typecheck, lint, format:check, production web build and focused workspace/feed tests at every stage. Commands run detached with `setsid nohup` and `nice`; heavy files run serially through `check:tmp`. Stage 2 integration files: `thread-file-previews.test.ts`, `computer-relay.test.ts`. Existing feed logic files: `feed-rows.test.ts`, `work-history-gaps.test.ts`. No UI/component test suite added. All seven PRs remain ready as requested. The maintainer merges the complete stack after CI is green on every head; no merge is performed here. Device check remains pending as previously authorized. No product copy change in this integration rebase. Everything below is historical evidence from before this final integration rebase, including earlier draft statuses and export/fingerprint measurements. ## Change Stage 2 of the approved seven-stage workspace stack, based on #640. The header's + opens Pull requests, Tasks or Connectors in a full tab. The right icon rail selects a minimal module, whose header offers a module chip, +, Open in tab and Collapse panel. Tab and panel metadata stay local to the device. Thread details dock by default when the panel has no module. Selecting a module leaves details closed behind their header button; the floating card closes on outside click or Escape and returns focus. Narrow layouts use separate bottom sheets. The panel supports keyboard/pointer resizing and respects the available main-area width. Existing PR refresh content retention and shared reads remain in use; task output can occupy a full tab. Mobile mirrors the module/switcher/sheet model with the native viewer and editor. Related: #613 ## Current-head rebase verification Rebased onto corrected stage 1 and dev `4bb71c80142e0c1d0616502ce428ca2bf19d8cad`, retaining merged thread scroll memory and default tool-group folding. Current-head install, gen:check, full typecheck, lint, format:check, production web build and iOS/Android exports passed with `nice`; both nightly native fingerprints match dev. Current-head CI is green, including all four test shards. Initial thread JS is 768,471 gzip bytes versus dev 756,367: cumulative +11.82 KiB, within the 15 KiB budget. The final stack head was reviewed again in a production browser on the separate review machine in light/dark at 1440/820/390 px. The summary docks without an active module, floats when Files occupies the desktop panel, and opens as a sheet at narrow/phone widths; Escape closes it. Files panel/sheet, long names and the phone tab-switcher sheet were inspected with no horizontal page overflow. No new UI copy in the rebase; the original copy audit remains applicable. **Device check pending**. This PR remains a draft in stack #643; full-suite fallback and serial corrective evidence are recorded in #648. ## Earlier implementation verification (historical) - Passed with `nice`: install, gen:check, typecheck, lint, format:check and production web build. Full check:tmp: 2759 passed, 166 skipped, 0 failed; temporary directory clean. No protocol/database changes and no UI test suite. - Both final iOS/Android exports passed. Fingerprints unchanged from the dev baseline: iOS `6ddec9ef559ee0095ac33e94ff9418a942053b17`, Android `5f6eae3ab278f1cd543e9ed763f923a319b65ec9` (`CANOPY_CHANNEL=nightly`). No native dependency/configuration changes. - **Device check pending**: Device support remains unavailable. The maintainer authorized continuing with typecheck, both exports and unchanged fingerprints. Consolidated device review is required before merging the stack; native runtime/performance and PR scroll restoration are not claimed as verified. - Real browser: light/dark, 1440/1280/900/390/320 px, short and long thread/tab names; module toggles, maximize into a tab, close module → details dock, floating details placement, outside/Escape and focus restoration, collapse/restore, keyboard resize bounds and narrow sheets. Linux window-control CSS reserves were checked; Electron runtime was not launched. Two review setups were already running on the second machine, so this stage used the authorized local fallback. - Thread-route initial JS: 766900 bytes gzip versus 754751 baseline; cumulative +12149 bytes (11.9 KiB), within 15 KiB. Production browser, 1440×900, 100 warm Thread/Tasks switches after 10 warm-ups: p50 32.2 ms / p95 32.4 ms, budget 50 ms, zero thread API requests during the sample. The local integration run was still active; these results do not replace the final paired streaming/resource scenario. No initial editor/grammar dependency added. - Authenticated PR mutations were not exercised: the private fixture has no linked account. Existing gateway/integration coverage and retained PR components cover the unchanged contract; a real-account flow remains a final QA gap. This PR stays a draft. The maintainer merges all seven stages together after complete verification. ## Copy audit — docs/copy.md §8 - Mixed thread-panel sections → Pull requests, Tasks and Connectors with a separate Thread details surface. Existing glossary terms stay intact. - Ambiguous panel actions → Open sidebar module, Open in tab, Close module and Collapse panel. Icon labels describe the same action as their tooltips; the chip retains an accessible full label when truncated. - Missing task history → a short explanation and instruction to open Tasks. Module tab limit errors explain the limit and ask to close a tab. Existing permission/offline notices remain actionable. - No humorous copy or inspiration references. Short/long labels and header controls were checked in both themes and at desktop/narrow/phone widths; native device coverage is pending as stated above.
nixuuu
added a commit
that referenced
this pull request
Nov 13, 2026
## Final integration rebase including history/fold recovery Rebased all seven layers of stack #643 onto dev `8e78568c7e86c188039743dde6cb879c34de4a6e`, including #671 provider warnings, #673 reconnect/backoff, #670 connector refresh, #674 deterministic steer recovery and #672 empty-work/history recovery. Two thread-page conflicts were resolved in their introducing stages: preserve the conversation/file tab wrapper together with history loading rows/actions, prefetch, fold synchronization/coverage, diagnostics and scroll anchors. Feed, history and fold implementation files retain the merged dev behavior. Earlier generated-descriptor conflicts were resolved through `bun run gen`; proto additions and field numbers are preserved. The independently confirmed five workspace fixes are unchanged. No pending Git or gh-stack rebase operation. Verification scope on the final heads: install, explicit gen, gen:check, full typecheck, lint, format:check, production web build and focused workspace/feed tests at every stage. Commands run detached with `setsid nohup` and `nice`; heavy files run serially through `check:tmp`. Stage 3 integration files: `thread-directory-race.test.ts`, `thread-directory.test.ts`. Existing feed logic files: `feed-rows.test.ts`, `work-history-gaps.test.ts`. No UI/component test suite added. All seven PRs remain ready as requested. The maintainer merges the complete stack after CI is green on every head; no merge is performed here. Device check remains pending as previously authorized. No product copy change in this integration rebase. Everything below is historical evidence from before this final integration rebase, including earlier draft statuses and export/fingerprint measurements. The Files module now browses the current thread's cwd/worktree in the sidebar or a full tab. Expanding a directory fetches one bounded page; selecting a file opens the existing replaceable preview tab. The additive `ListThreadDirectory` RPC routes through the thread's home, checks ownership and relative paths in the gateway, and enumerates on the worker without a recursive snapshot. Pages contain at most 200 entries / 64 KiB protobuf including the envelope. Eight one-use iterators expire after 30 seconds; closing Files releases cursors. Git status uses a shared bounded governor query. Symlinks expose no targets and cannot be expanded. Web and mobile share a bounded tree cache, two concurrent reads and cancellation. Virtual rows preserve the visible path anchor and keyboard focus; Git letters and accessible labels supplement colors. No database migration, native dependency/configuration change, UI test suite, polling or full-snapshot synchronization. Stage 3 of 7 in stack #643. Base: stage 2. All implementation PRs remain drafts until the entire stack is finished and verified; the maintainer merges it at once. Related: #613 ## Pre-merge security correction Directory iteration and child metadata now use the same verified native directory handle. Unix walks components with `openat(O_NOFOLLOW)` and uses `fdopendir` / `fstatat(AT_SYMLINK_NOFOLLOW)`. Windows pins all ancestors without delete sharing, refuses reparse points and queries entries plus metadata from the final handle. Cursors close these handles on completion, release, expiration and disconnect. The controlled ancestor ABA regression returns only the original inside name and size; replacing an ancestor before handle acquisition is rejected. Both regression tests and the existing 9 directory integration cases passed on Linux, including 10,000 children, owner isolation, cursor limits and symlink refusal. The Linux worker binary builds and starts. Native macOS/Windows execution has not been verified in this correction. Rebased onto dev `4bb71c80142e0c1d0616502ce428ca2bf19d8cad` and propagated through all seven draft layers of stack #643. The rebase preserves the merged thread scroll memory and default tool-group folding. Current-head install, gen:check, full typecheck, lint, format:check, production web build and iOS/Android exports passed with `nice`; both nightly fingerprints match dev. The 2 directory-race tests and all 9 directory integration cases passed locally, one file at a time (10,385 assertions combined, clean private temp directories). Current-head CI is green, including all four test shards. Local full-suite attempts were interrupted by SIGTERM and are not counted as passes. Before the last dev rebase, a subsequent detached `setsid nohup` run continued beyond the tool timeout but failed existing computer-move reachability/discovery cases under load; its owned process group was stopped after the failures, with a clean private temp directory. The maintainer authorized green CI on every stack layer plus serial corrective/stack integration files as the fallback. The final stack PR records the complete evidence. Native macOS/Windows execution and the mobile device check remain unverified. Current thread-route JS is 769,308 gzip bytes versus dev 756,367: cumulative +12.64 KiB, within the 15 KiB budget. The final stack head was reviewed again in a production browser in light/dark at 1440/820/390 px, including short/long names, Files panel/sheet and summary dock/float/sheet. Earlier performance observations below remain historical. ## Earlier implementation verification (historical) - Passed with `nice`: install, gen:check, typecheck (including mobile), lint, format:check and web production build. Full `check:tmp`: 2768 passed, 166 skipped, 0 failed; nothing left in the private temp directory. CI is green. - Gateway/worker/computer-link integration: 9 passed, 0 failed, 10,377 assertions. Covers worktree/home routing, 10,000 long names, bounded pagination, cursor replay/filter/thread binding/release, directory changes, owner isolation, traversal and symlink refusal, Git states, eight-iterator admission, older workers and restart cursor invalidation. - iOS/Android exports passed. Fingerprints equal the dev baseline with `CANOPY_CHANNEL=nightly`: iOS `6ddec9ef559ee0095ac33e94ff9418a942053b17`, Android `5f6eae3ab278f1cd543e9ed763f923a319b65ec9`. - **Device check pending**: Device support remains unavailable. The maintainer explicitly authorized continuing with typecheck, both exports and unchanged fingerprints. Consolidated device review remains required before merging the stack; no native CPU/FPS/thermal results are claimed. - Real production browser reviewed light/dark, desktop/narrow/phone, short/long names, pagination, file preview opening, focus preservation and sheets. Local fallback used while two review setups occupied the second machine. Final timing measurements pending completion of heavy checks. - Thread-route JS: 767,709 bytes gzip, +12,958 bytes / 12.65 KiB versus the dev baseline; within the cumulative 15 KiB budget. Tree and directory transport load lazily. External changes currently use Reload files; bounded change watching and reconnect recovery belong to stage 5. Expanded/scroll metadata persistence belongs to the resource/recovery stage. This PR does not claim those later slices. ## Copy audit — docs/copy.md §8 - No tree surface → Files / Working directory with verb actions Reload files, Load more and Show ignored files. Labels use sentence case and the glossary's directory term. - Silent or ambiguous partial listing → explicit Reload directory, update/reconnect guidance and actionable resource-limit errors. No cursor/protocol jargon on the surface. - Color-only status → Git letter plus Modified/Added/Deleted/Renamed/Conflict/Untracked/Ignored accessible labels. Symbolic links and deleted entries are explicit and inactive. - Short, typical and long file names reviewed in light/dark at desktop, narrow and phone widths. Names truncate with full paths available; no horizontal page overflow. No new humorous copy or inspiration references.
nixuuu
added a commit
that referenced
this pull request
Nov 13, 2026
## Final integration rebase including history/fold recovery Rebased all seven layers of stack #643 onto dev `8e78568c7e86c188039743dde6cb879c34de4a6e`, including #671 provider warnings, #673 reconnect/backoff, #670 connector refresh, #674 deterministic steer recovery and #672 empty-work/history recovery. Two thread-page conflicts were resolved in their introducing stages: preserve the conversation/file tab wrapper together with history loading rows/actions, prefetch, fold synchronization/coverage, diagnostics and scroll anchors. Feed, history and fold implementation files retain the merged dev behavior. Earlier generated-descriptor conflicts were resolved through `bun run gen`; proto additions and field numbers are preserved. The independently confirmed five workspace fixes are unchanged. No pending Git or gh-stack rebase operation. Verification scope on the final heads: install, explicit gen, gen:check, full typecheck, lint, format:check, production web build and focused workspace/feed tests at every stage. Commands run detached with `setsid nohup` and `nice`; heavy files run serially through `check:tmp`. Stage 4 integration files: `thread-highlight.test.ts`, `thread-file-previews.test.ts`, `computer-relay.test.ts`. Existing feed logic files: `feed-rows.test.ts`, `work-history-gaps.test.ts`. No UI/component test suite added. All seven PRs remain ready as requested. The maintainer merges the complete stack after CI is green on every head; no merge is performed here. Device check remains pending as previously authorized. No product copy change in this integration rebase. Everything below is historical evidence from before this final integration rebase, including earlier draft statuses and export/fingerprint measurements. File tabs now render virtual source rows and highlight the active viewer/editor in a dedicated CPU executor. Mobile keeps native editing and colors the saved viewer or an explicit Preview changes draft through a bounded gateway/worker RPC. Source indexing yields in chunks, long lines remain fully readable, and large files start as plain text. The additive `GetThreadFileHighlight` contract carries at most 200 lines / 64 KiB of semantic offsets and roles, tied to the file hash and draft revision. The gateway derives ownership and cwd. Draft source cannot cross an onward-sharing relay and is never persisted. One worker executor has four waiting slots, bounded source/checkpoint caches and a 100 ms execution deadline after separately bounded grammar initialization. Raster headers are checked before client decoding; images above 16 MP are refused and GIF/animated previews are static. Stage 4 of 7 in stack #643, based on stage 3. All implementation PRs stay drafts until the entire stack is finished and verified; the maintainer merges it at once. No database migration or native configuration change. Related: #613 ## Pre-merge reading-position correction The mobile source viewer restores the document's saved offset after full indexing, content measurement and layout. A newly requested line takes precedence, and preparatory scroll events cannot overwrite the saved offset. No UI text or native configuration changes. Rebased onto corrected stage 3 and dev `4bb71c80142e0c1d0616502ce428ca2bf19d8cad`, preserving merged thread scroll memory and default tool-group folding. Current-head install, gen:check, typecheck, lint, format:check, web build and both mobile exports passed with `nice`; nightly native fingerprints match dev. Current-head CI is green, including all four test shards. Highlight integration passed locally (6 tests); file previews (12) and three-gateway relay (11) passed serially on the otherwise idle review machine. A first preview run on the loaded host failed after its 100 ms heartbeat link timed out; it is not counted as a pass. Every run cleaned its private temp directory. Stage 3 separately passed its directory regressions on the rebased head. Current thread-route JS is 770,456 gzip bytes versus dev 756,367: cumulative +13.76 KiB, within the 15 KiB budget. The final stack head was reviewed again in a production browser in light/dark at 1440/820/390 px, with long names, source colors, line/range positioning, Files and summary sheets. Web file scroll was restored to the recorded 1200 px after switching away and back; this does not establish the native mobile result. **Device check pending**, including switch-away/back scroll restoration; no real-device result is claimed. The maintainer authorized green CI on every layer plus serial corrective/stack files if the detached full run still fails under shared-host load. The final stack PR records that run; interrupted local full suites are not counted as passes. Prior performance observations below are historical. This PR remains a draft in stack #643. ## Earlier implementation verification (historical) - Passed with `nice`: install, full typecheck, gen:check, lint, format:check, web production build and a compiled Linux worker binary. Full `check:tmp`: 2776 passed, 166 skipped, 0 failed, nothing left in the private temp directory. CI is green. - New highlight integration: 6 passed, 0 failed. Covers home routing through a real computer link, owner isolation, traversal/symlink safety, saved/draft hash and revision separation, bounded responses, long-line fallback, older workers and restart. - File preview integration: 12 passed, 0 failed, including safe raster dimensions, a static PNG preview and refusal above the pixel budget. Three-gateway relay integration: 11 passed, 0 failed, including rejected draft forwarding and forged incoming envelopes. - iOS and Android exports passed. Mobile typecheck passed. Native fingerprints equal the dev baseline with the nightly identity: iOS `6ddec9ef559ee0095ac33e94ff9418a942053b17`, Android `5f6eae3ab278f1cd543e9ed763f923a319b65ec9`. - **Device check pending**: Device support remains unavailable. The maintainer explicitly authorized continuing without device verification. Consolidated iOS/Android device review remains required before merging the stack; native CPU/FPS, keyboard/IME, background behavior and thermal results are not claimed. - Production browser inspected in light/dark at desktop, narrow and phone widths, with short and long names. Virtual rows, line/range positioning, theme colors, editor decorations, dirty/discard flow and horizontal overflow reviewed. Local fallback used while two review setups occupied the second machine; the prior remote review setups were then stopped. - Local synthetic 100 KiB file, 30 openings: p95 visible plain text 52.8 ms (250 ms budget), stable view 65.7 ms. Warm tab switch: p95 36.8 ms across 100 samples (50 ms budget), zero additional file reads. These are local synthetic measurements, not controlled remote-latency or native results. - Initial thread JS: 768,832 bytes gzip, cumulative +14,081 bytes / 13.75 KiB versus dev; within the 15 KiB budget. Syntax executor and editor remain lazy. The 20-cycle browser check had no explicit GC, so its coarse heap reading is not evidence for the retained-heap budget; final resource profiling belongs to stages 6–7. Disk invalidation/watch and conflict comparison remain stage 5; final scope cleanup and migration removal remain stages 6–7. No UI test suite was added. ## Copy audit — docs/copy.md §8 - Plain mobile file text → saved viewer colors and the explicit Preview changes / Keep editing actions; native editing remains immediately available. - Large or unsupported syntax → a compact reason, readable plain text and Enable highlighting where applicable. Errors explain that the file remains readable; older capabilities give an update action in words. - Unbounded image decoding → a stated preview limit with an action to open the file on its computer. No parser, cursor or transport jargon in the surface text. - Line highlights supplement original line numbers and Go to line. Dirty state and failures have text; neither depends only on color. - Short, typical and long names inspected across the responsive widths and both palettes. Sentence case and verb actions retained; no humorous copy or inspiration references.
nixuuu
added a commit
that referenced
this pull request
Nov 13, 2026
## Final integration rebase including history/fold recovery Rebased all seven layers of stack #643 onto dev `8e78568c7e86c188039743dde6cb879c34de4a6e`, including #671 provider warnings, #673 reconnect/backoff, #670 connector refresh, #674 deterministic steer recovery and #672 empty-work/history recovery. Two thread-page conflicts were resolved in their introducing stages: preserve the conversation/file tab wrapper together with history loading rows/actions, prefetch, fold synchronization/coverage, diagnostics and scroll anchors. Feed, history and fold implementation files retain the merged dev behavior. Earlier generated-descriptor conflicts were resolved through `bun run gen`; proto additions and field numbers are preserved. The independently confirmed five workspace fixes are unchanged. No pending Git or gh-stack rebase operation. Verification scope on the final heads: install, explicit gen, gen:check, full typecheck, lint, format:check, production web build and focused workspace/feed tests at every stage. Commands run detached with `setsid nohup` and `nice`; heavy files run serially through `check:tmp`. Stage 5 integration files: `thread-root-checkpoint.test.ts`, `thread-watch-cancellation.test.ts`, `thread-watch-relay.test.ts`, `thread-watch.test.ts`. Existing feed logic files: `feed-rows.test.ts`, `work-history-gaps.test.ts`. No UI/component test suite added. All seven PRs remain ready as requested. The maintainer merges the complete stack after CI is green on every head; no merge is performed here. Device check remains pending as previously authorized. No product copy change in this integration rebase. Everything below is historical evidence from before this final integration rebase, including earlier draft statuses and export/fingerprint measurements. Files now watch only the visible directories and active document. External changes refresh clean content and preserve dirty drafts, with Compare changes, Copy changes and a confirmed Discard and reload. The comparison switches between virtual read-only disk/draft versions; it never force-overwrites a file. The additive `WatchThreadFiles` stream carries bounded invalidations, never source or a tree snapshot. Gateway ownership, path checks and home routing apply before subscription. Shared checkout watches have bounded replay, reconnect requests visible-scope revalidation, and cancellation/background releases the stream and retries. Save conflicts use a typed Connect code and HTTP 412 in the BFF. No database migration or native configuration change. Stage 5 of 7 in stack #643, based on stage 4. Every implementation PR remains a draft until the whole stack is finished and verified; the maintainer merges the stack at once. Related: #613 ## Pre-merge root, watch and relay corrections - Every file response carries its root identity. The document retains that checkpoint with its base and draft across watch stops. A changed root remains a conflict until explicit discard and reload, even with identical base bytes. Additive `expected_root_identity` fields reach the home worker for writes and deletes; a stale root yields `Aborted`. Unsupported workers cannot silently ignore a supplied checkpoint. - Released queued additions check cancellation inside the serialized operation and after reconciliation. Pending additions keep coordinator ownership until cleanup. The controlled slow-reconciliation regression with 35 released queued subscriptions leaves zero subscribers, zero directory watches and zero callbacks after release; a fresh subscription still works. - Supported onward routes advertise `thread_files_watch_v1`. A new three-gateway integration covers negotiation, delivery of a file change and cancellation at the home worker. Rebased onto corrected stages 3–4 and dev `4bb71c80142e0c1d0616502ce428ca2bf19d8cad`, preserving merged thread scroll memory and default tool-group folding. Current-head install, gen:check, full typecheck, lint, format:check, production web build and iOS/Android exports passed with `nice`. Both nightly native fingerprints match dev. Current-head CI is green, including all four test shards. Serial integration files all passed with clean private temp directories: root checkpoint (2 tests / 30 assertions, both with and without a reopened watch) and queued cancellation (1 / 10) locally; three-gateway onward watch (1 / 5) and existing watches (6 / 43) on the otherwise idle review machine. The old draft cannot write or delete identical-byte replacement files; explicit discard/reload permits the new checkout. Thirty-five released queued subscriptions leave no subscribers, watches or callbacks. Interrupted local full-suite attempts are not counted as passes. Before the last dev rebase, a detached full run continued beyond the tool timeout but failed existing computer-move reachability/discovery cases under load and was stopped with a clean private temp directory. The maintainer authorized green CI on every layer plus serial corrective/stack files as the fallback; #648 records the final evidence. **Device check pending** remains in effect. The final stack head received a fresh production-browser review in both themes at 1440/820/390 px; prior performance observations below remain historical. This PR stays a draft in stack #643. Current initial thread JS is 770,777 gzip bytes versus dev 756,367: cumulative +14.07 KiB, within the 15 KiB budget. Copy audit for this correction: “reopen the file” → “reload the file” names the explicit recovery action for a root conflict; an unsupported checkpoint asks the user to update the computer and reload before changing the file. Existing conflict copy is reused for rejected mutations. No new labels, layout, glossary terms or humorous copy. ## Earlier implementation verification (historical) - Passed with `nice`: install, generation check, full typecheck, lint, formatting check, production web build and full `check:tmp` (nothing left in the private temp directory). CI is green. - New gateway/worker integration: 6 passed, 0 failed. Real local and linked-home streams cover owner isolation, traversal/symlink refusal, scope and envelope limits, replay, last-subscriber cancellation, burst recovery and dirty/hash conflicts without mutation replay. - Mobile typecheck and iOS/Android exports passed. Native fingerprints match the baseline with the nightly identity: iOS `6ddec9ef559ee0095ac33e94ff9418a942053b17`, Android `5f6eae3ab278f1cd543e9ed763f923a319b65ec9`. - **Device check pending**: Device support is unavailable. The maintainer authorized continuing with typecheck, exports and unchanged fingerprints. Consolidated iOS/Android device review remains required before the stack is merged; device CPU/FPS/IME and background results are not claimed. - Initial thread JS is 768,856 bytes gzip, cumulative +14,105 bytes / 13.77 KiB versus the dev baseline (15 KiB budget). File UI and watch adapters load on demand. On the isolated review machine, 30 opens of 100 KiB: plain text p50 48.7 ms / p95 52.1 ms; stable view p95 65.7 ms. 100 warm switches: p50 32.2 ms / p95 33.2 ms. Restarting a watch epoch revalidates the active file; these measurements do not claim zero network requests during switches. GC was unavailable, so the retained-heap budget is unverified. - Manual browser review covered light/dark, desktop/narrow/phone widths and long paths. A real worker filesystem watcher refreshed clean content, preserved a dirty draft, exposed both comparison versions, and reloaded the disk version only after discard confirmation. The save button is disabled for a known conflict. - No UI tests added. No full-tree or transcript snapshot recovery, polling of file contents, write replay or automatic overwrite. ## Copy audit — docs/copy.md §8 - Previously stale content → Changed on disk / Removed from disk, with explicit Compare changes, Copy changes and Discard and reload actions. The draft is preserved until confirmation. - Generic save rejection → a typed conflict with an explanation and an action; no hash, cursor, parser or transport jargon in UI errors. - Unavailable live changes → a plain explanation and Reload fallback. Short labels reserve status space and do not depend on color. - Comparison labels name the selected version; all destructive confirmations retain explicit verbs. No humorous copy or inspiration references. Light/dark and desktop/narrow/phone layouts preserve truncation and explicit actions.
nixuuu
added a commit
that referenced
this pull request
Nov 13, 2026
## Final integration rebase including history/fold recovery Rebased all seven layers of stack #643 onto dev `8e78568c7e86c188039743dde6cb879c34de4a6e`, including #671 provider warnings, #673 reconnect/backoff, #670 connector refresh, #674 deterministic steer recovery and #672 empty-work/history recovery. Two thread-page conflicts were resolved in their introducing stages: preserve the conversation/file tab wrapper together with history loading rows/actions, prefetch, fold synchronization/coverage, diagnostics and scroll anchors. Feed, history and fold implementation files retain the merged dev behavior. Earlier generated-descriptor conflicts were resolved through `bun run gen`; proto additions and field numbers are preserved. The independently confirmed five workspace fixes are unchanged. No pending Git or gh-stack rebase operation. Verification scope on the final heads: install, explicit gen, gen:check, full typecheck, lint, format:check, production web build and focused workspace/feed tests at every stage. Commands run detached with `setsid nohup` and `nice`; heavy files run serially through `check:tmp`. Stage 6 integration files: `thread-root-checkpoint.test.ts`, `thread-watch-cancellation.test.ts`, `thread-watch-relay.test.ts`, `thread-watch.test.ts`. Existing feed logic files: `feed-rows.test.ts`, `work-history-gaps.test.ts`. No UI/component test suite added. All seven PRs remain ready as requested. The maintainer merges the complete stack after CI is green on every head; no merge is performed here. Device check remains pending as previously authorized. No product copy change in this integration rebase. Everything below is historical evidence from before this final integration rebase, including earlier draft statuses and export/fingerprint measurements. Workspace now releases read work, live streams and cached bytes when a paired scope or thread access ends. A replaced worktree root preserves the old draft and requires explicit discard/reload. Clean content is bounded to four warm files on web and two on mobile, in addition to byte budgets; inactive files receive invalidation markers without background reads. This also forwards file-read cancellation through the BFF, fences late responses after cleanup, clears mobile token caches and excludes IME composition from workspace shortcuts. No database migration or native configuration change. Stage 6 of 7 in stack #643, based on stage 5. All implementation PRs remain drafts. The maintainer merges the whole stack at once. Related: #613 ## Pre-merge root-checkpoint correction Rebased onto corrected stages 3–5 and dev `4bb71c80142e0c1d0616502ce428ca2bf19d8cad`, preserving merged thread scroll memory and default tool-group folding. Root identities are checked for every retained document in a thread, including hidden tabs. Resource/access guards retain the new expected-root argument through writes and deletes; explicit discard and reload remain necessary after a root replacement. Current-head install, gen:check, full typecheck, lint, format:check, production web build and iOS/Android exports passed with `nice`. Both nightly native fingerprints match dev. Current-head CI is green, including all four test shards. Serial integration files on the otherwise idle review machine passed with clean private temp directories: root checkpoint (2 tests / 30 assertions), queued cancellation (1 / 10), onward relay (1 / 5), and expanded watch/resource/access coverage (9 / 58). Stages 3 and 5 also passed the three blocker regressions locally on their introducing heads. Current initial thread JS is 771,163 gzip bytes versus dev 756,367: cumulative +14.45 KiB, within the 15 KiB budget. No UI text or web layout changed in this correction. The final stack head received a fresh production-browser review in both themes at 1440/820/390 px, including long names, Files panel/sheet and summary dock/float/sheet. Earlier performance observations below remain historical; **Device check pending** remains in effect. Interrupted local full suites are not counted as passes. Before the last dev rebase, a detached full run continued beyond the tool timeout but failed existing computer-move reachability/discovery cases under load and was stopped with a clean private temp directory. The maintainer authorized green CI on every layer plus serial corrective/stack files as the fallback; #648 records the final evidence. This PR remains a draft in stack #643. ## Earlier implementation verification (historical) - Gateway/worker integration: 9 passed, 0 failed. Real local and linked-home streams cover owner/path safety, bounded replay, paired-scope cleanup, thread access revocation, root replacement and preservation of drafts. - Passed with `nice`: install, generation check, full typecheck, lint, formatting, production web build and iOS/Android exports. Full `check:tmp`: 2,785 passed, 166 skipped, 0 failed; nothing left in the temp directory. - CI is green. The first run had one existing remote thread-sequence recovery assertion returning the previous title after home reconnection. The unchanged test passed in isolation (1 passed, 0 failed, clean temp directory), then the failed CI shard passed on rerun. - Nightly native fingerprints match baseline: iOS `6ddec9ef559ee0095ac33e94ff9418a942053b17`, Android `5f6eae3ab278f1cd543e9ed763f923a319b65ec9`. - Browser review: light/dark, 1440/820/390 px widths, short and long file names, virtual source and line ranges, docked summary, Files panel, floating summary and phone sheet. No added UI suite. - On the isolated review machine: 100 warm switches p50 31.8 ms / p95 32.9 ms and **0 additional Files requests** (including subscriptions). After warmup and 20 edit/discard/close cycles with GC exposed, retained JS heap grew 517,260 bytes / 0.49 MiB (5 MiB budget). - Initial thread JS: 769,295 bytes gzip, cumulative +14,544 bytes / 14.20 KiB against dev (15 KiB budget). This measures the static import closure; editor/grammar loading remains deferred. - These stage-6 measurements do not verify RSS/bitmap memory or native runtime budgets. Final cumulative streaming/navigation pairs, controlled transport probes and the 30-minute file/Undo/offline endurance run are reported in stage 7 (#648), including the browser HTTP/1.1 emulation outlier and remaining measurement gaps; those results do not relabel the stage-6 head as separately measured. - **Device check pending**: Device support is unavailable. The maintainer authorized typecheck, iOS/Android exports and unchanged native fingerprints while continuing the stack. Consolidated device review is still required before merge. - No UI tests, database migrations or native dependency changes. ## Copy audit — docs/copy.md §8 - Stale/inaccessible content → “File access ended. Reopen the thread to check access.” The action matches the cleared scope. - A changed root → an explanation followed by Copy changes / Reload; an old draft never silently becomes a new-root edit. - Existing short labels and conflict confirmations are preserved. IME input is excluded from shortcuts. Responsive/theme review preserves explicit actions and truncation at desktop, narrow and phone widths.
nixuuu
added a commit
that referenced
this pull request
Nov 13, 2026
## Final integration rebase including history/fold recovery Rebased all seven layers of stack #643 onto dev `8e78568c7e86c188039743dde6cb879c34de4a6e`, including #671 provider warnings, #673 reconnect/backoff, #670 connector refresh, #674 deterministic steer recovery and #672 empty-work/history recovery. Two thread-page conflicts were resolved in their introducing stages: preserve the conversation/file tab wrapper together with history loading rows/actions, prefetch, fold synchronization/coverage, diagnostics and scroll anchors. Feed, history and fold implementation files retain the merged dev behavior. Earlier generated-descriptor conflicts were resolved through `bun run gen`; proto additions and field numbers are preserved. The independently confirmed five workspace fixes are unchanged. No pending Git or gh-stack rebase operation. Verification scope on the final heads: install, explicit gen, gen:check, full typecheck, lint, format:check, production web build and focused workspace/feed tests at every stage. Commands run detached with `setsid nohup` and `nice`; heavy files run serially through `check:tmp`. Stage 7 integration files: `thread-directory-race.test.ts`, `thread-directory.test.ts`, `thread-file-previews.test.ts`, `thread-highlight.test.ts`, `computer-relay.test.ts`, `thread-root-checkpoint.test.ts`, `thread-watch-cancellation.test.ts`, `thread-watch-relay.test.ts`, `thread-watch.test.ts`, `thread-scroll.test.ts`, `thread-watch-failures.test.ts`, `thread-live-updates.test.ts`, `connector-sessions.test.ts`, `connector-session-errors.test.ts`, `codex-provider-warnings.test.ts`, `prompt-after-turn-end.test.ts`, `thread-work-window.test.ts`. Existing feed logic files: `feed-rows.test.ts`, `work-history-gaps.test.ts`, `feed-prefix.test.ts`, `work-fold-state.test.ts`, `work-tool-groups.test.ts`, `steer-folds.test.ts`, `notice-folds.test.ts`. No UI/component test suite added. All seven PRs remain ready as requested. The maintainer merges the complete stack after CI is green on every head; no merge is performed here. Device check remains pending as previously authorized. No product copy change in this integration rebase. Everything below is historical evidence from before this final integration rebase, including earlier draft statuses and export/fingerprint measurements. Thread file links now use the workspace in every transcript. A link outside the current workspace opens the correct thread and selects its file tab. The old web modal, mobile file screen and their separate mutation state are removed; attachment, blob and bot viewers keep their existing flows. The web editor now has one highlighting path, using off-main-thread tokens. Architecture and client documentation describe the completed workspace, module surfaces and scoped file lifecycle. No database migration, protocol change or native configuration change. Stage 7 of 7 in stack #643, based on stage 6. All seven implementation PRs stay drafts. The maintainer merges the whole stack at once after verification, including the deferred device check. Related: #613 ## Pre-merge corrective rebase Rebased all seven draft layers onto dev `4bb71c80142e0c1d0616502ce428ca2bf19d8cad`, preserving the merged thread scroll memory and default tool-group folding. The stack includes directory-handle confinement in stage 3, mobile source scroll restoration in stage 4, document root checkpoints/mutation fences plus queued-watch cancellation and onward capability in stage 5, and retained hidden-document root checks in stage 6. No manual feed/work-fold edits. Current-head install, gen:check, full typecheck, lint, format:check, production web build and iOS/Android exports passed with `nice` at every stage after the final rebase. Both nightly native fingerprints match dev at all seven layers. Current-head CI is green on all seven PRs, including all four test shards for each layer. On the final head, all 9 changed integration files passed serially **locally after the static checks and exports finished**: **53 tests, 10,694 assertions, 0 failures**. The merged thread-scroll integration also passed (3 tests / 23 assertions), making **56 tests / 10,717 assertions across 10 files**, with every private temp directory clean. The same ten files also passed serially on the otherwise idle review machine. Introducing-stage regressions passed separately in stages 3–6: directory ABA/refusal and bounded listing locally in stage 3; highlighting locally and previews/relay on the review machine in stage 4; retained root/cancellation locally and onward watch/existing watches on the review machine in stage 5; root/cancellation/onward/resource/access files on the review machine in stage 6. Every test invocation used `nice` and ran one file at a time. The controlled ancestor swap returns only the original inside filename and size; a substituted ancestor before handle acquisition is refused. Identical-byte checkout replacement rejects the retained draft and direct stale write/delete, with and without reopening the watch; explicit discard/reload permits the new checkout. Thirty-five released queued additions leave no subscriptions, native watches or callbacks; a fresh subscription works. A real three-gateway route negotiates the watch feature, delivers a change and releases the home worker watch. There is **no claimed full local-suite pass** for this corrective rebase. Earlier local full attempts were interrupted by SIGTERM. Before the last dev rebase, a detached `setsid nohup` / `nice` attempt ran beyond the tool timeout but failed existing computer-move reachability/discovery cases under load; its owned process group was then stopped with SIGINT (exit 130, private temp directory clean). One earlier computer-move owner-discovery failure passed in isolation (1 test / 30 assertions). A first stage-4 preview run on the loaded host also failed after its 100 ms computer-link heartbeat expired; the same head passed all 12 previews on the idle review machine. These failures and interrupted runs are not counted as passes. The maintainer authorized green CI on all seven PRs plus serial corrective/stack files as the fallback. Current initial thread JS is 766,417 gzip bytes versus dev 756,367: cumulative **+10,050 bytes / 9.81 KiB**, within the 15 KiB budget. The new stage-6 maximum is +14.45 KiB, also within budget; editor and grammar imports remain deferred. Other detailed timing/endurance measurements below are historical and are not relabelled as measurements on this head. Fresh production-browser review of this final head on the separate review machine covered light/dark at 1440/820/390 px, short/long names, docked summary with no module, Files with summary closed, floating summary and Escape, narrow/phone summary and Files sheets, and the phone tab-switcher sheet. Switching away/back restored the saved web-file offset (1200 px); `sample.ts:31-40` scrolled to and highlighted the range. No horizontal document overflow was found at narrow/phone widths. The owned browser tab, servers, container, tunnel, runtime directory and review checkout were removed afterward. Native macOS/Windows directory-handle execution remains unverified. **Device check pending**, including native mobile scroll restoration on switching away/back; typecheck, exports and web review do not establish that runtime result. All seven PRs stay drafts for the maintainer's independent re-check of stack #643; none was marked ready or merged. ## Earlier implementation verification (historical) - Passed with `nice`: install, generation check, full typecheck (Svelte: 0 errors/warnings), lint, formatting check and production web build. Full `check:tmp`: 2,785 passed, 166 skipped, 0 failed; nothing left in the private temp directory. - iOS/Android exports passed. Nightly native fingerprints match the baseline: iOS `6ddec9ef559ee0095ac33e94ff9418a942053b17`, Android `5f6eae3ab278f1cd543e9ed763f923a319b65ec9`. - Initial thread JS: 764,558 bytes gzip versus dev 754,751: +9,807 bytes / 9.58 KiB (15 KiB budget). Removing the old modal reduces stage 6 by 4,737 bytes gzip. Editor and grammar code remain deferred. - Production browser reviewed in light/dark at 1440/820/390 px, with short and long names, Files in a panel/sheet, line/range source, summary placement, editing, Undo and keyboard save. File views are tabs; no legacy thread-file modal host remains. - On the isolated review machine, 30 opens of 100 KiB: plain text p50 48.6 ms / p95 65.2 ms; stable view p95 81.9 ms. 100 warm switches: p50 31.9 ms / p95 32.4 ms, **0 additional Files requests**. After warmup and 20 edit/discard/close cycles with explicit GC, retained JS heap grew 421,077 bytes / 0.40 MiB (5 MiB budget). - Three alternating 2-minute renderer pairs, 1000 turns / 2800 messages per run: baseline/current handler p95 0.4/0.4, 0.4/0.4 and 0.5/0.5 ms. Pairs 2/3 renderer task busy: 12.99/12.57% and 12.62/12.76%; layout 5.27/5.05 and 5.15/5.13 ms/s. Long-task totals for those pairs: 3752/3704 and 3723/3724 ms. The first baseline trace is partial and is not used for a full-duration CPU comparison. - Production endurance: 30 minutes / 648 open-edit-Undo-close cycles, including 22 offline/reconnect draft checks, completed without an error. Task busy 9.08%, layout 4.93 ms/s, 43 long tasks / 2939 ms total. rAF gap p95 16.8 ms; 100 gaps above 34 ms across 107,732 callbacks (0.093%). This is a scheduler proxy, **not compositor lost frames**. Final heap after GC: 69,592,520 bytes / 66.37 MiB; the separate warmed 20-cycle retained-heap result above is the budget check. Both runs used a visible 1440×900 Chromium page with reduced motion disabled. - File 100 KiB under browser transport emulation (100 ms, 10 Mbit/s), 30 opens over a private HTTP/2 proxy: plain p50 248.6 ms / p95 265.5 ms, stable p95 282.3 ms. A separate HTTP/1.1 proxy applies 100 ms response delay and a shared 1.25 MB/s response budget outside the browser: 30 opens, plain p50 265.0 ms / p95 265.6 ms, stable p95 282.3 ms, maximum 565.6 ms. Both controlled proxy runs meet the 800 ms goal; neither proves physical linked-home WAN latency. - Diagnostic limitation retained: browser-wide HTTP/1.1 emulation over the same BFF had plain p95 4181.1 ms, with about 3.9 s spent before request dispatch in slow samples. That result differs from the independently paced HTTP/1.1 run above and is not silently discarded or presented as a confirmed application fix. No speculative SSE code change was made: a focused real-gateway/worker cancellation probe passed. - Directory reload, 30 samples: local p95 33.7 ms, browser-shaped HTTP/1.1 p95 133.7 ms. A 10,000-child directory kept 45 tree items in DOM. These are reload/virtualization measurements, not cold module-import times. Editor input on 100 KiB, 30 inputs with Undo: p50 27.6 ms / p95 35.0 ms to the second frame (including automation round trips). - Three alternating production SPA navigation pairs, 30 measured openings per member after warmup: baseline/current p95 108.5/107.8, 109.7/109.7 and 113.6/106.9 ms; p50 67.2/71.1, 86.7/78.3 and 79.0/72.5 ms. These measure thread articles/composer readiness to the next frame, not browser TTI or cold startup. An earlier 20-sample probe had p95 96.6/106.8 ms and exceeded the tolerance; the larger alternating runs are reported alongside it rather than suppressing that sample. - Measurements used headless Chromium with software rendering. Actual compositor lost frames, isolated application RSS, bitmap memory and native process/JS profiling remain unmeasured. Browser/proxy transport shaping is a controlled surrogate, not a measurement of a physical linked computer's WAN route. Native results are not claimed. - **Device check pending**: Device support is unavailable. The maintainer authorized typecheck, exports and unchanged fingerprints while continuing. Consolidated device review remains required before merge; mobile runtime performance is unverified. - No UI tests added. Existing gateway/worker integration covers scope, paths, bounded listing, watch lifecycle and conflicts. ## Copy audit — docs/copy.md §8 - No new UI labels or errors. Existing workspace actions replace the old modal actions. - File names remain selectable and paths keep their explicit line/range meaning. Attachment copy is unchanged. - No new glossary terms, humorous copy or inspiration references. Short and long paths retain truncation and explicit actions in both themes at desktop, narrow and phone widths; native device review is pending.
nixuuu
added a commit
that referenced
this pull request
Nov 13, 2026
Dodaje „Edit from here”: cofnięcie rozmowy przed własną wiadomością w tym samym wątku Canopy. Oryginalne tury pozostają jako superseded; trwałe zdarzenie i upserty synchronizują urządzenia oraz lustra przyrostowo po seq. Undo przywraca poprzednią sesję przed kolejną turą. Cofnięte wiadomości nie wracają do modelu, również przy generowaniu tytułu. Projekt i źródła przypiętych harnessów: `docs/threads.md`, sekcja „Edit from here”. Claude SDK 0.3.316 tworzy prefiks sesji i opcjonalnie przywraca checkpointy plików. Codex 0.164.0 tworzy prefiks przez `thread/fork`; przypięty `thread/revert` nie zapewnia odwracalności. Grok CLI 1.0.70 nie ma zweryfikowanego kontraktu ACP rewind i zwraca jawną odmowę. Rozmowa nie cofa plików bez wyboru użytkownika. Odtwarzanie załączników zachowuje metadane wideo. Gateway egzekwuje właściciela, blokadę przyjęcia pracy i granice celów/harmonogramów, również przy Undo. Wątki botów, automatyczne i odziedziczone punkty są wyłączone; aktywne dzieci trzeba zatrzymać. Stop and edit zatrzymuje turę i zadania w tle oraz anuluje kolejkę, steery i interakcje. Zamiar rewindu pozostaje dostarczalny do ACK również po TTL outboxu. Starszy worker dostaje polecenie aktualizacji przez addytywną capability, bez zmiany WORKER_LINK_PROTOCOL. Poprawka P1 znajduje się w tej warstwie: rewind unieważnia generację startów i czeka także na StartTurn przygotowywany przed turn_started. Claude sprawdza anulowanie przed utworzeniem procesu i przekazaniem wejścia; Codex sprawdza aktualność sesji po asynchronicznym wyborze ustawień. Testy zatrzymują admission przy uzyskiwaniu runtime, przygotowaniu Claude i ustawieniach Codex. Oryginalna sesja nie otrzymuje anulowanej ani edytowanej wiadomości. Cały stos przebazowany przez gh stack na dev `dcd13faaa`, obejmujący workspace #640–#648 i filtrowanie pustych segmentów z #672. Zachowane provider warnings i interrupt z #671, odświeżanie konektorów z #670, odzyskiwanie live updates z #673 i poprawka testu steera #674. Konflikty wygenerowanych kontraktów rozwiązane przez bun run gen z połączonych addytywnych proto; RPC workspace i rewind pozostają dostępne. Parametry sesji Codex zachowują MCP przy start/resume/fork, a kontrola generacji Claude działa po odświeżeniu konektorów. Fixture Codex obsługuje katalog MCP; testy admission używają agent bus. Migracja pozostaje 0136 po najwyższej 0135 na dev. Brak pozostałego stanu rebase. Walidacja na dev dcd13fa: bun install, gen:check, pełny typecheck, lint i format:check przeszły z nice. Sprawdzenia odłączone od sesji terminala; ciężkie testy kolejno po jednym pliku. Wynik: 38 pass, 0 fail w 5 plikach — work-history-gaps, thread-rewind, thread-rewind-mirrors, thread-file-previews i thread-root-checkpoint; katalogi tymczasowe czyste. Pierwszy typecheck wymagał bun install dla nowego pakietu workspace @canopy/syntax; ponowiony pełny przebieg przeszedł. Wcześniejsze live: Codex 9 asercji, Claude 13 asercji, w tym przywrócenie pliku i brak cofniętych wiadomości w kontekście. Bieżący rebase nie powtarza pełnego check:tmp ani testów live. Copy audit §8: brak akcji → „Edit from here” (cel edycji); brak checkpointu → „Files stay as they are.” (jawny skutek); stary worker → „Update this thread's worker to use Edit from here.” (przyczyna i następny krok). Angielski sentence case, bez nowych synonimów i bez polegania wyłącznie na ikonie. Warstwa 1/3 stosu #662: #655 → #656 → #661. Ready; maintainer scala cały stos atomowo.
nixuuu
added a commit
that referenced
this pull request
Nov 13, 2026
Dodaje „Edit from here” w akcjach własnej wysłanej wiadomości: kompaktowe potwierdzenie, zatrzymanie aktywnej pracy i wybór cofnięcia rozmowy lub rozmowy z checkpointowanymi plikami. Tekst, cytaty, wzmianki i załączniki wracają do composera. Poprzedni szkic pozostaje w pamięci karty i można go odzyskać przez Swap drafts. Cofnięte tury i ich późne zdarzenia są schowane pod „N messages rewound · Show”. Undo działa przed kolejną turą; Edit message odzyskuje trwały szkic po ponownym otwarciu. Niepewna odpowiedź sieciowa zachowuje klucz idempotencji i pozwala sprawdzić wynik. Gateway egzekwuje uprawnienia i granice automatyzacji. Poprawka P2 znajduje się w tej warstwie: Swap drafts jest nieaktywne podczas wysyłania, uploadu, błędu załącznika i rewindu. Handler sprawdza tę samą blokadę, zgodnie z mobile. Odpowiedź wysłania B nie może wyczyścić podmienionego szkicu A. Wcześniejszy przegląd w prawdziwej przeglądarce z wstrzymaną odpowiedzią potwierdził blokadę i odzyskanie A z załącznikiem. Rebase całego stosu przez gh stack na dev `dcd13faaa` zachowuje karty workspace, pliki, moduły i panele z #640–#648. Rozmowa i composer pozostają zamontowane w swoim panelu przy przełączaniu kart; blokada rewindu działa w nowym położeniu composera. Zachowane filtrowanie pustych segmentów, kontrolki brakującej historii, prefetch i kotwiczenie feedu z #672 oraz Edit from here. Obie ścieżki feedu dostają granice brakującej pracy i diagnostykę. Wiersze work-gap cofniętej tury chowają się razem z nią; Show pozwala pobrać brakujące itemy. Regresja sprawdza ukrycie, Show, prefetch i te same segmenty po stronicowaniu. Zachowane #670, #671, #673 i #674. Migracja nadal 0136 po najwyższej 0135 na dev. Brak pozostałego stanu rebase. Walidacja na dev dcd13fa: bun install, gen:check, pełny typecheck (Svelte: 0 błędów i ostrzeżeń), lint i format:check przeszły z nice. Wynik testów: 38 pass, 0 fail w 5 plikach — work-history-gaps, thread-rewind, thread-rewind-mirrors, thread-file-previews i thread-root-checkpoint. Sprawdzenia odłączone od sesji terminala, testy kolejno przez check:tmp; katalogi tymczasowe czyste. Typecheck przeszedł po instalacji nowego pakietu workspace @canopy/syntax. Regresja #672 rozszerza istniejący test projekcji danych, bez testów komponentów i przeglądarki. Wcześniej przeszedł web build; obecny rebase nie deklaruje nowego pełnego przebiegu ani buildu. Wcześniejszy przegląd przeglądarkowy: jasny i ciemny motyw, desktop 1280×800 i telefon 390×844; potwierdzenie, oba warianty plików, długie ścieżki, odtwarzanie i zachowanie szkiców, Show/Hide, Undo i wysłanie edytowanej wiadomości w tym samym wątku. Bez poziomego przewijania. Przegląd z testowym workerem; prawdziwe harnessy i checkpointy sprawdzono w backendzie. Środowisko przeglądu usunięte. Copy audit §8: „Edit from here” (cel), „Stop and edit” (zatrzymanie), „Conversation only” / „Conversation and files” (zakres), „Your previous draft is saved.” + „Swap drafts” (odzyskanie). Potwierdzenie ma formę pytania; tooltip i przycisk zachowują nazwę akcji. „will stop” → „stop”, „will be cancelled” → „Canopy cancels”: czas teraźniejszy i aktywny głos. Angielski sentence case, krótkie zdania, błędy z następnym krokiem, techniczne szczegóły za Show details. Układ sprawdzony z długimi nazwami plików. Warstwa 2/3 stosu #662: #655 → #656 → #661. Ready; maintainer scala cały stos atomowo.
nixuuu
added a commit
that referenced
this pull request
Nov 14, 2026
Repeated mirror commits published unchanged computer presence, invalidating `GetComputers` and `ListWorkerRecords` in both desktop/web and mobile shared caches. Compare computer content excluding `lastSeenMs`; meaningful presence, name and sharing changes still invalidate. Remove the configuration-notice timer and send invalidation through the existing owner feed when the configuration clock or open notices change (including dismissal and expiry). Paired measurement on dev 7137e9a vs this branch: two real linked desktop gateways, desktop SSE, mobile Connect client simulation, 12 idle threads per gateway, diagnostics enabled, 5 s warmup then 30 s. The opt-in `gateway-chatter.test.ts` emits the same RPC starts / database-query counters as Diagnostics. No rendering or device performance is inferred. | Counter, 30 s | Before | After | | --- | ---: | ---: | | GetComputers, gateway A | 12 | 0 | | Database queries, A | 2,910 | 2,748 | | Database queries, B | 2,623 | 2,641 | | WatchThread new openings during window | 0 | 0 | | AckThreadRange, each gateway | 6 | 6 | The after column was refreshed on the route-corrected head with the same harness. GetComputers remains at zero new idle calls; the scoped route lookup is included in the SQL totals. The earlier composed seven-PR workload recorded 826/765 SQL queries per 30 s versus 2910/2623 on the baseline. That result predates the independent review corrections and is historical, not a measurement of the final combined heads. Use the refreshed independent measurements in this PR and #678 for the corrected implementations. Collection-only control is recorded in #679. These are idle local multi-client measurements, not extrapolations of the production window. Update timeout investigation: `LocalAppControl.check()` coalesces checks and resolves normally after a 30 s soft wait if the desktop has not acknowledged a newer check timestamp; it does not wait for an installation. Linked requests use a separate 120 s check deadline and 15 min installation deadline. No confirmed hang was reproduced, so no speculative update patch is included. An actual deadline failure in the reported three requests cannot be distinguished from the soft wait using durations alone. #669 adds no GetComputers polling. Diagnostics itself remained enabled in both runs. Its dropped-detail counters are still nonzero and are a separate issue; query totals are exact in this workload. Setup/teardown is excluded. Reproduce with `CANOPY_CHATTER_BENCH=1 bun run check:tmp tests/integration/gateway-chatter.test.ts`. Validation: bun install; gen:check; full typecheck; lint; format:check; web build; shared-query-events tests; gateway overview-feed integration tests (configuration revisions, resolved notices, owner isolation and idle streams); paired workload through check:tmp with cleanup. All commands used nice. The full local check:tmp suite was not run because concurrent unrelated heavy suites already load the host; CI must cover the full suite. Native mobile checks remain blocked by the reported device-host error; no native/mobile source or fingerprint changes. WatchThread verification of Related: #673: extended the existing real-transport progress/drop regression to the mobile Connect client. Both transports retain 1/2/4 s backoff across partial progress and stop after resume/resume/stop. The focused thread-watch-failures suite passes 14 tests / 90 assertions, including premature clean EOF, oversized frames and cursor repair. Normal desktop SSE and mobile foreground streams stayed open through the 30 s idle workload (zero new openings). No additional gateway close/GOAWAY defect was reproduced. The benchmark now exposes collector allocation, all global SQL-family counters and optional trace counts (`CANOPY_CHATTER_TRACE=1`). Composed validation before review corrections: linked update integration passed 13 tests / 112 assertions with clean check:tmp; typecheck, lint, format:check, gen:check and web build passed with all seven fixes applied. iOS and Android exports passed and native fingerprints remained unchanged; device-host verification remains unavailable. Independent review correction: computer overview events now include the current owner-scoped route list, matching GetComputers snapshots. Manual add/remove, authenticated route announcements and LAN discovery therefore remain visible to the content comparison. A real linked-gateway regression verifies cached routes refresh through overview on manual add and remove without a name or presence change. It fails against the old empty-route serialization and passes after the correction (7 assertions, clean check:tmp). Shared-query events pass 8 tests / 25 assertions; gateway typecheck and focused lint/format pass. The optional resolved-notice double read is unchanged.
nixuuu
added a commit
that referenced
this pull request
Nov 14, 2026
When a connector notice arrives before the provider echoes a message, the web/desktop feed replaces the turn-input placeholder at the echo's later sequence position. Its entire work fold can then appear above the user's message, including messages with attachments. Place the echoed input immediately after its turn's start, before its work. Keep the echo's item identity and the sequence positions of steers, background work and notices. The same derivation repairs existing saved histories after reload. Inputs containing only attachments or quotes also retain their placeholder while their echo is unavailable. Gateway inspection confirmed that admission already persists the input and binds attachments atomically before dispatch; the draft path uses that same admission. Event `seq` correctly records arrival order and remains unchanged. Mobile already renders the persisted turn input before its body and excludes the initial echo from that body. The bug reproduces on current dev, including #673, #687, #689, #690 and the merged drafts stack. #670 introduced the connector acknowledgement before Codex `turn/start`, exposing the timeline's assumption that the input echo was the first element. #672 retained that assumption. Fixes: #670 Validation: - Added PostgreSQL/gRPC gateway regression: upload a PNG and Markdown file, send the message, publish an early connector notice and commentary, then publish the input echo. The test failed on the original dev feed (input row 3, work row 1). - Covers echoes with and without client IDs, placeholder replacement, open/closed work folds, steer chronology, completion, a fresh sequenced history subscription, and the mobile turn/body derivation. Both new cases and 27 existing feed checks pass under `check:tmp`; nothing remains in the test temp directory. - `nice` install, `gen:check`, typecheck, lint, `format:check` and web build pass with temp files under `/var/tmp`. Full suite left to CI because the shared 12-CPU host reached load 12.41 during verification. - No browser/device visual run; the change affects timeline derivation, with no component, styling or UI-copy changes. Copy audit: no changed UI text.
nixuuu
added a commit
that referenced
this pull request
Nov 14, 2026
Remote prompts and even a desktop send could disappear from the desktop timeline while the overview kept updating. Three short native EventSource transport failures consumed the thread repair budget introduced in #673 and permanently stopped that watch; later online/focus events could not reopen it. Transport loss now stays in the existing connection backoff (capped at 30 seconds), without exhausting the projection repair budget. Scoped gateway errors, invalid batches and premature stream completion retain their bounded repairs. Mobile applies the same distinction. The visible thread is always included in overview head selection. Desktop and mobile compare that head with the view's own applied cursor, independently of the warmer's cache. After 10 seconds without progress, they resume incrementally from that cursor, preserving loaded history. Repairs are spaced by at least 30 seconds, capped at three per unchanged cursor, and recorded in Timeline recoveries with redacted numeric logs. No full snapshot is requested by this self-check. Validation: - The real gateway + mobile Connect client + desktop SSE/reconnect/feed-state integration reproduces the pre-fix failure at the third transport loss. It covers remote sends, a local send during a drop, retained-view reopening, background warming, and a silent but open SSE connection. All reconnects preserve the cursor and add no snapshots. - 28 focused tests passed, 321 assertions; check:tmp left no test directories. Includes warming, input ordering, scoped failures, recovery limits and the head divergence guard. - bun install, gen:check, full workspace typecheck, lint, format:check and the production web build passed on the updated dev base. Checks used nice and a private temporary directory, removed afterward. - No full-suite run or physical Electron/iOS/Android sleep test. No UI layout or text changes; copy audit §8: no changed copy. Mobile changes are JavaScript only, with no native dependency/configuration or protocol change; no OTA publication, build or release was run. Fixes: #673
This was referenced Nov 16, 2026
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.
Large active threads could keep reconnecting indefinitely: advancing sequence numbers cleared the thread failure budget, and each brief success reset the transport backoff. Mobile also retried a clean premature stream end without counting it as a watch failure. Both clients now preserve increasing backoff until 10 seconds of stable live updates, and stop repeated scoped failures with an actionable reason.
Sequence gaps now replay from the last atomic checkpoint instead of discarding it as a decoding failure. Oversized batches remain atomic and get a distinct size reason. Expected offline-watch completion when a linked home returns preserves the computer availability category and does not consume the thread failure budget. Details, SSE and linked-computer RPC preserve allowlisted reasons, RPC codes and frame sizes; redacted diagnostic exports include fixed reason counters. The linked response field is additive and older peers retain code-only behavior.
Evidence and limits
Validation
bun install,bun run gen:check, full typecheck, lint, format check, web build, and both native bundle exports. Fullbun run check:tmp --timeout 30000: 2787 passed, 166 skipped, 0 failed, 35,995 assertions across 520 files; nothing left in the checked temp directory. The initial 5-second run hit promotion/attachment timeouts on the loaded host and was stopped cleanly; those tests passed with the increased timeout.73ce60123f08d480db43bf6294628d02087f3a54, including four test shards, static checks, and web/Linux builds.nice -n 15, and Bun executes heavy test files sequentially.dev: iOS74705db3a68907bc28379bb9b1080a227bc0755b; Android7d38be8f5c9bf842d62060c75820a206f99c87e3. No native configuration or dependencies changed.Copy audit