Library Enter / Search 'i' 가 Inspect 진입. Doc 또는 Chunk 단일 view 로
metadata / provenance / blocks (doc) 또는 spans / text / embeddings (chunk)
6 section 을 collapsible 로 표시. Esc/q 로 originating pane 으로 복귀.
핵심:
- InspectTarget enum (`Doc(DocumentId) | Chunk(ChunkId)`).
- InspectState 본체 (`app.rs`) — target / doc / chunk / collapsed
HashSet / scroll / return_to / needs_fetch / loading.
- `src/inspect.rs`:
- `render_inspect` — target 종류별 render_doc / render_chunk 분기,
section header 가 collapse marker (▾/▸) 표시. metadata.user JSON
pretty-printed.
- `handle_key_inspect`: j/k / Down/Up scroll. PageDown/PageUp 10 row.
c = toggle all sections (v1 simplification). Esc/q = SwitchPane(return_to).
- `enter_inspect(state, target, return_to)` helper — Library 와 Search
공통 entry point.
- run-loop hook `refresh_inspect` — needs_fetch 면 lazy
inspect_doc_with_config / inspect_chunk_with_config.
- run.rs: Pane::Inspect arm 이 handle_key_inspect + render_inspect.
Idle tick 마다 refresh_inspect. SwitchPane(Inspect) lazy init.
- Library: Enter 가 enter_inspect(Doc(selected)) 호출 후 SwitchPane.
- Search: 'i' (plain modifier) 가 enter_inspect(Chunk(selected_hit))
호출 후 SwitchPane. typing 'i' (\"instance\") 와 충돌 가드.
테스트 12개 (`tests/inspect.rs`, TestBackend) — Esc 가 return_to 사용
/ q 도 동작 / j/k scroll bounds / PgUp PgDn ±10 / c 일괄 toggle / no
target hint / loading / doc view header+metadata+provenance+blocks /
collapse hides body / chunk view text+block_ids / no slot →
SwitchPane(Library) / enter_inspect helper sets fields.
Spec deviation (HOTFIXES `2026-05-02 P9-4`):
- `render_inspect<B: Backend>` generic 제거 (P9-1/2/3 와 동일).
- Search `i` 키 추가 (P9-2 spec 에 없었음, P9-4 retroactive 추가).
- `c` 일괄 collapse — spec 의 \"focus 기반 selective collapse\" 는 P+.
Docs (sync rule):
- README: TUI 행 \"4 패널\" + Quick start 코멘트.
- HANDOFF: 한 줄 요약 + Phase status (P9 3/5 → 4/5) + deviation 한 줄.
- HOTFIXES: P9-4 entry.
- tasks/p9/p9-4 status: completed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
30 lines
1.1 KiB
TOML
30 lines
1.1 KiB
TOML
[package]
|
|
name = "kebab-tui"
|
|
version = { workspace = true }
|
|
edition = { workspace = true }
|
|
rust-version = { workspace = true }
|
|
license = { workspace = true }
|
|
repository = { workspace = true }
|
|
description = "Ratatui shell + Library pane for kebab — UI consumes kebab-app facade only (P9-1)"
|
|
|
|
[dependencies]
|
|
kebab-core = { path = "../kebab-core" }
|
|
kebab-config = { path = "../kebab-config" }
|
|
# UI facade rule (design §8): UI crates may only touch `kebab-app`. The
|
|
# search / store / embed / llm / rag layers stay invisible behind it.
|
|
kebab-app = { path = "../kebab-app" }
|
|
ratatui = "0.28"
|
|
crossterm = "0.28"
|
|
anyhow = { workspace = true }
|
|
tracing = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
time = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
# Korean / wide-char column width — Ratatui's `Span` truncates by chars,
|
|
# not display width, so a list cell with `한` (width 2) followed by `a`
|
|
# (width 1) overflows by one column without explicit width accounting.
|
|
unicode-width = "0.2"
|
|
|
|
[dev-dependencies]
|
|
tempfile = { workspace = true }
|