You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Restore reading-position tracking for virtualized ChunkedMarkdown previews #264
Upstream #40631 moved rendered workspace Markdown previews into a virtualized LegendList (apps/web/src/components/files/ChunkedMarkdown.tsx). During the 2026-11-23 upstream catch-up, preserving the fork's reading-position tracker via DOM scrolling across unmounted chunks (byText in fileReadingPlace.ts) hit the 3-round review cap with remaining streaming and jitter bugs.
Per standing catch-up conflict policy, the ChunkedMarkdown reading-position binding was dropped from t3-catchup-20261123 so main stays on upstream's ChunkedMarkdown and unfreezes cleanly.
Goal
Rebuild reading-position save and restore for ChunkedMarkdown previews cleanly on main without DOM probing:
Expose ChunkedMarkdown's in-memory { chunks, loading } via a minimal (~3-line) fork hook on apps/web/src/components/files/ChunkedMarkdown.tsx.
Resolve saved positions (including blocks shifted across chunk boundaries after earlier edits) synchronously in memory, gating restore completion on loading === false so >1 MB preview-to-full loads never lock onto a wrong chunk.
Restore full browser test coverage in fileReadingPosition.browser.test.tsx.
Also tracked here (same upstream pingdotgg#40631 progressive-loading change, deferred from the 2026-11-23 catch-up PR to keep fileReadingPlace.ts and fileReadingPosition.ts untouched from fork main):
For large text files (1–64 MB) that stream progressively in source view via LargeFilePreview / useFullFileText:
Saved-line restore past the initial 1 MB preview should re-apply as text arrives until the reader scrolls or edits.
Line-link reveals targeting a line past the 1 MB preview should wait for the download to finish before marking the reveal handled/shown (or clamping to EOF once complete), wired cleanly through the download-completion state rather than guessing from text length inside ReadingTracker.
This issue should also cover text files from 1 MB to 64 MB in the source view.
Upstream pingdotgg#40631 now opens these files in parts. It shows the first megabyte at once, then loads the rest as it downloads. That causes two limits past the first megabyte:
A saved reading place is not restored if the rest of the file arrives after about one second.
A link to a line stops at the end of the text loaded so far, and the fork already counts that link as shown.
The fix should track when the download finishes and whether upstream's line reveal already ran.
Activity
fix(fork): resolve upstream merge 9dc3616 (2026-11-22)
fix(fork): resolve upstream merge 9dc3616 (2026-11-22)
fix(fork): resolve upstream merge 9dc3616 (2026-11-22)
orbitingflea commentedon Nov 23, 2026
Also tracked here (same upstream pingdotgg#40631 progressive-loading change, deferred from the 2026-11-23 catch-up PR to keep
fileReadingPlace.tsandfileReadingPosition.tsuntouched from forkmain):LargeFilePreview/useFullFileText:ReadingTracker.fix(fork): resolve upstream merge 9dc3616 (2026-11-22)
fix(fork): resolve upstream merge 9dc3616 (2026-11-22)
orbitingflea commentedon Nov 23, 2026
This issue should also cover text files from 1 MB to 64 MB in the source view.
Upstream pingdotgg#40631 now opens these files in parts. It shows the first megabyte at once, then loads the rest as it downloads. That causes two limits past the first megabyte:
The fix should track when the download finishes and whether upstream's line reveal already ran.
fix(fork): resolve upstream merge 9dc3616 (2026-11-22)