Skip to content

fix(web): recover secret view retry states - #146

Merged
dillonstreator merged 2 commits into
osbytes:mainfrom
snowyukitty:fix/view-retry-state
Aug 10, 2026
Merged

dillonstreator merged 2 commits into
osbytes:mainfrom
snowyukitty:fix/view-retry-state

Conversation

@snowyukitty

Copy link
Copy Markdown
Contributor

Summary

  • return rejected manual keys to the credential form while preserving invalid-link handling for fragment keys
  • retry the failed HEAD or read request from rate-limit and connection-error screens
  • keep the existence check as a one-time preflight so background refreshes cannot replace decrypted burn-after-read content
  • add component coverage for manual, fragment, password, HEAD, read, and background-refresh states

Testing

  • pnpm --filter @crypt.fyi/web test (2 files, 14 tests)
  • pnpm --filter @crypt.fyi/web lint
  • pnpm --filter @crypt.fyi/web typecheck
  • pnpm build (5 workspace builds)
  • pnpm typecheck (4 workspace typechecks)
  • core Jest suite (7 suites, 47 tests)
  • CLI Jest suite (1 suite, 15 tests)
  • pnpm install --frozen-lockfile
  • pnpm peers check
  • pnpm changeset status
  • Prettier on all changed files and git diff --check
  • targeted regression checks in real Chrome

Not run locally: server integration tests because Docker/Redis was unavailable; no server files changed. Full-repository formatting and lint on this Windows checkout report CRLF-only failures in untouched files; the web package and every changed file pass their applicable checks.

Closes #145

AI assistance

OpenAI Codex assisted with implementation and testing. Claude Code provided an independent sealed review that led to expanded coverage, and Google Antigravity performed the final independent sealed review of the current head. The submitter reviewed, reproduced, verified, and owns the changes.

snowyukitty and others added 2 commits August 10, 2026 07:37
Drop component tests in favor of a follow-up e2e approach, replace staleTime Infinity with enabled + not-found guards, and prevent double-submit on Try Again.
@dillonstreator

dillonstreator commented Aug 10, 2026 •

Copy link
Copy Markdown
Member

Thanks for filing #145 and for the solid fix — the manual-key recovery and retry-via-mutate changes were the right call.

I pushed a small follow-up onto this branch after review:

  • Removed the Vitest component tests (and the Testing Library/jsdom deps) for now — planning to cover these flows with e2e in a follow-up instead
  • Replaced staleTime: Infinity on the exists preflight with:
    • enabled: !decryptMutation.data so we stop HEADs once content is in memory
    • a not-found render guard of exists === false && !decryptMutation.data so a false exists result cannot clobber decrypted burn-after-read content
  • Hardened Try Again against double-submit (pending/fetch guard + isLoading on the button)

@dillonstreator
dillonstreator merged commit 1298f4b into osbytes:main Aug 10, 2026
2 checks passed
@github-actions github-actions Bot mentioned this pull request Aug 10, 2026
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.

Wrong key and rate-limit retries can leave the view flow unrecoverable

2 participants