Skip to content

fix(developer): set a slot label without changing the name (#5431) - #5441

Merged
natechadwick-intsof merged 4 commits into
mainfrom
fix/issue-5431-slot-label
Oct 9, 2026
Merged

natechadwick-intsof merged 4 commits into
mainfrom
fix/issue-5431-slot-label

Conversation

@natechadwick-intsof

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

Copy link
Copy Markdown
Collaborator

Summary

Developer slot detail can set the slot label with the existing slot PUT. The request sends label only, so the name, description, slot type, and finder stay. The new label shows only after that save succeeds. A blank label does not clear the name; the catalog echoes the name when the stored label is blank. Cancel does not write. HTTP 400, 403, and 409 do not claim success and leave the previous label.

Parent: #1690. Fixes #5431.

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

Test plan

  1. Sign in as Admin and open Developer → Slots. Create a user slot with a label, a description, and type INLINE. Lock it, set a finder and relationship, save, and unlock.
  2. Click Set slot label. Saving the same label does not PUT. Cancel does not PUT.
  3. Save a new label. The PUT body is label only. Reload shows that label. Name, description, type, and finder are unchanged.
  4. Save a blank label. The name is unchanged. The shown label is empty or the slot name. Description, type, and finder stay.
  5. Forced HTTP 400, 403, and 409 do not show Slot label saved and do not replace the previous label.

Checklist

  • Product documentation — updated product-docs/8.2/admin/developer-slots.md (set a label; blank label does not clear the name)
  • Unit / module tests — Vitest for slotLabel and SlotDetailPanel; WebUI clean install green
  • WebUI + Playwright — modules/perc-qa-automation/frontend/tests/developer-slot-label.spec.js
  • Build gates — standalone clean install for WebUI and perc-qa-automation; no API signature change
  • Cross-platform — N/A (no path/file I/O)

Build evidence

modules_built: WebUI, modules/perc-qa-automation

downstream_checked: none (no public Java signature or final/sealed type change)

cd WebUI && JAVA_HOME=/usr/lib/jvm/java-21-openjdk rtk mvn clean install
BUILD SUCCESS
Tests run: 69, Failures: 0, Errors: 0, Skipped: 0
Test Files  750 passed (750)
Tests  7266 passed (7266)

cd modules/perc-qa-automation && JAVA_HOME=/usr/lib/jvm/java-21-openjdk rtk mvn clean install
BUILD SUCCESS
No tests to run

UI proof (H2 QA)

python3 docker/scripts/perc-devctl.py qa-up --skip-image-build --then-qa-deploy-webui
RESULT:OK STEP:qa-up
QA_CMS_HOST_PORT=9993
TEST_CMS_URL=http://127.0.0.1:9993
RESULT:OK STEP:qa-deploy-webui
RESULT:OK STEP:qa-deploy-war-jars
python3 docker/scripts/perc-devctl.py qa-health
RESULT:OK STEP:qa-health HTTP:200 HEALTH:healthy URL:http://127.0.0.1:9993/Rhythmyx/rest/mimetypes

# after the save-path refactor, redeploy the rebuilt SPA and health again
python3 docker/scripts/perc-devctl.py qa-deploy-webui
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 TEST_DB_TYPE=h2 TEST_PRODUCT=cms \
  npm run test:surface -- --path tests/developer-slot-label.spec.js
1 passed (tests/developer-slot-label.spec.js)
console-clean=yes
server.log-clean=yes

Pre-push local code review

Independent Erlang review (did not author the PR). Gate counts in-diff bugs only. Preexisting complexity and the LLM fail-open do not block.

<!--
Copyright (c) 2026 Intersoft Data Labs, Inc.
Licensed under the Apache License, Version 2.0.
-->

# Erlang review — PR #5441

## Scope

- Persona: erlang 0.1.1
- Persona source: /home/nate/.local/share/mkd/agents/erlang
- Status: mkd-code-review 0.1.18, pack percussion, --gate advisory, --git-base origin/main
- PR: https://github.com/intersoftdatalabs-in/percussioncms/pull/5441
- Base: origin/main
- Head: 722b1d69ee295e9a43f02925bccda9e21d2b0e39
- Files analyzed: 9
- Reviewer: independent Erlang (did not author the PR)

## Independent reading

`slotLabelWrite` sends `{ label }` only. The same trimmed label is `"unchanged"` and does not PUT. Cancel does not write. `savedSlotLabel` rejects a response whose name, description, type, finder, relationship, or finder arguments differ from the previous slot, and it rejects a sent body that includes those fields. A blank label does not send the name. `SlotsAdaptor.applyMutableSlotUpdates` writes a label only when `body.getLabel()` is non-null and leaves omitted fields alone. A stored blank label is echoed as the slot name by `labelOrName`; the client accepts `""` or that name and does not treat any other label as success. HTTP 400, 403, and 409 restore the previous label and do not show **Slot label saved**. Vitest covers the write, the echo, and the rejection cases. Playwright and `product-docs/8.2/admin/developer-slots.md` are present. No path or file I/O. No rule files.

In-diff cognitive-complexity rows are suggestions (including `savedSlotLabel`). They are not bugs. The `handleSave` `nameInvalid` branch sits after `canSave`, which already requires `!nameInvalid`. It does not change save behavior. The LLM stage failed open (Ollama CUDA out of memory). Neither blocks.

Recommendation: approve. May merge: yes.

## CLI stdout (`mkd-code-review analyze --format markdown`)

## Summary

Machine analysis found **5** finding(s), **0** bug(s).

## Scope

- Base: origin/main
- Head: HEAD
- Files: 9 analyzed
- In-diff: 3 finding(s); preexisting: 1
- 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: WebUI/src/main/ts/developer/SlotDetailPanel.tsx:479 (preexisting)
- Rule: `complexity.cognitive`
- Tool: `arborist-metrics`
- Description: Function `handleDescriptionSave` cognitive=6 (max 15), cyclomatic=16 (max 15)
- Suggestion: Extract helpers, reduce nesting, use guard clauses (see CODE_STANDARDS).
- Status: open

### Issue 2 -- Severity: suggestion

- File: WebUI/src/main/ts/developer/SlotDetailPanel.tsx:574 (in-diff)
- Rule: `complexity.cognitive`
- Tool: `arborist-metrics`
- Description: Function `handleLabelSave` cognitive=6 (max 15), cyclomatic=16 (max 15)
- Suggestion: Extract helpers, reduce nesting, use guard clauses (see CODE_STANDARDS).
- Status: open

### Issue 3 -- Severity: suggestion

- File: WebUI/src/main/ts/developer/SlotDetailPanel.tsx:691 (in-diff)
- Rule: `complexity.cognitive`
- Tool: `arborist-metrics`
- Description: Function `handleSave` cognitive=14 (max 15), cyclomatic=18 (max 15)
- Suggestion: Extract helpers, reduce nesting, use guard clauses (see CODE_STANDARDS).
- Status: open

### Issue 4 -- Severity: suggestion

- File: WebUI/src/main/ts/developer/slotLabel.ts:91 (in-diff)
- Rule: `complexity.cognitive`
- Tool: `arborist-metrics`
- Description: Function `savedSlotLabel` cognitive=26 (max 15), cyclomatic=25 (max 15)
- Suggestion: Extract helpers, reduce nesting, use guard clauses (see CODE_STANDARDS).
- Status: open

### Issue 5 -- 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

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

Label-only PUT on the existing slot update. Name, description, type, and
finder stay. A blank label does not wipe the name. Cancel does not write.
HTTP 400, 403, and 409 do not claim success.

> Co-Authored by Grok Build 1.0.46 using grok-4.6 with agent night-issue-prs.
#5431)

> Co-Authored by Grok Build 1.0.46 using grok-4.6 with agent night-issue-prs.
> Co-Authored by Grok Build 1.0.46 using grok-4.6 with agent night-issue-prs.
@natechadwick-intsof natechadwick-intsof added operator:grok Changes authored by Grok operator:night-issue-prs night-issue-prs workflow model:grok-4.6 Session model grok-4.6 labels Oct 9, 2026
> Co-Authored by Grok Build 1.0.46 using grok-4.6 with agent night-issue-prs-erlang.
@natechadwick-intsof

Copy link
Copy Markdown
Collaborator Author

LGTM. Independent Erlang review (did not author the PR). Same-login APPROVE is rejected by GitHub; this comment is the LGTM.

mkd-code-review 0.1.18, persona erlang 0.1.1, pack percussion, gate advisory, base origin/main. In-diff bugs: 0. Cognitive-complexity rows are suggestions. LLM stage failed open (Ollama CUDA OOM) and does not block.

slotLabelWrite sends label only. A blank label does not send the name. savedSlotLabel rejects a response that changes name, description, type, or finder. HTTP 400, 403, and 409 are not success. Vitest, Playwright, and product-docs are present. No path I/O and no rule files.

Report: docs/ai-generated/code-reviews/pr-5441-erlang.md (ea6e4b5).

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

@natechadwick-intsof
natechadwick-intsof merged commit 128e5d7 into main Oct 9, 2026
6 checks passed
@natechadwick-intsof
natechadwick-intsof deleted the fix/issue-5431-slot-label branch October 9, 2026 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

model:grok-4.6 Session model grok-4.6 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 1690 slice 99: Developer set a slot label

1 participant