Skip to content

fix(ci): unblock main's static analysis after the nested-worktree delete dialog - #25683

Merged
brennanb2025 merged 2 commits into
mainfrom
brennanb2025/fix-dup-removal-import
Oct 5, 2026
Merged

brennanb2025 merged 2 commits into
mainfrom
brennanb2025/fix-dup-removal-import

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 5, 2026 •

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

ELI5

Every pull request in this repo currently fails CI before its tests even start, because of two mistakes on main from #25668 (the nested-worktree delete dialog). One file imports from the same module twice, and the dialog's 12 new on-screen strings were never added to the English string catalog. This fixes both.

What Changed

src/renderer/src/components/sidebar/delete-worktree-failure-toast.tsx imported ../../../../shared/worktree/removal twice: once for the WorktreeRemovalTarget type (added in #25668) and once for isLockedWorktreeRemovalError / WorktreeForceDeleteReason. The two are now one import. Nothing changes at runtime; the merged name is a type, so it compiles away either way.

src/renderer/src/i18n/locales/en.json gains the 12 worktree.nestedRemoval.* strings the dialog and its follow-up toast already pass to translate(), copied from their in-code English fallbacks by sync:localization-catalog. English users see the same text as before. The other languages fall back to English for these strings until they are translated, as with any new string.

Why

CI's "static analysis and typecheck" job runs pnpm run audit:code-quality:native with --deny-warnings. Its "modules should not be imported multiple times" rule flags this line (delete-worktree-failure-toast.tsx:7:44), so the job fails on every branch that has merged current main, and the test jobs behind it are skipped. Merging the imports is the whole fix; disabling the rule or allowlisting the file would hide the next duplicate as well. With that fixed, the same job's verify-localization-catalogs and verify-localization-extraction steps failed next, because the dialog's strings were missing from en.json. Syncing them in is the documented fix those checks print.

Linked Issue

Maintainer change; no issue. Found while CI on #19221 failed on this line.

Visual Proof

N/A: an import-only change with no UI or behavior difference.

Testing

  • oxlint --config config/oxlint-code-quality-native-plugins.json src config tests mobile --deny-warnings (the exact command CI runs) passes on this branch. On main it fails with this one warning.
  • Plain oxlint and oxfmt --check pass on the file.
  • All five localization checks pass locally (verify-localization-catalogs, verify-localization-catalog, the runtime English catalog, verify-localization-extraction, audit-localization-coverage --check).
  • Web typecheck (tsconfig.tc.web.json) passes locally.
  • Automated tests: not needed for an import merge; CI typechecks it.

AI Disclosure

Author: @BrennanKB5

Review

Self-reviewed; a single import merge.

Agent skill upstream boundary

  • Not applicable.

Notes

No security, platform, SSH, mobile, compatibility or performance impact: the change merges two import statements in one renderer file and adds English catalog entries matching existing fallbacks.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • N/A for visuals, with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (N/A)
  • CI will cover lint, typecheck, test and build

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

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: 0deec0f2-3f93-420d-883b-bd1e746c6cc7
📥 Commits

Reviewing files that changed from the base of the PR and between 3ba62cc and 7d97e17.

📒 Files selected for processing (1)
  • src/renderer/src/i18n/locales/en.json

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


📝 Walkthrough

Walkthrough

The toast component now imports WorktreeRemovalTarget from the shared nested-removal module. The imports for isLockedWorktreeRemovalError and WorktreeForceDeleteReason remain sourced from the general removal module. The English locale adds strings for nested-worktree removal, including deletion order and failure behavior.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to 7d97e

The updated removal guidance is consistent with the documented removal behavior. No issue requiring a fix before merge is established.

Architecture Summary

Architecture risk: 🔵 Low · up to 7d97e

The change affects 1 system.

Changed systems: src

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — src (ui) was modified; 2 changed files map to changed impact.

Before / after behavior

  • observed — Modified behavior in src/renderer/src/components/sidebar/delete-worktree-failure-toast.tsx: WorktreeRemovalTarget now comes from shared/worktree/nested-removal; it is no longer imported from shared/worktree/removal. The other removal imports remain sourced from the general removal module.
  • observed — Modified behavior in src/renderer/src/i18n/locales/en.json: Adds English translations for the nested-worktree removal flow, including its warning that nested worktrees are deleted before the parent and that a failure stops deletion while keeping the parent.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
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.
Title check ✅ Passed The title clearly identifies the main change: fixing CI static analysis after the nested-worktree delete dialog was added.
Description check ✅ Passed The description covers the change, user impact, reason, testing, visual-proof exception, and repository checklist. It explains that no linked issue is needed because this is a maintainer change, and i…
  • 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

  • Merge duplicate worktree/removal import — folds the standalone import type { WorktreeRemovalTarget } into the existing block importing isLockedWorktreeRemovalError / WorktreeForceDeleteReason from the same module in delete-worktree-failure-toast.tsx. Type-only, no runtime effect.

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

@brennanb2025 brennanb2025 changed the title fix(lint): merge the duplicate worktree/removal import in the delete-failure toast fix(ci): unblock main's static analysis after the nested-worktree delete dialog Oct 5, 2026
@brennanb2025
brennanb2025 merged commit ca883c5 into main Oct 5, 2026
37 of 38 checks passed
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.

1 participant