List the captures that need review in the popup, as the badge counts them #7

Open
opened 2026-09-30 15:19:45 +00:00 by tiagoagueda · 1 comment
Owner

The popup never lists captures. At its bottom is one link, “Captures in this browser”, with a pill counting the captures here that have not reached Postulo (src/popup.html, showCount() in src/popup.js). It opens captures.html in a new tab, which lists every capture kept in this browser with its state and actions. Nothing in the extension shows what waits in Postulo: a sent capture stays “Sent”, reviewed or not. The request: a “list of the captures that need review” in the popup.

Which rows

The set the badge counts (#5), so the number and the list agree: the captures waiting in Postulo, from the copy of GET /api/v1/captures that issue keeps in storage.local, and, if that issue counts them, the captures here not yet sent (kept, waiting, refused). The popup draws from that copy at once, offline too, and redraws when the read made on opening lands.

Proposed: one row per posting, by the badge's address rule, standing for the newest capture in Postulo if there is one, else the newest here, and saying how many there are and where. Postulo's review screen names the other captures waiting at that address, each with “Open it” (src/postulo/templates/jobs/capture_review.html in the core), so opening one reaches the rest (it matches on the address the page states, if any, rather than the one captured from).

What the popup should show

  • Newest first across both sources, by created_at (when Postulo received it) and the local capturedAt: five rows, or as many as fit, then a link to all of them. Popups are at most 800×600 by the browsers' documentation; this one is 320 px wide, 440 when widened (src/style.css).
  • Each row in words: the title, or “Untitled posting” (existing key untitled); company and place; when, formatted with the catalogue's languageTag as captures.js does; and where it waits: “Waiting for review in Postulo”, or the list page's “Not sent”, “Waiting for Postulo” or “Refused” (stateKept, stateWaiting, stateRefused). Never by colour alone, the rule of src/style.css.
  • Each row is one link, reachable by keyboard, opening its review as #8 decides, never inside the popup: review_url for a capture in Postulo, the extension's own review surface for one still here.
  • The list sits in the ready state under the capture button, or fills the body if #6 moves capturing into the header. It hides while the edit or pick form shows.

States

  • Nothing waiting: one line, “Nothing is waiting for review.”
  • Not set up: this browser's unsent captures only; the “Not connected to a Postulo yet” note already says why.
  • Testing switch on, no permission, Postulo unreachable or the token refused: the last list Postulo gave, with a line saying so, “As Postulo last listed them, on 30 September at 14:05.” A row may have been decided meanwhile, and that line is the only warning: by the core's code, its review page shows the form for a decided capture too, and saving makes another listing (CaptureReviewView, src/postulo/jobs/capture_views.py; not tried in a browser).
  • Never read from Postulo: this browser's rows, without that line.

Decisions for this repository

  • One row per posting or per capture. Recommended: per posting, so the list agrees with the badge. Alternative: one per capture, as “list of the captures” reads literally; rows can then outnumber the badge.
  • Where “all of them” goes. Recommended: captures.html, grown to show Postulo's waiting captures beside the ones kept here, from the same copy. Alternative: Postulo's /listings/, which lists up to 20 waiting captures (src/postulo/jobs/listing_views.py) but needs the browser signed in and shows nothing kept here. Settled with #8.
  • The “Captures in this browser” link and its pill. Recommended: the list's link replaces it, still opening captures.html, and the pill goes, since the rows say what is not sent. Alternative: keep both.

Needs from the server

Not filed on postulo/postulo. The rows need nothing new. A review page refusing a capture already decided would make a stale row harmless; until then the “last listed” line is the warning.

Words and documents

  • New sentences (heading, “Waiting for review in Postulo”, the empty and last-listed lines, captures per posting, the link to all): test/i18n.test.mjs requires every new key in all 40 _locales at once, with identical placeholders, so each costs 40 translations in the same commit. messages.json has no plural forms, so a sentence with a number must read right for any count.
  • README.md: “Without a server”, which describes the popup's link and its number, and the Layout row for src/popup.*.
  • PRIVACY.md: nothing beyond #5's change; the list adds no request.
  • Firefox for Android's full-screen popup is postulo/postulo-firefox#4.

Done when

  • Three captures waiting in Postulo, two of them of one posting, and one of another posting kept here: the popup lists three rows, the badge reads 3, and the doubled row says it stands for two.
  • A Postulo row opens its review page outside the popup; a row kept here opens in the extension's review surface.
  • With Postulo stopped, the popup lists the last rows and says when they were read; not set up, only captures kept here.
  • A pure function in src/lib/ builds the rows, with node --test cases for merging, order and the limit, since nothing tests popup.js.
  • README.md says what the popup lists.

From the list of extension improvements of 2026-09-30.

The popup never lists captures. At its bottom is one link, “Captures in this browser”, with a pill counting the captures here that have not reached Postulo (`src/popup.html`, `showCount()` in `src/popup.js`). It opens `captures.html` in a new tab, which lists every capture kept in this browser with its state and actions. Nothing in the extension shows what waits in Postulo: a sent capture stays “Sent”, reviewed or not. The request: a “list of the captures that need review” in the popup. ## Which rows The set the badge counts (#5), so the number and the list agree: the captures waiting in Postulo, from the copy of `GET /api/v1/captures` that issue keeps in `storage.local`, and, if that issue counts them, the captures here not yet sent (kept, waiting, refused). The popup draws from that copy at once, offline too, and redraws when the read made on opening lands. Proposed: one row per posting, by the badge's address rule, standing for the newest capture in Postulo if there is one, else the newest here, and saying how many there are and where. Postulo's review screen names the other captures waiting at that address, each with “Open it” (`src/postulo/templates/jobs/capture_review.html` in the core), so opening one reaches the rest (it matches on the address the page states, if any, rather than the one captured from). ## What the popup should show - Newest first across both sources, by `created_at` (when Postulo received it) and the local `capturedAt`: five rows, or as many as fit, then a link to all of them. Popups are at most 800×600 by the browsers' documentation; this one is 320 px wide, 440 when widened (`src/style.css`). - Each row in words: the title, or “Untitled posting” (existing key `untitled`); company and place; when, formatted with the catalogue's `languageTag` as `captures.js` does; and where it waits: “Waiting for review in Postulo”, or the list page's “Not sent”, “Waiting for Postulo” or “Refused” (`stateKept`, `stateWaiting`, `stateRefused`). Never by colour alone, the rule of `src/style.css`. - Each row is one link, reachable by keyboard, opening its review as #8 decides, never inside the popup: `review_url` for a capture in Postulo, the extension's own review surface for one still here. - The list sits in the ready state under the capture button, or fills the body if #6 moves capturing into the header. It hides while the edit or pick form shows. ## States - **Nothing waiting:** one line, “Nothing is waiting for review.” - **Not set up:** this browser's unsent captures only; the “Not connected to a Postulo yet” note already says why. - **Testing switch on, no permission, Postulo unreachable or the token refused:** the last list Postulo gave, with a line saying so, “As Postulo last listed them, on 30 September at 14:05.” A row may have been decided meanwhile, and that line is the only warning: by the core's code, its review page shows the form for a decided capture too, and saving makes another listing (`CaptureReviewView`, `src/postulo/jobs/capture_views.py`; not tried in a browser). - **Never read from Postulo:** this browser's rows, without that line. ## Decisions for this repository - **One row per posting or per capture.** Recommended: per posting, so the list agrees with the badge. Alternative: one per capture, as “list of the captures” reads literally; rows can then outnumber the badge. - **Where “all of them” goes.** Recommended: `captures.html`, grown to show Postulo's waiting captures beside the ones kept here, from the same copy. Alternative: Postulo's `/listings/`, which lists up to 20 waiting captures (`src/postulo/jobs/listing_views.py`) but needs the browser signed in and shows nothing kept here. Settled with #8. - **The “Captures in this browser” link and its pill.** Recommended: the list's link replaces it, still opening `captures.html`, and the pill goes, since the rows say what is not sent. Alternative: keep both. ## Needs from the server Not filed on postulo/postulo. The rows need nothing new. A review page refusing a capture already decided would make a stale row harmless; until then the “last listed” line is the warning. ## Words and documents - New sentences (heading, “Waiting for review in Postulo”, the empty and last-listed lines, captures per posting, the link to all): `test/i18n.test.mjs` requires every new key in all 40 `_locales` at once, with identical placeholders, so each costs 40 translations in the same commit. `messages.json` has no plural forms, so a sentence with a number must read right for any count. - README.md: “Without a server”, which describes the popup's link and its number, and the Layout row for `src/popup.*`. - PRIVACY.md: nothing beyond #5's change; the list adds no request. - Firefox for Android's full-screen popup is postulo/postulo-firefox#4. ## Done when - Three captures waiting in Postulo, two of them of one posting, and one of another posting kept here: the popup lists three rows, the badge reads 3, and the doubled row says it stands for two. - A Postulo row opens its review page outside the popup; a row kept here opens in the extension's review surface. - With Postulo stopped, the popup lists the last rows and says when they were read; not set up, only captures kept here. - A pure function in `src/lib/` builds the rows, with `node --test` cases for merging, order and the limit, since nothing tests `popup.js`. - README.md says what the popup lists. From the list of extension improvements of 2026-09-30.
Author
Owner

Landed in part (595ddba, Refs #7): the popup lists the postings waiting for review, one row per address, from the same merge the badge uses. Left: Captures in this browser does not show Postulo's waiting captures beside the local ones, and a row for a capture kept here opens the captures page rather than that capture. Not tried in a real browser.

Landed in part (`595ddba`, `Refs #7`): the popup lists the postings waiting for review, one row per address, from the same merge the badge uses. Left: *Captures in this browser* does not show Postulo's waiting captures beside the local ones, and a row for a capture kept here opens the captures page rather than that capture. Not tried in a real browser.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Postulo/postulo-chromium#7
No description provided.