Files
co-lite/openspec/changes/add-page-anchor-links/tasks.md
T

1.5 KiB

Tasks: add-page-anchor-links

Design: design.md. Every task is TDD. Work is serial in the main session, with a self-review per task.

1. services-counter

  • 1.1 CmsBlock.anchor; CmsBlockValidator: link-name pattern and uniqueness (PagesBadAnchor, PagesAnchorTaken on blocks[i].anchor), #name accepted by safeLink.
    • Verify: mvn -T 1C -B -pl solvway-services-counter -am verify

2. Portal

  • 2.1 Link rules: isSafeLink, the rich-text editor's SAFE_LINK, a sanitiser test that #name hrefs survive; block ids in CmsBlocks (pattern-checked).
  • 2.2 Frame bridge: click listener in the frame script, frameAnchor() message check, HtmlFrame scroll (own frame only).
  • 2.3 Editor: "Link name" field per block with field errors; label changes in defaultMessages.ts and zh_CN.seed.json, then npm run i18n:sql; sql/01-anchor-labels.sql (new labels, plus English and Chinese updates of PagesBadLink and PagesLinkPrompt) and sql/99-rollback.sql.
    • Verify (2.1 to 2.3): cd solvway-admin-portal && npx vitest run; echo VITEST=$? && npx tsc --noEmit && npm run lint

3. Release

  • 3.1 docs/deployment.md: SQL rows, drop the #anchor known gap, add the INS page note (name the FORM block signup, change the HTML's #consult to #signup).
  • 3.2 Live check (Playwright) on a local portal: hero button to a named form block; Custom HTML #name to the form and #top inside the frame; refusals for a bad and a duplicate link name; 1280 and 360 px.