Skip to content

Swarm Fix: [BUG] [alpha] Split panel shortcut displays shifted character (") instead of base key, causing ambiguity#38323

Open
willkhinz wants to merge 1 commit intoPlatformNetwork:mainfrom
willkhinz:fix-bug-alpha-split-panel-shortcut-displays-1774493431
Open

Swarm Fix: [BUG] [alpha] Split panel shortcut displays shifted character (") instead of base key, causing ambiguity#38323
willkhinz wants to merge 1 commit intoPlatformNetwork:mainfrom
willkhinz:fix-bug-alpha-split-panel-shortcut-displays-1774493431

Conversation

@willkhinz
Copy link

@willkhinz willkhinz commented Mar 26, 2026

Description

Brief description of the changes in this PR.

Related Issue

Fixes #(issue number)

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Performance improvement
  • Code refactoring

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Testing

Describe the tests you ran to verify your changes.

# Example commands
cargo test
cargo clippy

Screenshots (if applicable)

Add screenshots to help explain your changes.

Summary by CodeRabbit

  • Documentation
    • Added proposal documentation for improving the "Split Down" shortcut display representation in the UI.

…acter (") instead of base key, causing ambiguity

Signed-off-by: willkhinz <hinzwilliam52@gmail.com>
@coderabbitai
Copy link

coderabbitai bot commented Mar 26, 2026

📝 Walkthrough

Walkthrough

A new proposal document is added outlining a fix for the "Split Down" keyboard shortcut display. The proposal specifies rendering the shortcut using the base key that produces an apostrophe when shifted, rather than the shifted character itself, and suggests optional keyboard layout detection.

Changes

Cohort / File(s) Summary
Documentation
FIX_PROPOSAL.md
New proposal document detailing a fix for keyboard shortcut display, including problem statement, solution steps, code examples, and suggested commit message format.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A shortcut was twisted, displaying askew,
The apostrophe's base is the fix we pursue,
No more shifted confusion, just clarity bright,
The proposal hops forward with logic and light! 🌟

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main bug fix: the Split panel shortcut displaying the shifted character (double quote) instead of the base key (apostrophe), which is the primary change in the FIX_PROPOSAL.md file.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@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)
FIX_PROPOSAL.md (1)

1-11: Consider whether a proposal document should be committed to the main branch.

This file appears to be a design/proposal document rather than actual implementation code. Typically, such documents are either:

  • Included in project documentation (e.g., docs/ directory)
  • Discussed in the issue/PR description itself
  • Tracked in a separate design documentation system

If this is meant to document the fix for future reference, consider moving it to a docs/ or proposals/ directory rather than the repository root.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@FIX_PROPOSAL.md` around lines 1 - 11, FIX_PROPOSAL.md is a design/proposal
document that shouldn’t live in the repo root; move it to documentation (e.g.,
docs/ or proposals/) or convert it into an issue/PR description instead; also
update the proposal text to reference the exact UI label "Split Down" and the
displayed shortcut (currently shown as Ctrl + Shift + " and should display Ctrl
+ Shift + ') and add a note to implement keyboard-layout-aware display logic
when the actual fix is applied.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@FIX_PROPOSAL.md`:
- Around line 27-39: The fallback logic in getSplitDownShortcut returns a
shifted character for non-US layouts; instead ensure the function always
displays the base (unshifted) key unless a specific layout mapping exists:
update getSplitDownShortcut to consult a layout-to-base-key map (using
getKeyboardLayout()) and return the mapped unshifted key (e.g., "Ctrl + Shift +
'") as the default, removing the current else that returns the shifted quote
character; alternatively, implement/extend a comprehensive mapping for known
layouts and fall back to the consistent base-key string when no mapping is
found.
- Line 47: The fenced code block containing the commit message ("Fix: Display
base key for Split Down shortcut" and the bullet text) lacks a language
specifier; update its opening fence to include a language token such as text or
commit (e.g., ```text) so the block follows MD040 and renders correctly.

---

Nitpick comments:
In `@FIX_PROPOSAL.md`:
- Around line 1-11: FIX_PROPOSAL.md is a design/proposal document that shouldn’t
live in the repo root; move it to documentation (e.g., docs/ or proposals/) or
convert it into an issue/PR description instead; also update the proposal text
to reference the exact UI label "Split Down" and the displayed shortcut
(currently shown as Ctrl + Shift + " and should display Ctrl + Shift + ') and
add a note to implement keyboard-layout-aware display logic when the actual fix
is applied.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: d0105a4b-8ef7-4d11-a625-114d70020b48

📥 Commits

Reviewing files that changed from the base of the PR and between ec21e1b and d3996cf.

📒 Files selected for processing (1)
  • FIX_PROPOSAL.md

Comment on lines +27 to +39
```javascript
function getSplitDownShortcut() {
// Assuming a function to get the current keyboard layout
const keyboardLayout = getKeyboardLayout();

// Adjust the shortcut display based on the keyboard layout
if (keyboardLayout === "US") {
return "Ctrl + Shift + '";
} else {
// Handle other layouts as needed
return "Ctrl + Shift + \"";
}
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Questionable fallback logic in keyboard layout handling.

The dynamic example returns Ctrl + Shift + " for non-US keyboard layouts (line 37), which contradicts the stated goal of displaying the base key instead of the shifted character. If the intent is to show the base key that produces the desired character when shifted, all keyboard layouts should display the unshifted key.

Consider either:

  1. Removing the else clause and consistently showing the base key across all layouts
  2. Providing a more comprehensive mapping that identifies the correct base key for each layout
  3. Clarifying the intent if different layouts genuinely require different representations
💡 Proposed fix for consistent base key display
 function getSplitDownShortcut() {
     // Assuming a function to get the current keyboard layout
     const keyboardLayout = getKeyboardLayout();
     
-    // Adjust the shortcut display based on the keyboard layout
-    if (keyboardLayout === "US") {
-        return "Ctrl + Shift + '";
-    } else {
-        // Handle other layouts as needed
-        return "Ctrl + Shift + \"";
-    }
+    // Map keyboard layouts to their base key for apostrophe/quote
+    const baseKeyMap = {
+        "US": "'",
+        // Add other layouts as needed, mapping to their base key
+        // that produces the intended character when shifted
+    };
+    
+    const baseKey = baseKeyMap[keyboardLayout] || "'";
+    return `Ctrl + Shift + ${baseKey}`;
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@FIX_PROPOSAL.md` around lines 27 - 39, The fallback logic in
getSplitDownShortcut returns a shifted character for non-US layouts; instead
ensure the function always displays the base (unshifted) key unless a specific
layout mapping exists: update getSplitDownShortcut to consult a
layout-to-base-key map (using getKeyboardLayout()) and return the mapped
unshifted key (e.g., "Ctrl + Shift + '") as the default, removing the current
else that returns the shifted quote character; alternatively, implement/extend a
comprehensive mapping for known layouts and fall back to the consistent base-key
string when no mapping is found.


### Commit Message

```
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add language specifier to fenced code block.

The commit message code block should specify a language identifier for better rendering and compliance with markdown best practices. Consider using text or commit as the language identifier.

📝 Proposed fix
-```
+```text
 Fix: Display base key for Split Down shortcut
 
 * Modify the display of the Split Down shortcut to show the base key (Ctrl + Shift + ') instead of the shifted character.

As per static analysis hints: markdownlint-cli2 flags "Fenced code blocks should have a language specified (MD040)".

🧰 Tools
🪛 markdownlint-cli2 (0.22.0)

[warning] 47-47: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@FIX_PROPOSAL.md` at line 47, The fenced code block containing the commit
message ("Fix: Display base key for Split Down shortcut" and the bullet text)
lacks a language specifier; update its opening fence to include a language token
such as text or commit (e.g., ```text) so the block follows MD040 and renders
correctly.

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