Skip to content

General improvements: side panel placeholder and unit tests - #38

Merged
iharhl merged 2 commits into
masterfrom
feature/general-improvements
Nov 17, 2026
Merged

iharhl merged 2 commits into
masterfrom
feature/general-improvements

Conversation

@iharhl

@iharhl iharhl commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

Replaces the per-frame dummy session of the side panel and adds unit tests for the non-UI helpers.

Side panel

  • With no file open, the sections are drawn from a placeholder session stored on the app, instead of a dummy session created every frame
  • The section contents are disabled (greyed out) without a file. Before, the Jump To / Search fields and the radio buttons looked active, but typed text and clicks were lost on the next frame
  • File Information shows -- for the name and size instead of Untitled
  • The section headers can still be collapsed, and the layout does not change once a file is opened

Code

  • show_section helper for the collapsible sections and show_file_info for the file information, which keeps show_side_panel_contents short
  • The active session is borrowed from the fields directly, as get_curr_session_mut would borrow all of self

Tests

  • selection.rs: address within range in both drag directions and for a single byte, update restarting after release vs shift_update extending from the anchor, blocked selection, clear
  • byteedit.rs: ByteEdit::clear keeps the edit marks, remap_modified up / down / same address
  • events.rs: collect_inner run in a real egui frame. Text typed with Alt / Ctrl / Cmd is dropped and the filter resets on the next plain key, text and arrows are ignored in a focused text field, arrow order and key repeats, Shift+arrow kept, Escape, Shift and pointer state
  • fingerprint.rs: a 00 byte at address 0 is detected, a byte changed to the same value, removed start address
  • hex_input.rs: 0b prefixes, binary / decimal digit filters, trailing separator kept while typing, non-ASCII input rejected without panicking

@iharhl
iharhl merged commit b7a8d62 into master Nov 17, 2026
5 checks passed
@iharhl
iharhl deleted the feature/general-improvements branch November 17, 2026 23:07
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