Skip to content

refactor(ide): share jetbrains option definitions via factory - #1613

Merged
skevetter merged 1 commit into
mainfrom
refactor/surface-jetbrains-options
Oct 20, 2026
Merged

skevetter merged 1 commit into
mainfrom
refactor/surface-jetbrains-options

Conversation

@skevetter

@skevetter skevetter commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Replace 10 identical ide.Options literals in pkg/ide/jetbrains product adapters with one unexported factory, newProductOptions() in generic.go. Each product var (GolandOptions, CLionOptions, ...) is now newProductOptions(), so each gets its own fresh map. 11 files changed in total: 10 product files plus generic.go.

Why

Duplicated option definitions make common metadata changes error-prone: a change must be applied in ten places. A shared factory centralizes them, while each product keeps independent mutable options. No exported names, defaults, or field contents change.

Validation

  • mise run cli:format: only the 11 jetbrains files changed.
  • mise run cli:lint:ci: 0 issues.
  • go vet ./pkg/ide/jetbrains/: clean.
  • go test -count=1 ./pkg/ide/...: all packages ok.
  • Throwaway check (removed before commit): all 10 product maps reflect.DeepEqual the original contents; mutating one map does not affect another or the factory output.

CodeRabbit CLI

coderabbit review --agent --committed --base-commit c7aecf5a returned rate_limit: "You've used all free OSS reviews for now", wait about 27 minutes. No findings. Not retried.

Auto-merge

Eligible: yes under devsy-auto-refactor. 188 changed non-test lines (28 added, 160 removed), 11 non-test files, within the 300-line and 12-file caps. Behavior-preserving. The user explicitly authorizes coordinator squash merge after gates.

Next

Coordinator squash merge after gates. CodeRabbit CLI re-run is not required under the skill's CLI-failure allowance.

Summary by CodeRabbit

  • Improvements
    • Standardized download and version options across supported JetBrains IDEs.
    • IDE selections now consistently provide a default latest version and architecture-specific downloads.

@skevetter skevetter added the surface-refactor Unattended refactor (surface) label Oct 20, 2026
@netlify

netlify Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit 0bfff44
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6ad70ceadbb4503091cc6914

@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f2211234-5341-4e4c-8360-2b223902e505
📥 Commits

Reviewing files that changed from the base of the PR and between c7aecf5 and 0bfff44.

📒 Files selected for processing: 11
  • pkg/ide/jetbrains/clion.go
  • pkg/ide/jetbrains/dataspell.go
  • pkg/ide/jetbrains/generic.go
  • pkg/ide/jetbrains/goland.go
  • pkg/ide/jetbrains/intellij.go
  • pkg/ide/jetbrains/phpstorm.go
  • pkg/ide/jetbrains/pycharm.go
  • pkg/ide/jetbrains/rider.go
  • pkg/ide/jetbrains/rubymine.go
  • pkg/ide/jetbrains/rustrover.go
  • pkg/ide/jetbrains/webstorm.go

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

📝 Walkthrough

JetBrains IDE option definitions now use a shared constructor. The constructor defines the version option and optional amd64 and arm64 download URL options.

Changes: JetBrains IDE options

Layer / File(s) Summary
Shared options constructor and product wiring
pkg/ide/jetbrains/generic.go, pkg/ide/jetbrains/clion.go, pkg/ide/jetbrains/dataspell.go, pkg/ide/jetbrains/goland.go, pkg/ide/jetbrains/intellij.go, pkg/ide/jetbrains/phpstorm.go, pkg/ide/jetbrains/pycharm.go, pkg/ide/jetbrains/rider.go, pkg/ide/jetbrains/rubymine.go, pkg/ide/jetbrains/rustrover.go, pkg/ide/jetbrains/webstorm.go
newProductOptions() defines the shared version and architecture-specific download options. Ten product option variables now use this constructor instead of inline definitions.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Refactor

Merge Risk: ⚪ Minimal · up to 0bfff

No actionable issue is established for the JetBrains option refactor. Normal validation can proceed before merge.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Description check Warning The description explains the refactor, motivation, behavior-preservation goal, and validation results. However, it omits several template sections, including the change-type selection, AI assistance d… Update the description to use the repository template. Mark the change as a refactor, disclose AI assistance or state that none was used, document the relevant test commands and why integration tests are not needed, complete the checklist, …
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 12 functions across 11 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly describes the main change: sharing JetBrains IDE option definitions through a factory. It is concise and follows the repository's Conventional Commits format.
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.
Full details: Description check

Explanation

The description explains the refactor, motivation, behavior-preservation goal, and validation results. However, it omits several template sections, including the change-type selection, AI assistance disclosure, explicit testing section, checklist confirmations, and issue reference.

Resolution

Update the description to use the repository template. Mark the change as a refactor, disclose AI assistance or state that none was used, document the relevant test commands and why integration tests are not needed, complete the checklist, and add "Fixes #N", "Refs #N", or "none".

  • Fix all pre-merge checks with AI
✨ Finishing Touches
✨ Simplify code
  • Commit to this branch
  • Create a new PR
  • Autofix · 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.

@netlify

netlify Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for images-devsy-sh canceled.

Name Link
🔨 Latest commit 0bfff44
🔍 Latest deploy log https://app.netlify.com/projects/images-devsy-sh/deploys/6ad70cead1357a83bd7dcaaf

@skevetter
skevetter marked this pull request as ready for review October 20, 2026 14:38
@skevetter

Copy link
Copy Markdown
Contributor Author

@greptileai review

@mergify

mergify Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@greptile-apps

greptile-apps Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; it preserves the option contents and keeps each product’s map separate.

Summary

Replaces ten repeated JetBrains option definitions with newProductOptions().

  • JetBrains products now get their setup options from one shared definition.

Reviews (1) · Last reviewed commit: "refactor(ide): share jetbrains option de..." · Reviewed by Greptile

@skevetter

Copy link
Copy Markdown
Contributor Author

Final gate audit on 0bfff44: all applicable checks green, including CI Success after retrying Windows Podman startup timeout; commit signature verified; CodeRabbit completed current-head coverage with no actionable issue; Greptile 5/5; zero review threads. Diff: 188 non-test changed lines, 11 files; factory returns independent maps with unchanged option contents. Auto-merge policy passes. CodeRabbit advisory disposition: retain the devsy-auto-refactor body format required by the bot skill; implementation is AI-assisted. No docstring churn: the new helper is unexported and self-describing, consistent with skill section 3b. Local CodeRabbit CLI was rate-limited as documented; GitHub review completed successfully.

@skevetter
skevetter merged commit 2e9cb41 into main Oct 20, 2026
200 of 202 checks passed
@skevetter
skevetter deleted the refactor/surface-jetbrains-options branch October 20, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/l surface-refactor Unattended refactor (surface)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant