Skip to content

Ideas board: vim navigation + visual-mode region select (M3) #158

Description

@binarypath

Keyboard-native navigation and region selection for the ideas board (depends on #156 the engine endpoint, and #157 the board scaffold). This is what turns "analyze the whole 1Y window" into "analyze a candle range I selected".

Model (vim)

Board levelh/j/k/l move the selection between elements (nodes); Enter (or zoom) focuses a chart node, switching into chart mode. Esc returns to board level.

Chart level (a focused chart) — a candle cursor:

  • h / l = move ±1 candlestick (left / right)
  • H / L = ±5 candlesticks
  • {count}{motion} = ±count, e.g. 10l = 10 right, 10h = 10 left (standard vim count motions)

Visual modev anchors at the cursor; h/l (and counts) extend the selection over a candle range, rendered as the "analysed window" (in-range candles bright + blue/orange rails, the rest dimmed to context). Enter / :analyze fires GET /api/backtest/optimal-entry/{symbol}?from=&to= for the selected window and pins a way-to-trade card wired to the region. Esc cancels.

Notes / approach

  • Reuse the unified region vim-nav philosophy already in vim-nav.js; here it runs inside the React Flow board (board level) + inside a focused chart (candle level).
  • Use lightweight-charts coordinate APIs (logical range / timeToCoordinate) to place the cursor + the range overlay; the selected range maps to the endpoint's from/to.
  • The selection is keyboard-native marquee — same result as a mouse drag, but vim-first (mouse = failure).

Acceptance

  • Cursor moves by 1 / 5 / count; v selects a range with the analysed-window rendering; Enter analyses exactly that window and pins the card; Esc exits cleanly; no element is unreachable by keyboard.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions