Skip to content

feat(publish): delete one location scheme from Design (#5134) - #5144

Merged
natechadwick-intsof merged 3 commits into
mainfrom
fix/issue-5134-delete-location-scheme
Oct 4, 2026
Merged

natechadwick-intsof merged 3 commits into
mainfrom
fix/issue-5134-delete-location-scheme

Conversation

@natechadwick-intsof

@natechadwick-intsof natechadwick-intsof commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Parent: #4531. Slice #5134.

PublishingShell Design Contexts / schemes confirms, then reuses deleteScheme (DELETE /services/sitemanage/publishingdesign/schemes/{schemeId}). The location-scheme row leaves that context only after DELETE succeeds. If the list refresh fails after success, that row is still dropped and other schemes stay. Cancel does not call the server. HTTP 400, 403, and 409 stay in the contexts error region and do not claim the scheme was deleted. ApiError is not an Error, so the old handler showed only a generic message.

This is not scheme save (#4702), scheme copy (#5109), content-list delete, context delete, or edition delete (#5083).

Operator: Grok: night-issue-prs (model grok-4.7)

Fixes #5134

Test plan

  1. QA H2 (TEST_CMS_URL from perc-devctl qa-up). Log in as Admin. Open Publish → Design → Contexts / schemes.
  2. Add a location scheme (name, generator, unique content type and template). On that row, Delete → confirm. The row is gone only after DELETE succeeds. Other schemes on the context stay.
  3. Delete → cancel. No DELETE request. The row stays.
  4. Stub or force HTTP 400, 403, and 409. The contexts error region shows that message. The row stays. The shell does not claim the scheme was deleted.

Checklist

  • Product documentation — updated product-docs/8.2/admin/publishing.md (Delete a location scheme)
  • Unit / module tests — Vitest for delete error mapping, list-after-success, ContextsPanel confirm/cancel/400/403/409/refresh-fail; WebUI clean install green
  • WebUI + Playwright — modules/perc-qa-automation/frontend/tests/publishing/designLocationSchemeDelete.spec.js (3 passed on H2) plus golden smoke (2 passed)
  • Build gates — standalone rtk mvn clean install for WebUI and modules/perc-qa-automation (no skipTests)
  • Cross-platform — N/A (no path/file I/O)

Build evidence

modules_built: WebUI, modules/perc-qa-automation

downstream_checked: none (no final/sealed type, no public/protected signature change, no package API used by other modules)

JAVA_HOME=/usr/lib/jvm/java-21-openjdk
cd WebUI && rtk mvn clean install
BUILD SUCCESS (2026-10-04T02:09:27-04:00)
Tests run: 69, Failures: 0, Errors: 0, Skipped: 0
Vitest: Test Files 629 passed (629); Tests 5775 passed (5775)

cd modules/perc-qa-automation && rtk mvn clean install
BUILD SUCCESS (2026-10-04T02:09:44-04:00)
No tests to run (Playwright is the opt-in surface run below)

npm engine and Vite chunk-size warnings, and the existing WebUI javadoc warnings, match the module baseline. No new warnings from this change.

UI proof (C5)

python3 docker/scripts/perc-devctl.py qa-up --skip-image-build
RESULT:OK QA_CMS_HOST_PORT=9993 TEST_CMS_URL=http://127.0.0.1:9993 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-webui
RESULT:OK
python3 docker/scripts/perc-devctl.py qa-health
RESULT:OK HTTP:200 HEALTH:healthy

The first surface run failed in scheme create: the skip-image-build cell's perc-system stack-overflowed in findSchemesByContextId (interface default ↔ impl). Current main already overrides that method with the query. Hot-deployed matching SNAPSHOT jars and restarted Jetty inside the cell (no docker restart):

python3 docker/scripts/perc-devctl.py qa-deploy-war-jars --restart-jetty
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
TEST_CMS_URL=http://127.0.0.1:9993 ADMIN_USERNAME=Admin ADMIN_PASSWORD=<from qa-up> TEST_DB_TYPE=h2 TEST_PRODUCT=cms \
  rtk npm run test:surface -- --path tests/publishing/designLocationSchemeDelete.spec.js
3 passed (4.3s)
console-clean=yes (spec fails on pageerror and unexpected console error; HTTP 400/403/409 resource lines ignored)
rtk npm run test:golden
2 passed (2.4s)
server.log-clean=yes (test window after Jetty restart: login INFO only; no ERROR/FATAL)
python3 docker/scripts/perc-devctl.py qa-down
RESULT:OK (cell removed)

Pre-push local code review

Independent Erlang pass (not the author). Manual read of ContextsPanel.removeScheme and locationSchemeDelete.ts: the row is replaced only after DELETE succeeds; Cancel on window.confirm returns before the call; HTTP 400/403/409 set the contexts error and leave the previous rows. No blocking bug. Non-blocking: the 409 fallback string is hardcoded English. LLM CUDA OOM is not a defect.

Summary

Machine analysis found 1 finding(s), 0 bug(s).

Scope

  • Base: origin/main
  • Head: HEAD
  • Files: 7 analyzed
  • Persona: erlang 0.1.1
  • Persona source: /home/nate/.local/share/mkd/agents/erlang

Recommendation

approve

Gate

  • Blocking bugs: 0
  • May commit/push: yes

Issues

Issue 1 -- Severity: suggestion

  • File: review

  • Rule: llm.error

  • Tool: llm

  • Description: model ollama-dev-coder failed: http: status 500 Internal Server Error body {"error":{"message":"llama-server process has terminated: exit status 1: cudaMalloc failed: out of memory\nalloc_tensor_range: failed to allocate CUDA0 buffer of size 5064192000\nerror loading model: unable to allocate CUDA0 buffer","type":"api_error","param":null,"code":null}}

  • Status: open

Confirm deletes a context location scheme only after DELETE succeeds.
Cancel does not call the server. HTTP 400, 403, and 409 stay in the
Design error region and leave the row in place.

> 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.
> Co-Authored by Grok Build 1.0.46 using grok-4.7 with agent night-issue-prs-erlang.
@natechadwick-intsof

Copy link
Copy Markdown
Collaborator Author

Erlang 0.1.1 independent review (mkd-code-review 0.1.18, pack percussion, gate advisory).

Location-scheme delete removes the row only after DELETE succeeds. Cancel does not call the server. HTTP 400/403/409 stay in the contexts error and leave the row.

Blocking bugs: 0. Recommendation: approve. Report: docs/ai-generated/code-reviews/pr-5144-erlang.md.

Co-Authored by Grok Build 1.0.46 using grok-4.7 with agent night-issue-prs-erlang.

@natechadwick-intsof
natechadwick-intsof merged commit aa33c0f into main Oct 4, 2026
6 checks passed
@natechadwick-intsof
natechadwick-intsof deleted the fix/issue-5134-delete-location-scheme branch October 4, 2026 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

model:grok-4.7 Session model grok-4.7 operator:grok Changes authored by Grok operator:night-issue-prs night-issue-prs workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

issue 4531 slice 67: PublishingShell delete a location scheme

1 participant