11 KiB
TUI v2 UI Refresh Plan (Mockup-Aligned)
Status: Active (2026-03-02)
Branch target: beta
Primary references: UI_mockups/PNG/*.png, UI_mockups/SeedPass_UI-Board.pdf
1) Purpose
Translate the mockup direction into an implementation-ready, multi-session plan for Textual TUI v2 while preserving SeedPass's green visual identity.
This plan is intentionally detailed so future sessions can continue implementation without re-discovery.
2) Design Direction We Are Targeting
From the mockups, the desired direction is:
- Table-first operations with high information density.
- Persistent left "seed/account tree" navigation column.
- Large, contextual lower "inspector board" that changes by selected entry kind.
- Persistent bottom action strip for discoverability.
- Strong framed layout (hard borders, segmented panels, explicit labels).
- Black/neutral structure language, but with SeedPass green theme colors.
3) Visual System Contract (Keep Green Theme)
Use the existing TUI v2 palette as baseline (already present in src/seedpass/tui_v2/app.py):
- Base background:
#080a0c - Panel background:
#0d1114 - Header/footer background:
#0b0f13 - Primary text:
#daf2e5 - Secondary text:
#97b8a6 - Border default:
#1a3024 - Border emphasis:
#274533 - Accent/action:
#2abf75 - Focus highlight:
#58f29d
Rules:
- Keep semantic role colors stable (focus, warning, success, muted).
- Use contrast through brightness and border weight, not unrelated hues.
- Keep monochrome mockup geometry and spacing, but render in green palette.
4) Information Architecture (Target Layout)
Target screen structure:
- Top status ribbon:
- fingerprint
- managed users count
- entries count
- active kind/filter
- last sync timestamp
- Main split:
- Left: seed/account tree + context summary.
- Right:
- Top: search + filter controls + dense entry table/grid.
- Bottom: contextual inspector board for selected entry.
- Bottom action strip:
- Global shortcuts always visible.
- Context shortcuts appended for selected kind and mode.
5) Interaction Model Contract
Primary modes:
- Browse Mode:
- Grid-focused.
- Fast navigation/search/filter/sort.
- Inspect Mode:
- Inspector board-focused.
- Entry-specific actions (reveal/copy/export/edit/link).
- Edit Mode:
- Existing document editor/entry mutation mode.
Behavior rules:
- Selected row always drives inspector board content.
- Locked vault state must be visible in status ribbon and action strip.
- Sensitive actions reflect state chips:
HIDDEN,REVEALED,COPIED,LOCKED
- If no selection exists, inspector shows onboarding or "select entry" guidance.
6) Component-Level Spec
6.1 Left Navigation Tree
Goal: match mockup's persistent profile/seed hierarchy.
Requirements:
- Always visible.
- Shows active profile + managed-account context.
- Supports keyboard traversal and selection.
- Selection changes filter context for center grid.
Initial fallback (if full tree data unavailable):
- Render static grouped sections from currently available services.
- Keep widget contract stable so backing data can be enriched later.
6.2 Top Entry Grid
Goal: table-like view similar to mockups.
Columns (target):
- Index num
- Entry num
- Title
- Kind
- Tags (truncated)
- Date modified
- Archive/blacklist status
Rules:
- Compact row density by default.
- Overflow truncation with consistent ellipsis behavior.
- Sort indicators shown in header (even if only one active sort initially).
- Keyboard row selection must stay smooth on large datasets.
6.3 Inspector Board (Lower Panel)
Goal: board-style details by entry kind, matching mockup families.
Common board header:
- Entry label + kind.
- Modified timestamp.
- Archive/blacklist status.
- Index/entry IDs.
- Right-side primary action button area (
Edit, etc).
Common board body:
- Field blocks with labels.
- Copy/export/reveal controls as command hints/buttons.
- Notes area.
- Tags panel (right rail when space permits).
6.4 Bottom Action Strip
Goal: persistent discoverability.
Global segment examples:
[S]ettings[A]dd Entry[C]reate Seed[R]emove Seed[H]ide/Reveal Sensitive[E]xport[I]mport[B]ackup
Context segment examples:
- Password: copy password, copy username, reveal, qr.
- 2FA: copy code, refresh code, show qr.
- SSH/PGP: copy public/private, export key.
- Nostr: copy npub/nsec, show public/private qr.
7) Entry-Type Board Templates (Implementation Contract)
Each entry kind gets a formatter/template function returning a structured board text payload.
Template priority order:
password/stored_passwordnote/documentseed/managed_accounttotpsshpgpnostrkey_value- fallback generic JSON board
Per-kind minimum fields:
- Password/stored password:
- password (masked by default), username, url, tags, notes
- Note/document:
- content preview, tags, notes, file type (document)
- Seed/managed account:
- seed phrase hidden/reveal state, derivation/index metadata where available, tags, notes
- TOTP:
- current code, period, digits, secret hidden/reveal, qr support
- SSH:
- public key, private key hidden/reveal, export hints
- PGP:
- fingerprint, public key, private key hidden/reveal, export hints
- Nostr:
- npub, nsec hidden/reveal, public/private qr modes
8) Keyboard and Command Mapping Plan
Keep existing keybinds; add stronger discoverability and zone consistency.
Add/confirm mappings:
- Zone focus:
1left tree2top grid3inspector board
- Mode emphasis:
Taboptional focus advanceShift+Tabreverse focus (if Textual behavior allows cleanly)
- Inspector actions:
- keep
vreveal andgqr globally - add board-level shortcuts to status/action strip text
- Palette aliases:
- add board/action aliases where needed to mirror strip labels.
9) Delivery Plan (Phased Slices)
Phase 1: Shell Restructure (Layout only)
Deliver:
- Split right pane into top grid + lower inspector board.
- Add top status ribbon and bottom action strip scaffolding.
- Keep existing data behavior unchanged.
Exit criteria:
- Layout visually resembles mockup structure.
- Existing interaction tests still pass.
- No regression in reveal/qr/session behavior.
Phase 2: Grid Modernization
Deliver:
- Table-style header row and compact rows.
- Column alignment/truncation rules.
- Sort indicator placeholders and active filter badges.
Exit criteria:
- Large-list navigation remains performant.
- Paging/search/filter actions remain deterministic.
Phase 3: Inspector Board Templates (Core Kinds)
Deliver:
- Board templates for password, note/document, seed, totp.
- Sensitive-state chips + action hints.
- Context-aware action strip additions.
Exit criteria:
- Selected entry shows board instead of raw JSON for covered kinds.
- Reveal/qr flows are explicit and test-covered.
Phase 4: Inspector Board Templates (Advanced Kinds)
Deliver:
- SSH/PGP/Nostr/key_value boards.
- Copy/export affordance text and command parity hints.
- Managed-account board treatment.
Exit criteria:
- All major kinds render purpose-built boards.
- No loss of existing palette command capability.
Phase 5: Tree Navigation and Polish
Deliver:
- Left tree visual and keyboard behavior.
- Compact vs expanded density mode.
- Final visual polish against mockups (in green theme).
Exit criteria:
- Tree + grid + board flow is coherent end-to-end.
- User walkthrough of top daily workflows feels parity+ with legacy.
10) Testing and Quality Gates Per Slice
Mandatory per slice:
- Update/extend Textual interaction tests in:
src/tests/test_tui_v2_textual_interactions.pysrc/tests/test_tui_v2_action_matrix.py
- Run:
poetry run pytest -q src/tests/test_tui_v2_textual_interactions.py src/tests/test_tui_v2_action_matrix.py
- If app logic paths changed meaningfully, run:
scripts/tui2_coverage_gate.sh
- Update docs:
- this file
docs/tui_v2_legacy_parity_matrix.mddocs/dev_control_center.md(if priorities shift)
11) Non-Goals (for this refresh)
- Replacing Textual runtime stack.
- Reworking core service/data model APIs for cosmetic UI concerns.
- Introducing non-deterministic behavior in entry rendering.
- Removing legacy TUI fallback before explicit cutover decision.
12) Session Handoff Checklist
Before ending any session touching this refresh:
- Mark phase/slice progress in this document.
- Record what was implemented and what remains.
- Add test evidence and known regressions.
- Append summary to
memory-update.md.
Current next slice (recommended): Phase 1 - Shell Restructure.
13) Progress Update
2026-03-02 - Phase 1 scaffold (initial pass) landed
Implemented in src/seedpass/tui_v2/app.py:
- Added top status ribbon (
#top-ribbon) with live summary:
- fingerprint
- managed session indicator
- visible entry count
- active kind/archive filters
- lock/session state
- last sync summary
- Added structural section framing:
Entry Gridheading above center list/search areaInspector Boardheading above right detail area
-
Added persistent bottom action strip (
#action-strip) with keyboard hint rail. -
Preserved all existing command behavior and service-layer flows.
Validation:
poetry run pytest -q src/tests/test_tui_v2_textual_interactions.py src/tests/test_tui_v2_action_matrix.py- Result:
28 passed.
Notes:
- This is a layout/chrome scaffold only; no table/board template conversion yet.
- Next slice should implement Phase 2 grid modernization without regressing interaction tests.
2026-03-02 - Phase 2 grid modernization (initial pass) landed
Implemented in src/seedpass/tui_v2/app.py:
- Upgraded center section heading to a multi-line table scaffold:
- column header row (
Idx,Entry,Title,Kind,Meta,Arch) - sort-indicator placeholder row
- live page/row counts
- Updated entry list row formatter to aligned, dense table-style rows:
- fixed-width columns for index/entry/title/kind/meta/archive.
- meta column now uses URL or username preview when present.
- Kept behavior and command flows unchanged (visual/data-presentational slice only).
Validation:
poetry run pytest -q src/tests/test_tui_v2_textual_interactions.py src/tests/test_tui_v2_action_matrix.py- Result:
28 passed.
Next recommended slice:
- Phase 3 inspector board templates for core kinds (
password,document/note,seed,totp).
2026-03-02 - Phase 3 inspector board templates (core kinds) landed
Implemented in src/seedpass/tui_v2/app.py:
- Replaced raw JSON detail rendering for core kinds with structured board layouts:
password/stored_passworddocument/noteseed/managed_accounttotp
- Added reusable board helpers:
- entry kind normalization
- common board header (label/kind/id/modified/archived)
- tags and notes normalization
- Added secure-by-default board copy:
- sensitive values remain hidden in board body
- reveal/QR actions remain the explicit path for sensitive disclosure
- Kept fallback generic JSON board for non-templated kinds to preserve coverage while templates are expanded.
Validation:
poetry run pytest -q src/tests/test_tui_v2_textual_interactions.py src/tests/test_tui_v2_action_matrix.py- Result:
28 passed.
Next recommended slice:
- Phase 4 inspector board templates for advanced kinds (
ssh,pgp,nostr,key_value) and stronger action-strip context hints.