fix: 1824 keybind shortcut was throwing initilization issue and after… - #1827
fix: 1824 keybind shortcut was throwing initilization issue and after…#1827viveksharma48 wants to merge 1 commit into
Conversation
… few retrys was dumping entire json (each line as new entry)
📝 WalkthroughWalkthroughAdds a Hyprland rule to float Ghidra’s inactive-project window and updates Hyprland keybind parsing, unmapped key display, and CLI output defaults. ChangesGhidra window rule
Hyprland keybind hint handling
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@Configs/.local/lib/hyde/keybinds/hint-hyprland.py`:
- Around line 18-20: Update the sanitization substitutions in the JSON cleanup
flow to preserve valid primitive types: do not quote numeric keycode values or
boolean allow_input_capture values. Only quote genuinely malformed string
tokens, then ensure map_codeDisplay integer lookups and boolean checks receive
their expected native types.
🪄 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 Plus
Run ID: 30ad1b7b-13f9-4e54-a5fc-17ae3dc186e4
📒 Files selected for processing (2)
Configs/.config/hypr/windowrules.confConfigs/.local/lib/hyde/keybinds/hint-hyprland.py
| clean_json = result.stdout | ||
| clean_json = re.sub(r'("keycode":\s*)([^"\s,\}]+)(\s*[,}])', r'\1"\2"\3', clean_json) | ||
| clean_json = re.sub(r'("allow_input_capture":\s*)([^"\n]+?)(,\s*\n)', r'\1"\2"\3', clean_json) |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Preserve JSON primitive types during sanitization.
These substitutions convert valid values such as keycode: 87 into "87" and allow_input_capture: false into "false". Consequently, map_codeDisplay cannot match its integer map keys, and boolean checks may treat "false" as truthy. Only quote genuinely malformed string tokens, or normalize types before downstream lookups.
🤖 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 `@Configs/.local/lib/hyde/keybinds/hint-hyprland.py` around lines 18 - 20,
Update the sanitization substitutions in the JSON cleanup flow to preserve valid
primitive types: do not quote numeric keycode values or boolean
allow_input_capture values. Only quote genuinely malformed string tokens, then
ensure map_codeDisplay integer lookups and boolean checks receive their expected
native types.
|
closing as the issue should be fix in upstream Hyprland |
… few retrys was dumping entire json (each line as new entry)
Pull Request
Description
Type of change
Please put an
xin the boxes that apply:Checklist
Please put an
xin the boxes that apply:Screenshots
(if appropriate)
Additional context
Add any other context about the problem here.
Summary by CodeRabbit
New Features
Bug Fixes