Skip to content

Refine adaptive keyword selection and scope image tool#14

Merged
arthmaker merged 2 commits intomainfrom
codex/update-ui-design-covjwa
Jan 14, 2026
Merged

Refine adaptive keyword selection and scope image tool#14
arthmaker merged 2 commits intomainfrom
codex/update-ui-design-covjwa

Conversation

@arthmaker
Copy link
Copy Markdown
Owner

Motivation

  • Make generated anchor keywords more natural by preferring contiguous phrase windows from titles so anchor text reads in-order and stays contextually coherent.
  • Improve scoring consistency and avoid repeated scanning when ranking tokens to produce more stable keyword choices.
  • Prevent global/DOM symbol collisions and keep the image link tool usable alongside the anchor/link tool by scoping its behavior and adding defensive guards.

Description

  • Rewrote extractAdaptiveKeywords to score title tokens, build a scoreByWord map, and select the highest-scoring contiguous token window (2–4 words) before filling remaining slots from ranked tokens, and ensured presence of mahjongways when present in the title.
  • Tuned TOKEN_BOOST and expanded STOPWORDS_ID to favor contextual/tech terms and avoid noisy tokens when generating anchors.
  • Merged image UI into anchor.html, removed standalone image.html, and included image.js while updating copy and labels for combined Anchor/Link/Image workflow.
  • Scoped image.js inside an IIFE, replaced the global $ helper with getEl, added defensive ?. checks and existence guards, preserved auto-save/load behavior, and adjusted style.css and index.html layout (single-column grid, .three sizing, .stack, .toggle-row, dropzone file-button hiding, and action/button styles).

Testing

  • No automated tests were executed for this rollout; the changes are logic/UI focused and were not subject to automated test runs in this run.

Codex Task

@arthmaker arthmaker merged commit b5d1572 into main Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant