feat: add running page keyboard shortcuts - #1298
Conversation
| /// Hides the current setting page | ||
| CloseSettings, | ||
| /// Permits to change the current running page | ||
| ChangeRunningPage(RunningPage), |
There was a problem hiding this comment.
We already have the ChangeRunningPage message. Why not reusing it?
There was a problem hiding this comment.
Good call — done in 7e89d0a. Dropped RunningPageShortcut entirely; Ctrl+1/2/3 now emit ChangeRunningPage directly.
| } | ||
| } | ||
|
|
||
| fn running_page_shortcut(&mut self, running_page: RunningPage) { |
There was a problem hiding this comment.
I think we can update change_running_page with these side-effects guard?
There was a problem hiding this comment.
Done — the guard is now an early return in change_running_page, so running_page_shortcut is gone and the tab-bar click path gets the same protection.
One thing to flag: test_conf and test_toggle_thumbnail were driving ChangeRunningPage from states the guard now rejects (no running page, or settings open), so I added explicit setup to both. Those states are unreachable from the real UI, but shout if you'd rather the guard were narrower.
Address review feedback: drop the RunningPageShortcut message and emit the existing ChangeRunningPage from the Ctrl+1/2/3 shortcuts. The side-effect guard moves into change_running_page so the tab-bar path is covered too. Two existing tests drove ChangeRunningPage from states the guard now rejects (no running page / settings open); they set the state explicitly. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Summary
Testing
link.execannot findwpcap.lib)Refs #97