Repository navigation
feat(workspace): virtualize file views and highlight off thread - #645
Merged
Merged
Conversation
nixuuu
force-pushed
the
feat/workspace-highlighting
branch
4 times, most recently
from
November 13, 2026 20:27
faa463e to
2ec4ea5
Compare
nixuuu
marked this pull request as ready for review
November 13, 2026 20:39
nixuuu
force-pushed
the
feat/workspace-highlighting
branch
2 times, most recently
from
November 13, 2026 22:29
cd93647 to
0544746
Compare
nixuuu
force-pushed
the
feat/workspace-highlighting
branch
from
November 13, 2026 22:41
0544746 to
9275040
Compare
nixuuu
added a commit
that referenced
this pull request
Nov 19, 2026
## Changes - Restore drag selection in the read-only source preview by opting the reader into the app's text selection styles. The regression began when the virtual reader replaced the selectable code view. - Copy the selected source offsets as plain text. This preserves blank lines and avoids inserting newlines between parts of a long source line. The file toolbar still copies all loaded text. - Add a manual regression check to the workspace documentation. ## Verification - On nix-pc, before the fix, dragging across source text in Chromium left the selection empty and Ctrl+C left the clipboard unchanged. The file toolbar, rendered Markdown and editor copied successfully in the same session. - On nix-pc, tested commit `707de5c04ca2e9d429b14f2f58264cc212805da2` in Chromium against the real workspace file view with local fixtures, at 1280 px and 390 px in both themes. Read the clipboard after one- and multi-line drag selections, Ctrl+C, Ctrl+A then Ctrl+C, the selection menu and the file toolbar. Verified that blank lines, indentation and long source lines survive copying, and that line numbers are excluded. Also checked rendered Markdown and the editable file view. Native Windows Electron was not run. - Web typecheck, edited-file formatting and lint, and `git diff --check` passed locally. GitHub Actions runs the repository checks. No user-facing text changed. Fixes: #645
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.
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 throughbun 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 nohupandnice; heavy files run serially throughcheck: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
GetThreadFileHighlightcontract 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 withnice; 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)
nice: install, full typecheck, gen:check, lint, format:check, web production build and a compiled Linux worker binary. Fullcheck:tmp: 2776 passed, 166 skipped, 0 failed, nothing left in the private temp directory. CI is green.6ddec9ef559ee0095ac33e94ff9418a942053b17, Android5f6eae3ab278f1cd543e9ed763f923a319b65ec9.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