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

+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