bitwarden/clients · issue #20694 · PR #20867 · branch fix/20694-1pux-import-preserves-archived
The 1Password 1pux importer was silently dropping every item exported with state: "archived", contradicting the help-center docs that promise everything from a 1pux export is imported. Users migrating their vault ended up with their archive empty. The fix removes the early-return, stamps cipher.archivedDate = new Date() so isArchived reports true, and lands in libs/importer/ shared by browser, desktop, cli, and web - one change, four clients fixed.
The 1Password 1pux export format flags archived items with state: "archived". The Bitwarden importer in libs/importer/src/importers/onepassword/onepassword-1pux-importer.ts had an early return at lines 43-46 that skipped those entries entirely. Users migrating their vault ended up with an empty archive, contradicting Bitwarden's own help-center docs that promise "everything from the 1Password export is imported".
Worse, the existing unit test should not import items with state 'archived' explicitly enforced the buggy behaviour, so any naive fix to the source without correcting the test would have left the test suite broken.
archivedDate, fix the test that enforced the bugTwo source files touched, plus a regression guard. The fix lands in libs/importer/ which is shared by all four Bitwarden clients, one change, four clients fixed (browser, desktop, cli, web, exactly the labels on the issue).
The CipherView.archivedDate field is what powers Bitwarden's own isArchived getter (see cipher.view.ts:178-179), so this is the canonical, type-safe way to mark a cipher as archived programmatically, no schema migration, no new flag, no new state machine.
new Date() and not the original archive time?Because 1pux does not encode it. The Item type in onepassword-1pux-importer-types.ts:65 exposes only state: "active" | "archived", no timestamp. The import-time stamp is the highest fidelity we can give without inventing data. If 1pux ever exports archivedAt, the substitution is a one-line change.
The existing test was renamed and inverted to assert the correct behaviour; a new test was added to lock in that active items stay unarchived after the fix. 43 of 43 tests pass across the four onepassword importer suites.
The JSON.parse(JSON.stringify(...)) deep clone fixes a latent issue in the previous test which mutated the shared LoginData fixture across cases.
Locks in that the new if (item.state === "archived") branch does not accidentally archive-stamp every imported cipher.
npx jest libs/importer/src/importers/onepassword against the actual Bitwarden clients monorepo: 43 tests pass in 3.043s, no regressions, no skipped tests. npx tsc --noEmit and npx eslint both clean. Husky pre-commit hooks all green.Draft PR #20867 is open against main, identity-linked to the GitHub account, CLA signed automatically by the noreply-email preflight learned the hard way on the previous Joplin attempt.
Branch fix/20694-1pux-import-preserves-archived, commit 7a33830, 43/43 jest tests pass, tsc clean, eslint clean, husky pre-commit hooks all green.
Fork 999purple999/clients, draft PR #20867 open, @djsmith85 (community contributor who flagged the issue as good first issue with the file pointer) tagged in the PR body for natural notification.
license/cla status: SUCCESS, auto-signed via the GitHub noreply identity. bitwarden-bot added the PR to the internal Community PR board as PM-38123 (Jira ticket reference) and prepended the prefix to the PR title.
Verified email pattern firstInitial + lastName@bitwarden.com via six sample employee commits (bcunningham, btreston, dnance, gsmith, jengstrom, mgibson). Mail anchored to the PR URL with K-Perception (AES-256-GCM client-side + Y.js CRDT) and HALCYON (Node 24 WebRTC mesh) as the explicit stack-overlap signals for any cryptography or vault-side adjacent role.
The CI gate Check user permission failed by design, community PRs need a Bitwarden maintainer to manually approve the workflow run before Build Browser / Build CLI / Build Desktop / Build Web / Chromatic / Scan run for real on the code. This is a security-standard pattern for external forks and resolves on maintainer triage (typically 1-7 days).
Realistic odds: ~50-60% merge probability given the surgical scope, the clean Community PR board entry, the corrected test that enforces the right contract, and the existing CLA signature. Paid-conversation odds independent of merge: ~10-15% given Bitwarden's known external-contractor hiring at the vault/crypto layers and the K-Perception stack match documented in the cold mail.
If anything fails on your machine, the PR cannot land. Run them first.