Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(tooling): allow ignored-only staged changes #8468

Mergedjuliusmarmingemerged 1 commit intomain fromrefs/pull/8468/headmerged by juliusmarminge View on GitHub

juliusmarmingecommented

Problem

The pre-commit hook sends every staged path to vp fmt, but Oxfmt intentionally ignores files such as pnpm-lock.yaml and patch files. When a commit contains only ignored files, the formatter sees zero matches and fails the commit even though there is nothing to format.

Fix

Pass Oxfmtʼs supported --no-error-on-unmatched-pattern option from the Vite staged config. Supported source files are still formatted, while ignored-only commits become a successful no-op.

Verification

  • vp fmt vite.config.ts --check
  • vp staged --verbose formatted the staged Vite config normally
  • vp staged --diff origin/main...79e063e67 --no-stash --verbose ran against the exact patch/lockfile-only diff from #8467 and succeeded with zero matching files
  • the commit completed through the updated pre-commit hook without bypass flags
  • git diff --cached --check

Generated with GPT-5.6 Sol in T3 Code through the Codex harness.


Note

Low Risk Single-line change to pre-commit formatting behavior with no runtime, auth, or data impact.

Overview Updates the pre-commit staged formatter in vite.config.ts so vp fmt is invoked with --no-error-on-unmatched-pattern.

When a commit stages only paths that Oxfmt ignores (e.g. pnpm-lock.yaml), the hook no longer fails for “no matching files”; commits that include formattable sources still run the formatter as before.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit ed6c1bddb2958b1939acbcdff4dd3aee1c811f60. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

Add --no-error-on-unmatched-pattern to staged vp fmt command

Updates the staged task in vite.config.ts so the formatter does not error when the glob pattern matches no files. This lets staged changes consisting only of ignored files pass without a false failure.

Macroscope summarized ed6c1bd.
    1. Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro Plus

      Run ID: 0b929830-dc51-476e-999e-8656396cc0f5

      You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

      Use the checkbox below for a quick retry:

      • 🔍 Trigger review

      Comment `@coderabbitai help` to get the list of available commands.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    3. juliusmarminge merged thisb0ae3f3

    4. juliusmarminge closed this

    5. Thread transfer impact

      ✅ Thread transfer remains within every enforced ceiling.

      ProviderMetricMain baselineThis PRImpactPR ceiling
      CodexTotal thread wire13.3 KiB13.3 KiB+46 B (+0.3%)15.1 KiB✅
      CodexThread snapshot wire6.9 KiB6.9 KiB+5 B (+0.1%)7.3 KiB✅
      CodexLive turn WebSocket wire6.4 KiB6.4 KiB+41 B (+0.6%)7.8 KiB✅
      CodexLive turn WebSocket decoded55.5 KiB55.6 KiB+44 B (+0.1%)66.4 KiB✅
      CodexLive turn messages910+1 (+11.1%)21✅
      ClaudeTotal thread wire13.3 KiB13.3 KiB−1 B (−0.0%)15.1 KiB✅
      ClaudeThread snapshot wire6.9 KiB6.9 KiB+6 B (+0.1%)7.3 KiB✅
      ClaudeLive turn WebSocket wire6.4 KiB6.4 KiB−7 B (−0.1%)7.8 KiB✅
      ClaudeLive turn WebSocket decoded56.4 KiB56.4 KiB0 B (0.0%)66.4 KiB✅
      ClaudeLive turn messages11110 (0.0%)21✅

      Baseline: 94401d0 · PR result: ed6c1bd · Source CI: success

      Scenario and decoded snapshot size

      10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

      • Codex decoded thread snapshot: 109.4 KiB
      • Claude decoded thread snapshot: 110.1 KiB

      Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

Sign in to join this conversation.