Skip to content

Highlight source previews and link commit parents - #168

Merged
carsonfarmer merged 2 commits into
mainfrom
cf/viewer-syntax-parents
Sep 30, 2026
Merged

carsonfarmer merged 2 commits into
mainfrom
cf/viewer-syntax-parents

Conversation

@carsonfarmer

Copy link
Copy Markdown
Owner

Color source previews with Highlight.js and add links to every parent of the displayed commit. Parent links keep branch context and open the parent's repository root without extra storage reads. Unknown file types stay plain text; binary and large-file summaries are unchanged.

Compared ten language families on actual repository files in the Codex browser. Highlight.js needed about 21 KB compressed including its theme; the smallest Shiki build needed 148 KB. Highlighting the viewer's TypeScript took 2.2 ms versus 43.2 ms. These are browser processing measurements, not page-load times. The final client and theme add about 24 KB compressed.

Validation: 26 viewer tests, strict TypeScript/Biome, composed WASI build, make check, and independent review. Local Spin/MinIO checks covered source preservation, plain files, root and merge parent navigation, and unchanged source rendering during Copy URL and loading updates.

Closes #166. Closes #167.

carsonfarmer and others added 2 commits September 29, 2026 21:00
Read parent IDs from the selected commit header while keeping history traversal on the first parent. Cover root, ordinary and merge summaries without additional parent-object reads.

Co-authored-by: Codex <noreply@openai.com>
Use selected Highlight.js grammars and the GitHub theme. Parent links open each parent without extra catalog reads.

Co-authored-by: Codex <noreply@openai.com>
@carsonfarmer
carsonfarmer merged commit addf6be into main Sep 30, 2026
3 checks passed
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.

Link to commit parents from the repository code view Highlight source files in the repository viewer

1 participant