Skip to content

NCE-22 NCE-24: add direct pagination controls - #182

Merged
FortPT merged 5 commits into
release/v3.1.0-amber-webuifrom
fix/NCE-22-NCE-24-pagination-20260812
Aug 12, 2026
Merged

NCE-22 NCE-24: add direct pagination controls#182
FortPT merged 5 commits into
release/v3.1.0-amber-webuifrom
fix/NCE-22-NCE-24-pagination-20260812

Conversation

@FortPT

@FortPT FortPT commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

Implements NCE-22 and NCE-24 on the v3.1.0 Amber WebUI release line.

NCE-22 — Delivery History

  • Add First and Last page actions.
  • Add direct page-number input with Go and Enter-key navigation.
  • Reject out-of-range and non-integer page values.
  • Keep Previous/Next behavior and boundary disabled states.
  • Update Delivery History records using the existing paged API.

NCE-24 — Audit Log

  • Apply the same First/Last/direct-page controls to Audit Log.
  • Preserve the NCE-23 persisted entries-per-page behavior and selected page size in paged requests.

Scope protection

  • Routes retain the existing compact Previous/Next pager.
  • Responsive pager wrapping is added for narrow displays.

Validation on VM-09

  • node --check src/webui/qa_patch.js: passed
  • node --check src/webui/app.js: passed
  • node --check src/webui/i18n.js: passed
  • python -m compileall -q src: passed
  • pytest -q tests/test_webui.py: 12 passed
  • broader suite excluding tests/test_brand_identity.py: 1033 passed
  • git diff --check: clean

tests/test_brand_identity.py remains omitted only on the non-elevated VM-09 checkout because the normal VM user cannot recursively read /docker/nowlert-ce/config/config.yaml; CI should run it in a clean checkout.

Development gate

Keep this PR in draft until the branch image is deployed to CE Development and both Delivery History and Audit Log pagination are manually validated, including first/last boundaries, intermediate-page navigation, invalid direct-page values, Enter/Go behavior, and preservation of the Audit Log entries-per-page selection.

Base: release/v3.1.0-amber-webui

Refs: NCE-22, NCE-24

@FortPT
FortPT deployed to development August 12, 2026 17:06 — with GitHub Actions Active

FortPT commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator Author

Development UI validation found a remaining UX defect, so this PR stays draft.

Functional pagination is working, but user-triggered page changes can move the viewport unexpectedly after the table/pager re-renders:

  • Audit Log: clicking First can move the page upward.
  • Delivery History: the first Next can move the viewport upward; Previous from page 4 to page 3 can leave the viewport around the middle of the page; First from the last page and direct page-number navigation can also shift the viewport.
  • First/Last/Previous/Next/direct page selection otherwise return the correct records and boundary behavior is working.

Next patch: preserve the pagination control's viewport position across asynchronous page re-renders so the controls stay anchored where the user clicked, without changing the existing paging APIs or NCE-23 Audit page-size persistence.

FortPT commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator Author

Development follow-up fix pushed at 8a5f00bd5683afba749cedb972721d76a99f379a.

The corrective patch preserves the pagination control's viewport anchor across asynchronous Delivery History / Audit Log re-renders so page height changes do not move the user unexpectedly.

Validation on VM-09 after the correction:

  • pytest -q tests/test_webui.py: 12 passed
  • broader suite excluding the VM-local tests/test_brand_identity.py permission case: 1033 passed
  • JavaScript syntax checks: passed
  • git diff --check: clean

PR remains draft pending a Development retest specifically covering the previously observed scroll-position cases (First, Previous, initial Next, and direct page-number navigation).

@FortPT
FortPT deployed to development August 12, 2026 17:24 — with GitHub Actions Active

FortPT commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator Author

Development retest still shows inconsistent viewport behavior for direct page-number navigation. The previous viewport-anchor approach is therefore not the final behavior.

Updated Development acceptance for this PR:

  • Every Delivery History / Audit Log paging action (First, Previous, direct page + Go/Enter, Next, Last) finishes with the bottom pager visible at the bottom of the page instead of attempting to preserve the prior scroll anchor.
  • Add an explicit Top shortcut as the left-most control in the bottom pager.
  • Add an explicit Bottom shortcut in the top toolbar of Delivery History and Audit Log.
  • Add a Delivery History Entries selector matching Audit Log (25/50/100/150/250/500), persisted across refresh/navigation.
  • Extend the Delivery History paged API to accept the selected page size, mirroring the Audit Log API behavior.
  • Preserve NCE-23 Audit entries-per-page persistence and keep Routes pagination unchanged.

PR remains draft until this revised behavior is deployed and manually validated in CE Development.

@FortPT
FortPT deployed to development August 12, 2026 20:20 — with GitHub Actions Active
@FortPT
FortPT deployed to development August 12, 2026 20:44 — with GitHub Actions Active
@FortPT
FortPT deployed to development August 12, 2026 20:54 — with GitHub Actions Active
@FortPT
FortPT deployed to development August 12, 2026 21:01 — with GitHub Actions Active
@FortPT
FortPT marked this pull request as ready for review August 12, 2026 21:05
@FortPT
FortPT merged commit 01d6d41 into release/v3.1.0-amber-webui Aug 12, 2026
3 checks passed
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.

1 participant