Review captures in a bigger window or a dedicated browser tab, not in the popup #8

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

Today, before sending, the correction form sits in the popup, widened to 440 px: “Correct anything that is wrong; nothing leaves this browser until you send it.” After sending, Postulo's own review page (review_url) opens in a new tab from “Review in Postulo”, in the popup or on the list page (captures.html). The suggestion is to review in a bigger dialog box or a dedicated browser tab.

The popup is a poor place for it: browsers cap it at 800×600, and it closes as soon as focus leaves it; what was read and corrected lives only in memory until “Keep” or “Send” (src/popup.js), so a click elsewhere loses it. Nor can Postulo's review page be framed by anything the extension draws (X-Frame-Options: DENY, frame-ancestors 'none'), and it needs a signed-in session. No API call, under any scope, accepts, discards, binds or fetches a single capture.

What the extension should do

A review window. On Chromium and desktop Firefox, windows.create with type: "popup" and a size opens a window without tabs, and needs no permission. It uses the same profile, so the sign-in to Postulo should carry over; neither is tried yet in a real browser. Firefox for Android has no windows API: postulo/postulo-firefox#4.

The correction form moves into it. The page is still read from the popup: readCurrentTab() asks for the active tab of the current window, which from any other page is that page itself (passing the posting's tab id instead leans on activeTab outliving the popup; unverified). So the popup reads the page when capture is pressed, stores the result in one write, as store.add already does because a popup can close at any moment (or reuses the unsent capture of that address), and only then opens the window on it.

The review page carries what the popup shows: postingForm(), the hint that applies, “Read by …”, and the captured-before note, now asked from there. Its buttons: “Send for review”, “Keep in this browser”, “Delete”. “Send” asks for a missing host permission from its click, as the popup and the list do.

Postulo's review page, in the same window. Every “Review in Postulo” (popup, list page, #7) opens review_url there, and #6 opens “Add a listing” there. Postulo's page already walks the queue: “Save and next” and “Discard and next” go to the next older capture waiting, wrap round, and end on the listings.

Decisions for this repository

  • What “a bigger dialog box” is. Read here as a window of its own. The other reading, a wider popup up to 800×600, is cheaper but keeps both problems above. A dialog drawn over the posting needs a script left on the page, where PRIVACY.md says one runs for one call only; Chrome's side panel is not in Firefox, nor Firefox's sidebar in Chrome. Recommended: the window.
  • Window or tab, and how many. A window where the browser has windows and a tab where it has not (recommended), or a tab everywhere. One, reused and brought forward with windows.update (recommended), or a new one per click, as openCaptures() does with tabs.
  • Kept on reading, or handed over. Keeping the capture before the window opens loses nothing if the window closes, but a capture looked at and left undecided stays in the list as “Not sent”, and on today's badge, until deleted; today nothing is kept before “Keep” or “Send”. The alternative hands the read over in storage.session (emptied when the browser closes) and keeps only on “Keep” or “Send”. Recommended: keep on reading, with “Delete” on the review page.
  • Where the editor lives. A page for one capture, which the list's “Edit” also opens, so there is one editor (recommended); or captures.html with a link opening its inline editor (today “Save” and “Cancel” only) on one capture.
  • The results-page tick list (postulo/postulo#177; the popup's pick section). Postings listed and not ticked are not captures, so moving it needs the hand-over. Recommended: it stays in the popup; ticking is a choice, not a correction, and each ticked posting is reviewed on Postulo's page, in the window.

Needs from the server

Not filed on postulo/postulo. Reviewing inside the extension, without Postulo's page, would need API calls to fetch one capture and to accept, discard and bind it, and a scope for them. The route above works with the server as it is.

Translations and documents

Beyond a title for the review page, its words are existing keys. test/i18n.test.mjs requires every new key in all 40 _locales at once, with identical placeholders, so each new sentence costs 40 translations in the same commit. README.md: step 3 of “Set it up”, “Captured before” and the layout table, which place this in the popup; “Without a server” if “Edit” moves. PRIVACY.md: the POST /api/v1/captures/known row (“The popup opens on a posting”); and “What it keeps”, which says everything is in storage.local, if the hand-over is chosen.

Done when

  • On Chromium and desktop Firefox, capturing one posting opens the review window with the form; a click elsewhere loses nothing, and the next capture finds the window as decided.
  • Closing the window without deciding leaves the capture as decided above.
  • Every “Review in Postulo” opens review_url in that window, and Postulo's “Save and next” works there.
  • npm test passes; README.md and PRIVACY.md say what changed.

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

Today, before sending, the correction form sits in the popup, widened to 440 px: “Correct anything that is wrong; nothing leaves this browser until you send it.” After sending, Postulo's own review page (`review_url`) opens in a new tab from “Review in Postulo”, in the popup or on the list page (`captures.html`). The suggestion is to review in a bigger dialog box or a dedicated browser tab. The popup is a poor place for it: browsers cap it at 800×600, and it closes as soon as focus leaves it; what was read and corrected lives only in memory until “Keep” or “Send” (`src/popup.js`), so a click elsewhere loses it. Nor can Postulo's review page be framed by anything the extension draws (`X-Frame-Options: DENY`, `frame-ancestors 'none'`), and it needs a signed-in session. No API call, under any scope, accepts, discards, binds or fetches a single capture. ## What the extension should do **A review window.** On Chromium and desktop Firefox, `windows.create` with `type: "popup"` and a size opens a window without tabs, and needs no permission. It uses the same profile, so the sign-in to Postulo should carry over; neither is tried yet in a real browser. Firefox for Android has no windows API: postulo/postulo-firefox#4. **The correction form moves into it.** The page is still read from the popup: `readCurrentTab()` asks for the active tab of the current window, which from any other page is that page itself (passing the posting's tab id instead leans on `activeTab` outliving the popup; unverified). So the popup reads the page when capture is pressed, stores the result in one write, as `store.add` already does because a popup can close at any moment (or reuses the unsent capture of that address), and only then opens the window on it. The review page carries what the popup shows: `postingForm()`, the hint that applies, “Read by …”, and the captured-before note, now asked from there. Its buttons: “Send for review”, “Keep in this browser”, “Delete”. “Send” asks for a missing host permission from its click, as the popup and the list do. **Postulo's review page, in the same window.** Every “Review in Postulo” (popup, list page, #7) opens `review_url` there, and #6 opens “Add a listing” there. Postulo's page already walks the queue: “Save and next” and “Discard and next” go to the next older capture waiting, wrap round, and end on the listings. ## Decisions for this repository - **What “a bigger dialog box” is.** Read here as a window of its own. The other reading, a wider popup up to 800×600, is cheaper but keeps both problems above. A dialog drawn over the posting needs a script left on the page, where PRIVACY.md says one runs for one call only; Chrome's side panel is not in Firefox, nor Firefox's sidebar in Chrome. Recommended: the window. - **Window or tab, and how many.** A window where the browser has windows and a tab where it has not (recommended), or a tab everywhere. One, reused and brought forward with `windows.update` (recommended), or a new one per click, as `openCaptures()` does with tabs. - **Kept on reading, or handed over.** Keeping the capture before the window opens loses nothing if the window closes, but a capture looked at and left undecided stays in the list as “Not sent”, and on today's badge, until deleted; today nothing is kept before “Keep” or “Send”. The alternative hands the read over in `storage.session` (emptied when the browser closes) and keeps only on “Keep” or “Send”. Recommended: keep on reading, with “Delete” on the review page. - **Where the editor lives.** A page for one capture, which the list's “Edit” also opens, so there is one editor (recommended); or `captures.html` with a link opening its inline editor (today “Save” and “Cancel” only) on one capture. - **The results-page tick list** (postulo/postulo#177; the popup's `pick` section). Postings listed and not ticked are not captures, so moving it needs the hand-over. Recommended: it stays in the popup; ticking is a choice, not a correction, and each ticked posting is reviewed on Postulo's page, in the window. ## Needs from the server Not filed on postulo/postulo. Reviewing inside the extension, without Postulo's page, would need API calls to fetch one capture and to accept, discard and bind it, and a scope for them. The route above works with the server as it is. ## Translations and documents Beyond a title for the review page, its words are existing keys. test/i18n.test.mjs requires every new key in all 40 `_locales` at once, with identical placeholders, so each new sentence costs 40 translations in the same commit. README.md: step 3 of “Set it up”, “Captured before” and the layout table, which place this in the popup; “Without a server” if “Edit” moves. PRIVACY.md: the `POST /api/v1/captures/known` row (“The popup opens on a posting”); and “What it keeps”, which says everything is in `storage.local`, if the hand-over is chosen. ## Done when - On Chromium and desktop Firefox, capturing one posting opens the review window with the form; a click elsewhere loses nothing, and the next capture finds the window as decided. - Closing the window without deciding leaves the capture as decided above. - Every “Review in Postulo” opens `review_url` in that window, and Postulo's “Save and next” works there. - `npm test` passes; README.md and PRIVACY.md say what changed. From the list of extension improvements of 2026-09-30.
Author
Owner

Landed (c9ab9ad, Refs #8): a capture is reviewed in a window of its own; the picture offer, the language handling and the known-postings note moved with it. Left: it has never run in a real Chromium or Firefox 140 (sign-in carrying over, Save and next, the window being reused, drawing the picture from another window), and Firefox for Android only gets the tab fallback (postulo-firefox#4). See the manual-check issue.

Landed (`c9ab9ad`, `Refs #8`): a capture is reviewed in a window of its own; the picture offer, the language handling and the known-postings note moved with it. Left: it has never run in a real Chromium or Firefox 140 (sign-in carrying over, *Save and next*, the window being reused, drawing the picture from another window), and Firefox for Android only gets the tab fallback (postulo-firefox#4). See the manual-check issue.
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#8
No description provided.