CCExtractor / CCExtractor/ccsync

bug: hotkeysEnabled state is set but never checked before executing hotkeys

Offen
#425 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement frontend
Vorherrschende Sprache
TypeScript
Sterne
37
Forks
76
Ø Merge
3 T. 7 Std.
Gemergte PRs (30 T.)
2

Beschreibung

**Describe the bug**
The `hotkeysEnabled` state in the tasks component is set via mouse enter/leave handlers but is never actually checked before executing hotkey actions, it means hotkeys work globally on the page regardless of mouse position.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to `http://localhost:5173/home`
2. Hover your mouse outside the task table
3. Press f key
4. See that the search input still gets focused
5. Press r key
6. See that sync still triggers

**Expected behavior**
- Hotkeys (f, p, ArrowUp, ArrowDown, Enter, etc.) should only work when the mouse is hovering over the task table, when mouse leaves the task table, hotkeys should be disabled

**Root cause**
- `hotkeysEnabled` state is defined and set via **onMouseEnter/onMouseLeave** but the manual `useEffect` keyboard handler and all useHotkeys calls does not check `hotkeysEnabled` before executing

**Desktop (please complete the following information):**
- OS: macOS
- Browser: Chrome
- Version: Latest

**video:**

https://github.com/user-attachments/assets/6eeacafc-9ed0-421a-9f52-3985c2f6711a

- [x] I want to work on this issue.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne in der Tasks-Komponente, indem du den im Issue beschriebenen hotkey-useEffect-Handler und die useHotkeys-Aufrufe lokalisierst. Überprüfe, wie hotkeysEnabled von den Mouse-Enter- und Mouse-Leave-Handlern gesetzt wird, und verifiziere anschließend, dass Hotkeys nur über der Task-Tabelle funktionieren und außerhalb davon deaktiviert sind.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
typescript
Bereich
frontend
Issue-Typ
Bug
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
48/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.