Skip to content

Fix localization lint false positives for setup confirmation - #25494

Closed
nwparker wants to merge 1 commit into
mainfrom
nwparker/editor-hook-localization-lint
Closed

nwparker wants to merge 1 commit into
mainfrom
nwparker/editor-hook-localization-lint

Conversation

@nwparker

@nwparker nwparker commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 0 0 0 0
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​3 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3 0

ELI5

The localization check mistakes two internal setup identifiers for text shown to users, blocking otherwise valid checks on main.

What Changed

Rename the local confirm wrapper to confirmHook and update its two calls. The localization scanner recognizes confirm as a browser dialog; the wrapper actually passes typed setup and vmRecipe identifiers to the existing hook confirmation flow.

Why

A descriptive local name removes the false positives without translating internal identifiers, adding allowlist entries, or changing the scanner. The calls, arguments, and user-facing behavior stay the same.

Linked Issue

Repairs the lint failure introduced with #25472. No new issue is needed for this maintainer repair.

Visual Proof

N/A — local identifier rename with no visual or interaction change.

Testing

  • Reproduced both localization failures on unchanged main at c2c76498494e.
  • Full pnpm lint, full node/web/CLI pnpm tc, and the changed-code quality gate pass with the rename.
  • Existing hook preparation and hook flow tests pass. No new test is needed for a local identifier rename.
  • No app build or native UI test is needed; no runtime, path, platform, permission, or remote protocol behavior changes.

Review

Reviewed the scanner's confirm call classification and both internal wrapper calls. Three identifiers changed in one file, zero net lines. Merge risk: very low; no user-facing trade-off.

Agent skill upstream boundary

  • Not applicable; no skill source or registry change.

Notes

This separate repair avoids carrying duplicate lint fixes in the editor bug PRs.

Checklist

  • Small and focused; before/after, mechanism, and choice of approach explained.
  • Visual proof is N/A.
  • Reviewed for correctness, cross-platform support, remote use, and compatibility.
  • Relevant tests, full typecheck, full lint, and changed-code quality pass.

@coderabbitai

coderabbitai Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

🧰 Additional context used
📚 Code guidelines (1)
AGENTS.md — auto-discovered

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 07e3edec-b466-4103-82ae-0b042630f944
📥 Commits

Reviewing files that changed from the base of the PR and between 40f9e7a and 9969240.

📒 Files selected for processing (1)
  • src/renderer/src/lib/worktree-creation-hook-preparation.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.


📝 Walkthrough

Walkthrough

The local confirmation helper was renamed from confirm to confirmHook. The setup and VM-recipe confirmation calls now use confirmHook. The helper’s parameters, result, and behavior are unchanged.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 99692

This change only renames the hook-confirmation helper, and the existing tests cover both refusal paths. No actionable merge-blocking risk is evident.

Architecture Summary

Architecture risk: 🔵 Low · up to 99692

The change affects 1 system.

Changed systems: src

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — src (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in src/renderer/src/lib/worktree-creation-hook-preparation.ts: Renamed the local confirmation helper from confirm to confirmHook; its parameters and result are unchanged.
  • observed — Modified behavior in src/renderer/src/lib/worktree-creation-hook-preparation.ts: Updated the setup confirmation call to use confirmHook.
  • observed — Modified behavior in src/renderer/src/lib/worktree-creation-hook-preparation.ts: Updated the VM-recipe confirmation call to use confirmHook.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: fixing localization lint false positives for setup confirmation.
Description check ✅ Passed The description covers the required sections, explains the change and reason, links the related issue, marks visual proof as not applicable, and reports testing and review. It is sufficiently complete…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

  • Rename local hook confirmation wrapper — src/renderer/src/lib/worktree-creation-hook-preparation.ts renames the local confirm helper to confirmHook and updates its two call sites ('setup', 'vmRecipe'). The localization scanner's USER_VISIBLE_FUNCTION_NAMES treats confirm as a browser dialog, so the wrapper's string arguments were classified user-visible-call; confirmHook is not in that set.

I verified the fix against the real gate: node config/scripts/audit-localization-coverage.mjs --check passes, and reconstructing the base version (substituting confirmHook → confirm) makes the scanner report exactly the two false positives at lines 26 and 51. No behavioral change — arguments and user-facing flow are identical.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

@OrcaWin

OrcaWin commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

Closing as already on main: the confirm-to-confirmHook rename landed with #24376, so this diff has nothing left to apply.

@OrcaWin OrcaWin closed this Oct 9, 2026
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.

2 participants