Skip to content

Comments

Options: add missing tooltips#7044

Open
NoryGit wants to merge 10 commits intoFAForever:developfrom
NoryGit:pan_desc
Open

Options: add missing tooltips#7044
NoryGit wants to merge 10 commits intoFAForever:developfrom
NoryGit:pan_desc

Conversation

@NoryGit
Copy link
Contributor

@NoryGit NoryGit commented Feb 19, 2026

Description of the proposed changes

This also removes the warnings when hovering over the affected options.

Checklist

- [ ] Changes are annotated, including comments where useful

Summary by CodeRabbit

  • New Features
    • Added tooltips for invert middle‑mouse pan, reclaim batching distance threshold, painting duration while observing, radar assist‑to‑upgrade, factory repeat‑build default, and showing player names (client‑side).
  • Bug Fixes
    • Clarified assist‑to‑upgrade tooltip wording.
    • Fixed reclaim batching distance threshold option key and ensured batching respects the configured threshold.
  • Documentation
    • Added changelog entry documenting the new tooltips.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 19, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds several new UI tooltip entries, fixes a typo in the public option key for reclaim batching distance and updates the code that reads that option, and adds a changelog snippet documenting the tooltip additions. (50 words)

Changes

Cohort / File(s) Summary
UI Tooltips
lua/ui/help/tooltips.lua
Added tooltip entries: options_invert_middle_mouse_button, ooptions_reclaim_batching_distance_threshold (typo-prefixed duplicate), options_painting_duration_observing, options_assist_to_upgrade_radar, options_repeatbuild, options_show_player_names. Updated options_assist_to_upgrade.description.
Options declaration
lua/options/options.lua
Renamed public option key from reclaim_batching_distance_tresholdreclaim_batching_distance_threshold (fixes typo in public key).
Reclaim logic
lua/ui/game/reclaim.lua
Updated lookup to use the corrected option key reclaim_batching_distance_threshold when gating reclaim batching behavior.
Changelog
changelog/snippets/fix.7044.md
Added changelog snippet documenting the added/missing tooltips for options.

Estimated Code Review Effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I hopped through strings both new and old,
Tooltips sprouted, a typo made bold.
Keys renamed and snippets penned,
I chewed the bugs and helped amend. ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Options: add missing tooltips' clearly and concisely summarizes the main change—adding missing tooltips for various options in the codebase.
Description check ✅ Passed The description covers the key change (adding tooltips and removing warnings) and confirms the changelog snippet was added, addressing the main requirements despite incomplete checklist items.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

🧹 Nitpick comments (1)
lua/ui/help/tooltips.lua (1)

590-591: LOC key suffix convention is inconsistent with nearby entries.

Other descriptive tooltip keys in this file use paired _TITLE / _DESCRIPTION suffixes (e.g., ASSIST_TO_UPGRADE_TITLE / ASSIST_TO_UPGRADE_DESCRIPTION, WATER_DEPTH_ASSISTANCE_TITLE / WATER_DEPTH_ASSISTANCE_DESCRIPTION). The new entry uses no suffix on the title key (INVERT_MOUSE_PAN) and an abbreviated _DESC suffix on the description key (INVERT_MOUSE_PAN_DESC). This matters most if localization strings are ever added to a .loc file, as translators and tooling will expect consistent naming.

♻️ Suggested rename for consistency
-        title = "<LOC INVERT_MOUSE_PAN>Invert pan direction with middle mouse button",
-        description = "<LOC INVERT_MOUSE_PAN_DESC>When enabled, dragging with the middle mouse button moves the camera in the opposite direction.",
+        title = "<LOC INVERT_MOUSE_PAN_TITLE>Invert pan direction with middle mouse button",
+        description = "<LOC INVERT_MOUSE_PAN_DESCRIPTION>When enabled, dragging with the middle mouse button moves the camera in the opposite direction.",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@lua/ui/help/tooltips.lua` around lines 590 - 591, The LOC key names for this
tooltip are inconsistent: change the title key "INVERT_MOUSE_PAN" to
"INVERT_MOUSE_PAN_TITLE" and change the description key "INVERT_MOUSE_PAN_DESC"
to "INVERT_MOUSE_PAN_DESCRIPTION" so they match the surrounding *_TITLE /
*_DESCRIPTION convention; update the two entries in the tooltip table (the title
and description fields in tooltips.lua) and ensure any corresponding .loc or
lookup usages reference the new keys (search for INVERT_MOUSE_PAN and
INVERT_MOUSE_PAN_DESC to update callers).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@lua/ui/help/tooltips.lua`:
- Around line 590-591: The LOC key names for this tooltip are inconsistent:
change the title key "INVERT_MOUSE_PAN" to "INVERT_MOUSE_PAN_TITLE" and change
the description key "INVERT_MOUSE_PAN_DESC" to "INVERT_MOUSE_PAN_DESCRIPTION" so
they match the surrounding *_TITLE / *_DESCRIPTION convention; update the two
entries in the tooltip table (the title and description fields in tooltips.lua)
and ensure any corresponding .loc or lookup usages reference the new keys
(search for INVERT_MOUSE_PAN and INVERT_MOUSE_PAN_DESC to update callers).

@NoryGit NoryGit changed the title Add a missing tooltip for the invert middle mouse pan option Add three missing tooltips Feb 19, 2026
@NoryGit NoryGit changed the title Add three missing tooltips Options: add missing tooltips Feb 19, 2026
Copy link
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: 2

🧹 Nitpick comments (1)
lua/ui/help/tooltips.lua (1)

673-676: Minor capitalization inconsistency in title

"Assist to upgrade radars" (sentence case) versus the adjacent "Assist to Upgrade" (title case) in options_assist_to_upgrade. Aligning to title case would keep these related entries consistent.

✏️ Suggested change
 options_assist_to_upgrade_radar = {
-    title = "<LOC ASSIST_TO_UPGRADE_RADAR>Assist to upgrade radars",
+    title = "<LOC ASSIST_TO_UPGRADE_RADAR>Assist to Upgrade Radars",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@lua/ui/help/tooltips.lua` around lines 673 - 676, The title string in
options_assist_to_upgrade_radar uses sentence case ("Assist to upgrade radars")
while the related option options_assist_to_upgrade uses title case; update the
title value in options_assist_to_upgrade_radar to Title Case (e.g., "Assist to
Upgrade Radars") so it matches the casing style of options_assist_to_upgrade and
keeps UI entries consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@lua/ui/help/tooltips.lua`:
- Around line 681-684: The title/description pair for options_show_player_names
is contradictory (title says "Show Player Names" but description says it hides
them); update the description to describe the effect when the option is enabled
to match the title and the pattern used by other entries (e.g.,
options_painting, options_assist_to_upgrade). In the options_show_player_names
table change the description string to something like "When enabled, player
names are shown locally in the game; this change is client-side only." ensuring
the title remains options_show_player_names.title and the explanatory text is in
options_show_player_names.description.
- Around line 609-612: Rename the misspelled Lua key
options_reclaim_batching_distance_treshold to
options_reclaim_batching_distance_threshold everywhere it appears; update the
entry in the tooltip table (the shown diff), the options table entry, and the
reclaim handling code that references the key so lookups match the correctly
spelled key. Ensure you update all three occurrences and run a quick search for
any other references to options_reclaim_batching_distance_treshold to replace
them with the corrected key.

---

Nitpick comments:
In `@lua/ui/help/tooltips.lua`:
- Around line 673-676: The title string in options_assist_to_upgrade_radar uses
sentence case ("Assist to upgrade radars") while the related option
options_assist_to_upgrade uses title case; update the title value in
options_assist_to_upgrade_radar to Title Case (e.g., "Assist to Upgrade Radars")
so it matches the casing style of options_assist_to_upgrade and keeps UI entries
consistent.

Copy link
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: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@lua/options/options.lua`:
- Line 1077: The renamed profile key causes existing profiles to lose their
value; update the read site (e.g. in reclaim.lua where
GetFromCurrentProfile('options.reclaim_batching_distance_threshold') is used) to
attempt the new key first and, if nil, fall back to the old misspelled key
'options.reclaim_batching_distance_treshold' and use that value (then continue
using the default 150 only if both are nil); this one-line migration preserves
existing user settings without changing profile storage and can be removed after
a full migration cycle.

In `@lua/ui/help/tooltips.lua`:
- Line 609: The tooltip key is misspelled as
ooptions_reclaim_batching_distance_threshold — rename it to
options_reclaim_batching_distance_threshold so the options UI can find and
display the tooltip; locate the entry in lua/ui/help/tooltips.lua (the table key
currently named ooptions_reclaim_batching_distance_threshold) and correct the
key to options_reclaim_batching_distance_threshold, then run a quick UI hover to
verify the tooltip appears.

---

Duplicate comments:
In `@lua/ui/help/tooltips.lua`:
- Around line 681-684: The description for the tooltip entry
options_show_player_names semantically contradicts its title — update the
description to describe what the option enables (e.g., that toggling it controls
whether player names are shown locally and that states are 'on' vs
'allies-only') instead of saying it "locally hides" names; also verify the
tooltip lookup logic that resolves keys (the code that constructs the lookup
key, likely where Tooltips[...] is accessed) because the option key in
options.lua is already "options_show_player_names" and a lookup implementation
that prefixes "options_" would produce "options_options_show_player_names" (fix
the lookup to use the raw key or rename the tooltip entry to match the lookup).
Ensure you update the tooltip text for options_show_player_names and confirm/fix
the lookup code accordingly.

NoryGit and others added 2 commits February 20, 2026 14:18
Co-authored-by: lL1l1 <82986251+lL1l1@users.noreply.github.com>
Co-authored-by: lL1l1 <82986251+lL1l1@users.noreply.github.com>
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