Codebase healthPhase 1 — Documentation & setup

Behavioral spec: op_picker

Status: Partially implemented — spec published; the console op-picker //! module doc does not yet link to it

Current shape

The active console 1Password picker adapter is crates/jackin-console/src/tui/op_picker.rs. Picker metadata types (RawOpField, RawOpItemDetail, and the From conversions into jackin_core::op_types) live in crates/jackin-env/src/picker.rs; the OpStructRunner trait lives in crates/jackin-env/src/op_struct.rs and is consumed by env resolution in crates/jackin-env/src/resolve.rs. The surface-local render/state-plan component lives in crates/jackin-console/src/tui/components/op_picker.rs.

The old op_picker/mod.rs path is obsolete. The remaining task is documentation linkage, not another split.

Key invariants

INVDescriptionVerify by
INV-1Field selection commits OpField::reference verbatim when present; only fixtures missing reference use the synthesized op://<vault>/<item>/<label> fallbackselection path returns field.reference.clone() first, then falls back to format!("op://{}/{}/{}"...)
INV-2No secret values in picker path — RawOpField has no value field; serde drops it silentlygrep picker structs for value; use exhaustive destructure tests around RawOpField
INV-3Loading is async; key handlers stay synchronous and only advance UI state / poll pending resultsbackground loaders send through channels; key handlers do not call the op CLI directly
INV-4Field-list selection indexes the display row list, not the filtered field slice directly. Section-header rows are navigable and selectable; Enter on a header toggles collapse rather than committing a fielddisplay rows use a FieldDisplayRow-style layer; collapse/expand and Up/Down operate on display-row length

Remaining work

  1. Add a link to op_picker Behavioral Spec in the //! module doc at the top of crates/jackin-console/src/tui/op_picker.rs; keep implementation details in the reference spec, not duplicated in the module doc.

On this page