feat(tui-v2): extend card framing to all remaining inspector boards

TOTP, SSH, PGP, Nostr, and Seed/Managed Account boards now use
_board_card sections matching Password/Note treatment for consistent
visual language across all 9 board types.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
This commit is contained in:
thePR0M3TH3ANandClaude Opus 4.6 committed 2026-03-02 20:54:17 -05:00
1 parent 0ec4b86076
commit d1807ddab6
4 files changed
+117 -21

No files matched your search

+32
View File
@@ -1166,3 +1166,35 @@ Validation:
1. `poetry run pytest -q src/tests/test_tui_v2_textual_interactions.py src/tests/test_tui_v2_action_matrix.py`
2. Result: `58 passed`.
## 32) Progress Update (2026-03-03, Slice: Universal Card Framing)
Completed:
1. Extended `_board_card` framing to all remaining inspector boards:
- TOTP: `Parameters` (period/digits/code/secret) + `Quick Actions`
- SSH: `Keys` (public/private) + `Quick Actions`
- PGP: `Keys` (fingerprint/public/private) + `Quick Actions`
- Nostr: `Keys` (npub/nsec) + `Quick Actions`
- Seed/Managed Account: `Seed Info` (phrase/word count/index) + `Quick Actions`
2. All boards now use consistent card-section visual language matching the Password/Note treatment from Slice 29.
Code references:
1. `src/seedpass/tui_v2/app.py` (TOTP, SSH, PGP, Nostr, Seed board sections)
Regression coverage:
1. Updated SSH/PGP/Nostr board test to assert `+- Keys` and `+- Quick Actions` card framing.
2. Updated Seed/Managed Seed board test to assert `+- Seed Info` and `+- Quick Actions` card framing.
3. Updated TOTP board test to assert `+- Parameters` and `+- Quick Actions` card framing.
Validation:
1. `poetry run pytest -q src/tests/test_tui_v2_textual_interactions.py src/tests/test_tui_v2_action_matrix.py`
2. Result: `58 passed`.
Strict closeout impact:
1. All 9 board types now have consistent card-section framing.
2. SSH/PGP/Nostr/Seed boards moved from visual-gap to card-parity with Password/Note.
+14
View File
@@ -175,3 +175,17 @@
- Focused TUI v2 gate:
- `poetry run pytest -q src/tests/test_tui_v2_textual_interactions.py src/tests/test_tui_v2_action_matrix.py`
- Result: `58 passed`.
## Session Update (2026-03-03, Slice 6)
### Universal card framing
- Extended `_board_card` to TOTP (Parameters), SSH/PGP/Nostr (Keys), and Seed/Managed (Seed Info) boards.
- All 9 board types now use consistent card-section visual language.
- Updated regression tests for SSH/PGP/Nostr, Seed/Managed, and TOTP boards.
### Verification
- Focused TUI v2 gate: `58 passed`.
### Next
- Capture fresh state dump/screenshots for updated boards.
- Update strict closeout scoreboard (Password/Stored Password/Note now at card parity; remaining Minor Gap items are density/rhythm only).
+59 -21
View File
@@ -2046,11 +2046,19 @@ def launch_tui2(
if kind == "managed_account"
else "BIP-39 Seed Board"
)
lines = header + [
f"{self._kind_icon(kind)} {board_name}",
"▣ Reveal Seed ▣ QR Seed ▣ Copy Seed(confirm) ▣ Export Seed(confirm)",
seed_rows = [
f"Seed Phrase*: hidden (v confirm) | Word Count: {words}",
f"Index Num*: {index}",
]
operation_rows = [
"▣ Reveal Seed ▣ QR Seed ▣ Copy Seed(confirm) ▣ Export Seed(confirm)",
]
lines = header + [
f"{self._kind_icon(kind)} {board_name}",
"Seed Fields",
*self._board_card("Seed Info", seed_rows),
"Operations",
*self._board_card("Quick Actions", operation_rows),
*self._notes_tags_panel_hint(
tags_text=tags_text, notes_text=notes_text
),
@@ -2079,6 +2087,15 @@ def launch_tui2(
)
archived = "Yes" if bool(entry.get("archived", False)) else "No"
index_num = str(entry.get("index", "(auto)"))
field_rows = [
f"Period : {period}s",
f"Digits : {digits}",
"Current Code: hidden (use '6' board or 'v' reveal)",
"Secret: hidden | URI via QR",
]
operation_rows = [
"▣ Copy Code ▣ Copy URL(confirm) ▣ Reveal Secret ▣ QR",
]
lines = [
f"Entry #{entry_id} {label}",
"-" * 28,
@@ -2086,12 +2103,9 @@ def launch_tui2(
f"Kind: {kind} | Modified: {modified} | Archived: {archived}",
f"Index Num*: {index_num}",
"2FA Fields",
f"Period : {period}s",
f"Digits : {digits}",
"Current Code: hidden (use '6' board or 'v' reveal)",
"Secret: hidden | URI via QR",
*self._board_card("Parameters", field_rows),
"Operations",
"▣ Copy Code ▣ Copy URL(confirm) ▣ Reveal Secret ▣ QR",
*self._board_card("Quick Actions", operation_rows),
*self._notes_tags_panel_hint(
tags_text=tags_text, notes_text=notes_text
),
@@ -2125,16 +2139,24 @@ def launch_tui2(
)
archived = "Yes" if bool(entry.get("archived", False)) else "No"
index_num = str(entry.get("index", "(auto)"))
key_rows = [
f"Public Key: {public_preview}",
"Private Key: hidden (use 'v confirm' to reveal)",
]
operation_rows = [
"▣ Copy Public ▣ Export Public",
"▣ Reveal Private ▣ Copy Private ▣ Export Private",
]
lines = [
f"Entry #{entry_id} {label}",
"-" * 28,
f"{self._kind_icon(kind)} SSH Board",
f"Kind: ssh | Modified: {modified} | Archived: {archived}",
f"Index Num*: {index_num} | Entry Num: {entry_id}",
"▣ Copy Public ▣ Export Public",
"▣ Reveal Private ▣ Copy Private ▣ Export Private",
f"Public Key: {public_preview}",
"Private Key: hidden (use 'v confirm' to reveal)",
"Key Material",
*self._board_card("Keys", key_rows),
"Operations",
*self._board_card("Quick Actions", operation_rows),
*self._notes_tags_panel_hint(
tags_text=tags_text, notes_text=notes_text
),
@@ -2162,17 +2184,25 @@ def launch_tui2(
)
archived = "Yes" if bool(entry.get("archived", False)) else "No"
index_num = str(entry.get("index", "(auto)"))
key_rows = [
f"Fingerprint: {fingerprint_text}",
"Public Key: available",
"Private Key: hidden (use 'v confirm' to reveal)",
]
operation_rows = [
"▣ Copy Public ▣ Export Public",
"▣ Reveal Private ▣ Copy Private ▣ Export Private",
]
lines = [
f"Entry #{entry_id} {label}",
"-" * 28,
f"{self._kind_icon(kind)} PGP Board",
f"Kind: pgp | Modified: {modified} | Archived: {archived}",
f"Index Num*: {index_num} | Entry Num: {entry_id}",
"▣ Copy Public ▣ Export Public",
"▣ Reveal Private ▣ Copy Private ▣ Export Private",
f"Fingerprint: {fingerprint_text}",
"Public Key: available",
"Private Key: hidden (use 'v confirm' to reveal)",
"Key Material",
*self._board_card("Keys", key_rows),
"Operations",
*self._board_card("Quick Actions", operation_rows),
*self._notes_tags_panel_hint(
tags_text=tags_text, notes_text=notes_text
),
@@ -2200,16 +2230,24 @@ def launch_tui2(
)
archived = "Yes" if bool(entry.get("archived", False)) else "No"
index_num = str(entry.get("index", "(auto)"))
key_rows = [
f"npub: {npub}",
"nsec: hidden (use 'v confirm' to reveal)",
]
operation_rows = [
"▣ Copy npub ▣ Copy nsec ▣ Edit",
"▣ QR Public ▣ QR Private",
]
lines = [
f"Entry #{entry_id} {label}",
"-" * 28,
f"{self._kind_icon(kind)} Nostr Board",
f"Kind: nostr | Modified: {modified} | Archived: {archived}",
f"Index Num*: {index_num} | Entry Num: {entry_id}",
"▣ Copy npub ▣ Copy nsec ▣ Edit",
"▣ QR Public ▣ QR Private",
f"npub: {npub}",
"nsec: hidden (use 'v confirm' to reveal)",
"Key Material",
*self._board_card("Keys", key_rows),
"Operations",
*self._board_card("Quick Actions", operation_rows),
*self._notes_tags_panel_hint(
tags_text=tags_text, notes_text=notes_text
),
@@ -1433,6 +1433,8 @@ async def test_tui2_textual_ssh_pgp_nostr_boards_show_action_fidelity() -> None:
await pilot.pause()
board = _widget_text(app, "#entry-detail")
assert "SSH Board" in board
assert "+- Keys " in board
assert "+- Quick Actions " in board
assert "▣ Copy Public" in board
assert "▣ Reveal Private" in board
@@ -1440,6 +1442,8 @@ async def test_tui2_textual_ssh_pgp_nostr_boards_show_action_fidelity() -> None:
await pilot.pause()
board = _widget_text(app, "#entry-detail")
assert "PGP Board" in board
assert "+- Keys " in board
assert "+- Quick Actions " in board
assert "Fingerprint: FPR-2" in board
assert "▣ Export Private" in board
@@ -1447,6 +1451,8 @@ async def test_tui2_textual_ssh_pgp_nostr_boards_show_action_fidelity() -> None:
await pilot.pause()
board = _widget_text(app, "#entry-detail")
assert "Nostr Board" in board
assert "+- Keys " in board
assert "+- Quick Actions " in board
assert "▣ QR Public" in board
assert "▣ QR Private" in board
@@ -1486,6 +1492,8 @@ async def test_tui2_textual_seed_and_managed_seed_boards_show_fidelity() -> None
await pilot.pause()
board = _widget_text(app, "#entry-detail")
assert "BIP-39 Seed Board" in board
assert "+- Seed Info " in board
assert "+- Quick Actions " in board
assert "Word Count: 12" in board
assert "copy seed confirm" in board
@@ -1493,6 +1501,8 @@ async def test_tui2_textual_seed_and_managed_seed_boards_show_fidelity() -> None
await pilot.pause()
board = _widget_text(app, "#entry-detail")
assert "Managed Account Seed Board" in board
assert "+- Seed Info " in board
assert "+- Quick Actions " in board
assert "Word Count: 12" in board
assert "export-field seed <path> confirm" in board
@@ -1542,6 +1552,8 @@ async def test_tui2_textual_note_and_totp_boards_include_common_metadata() -> No
assert "Kind: totp | Modified:" in board
assert "Index Num*:" in board
assert "2FA Fields" in board
assert "+- Parameters " in board
assert "+- Quick Actions " in board
@pytest.mark.anyio