GoToMode hook and state machine
Type: engineering
Domain: Codeplane TUI
Implement the go-to mode state machine as a reusable hook.
- useGoToMode(): Returns { active, activate(), cancel(), destinationHints: GoToHint[], error: string|null }
- State machine: Inactive → press g → Active (1500ms timer) → second key resolves/cancels → Inactive
- GoToHint[]: Static array of { key, destination, requiresRepo }
- Timeout: 1500ms from activation, cleared on any second key or cancel
- Timer cleanup: useEffect cleanup clears timeout on unmount
- Error state: 'No repository in context' displayed for 2000ms then auto-clears
Files: apps/tui/src/hooks/useGoToMode.ts
Dependencies: tui-nav-chrome-eng-01, tui-nav-chrome-eng-02
Auto-generated by smithers workflow
GoToMode hook and state machine
Type: engineering
Domain: Codeplane TUI
Implement the go-to mode state machine as a reusable hook.
Files: apps/tui/src/hooks/useGoToMode.ts
Dependencies:
tui-nav-chrome-eng-01,tui-nav-chrome-eng-02Auto-generated by smithers workflow