Skip to content

feat(settings): add group dividers to tray-click action dropdowns#13

Merged
itsnateai merged 3 commits into
mainfrom
fix/tray-action-separators
Jun 5, 2026
Merged

feat(settings): add group dividers to tray-click action dropdowns#13
itsnateai merged 3 commits into
mainfrom
fix/tray-action-separators

Conversation

@itsnateai
Copy link
Copy Markdown
Owner

@itsnateai itsnateai commented Jun 4, 2026

What

Adds visual group dividers to the Tray Click Actions dropdowns so the 18 actions read as four logical groups instead of one long flat list. Requested grouping:

None
Auto-Login1
AutoLoginTeam1
──────────────
TogglePiP
Launch One
Launch Two
FixWindows
SwapWindows
Settings
ShowHelp
──────────────
Auto-Login2
Auto-Login3
Auto-Login4
──────────────
AutoLoginTeam2 … Team6

Groups: primary (None / Auto-Login1 / Team1) · window + utility · extra Auto-Logins · extra Teams. Applies to all five click combos (Single / Double / Triple / Middle / Middle-Double).

How

SettingsForm.cs only, ~44 lines:

  • private const string TrayActionSeparator — a U+2500 box-drawing line row.
  • clickActions reformatted to insert the divider at the three group boundaries.
  • WireTraySeparatorBounce(ComboBox) — attaches a SelectedIndexChanged handler that reverts to the last real selection if a divider is selected, wired to all five combos.

Why it's safe (6-agent verification: 5 APPROVE, 1 minor concern)

  • A divider can never be saved as an action. The bounce makes it unselectable; even in the impossible case, TrayDisplayToAction would pass it through and AppConfig.Validate's allowlist would reset to "None" — an unreachable backstop, not live data-loss.
  • Re-entrancy terminates — reverting to a real row re-fires the handler into the else-branch and stops.
  • lastIndex starts at 0 ("None") and is corrected by PopulateFromConfig on load; never holds a divider index.
  • No positional indexing of clickActions exists anywhere — selection is by SelectedItem string, so the added rows can't shift any logic.
  • Mirrors the existing separator-bounce pattern in QuickLoginSlotsDialog.
  • Build clean (Debug, 0 warnings / 0 errors).

Known minor limitation

Like QuickLoginSlotsDialog, arrow-key navigation can't cross a divider (it bounces back), so keyboard-only users can't reach items after a divider via arrows — mouse selection works fully. A follow-up could make the bounce skip past dividers in the direction of travel (and apply the same to QuickLoginSlotsDialog for consistency) if keyboard navigation matters.

Isolation

Branch off main, built/committed in a dedicated worktree so the concurrent session's in-flight work on main was never touched. Independent of #11 / #12 (different file).

Summary by CodeRabbit

  • New Features
    • Tray click action dropdowns now display visual group separators to organize related actions into four distinct categories, improving menu navigation and usability. Non-selectable divider rows automatically redirect selection attempts to the nearest adjacent valid action option, preventing misconfiguration.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 4, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1b7cd97d-cc55-4026-b8f2-935e83a5dda4

📥 Commits

Reviewing files that changed from the base of the PR and between 30e9216 and 0e25efc.

📒 Files selected for processing (1)
  • UI/SettingsForm.cs

📝 Walkthrough

Walkthrough

SettingsForm tray-click action dropdowns now include visual group dividers that partition actions into four logical categories. A separator constant and reorganized clickActions list introduce dividers, while WireTraySeparatorBounce prevents dividers from being selected by bouncing to adjacent real actions.

Changes

Tray action dropdown separators

Layer / File(s) Summary
Separator constant and grouped actions list
UI/SettingsForm.cs
TrayActionSeparator constant defines box-drawing divider text. The clickActions list is reorganized to insert separators between four logical action groups: primary, window/utility, extra auto-logins, and extra teams.
Divider-skip bounce behavior
UI/SettingsForm.cs
WireTraySeparatorBounce(ComboBox cb) tracks the last non-divider selection and, when a divider is selected, computes travel direction and skips to the nearest real action item, with fallback to the previous real selection at list edges.
ComboBox wiring for divider bounce
UI/SettingsForm.cs
After creating the six click action ComboBox controls, WireTraySeparatorBounce is applied to each combo to activate divider-skip behavior on SelectedIndexChanged, preventing divider values from being saved to AppConfig.

🎯 2 (Simple) | ⏱️ ~12 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 accurately describes the main change: adding group dividers to tray-click action dropdowns in the settings form. It is concise, clear, and directly reflects the primary purpose of the changeset.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/tray-action-separators

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.

@itsnateai itsnateai merged commit d29d7cb into main Jun 5, 2026
4 checks passed
@itsnateai itsnateai deleted the fix/tray-action-separators branch June 5, 2026 02:28
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