4 Commits
Author SHA1 Message Date
gaojunran d495771cee fix(ui): raise file open line limit to 20k lines 2026-08-27 12:56:56 +08:00
gaojunran a498d1935d fix(git): don't treat bare HEAD as a branch diff base
git switch -c / git checkout -b from the current branch record
'branch: Created from HEAD' in the reflog, but parseBranchCreationSource
only rejected 'HEAD@{...}' (detached start) and raw commit hashes. The
bare HEAD passed through, so getBranchBase returned { base: 'HEAD' }
and the branch scope computed diffs against HEAD itself, which is empty
when the service is checked out on that branch and wrong otherwise.

Treat bare HEAD like HEAD@{...}: no named source is recorded, so return
null and let the UI ask the user to pick a base.
2026-08-22 11:44:23 +08:00
gaojunran ae1c6de470 feat(ui): virtualize large file preview in FilesView
Files above the editable size cap (MAX_VIEW_CHARS) now render their full
content through pierre's Virtualizer (viewport-only DOM) with highlighting on
the shared Shiki worker pool instead of a 200k-char main-thread-highlighted
slice.

Also fixes a pierre virtualization deadlock: forcing the virtualized host to
viewport height decoupled the IntersectionObserver judgment box from the
scroll content height, so a large scroll jump blanked the file (0 lines).
The large-file host now keeps no fixed height; the observer always sees it
intersecting.

Addresses #2868 (part 1: large-file preview virtualization).
2026-08-22 02:33:28 +08:00
gaojunran 19c5cc1f1e fix(markdown): keep CJK punctuation out of bare-URL autolinks
marked's GFM url tokenizer swallows any non-space text after a bare URL,
including fullwidth punctuation and Chinese annotations written directly
after it ("https://x.com/docs(说明)了解更多"). Switch the autolink
tokenizer to marked-linkify-it, which treats Unicode punctuation as a URL
boundary, so fullwidth parens and CJK punctuation are trimmed naturally.
2026-08-21 13:10:42 +08:00