fix: service worker network-first strategy + lint fixes

This commit is contained in:
N1C4T
2026-01-10 19:50:59 +04:00
parent 1a55696407
commit a5e82fffa6
21 changed files with 136 additions and 240 deletions

View File

@@ -27,7 +27,11 @@ interface CommandFooterProps {
setSelectedHelper: (helper: 'yay' | 'paru') => void;
}
// The sticky footer with command preview and copy/download buttons
/**
* The sticky footer that shows the generated command and action buttons.
* Contains more state than I'd like, but hey, it works.
* Keyboard shortcuts are vim-style because we're not savages.
*/
export function CommandFooter({
command,
selectedCount,
@@ -52,9 +56,11 @@ export function CommandFooter({
const { toggle: toggleTheme } = useTheme();
// Track if selection has changed from initial state (user interaction)
// Track if user has actually interacted - we hide the bar until then.
// Otherwise it just sits there looking sad with "No apps selected".
useEffect(() => {
if (selectedCount !== initialCountRef.current && !hasEverHadSelection) {
// eslint-disable-next-line react-hooks/set-state-in-effect
setHasEverHadSelection(true);
}
}, [selectedCount, hasEverHadSelection]);