{"record":{"id":"19e0e2acd014bdc5","repo":"sipeed/picoclaw","slug":"the-login-passwords-do-not-match","errorCode":null,"errorMessage":"The login passwords do not match.","messagePattern":"The login passwords do not match\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"web/frontend/src/components/config/config-page.tsx","lineNumber":305,"sourceCode":"          ? err.message\n          : t(\"pages.config.factory_reset_error\"),\n      )\n    } finally {\n      setShowFactoryResetDialog(false)\n    }\n  }\n\n  const handleSave = async () => {\n    try {\n      setSaving(true)\n      const password = launcherForm.dashboardPassword.trim()\n      const confirm = launcherForm.dashboardPasswordConfirm.trim()\n      if (launcherPasswordDirty) {\n        if (!password) {\n          throw new Error(t(\"pages.config.dashboard_password_required\"))\n        }\n        if (password !== confirm) {\n          throw new Error(t(\"pages.config.dashboard_password_mismatch\"))\n        }\n        if (Array.from(password).length < 8) {\n          throw new Error(t(\"pages.config.dashboard_password_min_length\"))\n        }\n      }\n\n      if (configDirty) {\n        const workspace = form.workspace.trim()\n        const dmScope = form.dmScope.trim()\n\n        if (!workspace) {\n          throw new Error(\"Workspace path is required.\")\n        }\n        if (!dmScope) {\n          throw new Error(\"Session scope is required.\")\n        }\n\n        if (","sourceCodeStart":287,"sourceCodeEnd":323,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/web/frontend/src/components/config/config-page.tsx#L287-L323","documentation":"Validation error thrown in handleSave (web/frontend/src/components/config/config-page.tsx:305, message from i18n key pages.config.dashboard_password_mismatch) when the trimmed password and confirm strings differ while the password fields are dirty. Standard double-entry confirmation for POST /api/auth/setup; it is purely client-side and fires before any request.","triggerScenarios":"Typing different values in dashboardPassword vs dashboardPasswordConfirm, trailing/leading whitespace in exactly one field (both are trimmed before comparison), or paste errors.","commonSituations":"Caps Lock on for one field, autocomplete filling only one input, user re-types password differently, or invisible trailing space pasted into one field.","solutions":["Re-enter the same password in both fields and save again","Check for a trailing/leading space in one field — trim is applied, so an internal-only difference such as capitalization is the cause","Use a password manager paste rather than manual typing to avoid typos"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if (launcherPasswordDirty && password !== confirm) {\n  setFieldError(\"The login passwords do not match.\")\n  return\n}","typeGuard":null,"tryCatchPattern":"try {\n  await handleSave()\n} catch (err) {\n  if (err instanceof Error) setError(err.message) // show next to confirm field\n}","preventionTips":["Show an inline mismatch indicator as the user types in the confirm field","Offer a 'show password' toggle so users can compare values directly","Disable save while dirty password fields differ"],"tags":["validation","frontend","password","config","i18n"],"backgroundTag":null,"analyzedSha":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}