Releases: remorses/critique
critique@0.1.129
- Deterministic alphabetical file ordering — directory tree nodes are now sorted alphabetically at every level. Diff sections follow this tree order instead of inheriting the incoming git diff section order. Fixes repos where submodule diffs were grouped at the end and appeared out of tree order.
critique@0.1.127
-
Directory tree index in web previews — shared
critique --webpages now render the same file tree shown in the TUI at the top of the page, with each file row linking directly to its diff section:critique --web "My changes" # → opens a page with a clickable tree index at the top
Clicking a file in the tree jumps straight to that file's diff — useful for large PRs with many files.
-
Fixed
.patchURL routing —GET /v/:id.patchnow works reliably. Previously the Hono route param could conflict and fail to route.patchrequests correctly.
critique@0.1.123
-
Raw patch access via
.patchURL — every diff uploaded withcritique --webis now also available as a raw unified diff by appending.patchto the URL:# View the raw patch curl https://critique.work/v/<id>.patch # Apply the changes directly curl -s https://critique.work/v/<id>.patch | git apply # Undo the changes curl -s https://critique.work/v/<id>.patch | git apply --reverse
Useful for agents and scripts that need to programmatically consume or apply diffs — share the HTML link for humans, use the
.patchURL for machines.
critique@0.1.122
-
Deterministic syntax highlighting detection —
--webno longer polls for tree-sitter completion with arbitrary timeouts. UsesDiffRenderable.isHighlightingto detect exactly when highlighting finishes, then waits for one render stabilization pass. Exits the instant tree-sitter is done instead of always waiting a fixed 500ms. -
Fixed accidental clipboard copy during text drag — selecting text in the TUI no longer copies to clipboard mid-drag. Clipboard copy only fires on mouse-up after the selection is complete.
-
Clipboard OSC52 fallback uses renderer API — the OSC52 clipboard escape sequence (used over SSH) now goes through
renderer.copyToClipboardOSC52()instead of writing directly to stdout, which is more reliable with the rendering pipeline. -
Updated @opentuah/core and @opentuah/react to 0.1.97
critique@0.1.121
-
--webis now ~2x faster — URL prints in ~1.1s instead of ~3.1sDesktop, mobile, and OG image now render in parallel. URL is returned as soon as HTML uploads; OG image uploads in the background so social previews appear seconds later without delaying the link.
-
More syntax highlighting aliases — more extensions get proper highlighting:
.jsonc,.json5→ JSON.mkd,.mkdn,.mdown,.markdown→ Markdown.scss,.less→ CSS.xhtml,.xml,.svg→ HTML.hh,.tpp,.ipp,.inl→ C++.ksh→ Bash
-
Click filename in web preview to copy path — clicking a file header in
critique --webpages copies the filename to clipboard and updates the URL hash for deep linking. Cursor changes tocopyto hint at the behavior. -
--commitaccepts range syntax —critique --commit HEAD~2..HEADandHEAD~2...HEADnow work correctly:critique --commit HEAD~2..HEAD critique --commit main..feature-branch
-
Fixed iOS Safari pinch-to-zoom widget drift — the annotation widget on critique.work pages no longer drifts when pinching to zoom. Uses
visualViewportAPI to keep it anchored to the bottom-right corner.
critique@0.1.119
-
Real-time annotations on shared diff pages — collaborators can now leave comments and annotations directly on
critique.workdiff pages via the--webcommand -
Annotation widget auto-loads — the annotation UI loads automatically on web previews with real-time SSE updates as teammates add or resolve annotations
-
Fixed mobile web preview — mobile redirect now preserves scroll position and the annotation overlay renders correctly on small screens
critique@0.1.118
0.1.118
- Syntax highlighting (
critique,critique --web,critique review):- Replace the non-existent remote Prisma WASM URL with a vendored parser binary at
src/parsers/tree-sitter-prisma.wasm - Load Prisma parser from local absolute path so Prisma highlighting works without relying on external hosting
- Replace the non-existent remote Prisma WASM URL with a vendored parser binary at
0.1.117
- Syntax highlighting (
critique,critique --web,critique review):- Detect
.prismafiles asprismafiletype in diff syntax highlighting - Register Prisma parser configuration with Tree-sitter highlights query source
- Detect
critique@0.1.116
Web preview anchor links — more robust position detection
--web: Anchor IDs for file sections are now resolved from opentui layout coordinates instead of regex-scanning the rendered frame text- Previously scanned frame lines for a
filename +N-Npattern — fragile against code lines that happened to mimic that pattern - Each file section container now gets a React ref; after render stabilization
getComputedLayout().topgives the exact row for that section buildAnchorMapaccepts{ lineIndex, fileName }[]positions directly — simpler API, no false positives, no basename-fallback heuristic needed- Removed now-unnecessary imports (
getFileName,processFiles,parseGitDiffFiles,stripSubmoduleHeaders) fromweb-utils
- Previously scanned frame lines for a
- Tests:
- Simplified
buildAnchorMapunit tests to use the new direct-input API - Dropped tests for the removed regex heuristics
- Added edge-case coverage: empty input, negative/NaN indexes, duplicate line indexes, slugify-empty filenames
- Fixed
mockSpanhelper to useRGBA.fromValuesand include the requiredwidthfield
- Simplified
critique@0.1.109
What's new
Syntax highlighting
- Generalized delimiter balancing to fix tree-sitter misparsing when a diff hunk starts mid-string
- Python: balance
"""and'''triple-quoted strings / docstrings - Go: balance
`raw string literals - Scala, Swift, Julia: balance
"""triple-quoted strings - TypeScript/JS backtick template literals (existing, now part of a unified system)
- Python: balance
Bug fixes
--filter: paths containing$characters (e.g.d.$owner.$repo.tsx) now work correctly — switched to single quotes in shell commands to prevent variable expansion--stdin(lazygit pager): strip ANSI escape codes from colored diffs before parsing so filenames are no longer mangled — thanks @skoch13 for the lazygit README fix that surfaced this
Internal
- Replaced
balance-backticks.tswith a genericbalance-delimiters.tssupporting any multi-char delimiter - 42+ new tests covering all supported languages and edge cases
critique@0.1.106
New Features
PDF Export
- Generate PDF documents from diff and review commands with
--pdfflag critique HEAD~3 --pdfwrites to /tmp/critique-diff-*.pdfcritique HEAD~3 --pdf output.pdfwrites to specific pathcritique review --pdfgenerates PDF after AI review completes--openflag to launch PDF in default viewer after generation
PDF Rendering
- New
opentui-pdf.tsmodule converts CapturedFrame to multi-page PDF using pdfkit - Smart page breaking at natural section boundaries (empty line sequences)
- Auto-fits font size to frame width so content never clips horizontally
- Uses JetBrains Mono Nerd font (ships pre-converted .ttf, 2.4MB)
- Handles all text attributes: bold, italic, dim, underline, strikethrough
- Correct positioning of CJK/emoji/wide characters using span.width
- Default page size: A4 portrait (595x842 pt)
Improvements
File Organization
- Move parsers-config.ts, global.d.ts, and queries/ into src/ directory for cleaner structure
- Add dist/ to package.json files array (fixes published package missing compiled files)
Dependencies
- Add pdfkit as optional dependency (same as takumi)
- Remove wawoff2 (ship pre-converted .ttf font instead)
- Move resend to devDependencies (only used by Cloudflare Worker)
Review Mode
- Wait for AI generation to complete before exporting PDF
- Default to github-light theme for better print readability (can override with --theme)
Tests
- Suppress React act() warnings in opentui component tests (expected behavior for TUI testing)
- Increase DataPathsManager maxListeners to suppress EventTarget memory leak warning in DiffView tests
Bug Fixes
- Fix CLI version number display
Contributors
Thanks @tobeycodes for the contribution!