Bug Description
While a sidebar text field is being edited, every key is routed to on_sidebar_key, which matches Ctrl+S before handing anything to the filter tree. The edit buffer is only committed into params on Enter, so Ctrl+S mid-edit serialises the previous params, without the text just typed, and then flashes Filter settings saved. The statusbar advertises Ctrl+S Save the whole time the sidebar has focus, editing included, so the misleading path is the one the UI points at.
Steps to Reproduce
Focus the filter sidebar, start editing the user field, type a username, and press Ctrl+S because the hint bar says Save.
Expected Behavior
Either the value just typed gets saved, or the shortcut declines while editing. Not a success message over a stale write.
Actual Behavior
typed 'alice'; params.user that would be saved = Some("olduser")
after Enter, params.user = Some("alice")
The old value goes to disk, the flash says it saved, and the next launch restores the old filter, so the user concludes persistence is flaky.
System Information
sqwatch 0.2.0, source checkout at 4c594fb
Ubuntu 26.04.1, rustc 1.97.1
Guarding the shortcut on !self.filter_tree.is_editing() fixes the wrong report, but committing first and then saving is barely larger and does what the user meant, since Ctrl+S mid-edit almost certainly means keep what I just typed. That needs a commit_edit(&mut params) on FilterTree lifted out of the existing Enter arm, which is a move rather than new logic.
The same missing check means a literal s cannot be typed into a pattern while Control is held, which is harmless for a regex but is the same bug. While in the statusbar code, the hint should read Enter Apply during an edit rather than Enter Edit/Toggle, since Enter is the key that actually commits.
Bug Description
While a sidebar text field is being edited, every key is routed to
on_sidebar_key, which matchesCtrl+Sbefore handing anything to the filter tree. The edit buffer is only committed intoparamsonEnter, soCtrl+Smid-edit serialises the previousparams, without the text just typed, and then flashesFilter settings saved. The statusbar advertisesCtrl+S Savethe whole time the sidebar has focus, editing included, so the misleading path is the one the UI points at.Steps to Reproduce
Focus the filter sidebar, start editing the user field, type a username, and press
Ctrl+Sbecause the hint bar says Save.Expected Behavior
Either the value just typed gets saved, or the shortcut declines while editing. Not a success message over a stale write.
Actual Behavior
The old value goes to disk, the flash says it saved, and the next launch restores the old filter, so the user concludes persistence is flaky.
System Information
sqwatch 0.2.0, source checkout at 4c594fb Ubuntu 26.04.1, rustc 1.97.1Guarding the shortcut on
!self.filter_tree.is_editing()fixes the wrong report, but committing first and then saving is barely larger and does what the user meant, sinceCtrl+Smid-edit almost certainly means keep what I just typed. That needs acommit_edit(&mut params)onFilterTreelifted out of the existingEnterarm, which is a move rather than new logic.The same missing check means a literal
scannot be typed into a pattern while Control is held, which is harmless for a regex but is the same bug. While in the statusbar code, the hint should readEnter Applyduring an edit rather thanEnter Edit/Toggle, since Enter is the key that actually commits.