Skip to content

[ui] fix: send collection intervals as numbers - #11819

Open
cananoo wants to merge 2 commits into
mudler:masterfrom
cananoo:fix/collection-source-interval-number
Open

[ui] fix: send collection intervals as numbers#11819
cananoo wants to merge 2 commits into
mudler:masterfrom
cananoo:fix/collection-source-interval-number

Conversation

@cananoo

@cananoo cananoo commented Sep 1, 2026

Copy link
Copy Markdown

Description

Fixes #11815

The collection source form keeps input values as strings, so a numeric update interval was serialized as a JSON string and rejected by the Go API. This change:

  • converts the interval at the API boundary so it is sent as a JSON number
  • constrains the field to positive integer minutes, matching the backend contract
  • adds a Playwright regression test that inspects the posted JSON body
  • documents the collection source endpoints and interval unit

Notes for Reviewers

The API behavior and default interval are unchanged. Empty intervals remain omitted so the server continues to apply its existing default.

Signed commits

  • Yes, I signed my commits.
  • Documentation updated (docs/content/) for user-facing changes, or not applicable

Validation

  • npx eslint e2e/collections.spec.js src/utils/api.js src/pages/CollectionDetails.jsx (0 errors; existing warnings only)
  • npm run lint:inline-styles
  • npm run build
  • npx playwright test e2e/collections.spec.js --project=chromium --list
  • Full Playwright execution was not available in this Windows environment because the repository's configured UI test server uses Unix paths and requires the generated Go test assets.

pengmin added 2 commits September 1, 2026 18:10
Convert collection source update intervals at the API boundary so numeric form input is serialized as a JSON number. Constrain the form to the backend's minute-based integer contract and cover the request body with a focused Playwright regression test.\n\nAssisted-by: Codex:gpt-5 [eslint]

Signed-off-by: pengmin <minpeng@semigraph.com>
Document the collection source endpoints and their minute-based update_interval contract.\n\nAssisted-by: Codex:gpt-5

Signed-off-by: pengmin <minpeng@semigraph.com>
@cananoo
cananoo force-pushed the fix/collection-source-interval-number branch from ba23aa7 to 2c39531 Compare September 1, 2026 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Collection Sources: update_interval sent as string causing 400 Unmarshal error

1 participant