Skip to content

feat(go2): v2.3.0 persist --disable-confirm and add --confirm-distance threshold#2323

Open
mrhoribu wants to merge 2 commits into
masterfrom
feat/go2-v2.3.0-1
Open

feat(go2): v2.3.0 persist --disable-confirm and add --confirm-distance threshold#2323
mrhoribu wants to merge 2 commits into
masterfrom
feat/go2-v2.3.0-1

Conversation

@mrhoribu
Copy link
Copy Markdown
Contributor

@mrhoribu mrhoribu commented May 12, 2026

  • Add --disable-confirm=on/off persistent flag; bare --disable-confirm retains existing one-shot behavior
  • Add --confirm-distance= to configure the distance threshold (replaces hardcoded 20); minimum value 20, default 20
  • Seed CharSettings['disable_confirm']=false and CharSettings['confirm_distance']=20 on first run for back-compat
  • Show both settings in ;go2 list output and help text

Summary by CodeRabbit

  • New Features
    • Updated go2 script to v2.3.0 with persistent trip confirmation configuration
    • Added --disable-confirm flag to customize trip confirmation behavior
    • Added --confirm-distance flag to set a custom confirmation distance threshold (minimum 20)
    • New settings are automatically initialized and persist across sessions

Review Change Stack

…e threshold

- Add --disable-confirm=on/off persistent flag; bare --disable-confirm retains existing one-shot behavior
- Add --confirm-distance=<N> to configure the distance threshold (replaces hardcoded 20); minimum value 20, default 20
- Seed CharSettings['disable_confirm']=false and CharSettings['confirm_distance']=20 on first run for back-compat
- Show both settings in `;go2 list` output and help text
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 12, 2026

Warning

Rate limit exceeded

@mrhoribu has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 57 minutes and 49 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 878eb255-5165-45e1-84bf-8600b6d91209

📥 Commits

Reviewing files that changed from the base of the PR and between d42c555 and 926c9b5.

📒 Files selected for processing (1)
  • scripts/go2.lic
📝 Walkthrough

Walkthrough

The go2 script is updated to version 2.3.0 with configurable trip confirmation behavior. Two new persistent settings—disable_confirm and confirm_distance—are initialized, exposed in help and list output, parsed from CLI flags, persisted when provided, and applied throughout trip confirmation logic to replace the hardcoded distance threshold.

Changes

Trip Confirmation Settings

Layer / File(s) Summary
Version and release notes
scripts/go2.lic
Version bumped to 2.3.0 with changelog entries documenting persistent disable_confirm and confirm_distance configuration.
Settings initialization defaults
scripts/go2.lic
New settings disable_confirm (default false) and confirm_distance (default 20) seeded in CharSettings on first run.
User-facing documentation
scripts/go2.lic
Help text extended with --disable-confirm and --confirm-distance flag documentation; list output now displays current setting values.
CLI argument parsing and locals
scripts/go2.lic
Local variables introduced to track settings state; command-line parsing accepts --disable-confirm=<on|off|true|false|yes|no> and --confirm-distance=<N>.
Settings persistence
scripts/go2.lic
When running with settings-only arguments, CharSettings values are persisted with confirm_distance clamped to minimum 20; confirmation messages display resulting defaults.
Trip confirmation distance application
scripts/go2.lic
Guild-target, locker-target, and generic matching-target confirmation decisions updated to use CharSettings['confirm_distance'] (fallback 20) instead of hardcoded distance 20.

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically summarizes the main changes: adding persistent --disable-confirm and --confirm-distance threshold features in v2.3.0.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/go2-v2.3.0-1

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 and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
scripts/go2.lic (1)

1044-1045: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix Rubocop indentation failure in chained call.

Line 1045 must align .each with .find_all to satisfy Layout/MultilineMethodCallIndentation (currently failing CI).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/go2.lic` around lines 1044 - 1045, The chained call indentation for
Map.list.find_all { |iroom| ... }.each is incorrect; move the `.each` to a new
line aligned under `.find_all` so the block passed to `.each` is indented one
level deeper than the call (i.e., align `.each` with `.find_all` and indent the
`{ |iroom| output << ... }` or do-block accordingly) to satisfy
Layout/MultilineMethodCallIndentation for the Map.list.find_all / .each chain
that builds the output string.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scripts/go2.lic`:
- Around line 1189-1190: The parsed --confirm-distance
(setting_confirm_distance) is never applied for one-shot trips with a target
because distance checks still read CharSettings['confirm_distance']; update the
trip-start/confirmation logic (where distance is compared against CharSettings,
e.g., in the one-shot target handling and any confirmation checks) to prefer
setting_confirm_distance when it is non-nil, falling back to
CharSettings['confirm_distance'] otherwise; ensure the same change is applied at
the other occurrences that initialize or check setting_confirm_distance so the
flag actually overrides the CharSettings value for one-shot trips.

---

Outside diff comments:
In `@scripts/go2.lic`:
- Around line 1044-1045: The chained call indentation for Map.list.find_all {
|iroom| ... }.each is incorrect; move the `.each` to a new line aligned under
`.find_all` so the block passed to `.each` is indented one level deeper than the
call (i.e., align `.each` with `.find_all` and indent the `{ |iroom| output <<
... }` or do-block accordingly) to satisfy Layout/MultilineMethodCallIndentation
for the Map.list.find_all / .each chain that builds the output string.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 78956f2c-dee5-432e-b266-51640cfa3c4b

📥 Commits

Reviewing files that changed from the base of the PR and between 7389607 and d42c555.

📒 Files selected for processing (1)
  • scripts/go2.lic

Comment thread scripts/go2.lic
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