Refactor: simplify essential-article source dedup and tidy imports

Follow-up cleanup to the T428504 fix. The essential-article picker deduped suggestions in two passes: a Wikidata sitelink check, then a per-batch existence query against the target wiki. The second pass cost a network round-trip per batch but only caught articles living under their exact English title while unsitelinked -- rare on non-English wikis, and the redirect case it cited is already covered by the sitelink check.

  • resolveWikidataBatch now filters out entities already present on the target wiki and returns a plain string[] of English titles.
  • Drop the redundant filterExistingTitles existence check (and the now unused helper) from processBatch.
  • Extract resetEssentialState() to remove the duplicated paging-state resets in loadSource.
  • Document wikiCodeToSite's code->dbname heuristic with working and broken examples (be-tarask, nb, lzh) plus a TODO to replace it with a reliable lookup.
  • Normalise imports in the essential-article step components to the @/ alias.

Co-Authored-By: Claude Opus 4.8 Bug: T428504

Closes T428504

Merge request reports

Loading