Skip to content

fix(v99): honest native unlock errors, real desktop recovery reset, unclipped bulk bar - #5

Merged
tonmoycoder merged 1 commit into
mainfrom
arena/1ec38836-vaultzero
Nov 10, 2026
Merged

tonmoycoder merged 1 commit into
mainfrom
arena/1ec38836-vaultzero

Conversation

@tonmoycoder

Copy link
Copy Markdown
Owner

V-99 β€” "nothing is working": Windows photo RCA + fixes

Provenance check (not a stale-binary artefact). Current main is 722affc (PR #4 merged). Live Latest is v2.5.2-beta.1, published 2026-11-09T18:36:11Z, target 071e407 whose parent is 2280e33 (Batch 1–7 head) β€” so the beta already contains all previous work. gh api on that ref confirms src/lib/platform.ts still had upper.includes('VALID') and VaultHome.tsx still had bottom-8. All three defects below are present in main itself.

D-01 β€” wrong password reported as "Some of the values entered were not valid."

classifyNativeError() matched the substring VALID, which appears in "Authentication failed: **invalid** master password ..." and "File header is **invalid** ...". Rust unlock_vault was also the last storage command returning raw VaultError Display text, while safe_error() emits only fixed messages (never code strings) β€” so AUTH_FAILED / INVALID_FORMAT / TAMPERED / IO / CRYPTO_FAILED were unreachable in the UI. The lock screen additionally fired a success haptic on failure.

Fix: exact-message + known-prefix classifier (structured codes still accepted; genuine Tauri invalid value: stays VALIDATION), unlock_vault uses safe_error(&e), unlock errors prefer err.safeMessage, no success haptic on failure.

D-02 β€” "Forgot master password? Recover vault" was a dead end

The 24-character recovery key is WebCrypto/localStorage-only: the Rust VaultFileHeader has no recovery slot, create_vault(..., None) passes none, createNewVault()'s native branch ignores its recoveryKey argument, and recoverVaultWithRecoveryKey() reads only localStorage. Worse, "Fresh Reset" cleared only localStorage, leaving the real .pmv file β€” so the app returned to "Welcome back" with the same unopenable vault.

Fix: new Rust command reset_vault (timestamped archive of local-vault.pmv, bounded to 3 archives, session/vault_path cleared); resetVaultForForgotPassword() selects the native command or the browser archive path and clears the stale native flag; the modal detects isNativeRuntime(), hides the impossible key tab, explains why, and starts on the one working path. Browser recovery-key behaviour and its tests are unchanged.

Full native recovery-key support would need a new wrapped-key slot in the PMV file format. That is not faked here; the UI is now honest about it.

D-03 β€” clipped / overlapping bulk-action bar

FloatingBulkBar was a 654px flex row at fixed bottom-8 z-[70] while MobileNav is z-[60] at the same bottom (lg:hidden). Earlier audits only covered 360Γ—800 / 1440Γ—900 and never selected an item.

viewport RED GREEN
700Γ—1000 bar 23..677 / 922..968, nav 932..990 β†’ 36px overlap bar 12..688 / 860..906 β†’ 26px gap
390Γ—844 bar x=-132..522, Delete right 476 > 390, 36px overlap bar x=12..378, Delete right 240, all actions visible, 26px gap
1440Γ—900 nav hidden, bar 373..1067 β€” fine unchanged 373..1067

Fix: .floating-bulk-bar CSS β€” 94px mobile / 32px desktop offset (plus --safe-bottom), width: max-content + viewport cap, phone wrap / β‰₯640px single-row pill, non-shrinking children. A 24px Android inset gives computed bottom: 118px with no overlap.

RED β†’ GREEN

  • 45th harness native-error-classification: RED 12 FAIL β†’ GREEN 20/20 PASS
  • 46th harness native-recovery-bulk-bar: RED 19 FAIL β†’ GREEN 37/37 PASS (imports the real bundled modules, including a mocked window.__TAURI_INTERNALS__.invoke for native reset)
  • vault-bulk-bar-layout.spec.ts: RED 4/4 FAIL β†’ GREEN 4/4
  • vault-unlock-error-native-reset.spec.ts: 2 FAIL against reverted 722affc β†’ 2 PASS on the fix
  • platform-built.mjs added to scripts/build-test-bundles.mjs

Final gates β€” zero regressions

npx tsc --noEmit 0 Β· npm run verify 0 (46/46 harness, WCAG contrast, 23 Rust files formatted, bundle budget) Β· node@20 scripts/run-harness.mjs 46/46 Β· npm audit --audit-level=high 0 Β· check-live-release.mjs 5/5 Β· full npx playwright test 182 passed (11.6m) Β· push CI 42849591867 success (2/2 jobs).

Not done by this agent

No merge, tag, signing or publication. These fixes are not in v2.5.2-beta.1; a new signed Beta/final build (4 secrets + keytool + Windows runner + signed-log gate) is required before the user's Windows .exe shows them.

…nclipped bulk bar

D-01: classifyNativeError matched 'VALID' inside "...inVALID master password...", so every wrong password showed "Some of the values entered were not valid." unlock_vault also leaked the raw VaultError Display text; it now uses safe_error. Exact-message/prefix classification keeps AUTH_FAILED, INVALID_FORMAT, TAMPERED, IO and CRYPTO_FAILED distinct.

D-02: native .pmv vaults have no recovery-key slot, yet the modal offered a 24-char key form; Fresh Reset cleared only localStorage and sent the user straight back to "Welcome back". Add Rust reset_vault (timestamped archive + bounded prune + session clear), resetVaultForForgotPassword() for both backends, and an honest native-only recovery UI. Browser recovery-key behaviour is untouched.

D-03: FloatingBulkBar was fixed bottom-8 z-[70] over the z-[60] mobile nav: measured 36px overlap at 700x1000 and x=-132..522 clipping at 390x844. .floating-bulk-bar CSS lifts it above the nav, caps its width, wraps on phones and keeps the desktop pill.

Tests: 45th/46th harnesses + 2 Playwright specs. RED 12+19 harness FAIL, 4/4 Playwright FAIL, 2 FAIL against reverted 722affc; GREEN 46/46 harness, 182/182 Playwright (11.6m). Gates: tsc 0, verify 0, node20 46/46, audit 0, live 5/5, rustfmt 23/23.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
@tonmoycoder
tonmoycoder merged commit 1c6ecdd into main Nov 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant