These files belong together and implement the “runtime tracking” of suggestions on github.dev.
logging.js- Captures visible ghost DOM elements and emits
log_coordinatessnapshots. - Emits “empty snapshots” when we need to force-close a suggestion (e.g. focus loss).
- Captures visible ghost DOM elements and emits
acceptance.js- Captures ghost text while visible.
- When ghosts disappear, compares captured ghost text against current editor text (near the top) and emits:
log_acceptance_check(per-anchor diagnostics)log_acceptance(if any anchor matches)
observer.js- Attaches a
MutationObserverto the editor root. - Filters to only react to mutations likely related to ghost suggestions (reduces overhead).
- Attaches a
index.js- “Facade” that wires the above together and exposes the stable
NS.tracking.*API used by:src/content/30_config.js(settings updates)src/content/99_entry.js(startup timers + initial kick)
- “Facade” that wires the above together and exposes the stable