Add /dashboard route, mark-all-watched on complete, keyboard fixes

- Move dashboard page to app/(pages)/dashboard, redirect / to /dashboard
  for authenticated users, update all nav/breadcrumb/auth hrefs
- Mark all episodes watched when a TV show status is set to "completed"
  (markAllEpisodesWatched skips already-watched episodes)
- Refactor KeyboardProvider to store shortcuts in a ref instead of
  state, eliminating unnecessary re-renders; use react-hotkeys-hook for
  Cmd+K so it works reliably in form inputs
- Fix useRegisterShortcut: re-register on every render (stable ref read)
  with a separate cleanup effect, removing brittle key memoization
- Search page: silently navigate to title detail on import instead of
  showing "Added to library" toast
This commit is contained in:
2026-03-01 11:06:26 -05:00
parent b6aaad243f
commit dcb48eaf37
13 changed files with 125 additions and 59 deletions
+2 -2
View File
@@ -10,11 +10,11 @@ import {
import { Kbd } from "@/components/ui/kbd";
export function KeyboardHelpDialog() {
const { shortcuts, helpOpen, setHelpOpen } = useKeyboard();
const { shortcutsRef, helpOpen, setHelpOpen } = useKeyboard();
// Group shortcuts by scope
const grouped: Record<string, { description: string; keys: string[] }[]> = {};
for (const def of shortcuts.values()) {
for (const def of shortcutsRef.current.values()) {
const scope = def.scope ?? "Global";
if (!grouped[scope]) grouped[scope] = [];
grouped[scope].push({ description: def.description, keys: def.keys });