Recently Written · git

subplz-web

git clone https://github.com/equwal/subplz-web

Log | Files | Refs


commit 8e5c4345bd17fd46f91b5aacac3faa8635525d9e
equwal <truex@equwal.com>
2026-09-22 19:28:21 -0700

Say only that the JavaScript version uses no cloud credits

The note under the switch dropped the beta debug-copy sentence, the
has-no-limit clause, and the offer to turn the switch off. It now
reads only: The JavaScript version does not use any cloud credits.

serverCost() had no other caller, so it is removed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

 frontend/app.js     | 14 +-------------
 frontend/index.html |  2 +-
 tests/test_page.py  | 16 ++++++++++------
 3 files changed, 12 insertions(+), 20 deletions(-)
diff --git a/frontend/app.js b/frontend/app.js
index 4cdc055..617901b 100644
--- a/frontend/app.js
+++ b/frontend/app.js
@@ -378,24 +378,12 @@ 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()) {
-    const copy = account?.browser_copy
-      ? ' During the beta, a copy of your files goes to our server, for debugging.' : '';
-    el.modeNote.textContent = 'Uses no credit, and has no limit.' + copy +
-      (offered ? ` Turn this off to have our server do the work instead${serverCost()}.` : '');
+    el.modeNote.textContent = 'The JavaScript version does not use any cloud credits.';
     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/frontend/index.html b/frontend/index.html
index a288129..949011b 100644
--- a/frontend/index.html
+++ b/frontend/index.html
@@ -63,7 +63,7 @@
       <span><strong>Convert in this browser (JavaScript)</strong>
         <span class="tag free">free</span></span>
     </label>
-    <p class="muted small" id="mode-note">Uses no credit, and has no limit.</p>
+    <p class="muted small" id="mode-note">The JavaScript version does not use any cloud credits.</p>
   </section>
 
   <!-- step 1: drop -->
diff --git a/tests/test_page.py b/tests/test_page.py
index 809e944..1dfc9f4 100644
--- a/tests/test_page.py
+++ b/tests/test_page.py
@@ -20,10 +20,14 @@ def test_the_javascript_switch_is_on_the_first_screen_and_on(client):
     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.
+def test_the_browser_mode_note_says_only_that_it_uses_no_cloud_credits(client):
+    # The note under the switch must carry no other message: not the beta
+    # debug-copy disclosure, not the server price, not an offer to turn it off.
+    page = client.get("/").text
     app = client.get("/app.js").text
-    assert "'Uses no credit, and has no limit." in app
-    assert "do the work.' + serverPrice()" not in app
+    note = re.search(r'<p[^>]*id="mode-note"[^>]*>(.*?)</p>', page, re.S)
+    assert note
+    assert note.group(1).strip() == "The JavaScript version does not use any cloud credits."
+    assert "'The JavaScript version does not use any cloud credits.'" in app
+    for gone in ("has no limit", "Turn this off", "serverCost"):
+        assert gone not in app