Repository navigation
fix(publishing): reorder a content list on an edition - #5195
Conversation
Move up and move down change one edition content-list association only after an adjacent sequence write succeeds. First and last rows stay disabled, cancel does not write, and HTTP 400, 403, and 409 keep the previous order. Fixes #5184 > Co-Authored by Grok Build 1.0.46 using grok-4.7 with agent night-issue-prs.
> Co-Authored by Grok Build 1.0.46 using grok-4.7 with agent night-issue-prs-erlang.
|
LGTM. Same-login APPROVE is rejected, so this comment is the review. Independent Erlang pass (mkd-code-review 0.1.18, percussion, advisory, Full CLI report: PR body section
|
Summary
Publishing Design can move one content list up or down on an edition. The move is an adjacent
PUTofPSEditionContentList.sequence. The rendered order changes only after that write succeeds. Cancel does not call the server. HTTP 400, 403, and 409 keep the previous order. Associating a list with no sequence appends it after the highest numbered association so a new pair stays in click order.Parent tracker: #4531 (slice 75). Fixes #5184.
Operator: Grok: night-issue-prs (model grok-4.7)
Test plan
Checklist
product-docs/8.2/admin/publishing.md(Reorder a content list on an edition; associate stores the next sequence). Frontmatteridunchanged.PSPublishingDesignRestServiceTestreorder/associate-sequence cases; VitestEditionEditor.reorder.test.tsxandreorderEditionContentList.api.test.ts.modules/perc-qa-automation/frontend/tests/publishing/designEditionReorderContentList.spec.js(3 passed on H2).projects/sitemanage,WebUI, andmodules/perc-qa-automation(no skipTests).Build evidence
modules_built: projects/sitemanage, WebUI, modules/perc-qa-automation
downstream_checked: none (C2 did not apply). No type was made final or sealed, and no existing public or protected signature changed. The new PUT is a sitemanage publishingdesign method. Production code does not subclass
PSPublishingDesignRestService.Commands (JAVA_HOME=/usr/lib/jvm/java-21-openjdk):
cd projects/sitemanage && bash ../../mvnw clean install— BUILD SUCCESS. Tests run: 3512, Failures: 0, Errors: 0, Skipped: 125.cd WebUI && bash ../mvnw clean install— BUILD SUCCESS. Java tests run: 69, Failures: 0. Vitest: Test Files 669 passed, Tests 6104 passed.cd modules/perc-qa-automation && bash ../../mvnw clean install— BUILD SUCCESS. Surefire: No tests to run (Playwright is the surface spec below, not the default Maven test phase).UI proof (H2 QA)
python3 docker/scripts/perc-devctl.py qa-up --skip-image-build— RESULT:OK. TEST_CMS_URL=http://127.0.0.1:9993 (freeport from that run). QA_CONTAINER=perc-matrix-cms-h2.python3 docker/scripts/perc-devctl.py qa-health— RESULT:OK HTTP:200 HEALTH:healthy.python3 docker/scripts/perc-devctl.py qa-deploy-war-jars --restart-jetty— copied this worktree's perc-system, rest, sitemanage, and extensions-workflow jars into the Rhythmyx WAR WEB-INF/lib and restarted Jetty in-cell. RESULT:OK.python3 docker/scripts/perc-devctl.py qa-health— RESULT:OK HTTP:200 HEALTH:healthy.python3 docker/scripts/perc-devctl.py qa-deploy-webui— RESULT:OK.python3 docker/scripts/perc-devctl.py qa-health— RESULT:OK HTTP:200 HEALTH:healthy.cd modules/perc-qa-automation/frontend && npm run test:surface -- --path tests/publishing/designEditionReorderContentList.spec.jswith TEST_CMS_URL, ADMIN_USERNAME=Admin, TEST_DB_TYPE=h2, TEST_PRODUCT=cms — 3 passed (6.3s)./opt/Percussion/jetty/base/logs/server.logduring the Playwright window).Pre-push local code review
Erlang verdict
Independent read of
reorderEditionContentList,EditionEditor.handleReorder, andreorderEditionContentListindesignApi.Non-adjacent positions, a missing sequence, and a blank id are HTTP 400 before any save. Design-write denial is 403. A running publish job is 409. An adjacent move rewrites stored sequences to 1..n. The editor swaps that pair only after the PUT returns; cancel does not write. Edition priority is not part of this request. The
associateContentListcomplexity row is preexisting and out of diff, so it does not block. The twosaveEditionContentListcalls are separate transactions; a failure on the second row could leave a partial order while the UI shows the error. That is not the specified happy path or the 400/403/409 paths, and it is not a missing behavioral test. No agent rule files are in the diff.Recommendation: approve. May merge: yes.