Skip to content

feat(developer): item-filter rules write (AS-07 #4438) - #4441

Merged
natechadwick-intsof merged 1 commit into
mainfrom
fix/issue-4438-item-filter-rules-write
Sep 9, 2026
Merged

natechadwick-intsof merged 1 commit into
mainfrom
fix/issue-4438-item-filter-rules-write

Conversation

@natechadwick-intsof

Copy link
Copy Markdown
Collaborator

Summary

Implements #4438 (AS-07 slice 1, parent #1690): Developer → Item Filters rule-row write.

  • SPA ItemFilterDetailPanel: add / edit / remove rule rows (name + params); Clear all rules; Save persists.
  • Wire: coerce single-rule Jackson objects to arrays; ItemFilter.rules is List; clearRules: true when clearing (empty rules: [] is dropped by some JAX-RS paths).
  • Adaptor: clear via removeRuleDef + post-save filterService.saveFilter so empty clears persist.
  • Vitest (panel + rules helpers + API), Playwright surface developer-item-filter-editor.spec.js, product-docs.

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

Test plan

  • cd rest && ../mvnw.cmd clean install — BUILD SUCCESS
  • cd projects/sitemanage && ../../mvnw.cmd clean install — BUILD SUCCESS
  • cd WebUI && ../mvnw.cmd clean install — BUILD SUCCESS (Tests run: 4178)
  • Vitest item-filter panel/API/rules
  • C5: perc-devctl qa-up → TEST_CMS_URL=http://127.0.0.1:9993 → hot-deploy rest/sitemanage + WebUI modern → Playwright npm run test:surface -- --path tests/developer-item-filter-editor.spec.js — 3 passed; console-clean=yes; server.log-clean=yes (no feature-related ERROR/FATAL)

Product documentation

  • Updated product-docs/8.2/admin/developer-item-filters.md (id: admin-developer-item-filters)
  • Updated Item filters section of product-docs/8.2/developer/rest.md (stable id)

C3 evidence

  • modules_built: rest, projects/sitemanage, WebUI
  • downstream_checked: sitemanage standalone after rest List/clearRules API change; grepped ItemFilter.setRules call sites
  • build_evidence: see Test plan

C5 UI proof

  • qa-up RESULT:OK; TEST_CMS_URL=http://127.0.0.1:9993
  • Playwright surface 3/3; console-clean=yes; server.log-clean=yes

Fixes #4438
Partial for #1690 (slice 1 only; do not stack #4439/#4440)

Co-Authored by Grok Build 1.0.24 using grok-4.5 with agent night-issue-prs.

@natechadwick-intsof natechadwick-intsof left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Peer review (night-issue-prs / grok-4.6)

Independent Erlang-style review of #4441 (AS-07 slice 1 / #4438, author model: grok-4.5).

GitHub will not accept APPROVE from the same account as the PR author (natechadwick-intsof). This comment is the peer-review record; squash-merge uses the branch-protection bypass for this operator.

Verified

  • Change class: WebUI product screen + REST DTO (rules as List + clearRules) + sitemanage adaptor persist + Playwright + product-docs/8.2.
  • Companions present: Vitest (panel, rules helpers, API coerce), adaptor write tests (update_emptyRules_*, update_clearRulesFlag_*), Jackson empty-[] vs omitted, Playwright developer-item-filter-editor.spec.js (create/save/delete + add/persist/clear + 409), smoke-set entry, admin + REST product-docs (id: stable).
  • Adaptor: empty rules / clearRules: true uses removeRuleDef plus post-save filterService.saveFilter (design-WS empty-wrapper workaround); omitted rules still leaves stored rules; blank rule names stay on the wire for 400.
  • SPA: draft dirty fingerprint, always-send current rules[] (documented), coerce single Jackson rule/param objects, no non-portable path I/O.
  • Checks (this pass): CodeQL (java + js) SUCCESS, product-docs smoke SUCCESS, Kilo Code Review SUCCESS, optional H2 live skipped. mergeable=MERGEABLE. No review threads.

Nits (non-blocking)

  • Dead IF_GAP_RULE_EDIT copy still in messages.ts (not rendered).
  • All HTTP 400s map to IF_INVALID_NAME fallback; panelErrMsg still appends the REST body (rule name is required).
  • itemFilterRules.test.ts uses a short copyright line (other new files have the full Apache block).

Ready to squash-merge. Does not close parent #1690.

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

@natechadwick-intsof
natechadwick-intsof merged commit 7fa9a79 into main Sep 9, 2026
9 checks passed
@natechadwick-intsof
natechadwick-intsof deleted the fix/issue-4438-item-filter-rules-write branch September 9, 2026 19:26
@natechadwick-intsof

Copy link
Copy Markdown
Collaborator Author

night-issue-prs peer review (grok-4.6, independent of author grok-4.5): ready. GitHub blocks self-APPROVE on this operator account; review is recorded as a COMMENT. Squash-merged with admin bypass (required reviews).

Linked #4438 should auto-close. Parent #1690 stays open (later AS-07 slices).

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

)

AS-07 slice 1 (parent #1690): Admin can add/edit/remove rule rows (name +
params) in Developer → Item Filters; Save persists via PUT rules[] /
clearRules. Coerce single-rule Jackson objects; List wire type + clearRules
when empty arrays are dropped; adaptor clears via removeRuleDef +
filterService.saveFilter. Vitest, Playwright surface, product-docs.

> Co-Authored by Grok Build 1.0.24 using grok-4.5 with agent night-issue-prs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

model:grok-4.5 Grok 4.5 model 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 1: item-filter rules write (AS-07)

1 participant