Implement initialization, entry creation and generation dialogs #24

Closed
opened 2026-08-09 19:11:06 +00:00 by hugo · 1 comment
Owner

Objective

Implement the TUI forms and dialogs for vault initialization, recipient selection, entry creation and password generation.

Scope

  • Provide guided root/subfolder initialization and .gpg-id recipient selection using storage-provided key identities.
  • Create single-line and multiline entries without exposing secret input.
  • Generate new passwords with length, symbols/no-symbols, overwrite and in-place choices.
  • Offer both direct hotkeys and equivalent : commands, with consistent validation and confirmation.
  • Refresh the sidebar and open the resulting entry only from successful storage results.

Acceptance criteria

  • Every form handles keyboard-only focus, cancellation, validation and secure input.
  • Multiple recipients, nested initialization, overwrite, generated password and failure flows are covered.
  • Cancelled or failed dialogs leave UI and repository state unchanged.
  • No form implements .gpg-id, encryption, generation or Git rules itself.

Prerequisites

Sidebar; authentication UI; structured editor; keymap; command mode.

## Objective Implement the TUI forms and dialogs for vault initialization, recipient selection, entry creation and password generation. ## Scope - Provide guided root/subfolder initialization and `.gpg-id` recipient selection using storage-provided key identities. - Create single-line and multiline entries without exposing secret input. - Generate new passwords with length, symbols/no-symbols, overwrite and in-place choices. - Offer both direct hotkeys and equivalent `:` commands, with consistent validation and confirmation. - Refresh the sidebar and open the resulting entry only from successful storage results. ## Acceptance criteria - Every form handles keyboard-only focus, cancellation, validation and secure input. - Multiple recipients, nested initialization, overwrite, generated password and failure flows are covered. - Cancelled or failed dialogs leave UI and repository state unchanged. - No form implements `.gpg-id`, encryption, generation or Git rules itself. ## Prerequisites Sidebar; authentication UI; structured editor; keymap; command mode.
hugo added this to the 02 - Mutt-style terminal UI milestone 2026-08-09 19:11:06 +00:00
hugo added the enhancement label 2026-08-09 19:11:06 +00:00
Author
Owner

Implemented and pushed in commit 6ea184c.

The Ratatui frontend now provides keyboard-only dialogs for recipient initialization, entry insertion, and password generation. Direct hotkeys and typed colon commands use the same forms. Initialization selects one or more encrypt-capable identities supplied by crates/storage and supports nested policies. Insert supports hidden-confirmed, echoed, and multiline secret input with constant masking and zeroized buffers. Generate supports pass-default or explicit length, symbol selection, overwrite, and in-place replacement.

All repository mutation remains in crates/storage through RecipientPolicyManager, VaultWriter, PasswordGenerator, and storage-owned automatic Git committers. Work executes off the input thread after secure-store authentication. Cancellation and validation do not mutate the vault; failures retain the form; successful writes refresh the sidebar and open the resulting structured document without rendering the plaintext password.

Verification included an encrypted compatibility-store integration covering nested multi-recipient init, multiline insert, declined overwrite with byte-identical ciphertext and unchanged Git history, new generation, in-place generation preserving document suffix fields, and one automatic Git commit per successful operation. Secure rendering, command parity, validation, focus, cancellation, and redacted diagnostics have unit tests.

Required gates passed from the repository root:

  • cargo fmt --all -- --check
  • RUSTFLAGS=-D warnings cargo check --workspace --all-targets
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace
Implemented and pushed in commit 6ea184c. The Ratatui frontend now provides keyboard-only dialogs for recipient initialization, entry insertion, and password generation. Direct hotkeys and typed colon commands use the same forms. Initialization selects one or more encrypt-capable identities supplied by crates/storage and supports nested policies. Insert supports hidden-confirmed, echoed, and multiline secret input with constant masking and zeroized buffers. Generate supports pass-default or explicit length, symbol selection, overwrite, and in-place replacement. All repository mutation remains in crates/storage through RecipientPolicyManager, VaultWriter, PasswordGenerator, and storage-owned automatic Git committers. Work executes off the input thread after secure-store authentication. Cancellation and validation do not mutate the vault; failures retain the form; successful writes refresh the sidebar and open the resulting structured document without rendering the plaintext password. Verification included an encrypted compatibility-store integration covering nested multi-recipient init, multiline insert, declined overwrite with byte-identical ciphertext and unchanged Git history, new generation, in-place generation preserving document suffix fields, and one automatic Git commit per successful operation. Secure rendering, command parity, validation, focus, cancellation, and redacted diagnostics have unit tests. Required gates passed from the repository root: - cargo fmt --all -- --check - RUSTFLAGS=-D warnings cargo check --workspace --all-targets - cargo clippy --workspace --all-targets -- -D warnings - cargo test --workspace
hugo closed this issue 2026-08-10 09:23:25 +00:00
Sign in to join this conversation.