Skip to content

Releases: remorses/critique

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!

v0.1.105

15 Feb 12:09

Choose a tag to compare

critique --stdin / critique --web:

  • Only show 'URL is private' notice when generating with --web (fix notice appearing in scrollback/pager output like lazygit where it makes no sense)

Tests:

  • Add comprehensive integration tests for --stdin pager mode using tuistory (10 test cases covering empty diffs, multiple files, renames, binary files, narrow terminals, etc.)
  • Rewrite lazygit pager test as real integration test that launches critique in a PTY and verifies scrollback output

critique@0.1.104

14 Feb 12:47

Choose a tag to compare

Changes

  • critique --stdin (pager mode):
    • Force scrollback mode for --stdin pager usage to fix lazygit integration (#25)
    • When used as a pager (e.g. critique --stdin in lazygit), critique now correctly outputs static colored text instead of interactive TUI escape sequences
  • critique:
    • Fix crash in Bun compiled binaries where terminal TTY columns/rows report as 0, causing NaN framebuffer dimensions
    • Replace @opentui/* npm alias remapping with direct @opentuah/* imports

critique v0.1.103

13 Feb 15:55

Choose a tag to compare

Highlights

Syntax highlighting improvements:

  • JSON punctuation now uses muted comment color instead of bright red
  • Better visual hierarchy for JSON files in diffs

Web preview improvements:

  • Added privacy notice to critique.work URLs explaining unlisted/private nature
  • New critique unpublish <url> command to delete uploaded diffs
  • Muted styling for upload notices

CLI improvements:

  • Replaced cac with goke for better CLI parsing
  • Repeatable --filter and --session flags now properly handled as arrays
  • Fixed TypeScript build by adding type declarations for .scm imports

Theme improvements:

  • Rewrote Cursor theme with authentic Anysphere Modern colors
  • Fixed theme reactivity across all UI components
  • Fixed diff foreground colors in OG images (no more white-on-white text)
  • Better word-level highlighting on light themes

Bug fixes:

  • Fixed dropdown search filtering with immediate input response
  • Fixed scroll behavior and mouse wheel acceleration
  • Fixed JSON syntax highlighting compatibility with tree-sitter

All Changes (0.1.88 → 0.1.103)

0.1.103

  • Syntax highlighting:
    • JSON: render punctuation (quotes/brackets/separators) using comment color instead of operator red / full-bright

0.1.102

  • critique --web / critique web:
    • Render the upload notice block in a single muted color (no mixed emphasis)

0.1.101

  • critique / critique --web / OG images:
    • Pass addedBg/removedBg alongside content backgrounds so opentui's word-level highlights don't inherit dark defaults on light themes
    • Keep a small github-light-only addedWordBg override to make added word highlights visible in images

0.1.100

  • Dependencies:
    • Update @opentui/core / @opentui/react npm aliases to @opentuah/*@0.1.88
    • Remove @opentuah/core-darwin-arm64 optional dependency (core pulls the correct platform binary via its own optional deps)

0.1.99

  • critique / critique review / critique web / critique hunks list:
    • Define --filter <pattern> as an array schema in goke so repeated flags are parsed explicitly as string[]
  • critique review:
    • Define --session <id> as an array schema so repeated session flags are handled natively

0.1.98

  • Dependencies:
    • Replace @xmorse/cac with goke for CLI argument parsing

0.1.97

  • README:
    • Make the CodeRabbit sponsor text clickable while keeping the compact logo link

0.1.96

  • README:
    • Add a bottom Sponsors section with a compact CodeRabbit logo link

0.1.95

  • Syntax highlighting:
    • JSON: Color quote characters (") separately as punctuation.delimiter while keeping string text highlighted as property (keys) and string (values)

0.1.94

  • Syntax highlighting:
    • Fix JSON syntax highlighting by using local query file with captures compatible with themes.ts
    • Fix syntax highlighting in web preview by pre-initializing TreeSitter client before rendering

0.1.93

  • Dependencies:
    • Update @opentui/core and @opentui/react npm aliases to @opentuah/*@^0.1.81

0.1.92

  • critique:
    • Fix dropdown search filtering by syncing plainText from onContentChange in a microtask
    • Make watch-mode loading/empty backgrounds reactive to the selected theme
  • critique pick:
    • Use the active global theme for picker UI colors
  • diff rendering:
    • Remount the DiffView wrapper on theme changes for reliable background refresh
  • Tests:
    • Add theme-switch background update tests
    • Add dropdown filtering coverage

0.1.91

  • critique:
    • Improve main diff layout scrolling behavior by allowing the scrollbox to shrink within the column layout
  • Tests:
    • Add mouse-wheel scrolling tests using opentui test renderer
    • Export App/AppProps for renderer-driven CLI tests

0.1.90

  • critique:
    • Fix dropdown search input in file/theme pickers by switching to <input onInput>
    • Ensure diff internals fully refresh on theme change by remounting <diff>
    • Make loading/empty-state backgrounds reactive to theme changes
  • critique pick:
    • Use the currently selected global theme
  • Tests:
    • Add dropdown and DiffView regression tests

0.1.89

  • critique:
    • Keep the main diff scrollbox focused so mouse-wheel scrolling works reliably

0.1.88

  • Dependencies:
    • Switch to Jake's @opentuah fork via npm alias mapping
    • Map @opentui/corenpm:@opentuah/core@latest
    • Map @opentui/reactnpm:@opentuah/react@latest

critique@0.1.87

08 Feb 18:44

Choose a tag to compare

  • hunks:\n - critique hunks add <id> now appends dirty submodule diffs before hunk lookup\n - Fixes mismatch where IDs listed by critique hunks list for submodule changes could fail with "Hunk not found"\n\n- No external contributors in this release.

critique@0.1.78

30 Jan 11:27

Choose a tag to compare

0.1.78

  • Breaking change: Single positional argument now uses git diff instead of git show
    • Aligns with git diff behavior: critique <ref> compares ref to working tree
    • Before: critique HEAD~1 showed what HEAD~1 commit introduced (just that commit)
    • After: critique HEAD~1 shows all changes since HEAD~1 (like git diff HEAD~1)
    • To get the previous behavior (view a specific commit only), use --commit:
      critique --commit HEAD~1  =  shows only what HEAD~1 introduced (just that commit)
      
    • Two positional arguments unchanged: critique main feature still uses three-dot syntax

0.1.77

  • Web previews:
    • Add favicon support with automatic light/dark mode switching
    • Dark mode shows white diff icon, light mode shows black diff icon

0.1.76

  • Syntax highlighting:
    • Add tree-sitter parsers for 21 additional languages: Python, Rust, Go, C++, C#, Bash, C, Java, Ruby, PHP, Scala, HTML, JSON, YAML, Haskell, CSS, Julia, OCaml, Clojure, Swift, Nix

critique@0.1.75

27 Jan 15:19

Choose a tag to compare

Changes since 0.1.50

  • New --image flag for diff command:
    • Generates WebP images of terminal output (saved to /tmp)
    • Splits long diffs into multiple images (70 lines per image)
    • Uses takumi for high-performance image rendering
    • @takumi-rs/core and @takumi-rs/helpers added as optional dependencies
    • Library exports: renderFrameToImages, renderDiffToImages, renderReviewToImages from critique/src/image.ts
  • Web previews:
    • --web: allow licensed uploads to never expire via stored license key
    • review --web and review --resume --web: show never-expire status from worker
    • --web: show purchase URL after expiry notice for non-licensed uploads
    • Render expiry notice in TUI JSX with left padding
    • Linkify URLs in HTML output (clickable links in web previews)
  • CLI:
    • login: store Critique license key in ~/.critique/license.json
    • Add git rename/copy detection with -M flag
  • Worker:
    • Add Stripe subscription routes and KV-backed license validation for permanent links
    • Email the license command via Resend on successful checkout
    • Add Resend reply-to and tag metadata for license emails
    • Centralize all KV reads/writes in a dedicated storage helper
    • Add JS entrypoint shim for Wrangler deploy
  • Tooling:
    • Add worker:secrets script to upload Cloudflare secrets from .env
  • Tests:
    • Write example OG image to tmp/og-examples/og-example.png