fix(settings): polish TUI mouse interactions and dirty markers#2395
Open
NihilDigit wants to merge 1 commit into
Open
fix(settings): polish TUI mouse interactions and dirty markers#2395NihilDigit wants to merge 1 commit into
NihilDigit wants to merge 1 commit into
Conversation
sinelaw
approved these changes
Jun 18, 2026
sinelaw
left a comment
Owner
There was a problem hiding this comment.
This is an autogenerated comment
- Right-panel page title: Confirmed "General", "Plugin: dashboard", and "Plugin: git_explorer" all appear correctly in bold as the right-panel title; this gives full context when sidebar names are truncated.
- Plugin name truncation: Verified
Plugin: git_ex...truncated with ellipsis in the fixed-width sidebar while the right panel shows the full name. Display-width-aware truncation correctly handles CJK/emoji names without overflow. - Toggle dirty markers: Toggling Check For Updates shows
(modified)in the title bar and●on the setting row and parent category. Toggling back to the original value clears all markers immediately (no save needed). Same behavior confirmed for thePlugin: git_explorerColorNames toggle reverting to its schema default. - Left-tree focus: After navigating into an Editor section via keyboard, the
>focus cursor correctly stays in the left tree panel rather than jumping to the body. - Hit-test fix:
ControlLayoutInfo::Togglenow storescheckbox_areainstead offull_area, scoping the toggle click target to the visible chip only. Layout test updated accordingly. - Unit tests: All PR-listed unit tests pass (
pad_to_display_width_uses_terminal_columns, threetruncate_display_width_with_ellipsis_*tests,dropdown_reverting_to_original_value_clears_pending_and_row_modified,reset_after_unsaved_inherited_dropdown_change_cancels_pending_edit,test_hit_test_item_with_toggle). - Code quality: New helpers (
path_has_pending_change,page_has_pending_changes,effective_original_value) are well-scoped abstractions with clear semantics; no duplication. Thepaths_intersectfunction correctly handles JSON pointer prefix matching. Follows all CONTRIBUTING.md guidelines (display-width APIs, no full-buffer scans, tests reproduce each behavioral claim).
Generated by Claude Code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes several user-visible rough edges in the TUI Settings panel:
Visual context
This screenshot shows the new right-panel title and the left-tree truncation behavior for long plugin names:
Notes
The left tree remains fixed-width. Plugin names come from external input and can be arbitrarily long, so this keeps the sidebar stable and uses the right-panel title to preserve page context.
Toggle mouse behavior now uses a narrower hit target than before. Previously, parts of the label row could also toggle the value. I think using the label/row for selection and the chip for mutation is less surprising and matches Dropdown, Number, and Text controls, but this can be adjusted if the preferred Settings behavior is clicking anywhere on the toggle row to toggle.
Testing
cargo fmt --checkcargo build -p fresh-editorcargo check --all-targetscargo clippy --all-targetscargo test -p fresh-editor --quiet pad_to_display_width_uses_terminal_columnscargo test -p fresh-editor --quiet truncate_display_width_with_ellipsiscargo test -p fresh-editor --quiet dropdown_reverting_to_original_value_clears_pending_and_row_modifiedcargo test -p fresh-editor --quiet reset_after_unsaved_inherited_dropdown_change_cancels_pending_editcargo test -p fresh-editor --quiet test_hit_test_item_with_togglecargo test -p fresh-editor --test e2e_tests --quiet settings::test_settings_togglecargo test -p fresh-editor --test e2e_tests --quiet settings::test_plugin_toggle_mouse_click_chip_matches_visual_positioncargo test -p fresh-editor --test e2e_tests --quiet settings_tree_viewcodex review --commit HEAD