Skip to content

refactor: extract getIdentities() to separate data fetch from DOM rendering#204

Open
JuliaKalder wants to merge 1 commit into
mainfrom
fix/issue-119
Open

refactor: extract getIdentities() to separate data fetch from DOM rendering#204
JuliaKalder wants to merge 1 commit into
mainfrom
fix/issue-119

Conversation

@JuliaKalder
Copy link
Copy Markdown
Owner

Summary

  • Add getIdentities() pure data function to modules/template-store.js, following the same pattern as getTemplates()
  • loadIdentities() in options/options.js is now a thin DOM-only wrapper that calls getIdentities() and iterates over the returned objects
  • Label-formatting logic (identity.name ? ... : identity.email) now lives in the module layer where it is unit-testable without a DOM or messenger.* environment

Verification

  • Existing test suite: 90 pass / 7 fail — the 7 failures are pre-existing migrateV0toV1 test failures unrelated to this change (verified by running tests against the original code on main)
  • No new failures introduced

Fixes #119

…dering (#119)

Add getIdentities() pure data function to modules/template-store.js so
that identity label-formatting logic is unit-testable in isolation.
loadIdentities() in options.js is now a thin DOM-only wrapper that
delegates data retrieval to getIdentities(), following the same pattern
established by getTemplates().

Fixes #119
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.

[LOW] loadIdentities() in options.js mixes messenger.accounts.list() data fetch with DOM rendering — no getIdentities() module function

1 participant