consciousness/src/user
Kent Overstreet d4331e80f5 user: share candidate-browser helpers between F6/F7
F6 (learn) and F7 (compare) were duplicating the candidate-screen
skeleton: outer magenta-bordered block with screen legend + title,
settings row / content / help vertical split, 40/60 list/detail
horizontal split, j/k/↑/↓ nav with bounds clamping.

Factor out three helpers in user/widgets.rs:

  candidate_frame(frame, area, title) -> (settings, content, help)
  list_detail_split(content) -> (list, detail)
  handle_list_nav(events, list_state, count, on_other)

Callers provide screen-specific content — settings line, empty state,
per-candidate list item, detail pane, help line, extra key bindings —
and the helpers absorb the common framing.

Net change is small in lines (-13 src) but removes the
copy-paste-and-tweak trap: F8/F9/whatever-next-screen now starts from
these three calls instead of a copy of learn.rs.

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
2026-04-17 16:22:30 -04:00
..
chat.rs agent: add NodeBody::Image for Qwen3-VL vision input 2026-04-16 18:00:10 -04:00
compare.rs user: share candidate-browser helpers between F6/F7 2026-04-17 16:22:30 -04:00
context.rs config: drop dead code and collapse to a single backend 2026-04-16 15:41:55 -04:00
learn.rs user: share candidate-browser helpers between F6/F7 2026-04-17 16:22:30 -04:00
mod.rs user: F7 compare screen 2026-04-17 16:12:26 -04:00
scroll_pane.rs user: fix text selection on wrapped lines 2026-04-12 15:49:57 -04:00
selectable.rs selectable: silence unused method warning 2026-04-12 16:10:58 -04:00
subconscious.rs subconscious screen: show full context window 2026-04-12 01:45:10 -04:00
thalamus.rs thalamus: add thinking mode toggles (native + tool) 2026-04-14 18:25:00 -04:00
unconscious.rs user: remove dead scroll state from thalamus and unconscious screens 2026-04-11 01:35:15 -04:00
widgets.rs user: share candidate-browser helpers between F6/F7 2026-04-17 16:22:30 -04:00