Skip to the content.

LexiShift Extension System Map

Status: active architecture map Role: Canonical current Last updated: 2026-03-21 Source-of-truth: as-is extension runtime/file map; verify implementation details in apps/chrome-extension/manifest.json, apps/chrome-extension/options.html, and the linked source modules.

Purpose:

1) Entry Points

Core extension entry files:

How they connect:

2) Runtime Topology (Content Script)

Primary runtime folders:

High-level flow:

  1. Load and normalize settings from chrome.storage.local.
  2. Resolve active ruleset (ruleset + optional helper rules + optional SRS gate).
  3. Build matcher/trie and scan DOM text nodes.
  4. Replace matched text with .lexishift-replacement spans.
  5. Track exposure and enable feedback popup interactions.
  6. Re-apply or rescan on settings/storage/mutation events.

Core runtime modules:

3) Popup Module Runtime

Popup ownership:

Current built-in module:

Contract:

Reference:

4) Options App Topology

Primary folders:

Composition root:

Controller graph builder:

Controller factory guard:

Design rule:

Detailed reference:

5) Storage Map

Persistent stores:

Defaults source:

Profile-scoped settings container:

6) Helper Integration Map

Client/transport modules:

Who calls helper flows:

7) Where To Edit (By Feature)

If you are changing:

8) Fast Debug Paths

A word is not replaced:

  1. Check extension enabled + pair settings in options.
  2. Check active rules resolution in content debug logs.
  3. Check node-filter skips in DOM scan runtime logs.
  4. Check page/lemma replacement budgets.

Popup module not visible:

  1. Confirm replacement span has expected dataset payload (data-script-forms, data-display-script, data-origin).
  2. Confirm origin gating allows popup on that span.
  3. Confirm module registry build path runs and module returns content.

Profile switch appears inconsistent:

  1. Check selected profile key (srsSelectedProfileId / runtime mirrors).
  2. Check srsProfiles.<id> language prefs and pair settings.
  3. Check profile background runtime bridge updates.

9) Architecture Invariants