diff --git a/docs/tui_v2_ui_refresh_plan.md b/docs/tui_v2_ui_refresh_plan.md index f6c36f9c..10559395 100644 --- a/docs/tui_v2_ui_refresh_plan.md +++ b/docs/tui_v2_ui_refresh_plan.md @@ -416,3 +416,86 @@ Validation: Next recommended slice: 1. Phase 4 inspector board templates for advanced kinds (`ssh`, `pgp`, `nostr`, `key_value`) and stronger action-strip context hints. + +### 2026-03-02 - Phase 4 advanced actions (copy workflow) landed + +Implemented in `src/seedpass/tui_v2/app.py`: + +1. Added palette command: +- `copy (optional: confirm)` + +2. Added kind-aware copy field resolution for: +- `password/stored_password`: `password`, `username`, `url` +- `seed/managed_account`: `seed|phrase` +- `totp`: `code`, `secret` +- `ssh`: `public`, `private` +- `pgp`: `private`, `fingerprint` +- `nostr`: `npub`, `nsec` +- `key_value`: `key`, `value` +- `document/note`: `content|text` + +3. Sensitive copy targets now require explicit confirmation (`confirm`) before clipboard action. + +4. Updated command reference/help coverage to include `copy`. + +Validation: + +1. `poetry run pytest -q src/tests/test_tui_v2_textual_interactions.py src/tests/test_tui_v2_action_matrix.py` +2. Result: `29 passed`. + +Next recommended slice: + +1. Extend Phase 4 with explicit file export actions for advanced key kinds (SSH/PGP/Nostr material export paths with confirmation and tests). + +### 2026-03-02 - Phase 4 advanced actions (export workflow) landed + +Implemented in `src/seedpass/tui_v2/app.py`: + +1. Added palette command: +- `export-field (optional: confirm)` + +2. Reused kind-aware field resolution from copy workflow and added file export writing: +- supports same kind/field matrix as `copy`. +- writes UTF-8 payloads to absolute or relative paths (relative paths resolve from cwd). + +3. Sensitive export targets now require explicit confirmation (`confirm`) before writing. + +4. Updated command discoverability/help: +- palette placeholder +- help summary +- full palette reference + +Validation: + +1. `poetry run pytest -q src/tests/test_tui_v2_textual_interactions.py src/tests/test_tui_v2_action_matrix.py` +2. Result: `29 passed`. + +Next recommended slice: + +1. Continue Phase 5 polish: left tree navigation model + compact/expanded density toggle and final visual alignment pass to mockups. + +### 2026-03-02 - Phase 5 polish (density + profile tree scaffold) landed + +Implemented in `src/seedpass/tui_v2/app.py`: + +1. Added density controls: +- keybind: `d` (toggle compact/comfortable) +- palette: `density ` +- top ribbon, left panel, and grid heading now show active density mode + +2. Added left-panel profile tree scaffold: +- new `Profiles` section in left panel +- shows known profiles from profile service when available +- marks active fingerprint line + +3. Expanded command discoverability: +- palette placeholder/help/reference include `density` command. + +Validation: + +1. `poetry run pytest -q src/tests/test_tui_v2_textual_interactions.py src/tests/test_tui_v2_action_matrix.py` +2. Result: `29 passed`. + +Next recommended slice: + +1. Continue Phase 5 by adding explicit keyboard navigation inside the left profile tree and wiring profile-selection actions to update active context. diff --git a/memory-update.md b/memory-update.md index 04f539f7..f273533a 100644 --- a/memory-update.md +++ b/memory-update.md @@ -954,3 +954,76 @@ - Result: `28 passed`. - Refresh plan updated: - `docs/tui_v2_ui_refresh_plan.md` now records Phase 3 progress and sets Phase 4 advanced-kind board templates as next slice. + +## 2026-03-02 UI refresh implementation slice: Phase 4 advanced-kind actions (copy workflow) +- Implemented advanced-kind inspector action command in `src/seedpass/tui_v2/app.py`: + - `copy (optional: confirm)` +- Added kind-specific copy field resolution: + - password/stored_password: `password`, `username`, `url` + - seed/managed_account: `seed|phrase` + - totp: `code`, `secret` + - ssh: `public`, `private` + - pgp: `private`, `fingerprint` + - nostr: `npub`, `nsec` + - key_value: `key`, `value` + - document/note: `content|text` +- Sensitive field copies now require explicit `confirm`. +- Updated palette help/reference strings to include copy action. +- Tests added/updated: + - `src/tests/test_tui_v2_textual_interactions.py` + - new test: `test_tui2_textual_copy_command_for_core_and_advanced_fields` + - validation assertions for copy usage errors + - `src/tests/test_tui_v2_action_matrix.py` + - matrix now exercises copy usage and success paths +- Validation: + - `poetry run pytest -q src/tests/test_tui_v2_textual_interactions.py src/tests/test_tui_v2_action_matrix.py` + - Result: `29 passed`. +- Refresh plan updated: + - `docs/tui_v2_ui_refresh_plan.md` marks this Phase 4 action slice and sets advanced-key export actions as next recommendation. + +## 2026-03-02 UI refresh implementation slice: Phase 4 advanced-kind actions (export workflow) +- Implemented export action command in `src/seedpass/tui_v2/app.py`: + - `export-field (optional: confirm)` +- Export workflow details: + - uses the same field/kind resolver as `copy` + - writes UTF-8 payloads to requested file path + - supports relative paths (resolved from current working directory) + - creates parent directories when needed +- Sensitive field exports now require explicit `confirm`. +- Discoverability updates: + - command palette placeholder now includes `export-field` + - help summary and palette reference include `export-field` +- Tests added/updated: + - `src/tests/test_tui_v2_textual_interactions.py` + - extended copy test to cover `export-field` success and confirmation gating + - validation test covers usage errors + - `src/tests/test_tui_v2_action_matrix.py` + - matrix now exercises export-field usage + success paths +- Validation: + - `poetry run pytest -q src/tests/test_tui_v2_textual_interactions.py src/tests/test_tui_v2_action_matrix.py` + - Result: `29 passed`. +- Refresh plan updated: + - `docs/tui_v2_ui_refresh_plan.md` marks export workflow landed and points next to Phase 5 polish (tree nav + density toggle + final mockup alignment). + +## 2026-03-02 UI refresh implementation slice: Phase 5 polish (density + profile tree scaffold) +- Implemented density controls in `src/seedpass/tui_v2/app.py`: + - keybind: `d` via `action_toggle_density` + - palette command: `density ` + - density state shown in top ribbon, left panel, and grid heading +- Implemented left-panel profile tree scaffold: + - new `Profiles` section in left panel + - uses profile service list when available + - marks active fingerprint entry +- Discoverability updates: + - command palette placeholder/help/reference include density command +- Tests updated: + - `src/tests/test_tui_v2_textual_interactions.py` + - pagination flow now verifies keybind/palette density success + - settings validation now covers density usage/invalid-mode errors + - `src/tests/test_tui_v2_action_matrix.py` + - matrix now exercises density usage error + valid mode switches +- Validation: + - `poetry run pytest -q src/tests/test_tui_v2_textual_interactions.py src/tests/test_tui_v2_action_matrix.py` + - Result: `29 passed`. +- Refresh plan updated: + - `docs/tui_v2_ui_refresh_plan.md` now tracks Phase 5 density/tree scaffold progress and points next to explicit tree keyboard navigation + selection actions. diff --git a/src/seedpass/tui_v2/app.py b/src/seedpass/tui_v2/app.py index 3654d671..33b4f3d3 100644 --- a/src/seedpass/tui_v2/app.py +++ b/src/seedpass/tui_v2/app.py @@ -288,6 +288,7 @@ def launch_tui2( ("2", "focus_center", "Center"), ("3", "focus_right", "Right"), ("f", "cycle_filter", "Filter"), + ("d", "toggle_density", "Density"), ("h", "cycle_archive_scope", "Archive View"), ("p", "prev_page", "Prev Page"), ("n", "next_page", "Next Page"), @@ -319,6 +320,7 @@ def launch_tui2( placeholder=( "Command palette: help | open | search | " "help-commands | onboarding | quickstart | stats | session-status | lock | unlock | " + "density | " "filter | archive | restore | " "archive-filter | " "add-password