commit 8aa331735215528911adc52e792f107a7bd59b11
equwal <truex@equwal.com>
2026-09-22 18:12:51 -0700
Say that a job in the browser uses no credit
The note under the switch ended with the price of the server ("One
credit a book; you have 3 free."). It read as if the browser mode took a
credit, which it never does.
The browser mode now says "Uses no credit, and has no limit.", and the
price is a clause of the sentence about the server: "Turn this off to
have our server do the work instead, for one credit a book (you have 3)."
frontend/app.js | 13 +++++++++++--
tests/test_page.py | 9 +++++++++
2 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/frontend/app.js b/frontend/app.js
index 5f6fdd7..01c149a 100644
--- a/frontend/app.js
+++ b/frontend/app.js
@@ -378,13 +378,22 @@ function serverPrice() {
return ' One credit a book.';
}
+/* The same cost as a clause, for the note of the browser mode: the price must
+ stay with the server, or it reads as if the browser mode took a credit. */
+function serverCost() {
+ const a = account;
+ if (!a?.billing_enabled) return '';
+ if (a.unlimited) return ', which your plan includes';
+ return `, for one credit a book${a.credits > 0 ? ` (you have ${a.credits})` : ''}`;
+}
+
function renderMode() {
const offered = serverOffered();
el.inBrowser.disabled = !offered;
if (!offered) el.inBrowser.checked = true;
if (inBrowser()) {
- el.modeNote.textContent = 'Free, without limit, and your files are not uploaded.' +
- (offered ? ' Turn this off to have our server do the work.' + serverPrice() : '');
+ el.modeNote.textContent = 'Uses no credit, and has no limit. Your files are not uploaded.' +
+ (offered ? ` Turn this off to have our server do the work instead${serverCost()}.` : '');
el.start.textContent = browserPlan.label;
el.eta.textContent = browserPlan.note +
(offered ? '' : ' Our server is not taking conversions at the moment, so this is the one way.');
diff --git a/tests/test_page.py b/tests/test_page.py
index 16d77b1..809e944 100644
--- a/tests/test_page.py
+++ b/tests/test_page.py
@@ -18,3 +18,12 @@ def test_the_javascript_switch_is_on_the_first_screen_and_on(client):
dropzone = page.index('id="dropzone"')
assert switch.start() < dropzone
assert "JavaScript" in page[switch.start():dropzone]
+
+
+def test_the_browser_mode_says_that_it_uses_no_credit(client):
+ # The note under the switch put the price of the server after the browser
+ # mode, and it read as if the browser mode took a credit. The page writes
+ # that note when the account loads.
+ app = client.get("/app.js").text
+ assert "'Uses no credit, and has no limit." in app
+ assert "do the work.' + serverPrice()" not in app