Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs
1.5 KiB
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,PagesAnchorTakenonblocks[i].anchor),#nameaccepted bysafeLink.- Verify:
mvn -T 1C -B -pl solvway-services-counter -am verify
- Verify:
2. Portal
- 2.1 Link rules:
isSafeLink, the rich-text editor'sSAFE_LINK, a sanitiser test that#namehrefs survive; block ids inCmsBlocks(pattern-checked). - 2.2 Frame bridge: click listener in the frame script,
frameAnchor()message check,HtmlFramescroll (own frame only). - 2.3 Editor: "Link name" field per block with field errors; label changes in
defaultMessages.tsandzh_CN.seed.json, thennpm run i18n:sql;sql/01-anchor-labels.sql(new labels, plus English and Chinese updates ofPagesBadLinkandPagesLinkPrompt) andsql/99-rollback.sql.- Verify (2.1 to 2.3):
cd solvway-admin-portal && npx vitest run; echo VITEST=$? && npx tsc --noEmit && npm run lint
- Verify (2.1 to 2.3):
3. Release
- 3.1
docs/deployment.md: SQL rows, drop the#anchorknown gap, add the INS page note (name the FORM blocksignup, change the HTML's#consultto#signup). - 3.2 Live check (Playwright) on a local portal: hero button to a named form block; Custom HTML
#nameto the form and#topinside the frame; refusals for a bad and a duplicate link name; 1280 and 360 px.