Skip to content

fix: EditorHost numeric field save (#4752) - #4757

Merged
natechadwick-intsof merged 3 commits into
mainfrom
fix/issue-4752-editor-numeric-field
Sep 23, 2026
Merged

natechadwick-intsof merged 3 commits into
mainfrom
fix/issue-4752-editor-numeric-field

Conversation

@natechadwick-intsof

@natechadwick-intsof natechadwick-intsof commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Parent: #4532. Slice #4752.

EditorHost saves a numeric content field (sys_Number, or dataType integer / number / float) through PUT /services/itemmanagement/item/fields/{id}. A valid in-range value is stored. Non-numeric text and out-of-range values are rejected before save and, if they reach the server with a numeric dataType, return HTTP 400 without writing. View mode makes the input read-only and hides Save.

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

Test plan

  • PSItemEditorNumericTest and PSItemServiceSaveEditorFieldsTest (valid save, HTTP 400, no contentItemDao.save)
  • Vitest: numericField.test.ts, controlKinds.test.ts, EditorHost.test.tsx (70 tests in those files; numeric save, range, 400 mapping, view read-only)
  • Playwright surface tests/editor-host-numeric-fields.spec.js — 4 passed on H2 QA
  • Reviewer: confirm inclusive min/max control properties (minimum/maximum, min/max)

Product documentation

  • Updated pages under product-docs/ — product-docs/8.2/admin/content-explorer.md (numeric row)
  • N/A

Pre-PR Maven

  • modules_built: projects/sitemanage, WebUI
  • cd projects/sitemanage && JAVA_HOME=JDK21 rtk mvn clean install — BUILD SUCCESS. Tests run: 2991, Failures: 0, Errors: 0, Skipped: 125 (first install). Re-run after the message-text commit: rtk mvn clean install -q exit 0.
  • cd WebUI && JAVA_HOME=JDK21 rtk mvn clean install — BUILD SUCCESS. Tests run: 69, Failures: 0.
  • downstream_checked: WebUI standalone clean install compiles the editor against the updated sitemanage field DTO. No type was made final/sealed and no existing method signature changed (new getters only).
  • No new compiler warnings attributable to this change (baseline javadoc/dependency warnings remain).

UI proof (C5)

  • python3 docker/scripts/perc-devctl.py qa-up — TEST_CMS_URL=http://127.0.0.1:9993 (free port printed by qa-up)
  • qa-health RESULT:OK HEALTH:healthy
  • qa-deploy-webui and qa-deploy-war-jars RESULT:OK, then qa-health RESULT:OK again
  • npm run test:surface -- --path tests/editor-host-numeric-fields.spec.js — 4 passed
  • console-clean=yes (pageerror/console error listeners empty)
  • server.log-clean=yes (no ERROR/FATAL in the QA server.log tail after the run)
  • qa-down after the run

Pre-push local code review

Erlang review — PR #4757

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: fix: EditorHost numeric field save (#4752) #4757
  • Base: origin/main
  • Head: f19e91f
  • Files analyzed: 18
  • Reviewer disposition: approve. In-diff machine finding is cognitive complexity on numericFieldProblem (suggestion), not a bug. Preexisting path heuristics on the NUL message and PSItemService are out of diff (the mapper line is a quote character, not a filesystem join). Server rejects non-numeric and out-of-range values as HTTP 400 before prepareForEdit when the PUT carries dataType. Client save blocks the same cases. Not a rule-file change.
  • Recommendation: approve. May merge: yes, when required checks are green.

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

Summary

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

Scope

  • Base: origin/main
  • Head: HEAD
  • Files: 18 analyzed
  • In-diff: 1 finding(s); preexisting: 9
  • 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: bug

  • File: projects/sitemanage/src/main/java/com/percussion/itemmanagement/service/impl/PSItemEditorFieldsMapper.java:117 (preexisting)
  • Rule: paths.hardcoded_sep
  • Tool: paths.hardcoded_sep
  • Pattern-id: paths.hardcoded-sep
  • Description: Possible non-portable path construction (line 117)
  • Suggestion: Use Path/PathBuf, path.join, File.separator, or pathSeparator — not literal / or \ joins.
  • Status: open

Issue 2 -- Severity: bug

  • File: projects/sitemanage/src/main/java/com/percussion/itemmanagement/service/impl/PSItemService.java:1813 (preexisting)
  • Rule: paths.hardcoded_sep
  • Tool: paths.hardcoded_sep
  • Pattern-id: paths.hardcoded-sep
  • Description: Possible non-portable path construction (line 1813)
  • Suggestion: Use Path/PathBuf, path.join, File.separator, or pathSeparator — not literal / or \ joins.
  • Status: open

Issue 3 -- Severity: bug

  • File: projects/sitemanage/src/main/java/com/percussion/itemmanagement/service/impl/PSItemService.java:1948 (preexisting)
  • Rule: paths.hardcoded_sep
  • Tool: paths.hardcoded_sep
  • Pattern-id: paths.hardcoded-sep
  • Description: Possible non-portable path construction (line 1948)
  • Suggestion: Use Path/PathBuf, path.join, File.separator, or pathSeparator — not literal / or \ joins.
  • Status: open

Issue 4 -- Severity: bug

  • File: projects/sitemanage/src/main/java/com/percussion/itemmanagement/service/impl/PSItemService.java:1949 (preexisting)
  • Rule: paths.hardcoded_sep
  • Tool: paths.hardcoded_sep
  • Pattern-id: paths.hardcoded-sep
  • Description: Possible non-portable path construction (line 1949)
  • Suggestion: Use Path/PathBuf, path.join, File.separator, or pathSeparator — not literal / or \ joins.
  • Status: open

Issue 5 -- Severity: bug

  • File: projects/sitemanage/src/main/java/com/percussion/itemmanagement/service/impl/PSItemService.java:1953 (preexisting)
  • Rule: paths.hardcoded_sep
  • Tool: paths.hardcoded_sep
  • Pattern-id: paths.hardcoded-sep
  • Description: Possible non-portable path construction (line 1953)
  • Suggestion: Use Path/PathBuf, path.join, File.separator, or pathSeparator — not literal / or \ joins.
  • Status: open

Issue 6 -- Severity: bug

  • File: projects/sitemanage/src/main/java/com/percussion/itemmanagement/service/impl/PSItemService.java:1954 (preexisting)
  • Rule: paths.hardcoded_sep
  • Tool: paths.hardcoded_sep
  • Pattern-id: paths.hardcoded-sep
  • Description: Possible non-portable path construction (line 1954)
  • Suggestion: Use Path/PathBuf, path.join, File.separator, or pathSeparator — not literal / or \ joins.
  • Status: open

Issue 7 -- Severity: bug

  • File: projects/sitemanage/src/main/java/com/percussion/itemmanagement/service/impl/PSItemService.java:1960 (preexisting)
  • Rule: paths.hardcoded_sep
  • Tool: paths.hardcoded_sep
  • Pattern-id: paths.hardcoded-sep
  • Description: Possible non-portable path construction (line 1960)
  • Suggestion: Use Path/PathBuf, path.join, File.separator, or pathSeparator — not literal / or \ joins.
  • Status: open

Issue 8 -- Severity: bug

  • File: WebUI/src/main/ts/editor/controlKinds.ts:67 (preexisting)
  • Rule: complexity.cognitive
  • Tool: arborist-metrics
  • Description: Function classifyEditorControl cognitive=22 (max 15), cyclomatic=37 (max 15)
  • Suggestion: Extract helpers, reduce nesting, use guard clauses (see CODE_STANDARDS).
  • Status: open

Issue 9 -- Severity: suggestion

  • File: WebUI/src/main/ts/editor/numericField.ts:118 (in-diff)
  • Rule: complexity.cognitive
  • Tool: arborist-metrics
  • Description: Function numericFieldProblem cognitive=23 (max 15), cyclomatic=18 (max 15)
  • Suggestion: Extract helpers, reduce nesting, use guard clauses (see CODE_STANDARDS).
  • Status: open

Issue 10 -- Severity: suggestion

  • File: projects/sitemanage/src/main/java/com/percussion/itemmanagement/service/impl/PSItemService.java:407 (preexisting)
  • Rule: complexity.cognitive
  • Tool: arborist-metrics
  • Description: Function saveEditorFields cognitive=17 (max 15), cyclomatic=20 (max 15)
  • Suggestion: Extract helpers, reduce nesting, use guard clauses (see CODE_STANDARDS).
  • Status: open

sys_Number / integer / float values persist through the item fields PUT.
Non-numeric and out-of-range values are HTTP 400 and are not saved. View mode is read-only.

> Co-Authored by Grok Build 1.0.40 using grok-4.6 with agent night-issue-prs.
> Co-Authored by Grok Build 1.0.40 using grok-4.6 with agent night-issue-prs.
Record the pre-push mkd-code-review report for EditorHost numeric fields.

> Co-Authored by Grok Build 1.0.40 using grok-4.6 with agent night-issue-prs-erlang.
@natechadwick-intsof

Copy link
Copy Markdown
Collaborator Author

LGTM. Independent Erlang review (mkd-code-review 0.1.18, persona erlang 0.1.1, gate advisory). No in-diff bugs. GitHub rejected same-login APPROVE; this comment is the LGTM. Full CLI report is in the PR body under Pre-push local code review and in docs/ai-generated/code-reviews/pr-4757-erlang.md.

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

@natechadwick-intsof
natechadwick-intsof merged commit 2f5fd9a into main Sep 23, 2026
8 checks passed
@natechadwick-intsof
natechadwick-intsof deleted the fix/issue-4752-editor-numeric-field branch September 23, 2026 03:51
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.

1 participant