A job post’s applications, a page at a time
A hiring team’s review app reads one job post’s applications from a job board’s API, newest first, a page at a time: the first request gets page 1, and each page carries a token for the next. The board logs every session it opens, every page it serves and every close, and the cases read that log. Each level starts from the previous level’s finished code, so you can begin at any of them.
The review screen now has a Load more button: the first press shows the newest few applications, each later press the next few. It is built on newest(), asking for everything shown so far plus the next few and dropping the ones already on screen.
Every press reads the post from the first page again. On a post with forty pages of applications, the tenth press fetches ten pages to show five names, and each press opens and closes a session of its own.
Reproduce Create a review screen on a board with one page, Rosa and Liam, and press Load more twice, for one application each time. The names are right, Rosa and then Liam, but the log reads open, page 1, close, open, page 1, close: two sessions and the same page twice.
Acceptance criteria Each press carries on where the previous one stopped: every page is fetched once, and one session lasts for the screen’s whole life. Creating the screen fetches nothing; the first press opens the session. Closing the screen closes the session. When the last application has been shown, the session closes even if the screen stays open, and later presses show nothing and fetch nothing. The earlier rules still hold: an empty page is not the end, and newest and hasApplied still stop as soon as they have their answer. Notes A screen case prints each press’s names, separated by “ / ”, then the board’s log. Keep the screen’s name, its constructor and its two methods; the checker calls them.