Skip to content

Improved register view#2023

Open
rocketz wants to merge 1 commit into
grumpycoders:mainfrom
rocketz:main
Open

Improved register view#2023
rocketz wants to merge 1 commit into
grumpycoders:mainfrom
rocketz:main

Conversation

@rocketz
Copy link
Copy Markdown
Contributor

@rocketz rocketz commented May 25, 2026

  • Now shows both hexidecimal and decimal at the same time
  • Color coded registers by type for easier overview
  • Inline editing of values - both as hex or decimal
  • Keyboard navigation

* Now shows both hexidecimal and decimal at the same time
* Color coded registers by type for easier overview
* Inline editing of values - both as hex or decimal
* Keyboard navigation
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 25, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7a8ebc5b-8844-4ae9-a972-917639e7b5de

📥 Commits

Reviewing files that changed from the base of the PR and between 33788e8 and 8717441.

📒 Files selected for processing (2)
  • src/gui/widgets/registers.cc
  • src/gui/widgets/registers.h

📝 Walkthrough

Walkthrough

Register editing refactored from modal popups to inline ImGui input fields. New helper functions support value parsing and clipboard copying with per-radix context menus. GPR and Misc tabs now use editable InputText fields with validation callbacks, replacing the old makeEditableRegister modal mechanism.

Changes

Register Widget Inline Editing Refactor

Layer / File(s) Summary
Header Declarations
src/gui/widgets/registers.h
Private method signatures changed: contextMenu(...) and updateRegisterValue(...) added; makeEditableRegister(...) removed. Member variables m_selected, m_registerEditor, m_editorToOpen removed; m_showFixed retained.
Helper Functions: contextMenu and updateRegisterValue
src/gui/widgets/registers.cc
New contextMenu(...) formats and copies register values (hex or decimal) to clipboard. updateRegisterValue(...) parses user input and writes to either registers->pc or GPR registers with validation.
GPR Tab Inline Editing UI
src/gui/widgets/registers.cc
GPR register rows refactored to colored text labels and inline InputText fields for hex (read-only for register 0) and decimal values. Per-radix context menus added for copying. PC also rendered inline with InputText and context menu.
Misc Tab PC Inline Editing
src/gui/widgets/registers.cc
Misc tab pc display changed from formatted text to inline hex InputText field with updateRegisterValue callback and context menu for copying.
Modal Editing Infrastructure Removal
src/gui/widgets/registers.cc
Entire modal/popup-based register editing section removed, including BeginPopupModal loop and m_editorToOpen-driven state tracking.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested labels

size/XL

Poem

🐰 A modal once opened to edit each register,
Now inline fields sparkle, much nimbler and fresher!
With context menus copying values with care,
The widgets hop forward with style and such flair! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Improved register view' directly reflects the main change—refactoring the register UI from modal editing to inline editable fields with display improvements.
Description check ✅ Passed The description is fully related to the changeset, detailing the key improvements: dual hex/decimal display, color-coded registers, inline editing, and keyboard navigation.
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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant