Skip to content

Caption the list pager's links Newer and Older - #162

Open
SushilAmbekar wants to merge 2 commits into
jenkinsci:mainfrom
SushilAmbekar:fix/150-newer-older-pager
Open

SushilAmbekar wants to merge 2 commits into
jenkinsci:mainfrom
SushilAmbekar:fix/150-newer-older-pager

Conversation

@SushilAmbekar

Copy link
Copy Markdown

What this changes

The Pending, Active and Ended lists use the shared pager tag (tags/pager.jelly), whose links said Previous / Next. History and Change Records say Newer / Older. Every list is sorted newest first, so Newer / Older says where a link takes you, and one pair of words everywhere is less confusing. This change captions the pager's links Newer and Older and updates the tag's comment, as the issue suggests. The links still lead to the same pages; only their captions change.

Anchor

Testing done

  • T-UI-318 (PagerParameterTest#t_ui_318_pagerLinksSayNewerAndOlder), the small HtmlUnit check the issue asks for. With T-UI-146's fixture (pending run requests until the list offers page 2), admin opens batch-control/requests/ and ?pendingPage=2. The pager is found by its navigation landmark (Pages of pending requests). Page 1's link to page 2 must read exactly Older, page 2's link to page 1 exactly Newer, and no link may read Previous or Next. Guard first: the links are judged by the page they lead to before their captions, so a change that swapped the two links would fail.
  • Committed failing first (a4cd0bd), run on its own commit with mvn -ntp test -Dtest='PagerParameterTest#t_ui_318*':
    #150: page 1: the link to page 2 must read 'Older', links were {Next=2}; page 2: the link to page 1 must read 'Newer', links were {Previous=1}; no pager link may read 'Previous': ...; no pager link may read 'Next': ...
    Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
    
    With the fix (949b938), the whole class: Tests run: 4, Failures: 0, Errors: 0, Skipped: 0 (T-UI-146..148 unchanged). Both runs used Windows 11 and JDK 21.
  • e2e: the drivers that find the pager links by caption now use the new captions: e2e/r14/s_listpager.py and e2e/r25/pager_params.py (the lines the issue lists, plus its docstrings and check names). The descriptions in e2e/r14/misc.py and e2e/r14/seed_paging.py were updated too. e2e/r14/misc.py and e2e/r14/def07.py already accepted both captions, so their code needed no change. The listpager rows keep their next / prev keys, so ci/h1_rules.py is unchanged. python3 e2e/ci/selftest_h1.py passes locally (315 PASS, 0 FAIL). Old reports under docs/reports/ describe past runs and were left as they are.
  • Fork CI: Build passed, 26 of 26 jobs (the whole test suite and SpotBugs). One group, "activation and new jobs", failed on the first attempt before any test ran: Maven could not download surefire-junit-platform on the runner. It passed on a rerun with no change. E2E passed, 12 of 12 jobs.

Checks

  • The pull request title represents the desired changelog entry.
  • Opened from a topic branch, not from the main branch of my fork.
  • The build and e2e workflows passed on my fork (links above).
  • mvn clean verify passed locally. Not ticked, and here is why: the full suite takes about 2.5 h on my Windows machine, so I ran PagerParameterTest locally (red and green, above) and the whole suite in the fork's build workflow instead.
  • New behaviour has a row in docs/TEST-MATRIX.md (T-UI-318, note 375, changelog line), the row ID is in the test's name, and the test was committed failing first.
  • Touched src/main/resources/**: only the two link captions and the comment of tags/pager.jelly changed; the links' targets, classes and the navigation landmark are as before. T-UI-318 checks the rendered captions, and the E2E workflow, which drives these pages in a real browser and clicks the pager links by caption, passed.
  • This PR does not disclose a security vulnerability.

Suggested label: enhancement (a usability fix to the list pager).

AI assistance: I made this change with the help of Claude Code. I reviewed the diff and the test, and I ran the red and green runs above myself.

🤖 Generated with Claude Code

SushilAmbekar and others added 2 commits November 22, 2026 21:01
Every list is sorted newest first, and History and Change Records
already caption their links Newer / Older. T-UI-318 asserts that the
shared pager of the Pending, Active and Ended lists does the same:
page 1's link to page 2 reads Older, page 2's link to page 1 reads
Newer, and no link reads Previous or Next. Guard: the links still lead
to the same pages, so swapping them would not pass.

Refs jenkinsci#150 (SPEC 5, 6a, 8; D-66; note 375)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Pending, Active and Ended lists are sorted newest first, and
History and Change Records already caption their paging links Newer /
Older. The shared pager tag said Previous / Next, so the plugin showed
two pairs of words for the same move. tags/pager.jelly now says Newer
and Older; the links still lead to the same pages.

The e2e drivers that find these links by caption
(r14/s_listpager.py, r25/pager_params.py) and two descriptions
(r14/misc.py, r14/seed_paging.py) now name the new captions.

Fixes jenkinsci#150 (SPEC 5, 6a, 8; D-66; T-UI-318, note 375)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@SushilAmbekar
SushilAmbekar requested a review from a team as a code owner November 22, 2026 16:40
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.

Use Newer and Older on every pager

1 participant