Description: The hook sets setError('WORKER_TIMEOUT') and sometimes sets error to arbitrary messages. The UI prints String(error) directly. This makes it hard to provide consistent, actionable feedback.
Files: lib/hooks/useCipherWorker.ts, components/challenge/ChallengeMode.tsx
Proposed enhancement: Define an error shape or error-code union (e.g., WORKER_TIMEOUT, INVALID_INPUT, WORKER_ERROR) and map to localized UI strings/banners (timeout retry suggestion, validation tips, etc.).
Description: The hook sets setError('WORKER_TIMEOUT') and sometimes sets error to arbitrary messages. The UI prints String(error) directly. This makes it hard to provide consistent, actionable feedback.
Files: lib/hooks/useCipherWorker.ts, components/challenge/ChallengeMode.tsx
Proposed enhancement: Define an error shape or error-code union (e.g., WORKER_TIMEOUT, INVALID_INPUT, WORKER_ERROR) and map to localized UI strings/banners (timeout retry suggestion, validation tips, etc.).