diff --git a/TODO.md b/TODO.md index b9b333e..6b5b595 100644 --- a/TODO.md +++ b/TODO.md @@ -45,6 +45,16 @@ but the review is broader than any of them. # Completed Steps +- 2026-09-21: The debug/testnet banner no longer shows the internal view id to + the user in a release build + ([#375](https://git.eeqj.de/sneak/AutistMask/issues/375)). The banner appended + the active view's id (e.g. `[TESTNET] (approve-tx)`), which is developer + vocabulary sitting directly above the approval screen's carefully worded + authorization text. The suffix is now gated on the compile-time `DEBUG` + constant rather than `isDebug()`, so it survives only in a debug build; a + testnet or the runtime debug toggle still raises the banner but without the + view id. + - 2026-08-30: An address no longer wraps, or is shortened to fit, in any of the common views ([#380](https://git.eeqj.de/sneak/AutistMask/issues/380)). The wallet list was the reported case: the address shared one row with the diff --git a/src/popup/views/helpers.js b/src/popup/views/helpers.js index 057739f..f1e5f9f 100644 --- a/src/popup/views/helpers.js +++ b/src/popup/views/helpers.js @@ -12,6 +12,7 @@ // escapeHtml lives in src/shared/html.js, where the escape and the // reasoning behind it are; it is re-exported below so views keep importing // it from here. +const { DEBUG } = require("../../shared/constants"); const { escapeHtml } = require("../../shared/html"); const { isDebug } = require("../../shared/log"); const { formatUsd, getPrice } = require("../../shared/prices"); @@ -119,7 +120,11 @@ function updateDebugBanner(viewName) { "background:#c00;color:#fff;text-align:center;font-size:10px;padding:1px 0;font-family:monospace;position:sticky;top:0;z-index:9999;"; document.body.prepend(banner); } - const suffix = viewName ? " (" + viewName + ")" : ""; + // The view id is internal vocabulary; it helps while developing but + // means nothing to a user. Only a debug build appends it, gated on the + // compile-time DEBUG constant so a release build never shows it — not + // isDebug(), which is also true for a testnet or the runtime toggle. + const suffix = DEBUG && viewName ? " (" + viewName + ")" : ""; if (debug && net.isTestnet) { banner.textContent = "DEBUG / INSECURE [TESTNET]" + suffix; } else if (net.isTestnet) {