Commit Graph
20 Commits
Author SHA1 Message Date
thePR0M3TH3ANandClaude Fable 5 5dcd779a6f fix(python): TOTP codes must honor the entry's period and digits
TotpManager built pyotp.TOTP(secret) with library defaults (6 digits, 30s)
and ignored what the entry recorded, so any imported or derived entry using
other values produced codes the issuing service rejects. The service was
configured from the entry's values -- those govern the code.

- current_code_from_secret and current_code take period/digits
- EntryManager.get_totp_code passes the entry's values for both the
  derived and imported paths
- display_service, menu_handler (totp_list now carries digits) and the GUI
  updated at every call site
- regression tests for imported and deterministic entries with custom
  parameters, asserting against pyotp with the matching interval/digits,
  and confirming default entries are byte-identical to before

Found by scripts/cross_impl_check.py, which flagged it as a divergence
against the TypeScript port. That allowance is now removed: the suite
asserts TOTP equality and reports 30/30 with zero divergences.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-14 16:41:04 -04:00
google-labs-jules[bot]andPR0M3TH3AN 7295807013 fix: resolve CI failures in trio tests and GUI/CLI test pollution
- Made `trio` backend detection in `src/tests/conftest.py` robust by using `try-import-except` instead of `find_spec`, fixing `ModuleNotFoundError` in environments where `find_spec` behavior differs or trio is partially present but not importable.
- Prevented test pollution in `src/tests/test_gui_features.py` by adding `try...finally` block to unsubscribe `refresh_codes` from the global `bus`, ensuring subsequent CLI tests (like `test_nostr_sync`) don't crash due to lingering callbacks.
- Hardened `src/seedpass_gui/app.py` against test-induced errors:
    - `TotpViewerWindow.refresh_codes` now accepts `*args, **kwargs` to safely ignore event arguments if called via subscription.
    - `MainWindow.vault_locked` catches `ValueError` when closing, handling cases where the window is already detached in test environments.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-27 03:32:38 +00:00
thePR0M3TH3AN 0f8a54342c Fix profile setup edge cases and TOTP viewer refresh 2026-02-25 20:57:29 -05:00
thePR0M3TH3AN 37d0dffdc3 Merge branch 'beta' into main (safe conflict resolution) 2026-02-23 16:38:18 -05:00
google-labs-jules[bot]andPR0M3TH3AN afa35a1782 Optimize TOTP derivation in GUI loop by caching secrets
- Add `get_totp_secret` to `EntryManager` and `EntryService` to allow retrieving the secret (derived or imported) without calculating the code.
- Update `TotpViewerWindow` in GUI to cache TOTP secrets locally. This prevents expensive PBKDF2/BIP39 derivation on every UI refresh (every second).
- Clean up unused imports and f-strings in `entry_management.py`.

Benchmarks show a ~9x speedup for 10 frames (50 entries) and >100x speedup for steady state.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-16 17:37:03 +00:00
thePR0M3TH3AN 468608a369 Support listing all entry types 2025-08-18 19:12:55 -04:00
thePR0M3TH3AN 4a537b7063 refactor: import main from package 2025-08-08 15:27:43 -04:00
thePR0M3TH3AN dcd095d1af Include entry type in search results 2025-08-02 16:26:52 -04:00
thePR0M3TH3AN 77757152d7 Add async background sync task management 2025-07-31 19:38:09 -04:00
thePR0M3TH3AN 4a20817094 Add key field to key/value entries 2025-07-28 15:04:56 -04:00
thePR0M3TH3AN ec52d2eda0 Add vault sync trigger to GUI 2025-07-19 18:14:47 -04:00
thePR0M3TH3AN e6ca36b8b7 Update EntryDialog to modify entry source 2025-07-19 17:18:46 -04:00
thePR0M3TH3AN ff1f8bb4e1 Use background sync in entry service 2025-07-19 15:50:52 -04:00
thePR0M3TH3AN c2809032fd Add TOTP viewer window 2025-07-18 22:41:53 -04:00
thePR0M3TH3AN ea579aaa5d GUI: support multiple entry types 2025-07-18 22:26:18 -04:00
thePR0M3TH3AN 5fce7836d9 Remove binary docs images 2025-07-18 17:38:07 -04:00
thePR0M3TH3AN 37c78f608a Add module entry point 2025-07-18 10:39:52 -04:00
thePR0M3TH3AN d93f47e3ee Add basic GUI windows and headless tests 2025-07-18 08:46:34 -04:00
thePR0M3TH3AN fac31cd99f Add GUI runner and packaging docs 2025-07-17 21:21:05 -04:00
thePR0M3TH3AN 6c22e28512 Add basic Toga GUI 2025-07-17 21:09:12 -04:00