Skip to content

feat(workspace): browse thread files in a bounded tree - #644

Merged
nixuuu merged 4 commits into
feat/workspace-modulesfrom
feat/workspace-file-tree
Nov 13, 2026
Merged

nixuuu merged 4 commits into
feat/workspace-modulesfrom
feat/workspace-file-tree

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

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
nixuuu added this pull request to stack #643 November 13, 2026 14:05
@nixuuu
nixuuu force-pushed the feat/workspace-file-tree branch 4 times, most recently from be505fb to 41e3768 Compare November 13, 2026 20:27
@nixuuu
nixuuu marked this pull request as ready for review November 13, 2026 20:39
@nixuuu
nixuuu force-pushed the feat/workspace-file-tree branch 2 times, most recently from 4bb79e4 to ad60b60 Compare November 13, 2026 22:29
@nixuuu
nixuuu force-pushed the feat/workspace-file-tree branch from ad60b60 to 5bc32c0 Compare November 13, 2026 22:41
@nixuuu
nixuuu merged commit e7b12d7 into dev Nov 13, 2026
10 checks passed
@nixuuu
nixuuu deleted the feat/workspace-file-tree branch November 13, 2026 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant