Skip to content

Add F5 shortcut to refresh file/folder pickers and comparison view - #30

Merged
svenbuild merged 4 commits into
svenbuild:mainfrom
ElektroStudios:feature/f5-refresh-shortcut
Nov 19, 2026
Merged

svenbuild merged 4 commits into
svenbuild:mainfrom
ElektroStudios:feature/f5-refresh-shortcut

Conversation

@ElektroStudios

@ElektroStudios ElektroStudios commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Added F5 keyboard shortcut support on the Setup screen to refresh files and folders in the local file/folder pickers (bypassing both renderer and main-process directory caches so newly created, deleted, or modified files appear immediately without losing navigation history) as well as the Git repository browser.
  • Added F5 keyboard shortcut support on the Compare screen by invoking the existing runCompareFromToolbar() handler directly instead of duplicating reload logic, guarded so it only triggers when the Compare screen is active and no modal dialog is open.
  • Updated the Compare reload button tooltip to indicate the (F5) shortcut.
  • Added tests explorer-service.test

Validation

  • npm run check
  • npm test
  • npm run electron:package

Notes

I have no experience with TypeScript, Svelte, or Electron, so I delegated the code implementation to an AI assistant and verified the behavior locally on Windows. Please review carefully for any idiomatic improvements or edge cases I might have missed.

- Add optional cache-bypass support to listDirectory IPC so manual refreshes reflect file modifications, creations, and deletions on disk.
- Bind F5 on the Setup screen to reload open directories in Local compare panes (preserving navigation history and selection) and the Git repository browser.
- Bind F5 on the Compare screen to invoke the existing runCompareFromToolbar handler directly, guarded so hidden mounted instances do not trigger while Settings or dialogs are open.
Pache Sven added 3 commits November 19, 2026 17:41
Folders visited before the refresh now reload on the next visit instead
of showing the renderer copy from before the refresh.
…rowser hook

The renderer already forgets every cached folder on F5, but the main
process could still serve an old listing for a revisited folder whose
mtime did not change. GitRepositoryBrowser is not mounted anywhere, so
its F5 handler never ran and is removed again.
@svenbuild
svenbuild merged commit ebe0e69 into svenbuild:main Nov 19, 2026
@svenbuild

Copy link
Copy Markdown
Owner

Thanks, merged! Changes I pushed on top before merging:

  • F5 now clears the whole folder cache in both the renderer and the main process. Folder mtimes do not change when a file inside is edited, so revisited folders could otherwise still show old sizes.
  • Typed but unsubmitted text in the path field is kept on refresh.
  • Removed the F5 hook in GitRepositoryBrowser.svelte: that component is not mounted anywhere, so it never ran. F5 in Git setup is therefore not part of this change.

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.

2 participants