Skip to content

Releases: remorses/critique

critique@0.1.129

17 Mar 19:37

Choose a tag to compare

  1. 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

15 Mar 16:10

Choose a tag to compare

  1. Directory tree index in web previews — shared critique --web pages 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.

  2. Fixed .patch URL routingGET /v/:id.patch now works reliably. Previously the Hono route param could conflict and fail to route .patch requests correctly.

critique@0.1.123

09 Mar 20:26

Choose a tag to compare

  1. Raw patch access via .patch URL — every diff uploaded with critique --web is now also available as a raw unified diff by appending .patch to 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 .patch URL for machines.

critique@0.1.122

08 Mar 23:05

Choose a tag to compare

  1. Deterministic syntax highlighting detection--web no longer polls for tree-sitter completion with arbitrary timeouts. Uses DiffRenderable.isHighlighting to 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.

  2. 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.

  3. 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.

  4. Updated @opentuah/core and @opentuah/react to 0.1.97

critique@0.1.121

08 Mar 22:16

Choose a tag to compare

  1. --web is now ~2x faster — URL prints in ~1.1s instead of ~3.1s

    Desktop, 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.

  2. 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
  3. Click filename in web preview to copy path — clicking a file header in critique --web pages copies the filename to clipboard and updates the URL hash for deep linking. Cursor changes to copy to hint at the behavior.

  4. --commit accepts range syntaxcritique --commit HEAD~2..HEAD and HEAD~2...HEAD now work correctly:

    critique --commit HEAD~2..HEAD
    critique --commit main..feature-branch
  5. Fixed iOS Safari pinch-to-zoom widget drift — the annotation widget on critique.work pages no longer drifts when pinching to zoom. Uses visualViewport API to keep it anchored to the bottom-right corner.

critique@0.1.119

27 Feb 19:15

Choose a tag to compare

  1. Real-time annotations on shared diff pages — collaborators can now leave comments and annotations directly on critique.work diff pages via the --web command

  2. Annotation widget auto-loads — the annotation UI loads automatically on web previews with real-time SSE updates as teammates add or resolve annotations

  3. Fixed mobile web preview — mobile redirect now preserves scroll position and the annotation overlay renders correctly on small screens

critique@0.1.118

22 Feb 19:11

Choose a tag to compare

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

0.1.117

  • Syntax highlighting (critique, critique --web, critique review):
    • Detect .prisma files as prisma filetype in diff syntax highlighting
    • Register Prisma parser configuration with Tree-sitter highlights query source

critique@0.1.116

22 Feb 14:06

Choose a tag to compare

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-N pattern — fragile against code lines that happened to mimic that pattern
    • Each file section container now gets a React ref; after render stabilization getComputedLayout().top gives the exact row for that section
    • buildAnchorMap accepts { lineIndex, fileName }[] positions directly — simpler API, no false positives, no basename-fallback heuristic needed
    • Removed now-unnecessary imports (getFileName, processFiles, parseGitDiffFiles, stripSubmoduleHeaders) from web-utils
  • Tests:
    • Simplified buildAnchorMap unit 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 mockSpan helper to use RGBA.fromValues and include the required width field

critique@0.1.109

19 Feb 08:36

Choose a tag to compare

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)

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.ts with a generic balance-delimiters.ts supporting any multi-char delimiter
  • 42+ new tests covering all supported languages and edge cases

critique@0.1.106

16 Feb 13:23

Choose a tag to compare

New Features

PDF Export

  • Generate PDF documents from diff and review commands with --pdf flag
  • critique HEAD~3 --pdf writes to /tmp/critique-diff-*.pdf
  • critique HEAD~3 --pdf output.pdf writes to specific path
  • critique review --pdf generates PDF after AI review completes
  • --open flag to launch PDF in default viewer after generation

PDF Rendering

  • New opentui-pdf.ts module 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!