review(p9-fb-13): 회차 1 nit 반영

- `cheatsheet_intercept` doc 에 trade-off 명시: Esc-when-visible 가
  cheatsheet 만 닫고 mode flip 안 함 (single-effect-per-keystroke).
  Insert 모드 사용자는 두 번째 Esc 로 Normal 전환.
- `cheatsheet.rs` 모듈 doc 에 maintenance 경고 추가: push_section()
  이 hard-coded string 이라 binding 변경 시 cheatsheet 동기화 수동.
  자동 link 없음 — future PR 가 키 바꾸면 cheatsheet 도 갱신 필수.

118 TUI 테스트 통과 + clippy clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-03 08:32:37 +00:00
parent 69c410aaff
commit 79fb19f0df
2 changed files with 11 additions and 1 deletions

View File

@@ -15,6 +15,13 @@
//! * The verb hint line redesign sits in the existing `render_footer`
//! path; the per-pane string already serves the same role. A
//! future PR can split it into mode-aware verb fragments.
//!
//! **Maintenance**: the `push_section(...)` calls below hold every
//! key binding as a literal string — there is NO automated link
//! from `handle_key_*` to the cheatsheet entries. A future PR that
//! changes a binding (e.g. swap `r` → `R` for ingest) MUST update
//! the matching entry here. Drift would be silently invisible
//! (the cheatsheet still renders, but lies about the live key).
use ratatui::Frame;
use ratatui::layout::Rect;

View File

@@ -399,7 +399,10 @@ pub fn mode_intercept(app: &mut crate::app::App, key: crossterm::event::KeyEvent
/// - **`Esc` while visible** → close. Returning `true` here means
/// the global `mode_intercept` does NOT also see the Esc, so the
/// user's "close cheatsheet" action stays a single keystroke
/// instead of also flipping mode.
/// instead of also flipping mode. **Trade-off**: a user in
/// Insert mode with the cheatsheet open needs a SECOND `Esc` to
/// flip to Normal. Single-effect-per-keystroke wins over
/// compound actions.
/// - Any other key while visible → fall through (so the key reaches
/// the active pane normally — useful if the user wants to keep
/// the popup open and still navigate). The popup auto-closes