Skip to content

Annotate duplicated shared/ modules pending cross-repo package extraction #67

@Loule95450

Description

@Loule95450

Context

The task brief notes "shared/ between repos isn't yet a thing". Multiple modules in extension/src/shared/ are 1:1 forks of equivalent files in the desktop repo (motion presets, domain parsing, types, ProfileEditor, atoms.css).

Problem / Observation

High-confidence overlaps:

A drift bug today is invisible until a user opens the same site on both platforms.

Proposed approach

Stand up a private npm package (@keyfount/core or similar), version-pinned, that owns:

  • Profile, AccountEntry, DerivationInputs
  • derive, argon2, render, memorable, wordlist, fingerprint
  • domain (registrable-domain extraction)
  • sync/keys, sync/auth (client-side OPAQUE flow)

The package can live in keyfount/core repo or as a workspace dependency of both apps. Until then, add a // SYNC WITH desktop/src/... header comment to every duplicated file so future contributors at least know to update both.

Acceptance criteria

  • Plan written up in docs/ (or this issue) for the eventual package.
  • Header comment added to each duplicated file pointing to the desktop equivalent.
  • A nightly CI job diffs the duplicated files against the desktop counterpart and posts a warning when they drift (out of scope for this issue, but mentioned as follow-up).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low priorityrefactorCode restructuring without behavior changetech-debtAccumulated debt to repay

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions