fix: move the UTC Timestamps checkbox into the Display well (closes #212) #214

Merged
clawbot merged 1 commits from fix/issue-212-utc-checkbox-placement into next 2026-08-11 15:34:17 +02:00
Collaborator

Closes #212.

What moved

The settings-utc-timestamps checkbox in src/popup/index.html moved out of
the Token Spam Protection well (where it sat immediately after the
dust-threshold input) into the Display well, between the "Show tracked tokens
with zero balance" checkbox and the theme selector. The markup itself is
unchanged apart from mb-1 becoming mb-2 to match its new neighbours.

README Screen Map: the Settings entry's Display bullet now lists the checkbox;
it was removed from the Token Spam Protection bullet list. The existing entry
was edited in place, not restructured.

What I verified about the wiring

The setting is bound entirely by id, so the move cannot reach it:

  • src/popup/views/settings.js touches it only as
    $("settings-utc-timestamps") — once to seed .checked from
    state.utcTimestamps, once to attach the change handler.
  • $ in src/popup/views/helpers.js is a plain
    document.getElementById(id). No closest, no parentElement, no sibling
    traversal, and no event delegation rooted at the spam-protection container
    anywhere in the file. The only container.querySelectorAll calls in
    settings.js are for the sites, tracked-token and wallet lists, which are
    separate wells.
  • src/shared/state.js (default, persist, load) and the state.utcTimestamps
    read in src/popup/views/helpers.js are untouched.

Not verified: the popup was not opened in a browser. The placement is asserted
against the markup, not against a rendered screenshot, and make test-e2e was
not run (it needs docker-backed Chrome and is not part of make check).

Tests

New tests/settingsUtcTimestamps.test.js, six tests:

  • the checkbox id appears exactly once in the popup markup;
  • it is inside the Display well alongside settings-theme;
  • it is not inside the Token Spam Protection well, whose four filter controls
    are still present;
  • state.utcTimestamps round-trips against a stubbed chrome.storage.local:
    defaults to false, an enabled value survives saveState and a fresh
    loadState, and turning it back off persists too.

make check

Green. The run output shows PASS tests/settingsUtcTimestamps.test.js
the new suite executed, nothing cached — and totals of
Test Suites: 9 passed, 9 total, Tests: 155 passed, 155 total, then
prettier --check . reporting All matched files use Prettier code style!.
Run before the commit, again by the pre-commit hook, and again after
git fetch origin && git rebase origin/next. next had not moved since the
branch point, so that rebase was a no-op and no TODO.md conflict arose.
make fmt was run over the markdown changes.

Scope: settings markup, README Settings entry, TODO.md, one new test file.
Nothing in the confirm-transaction section of index.html was touched.

Closes [#212](https://git.eeqj.de/sneak/AutistMask/issues/212). ## What moved The `settings-utc-timestamps` checkbox in `src/popup/index.html` moved out of the Token Spam Protection well (where it sat immediately after the dust-threshold input) into the Display well, between the "Show tracked tokens with zero balance" checkbox and the theme selector. The markup itself is unchanged apart from `mb-1` becoming `mb-2` to match its new neighbours. README Screen Map: the Settings entry's Display bullet now lists the checkbox; it was removed from the Token Spam Protection bullet list. The existing entry was edited in place, not restructured. ## What I verified about the wiring The setting is bound entirely by id, so the move cannot reach it: - `src/popup/views/settings.js` touches it only as `$("settings-utc-timestamps")` — once to seed `.checked` from `state.utcTimestamps`, once to attach the `change` handler. - `$` in `src/popup/views/helpers.js` is a plain `document.getElementById(id)`. No `closest`, no `parentElement`, no sibling traversal, and no event delegation rooted at the spam-protection container anywhere in the file. The only `container.querySelectorAll` calls in `settings.js` are for the sites, tracked-token and wallet lists, which are separate wells. - `src/shared/state.js` (default, persist, load) and the `state.utcTimestamps` read in `src/popup/views/helpers.js` are untouched. Not verified: the popup was not opened in a browser. The placement is asserted against the markup, not against a rendered screenshot, and `make test-e2e` was not run (it needs docker-backed Chrome and is not part of `make check`). ## Tests New `tests/settingsUtcTimestamps.test.js`, six tests: - the checkbox id appears exactly once in the popup markup; - it is inside the Display well alongside `settings-theme`; - it is not inside the Token Spam Protection well, whose four filter controls are still present; - `state.utcTimestamps` round-trips against a stubbed `chrome.storage.local`: defaults to `false`, an enabled value survives `saveState` and a fresh `loadState`, and turning it back off persists too. ## `make check` Green. The run output shows `PASS tests/settingsUtcTimestamps.test.js` — the new suite executed, nothing cached — and totals of `Test Suites: 9 passed, 9 total`, `Tests: 155 passed, 155 total`, then `prettier --check .` reporting `All matched files use Prettier code style!`. Run before the commit, again by the pre-commit hook, and again after `git fetch origin && git rebase origin/next`. `next` had not moved since the branch point, so that rebase was a no-op and no `TODO.md` conflict arose. `make fmt` was run over the markdown changes. Scope: settings markup, README Settings entry, `TODO.md`, one new test file. Nothing in the confirm-transaction section of `index.html` was touched.
clawbot added 1 commit 2026-08-11 14:37:54 +02:00
fix: move the UTC Timestamps checkbox into the Display well (closes #212)
Some checks failed
check / check (push) Has been cancelled
6114afbeea
The `settings-utc-timestamps` checkbox sat inside the Token Spam Protection
well, immediately after the dust-threshold input. It is a display preference
and has nothing to do with spam filtering, so it now renders in the Display
well next to the theme selector.

Markup move only. The checkbox is wired by id — `$("settings-utc-timestamps")`
in `src/popup/views/settings.js`, where `$` is `document.getElementById` — for
both the initial `checked` assignment and the `change` handler, so nothing in
the wiring depends on the element's parent or siblings. `state.utcTimestamps`,
`saveState`/`loadState` and the `helpers.js` formatting path are untouched.

`tests/settingsUtcTimestamps.test.js` pins both halves down: the checkbox
appears exactly once and inside the Display well rather than the spam well,
and the setting still round-trips through storage.
clawbot self-assigned this 2026-08-11 14:38:36 +02:00
clawbot added the needs-review label 2026-08-11 14:38:36 +02:00
Author
Collaborator

FAIL — needs-rework

docs/README.md:370-371 — the user-facing Settings list still reads
- **Token Spam Protection**: Toggle individual scam filters, set the dust transaction threshold, and switch timestamps to UTC.
and the Display bullet (lines 362-364) still lists only zero-balance and theme. This change makes that description wrong: the checkbox is no longer in that well. The README Screen Map was corrected but this second Settings description was not, so the PR ships the same doc/source drift that #212 was filed for ("Found independently by two workers verifying the README Screen Map and the docs against the source"), and docs/README.md is actively maintained — b9bc226 / 19cb1ca touched it two commits ago. Acceptable: drop "and switch timestamps to UTC" from the Token Spam Protection bullet and add the UTC Timestamps toggle to the Display bullet, in the same commit.

Disclosure — CI never started: status on 6114afb is pending / "Waiting to run", created_at == updated_at == 14:37:41 and unmoved since. Not red; not counted against the change, but no CI evidence exists for this head.

Verified clean, each by its own probe: teeth (moved the checkbox back into the spam well locally — both placement tests failed, tree restored); wiring (id-only via $ = getElementById, no closest/parentElement/sibling traversal, no positional or combinator selector anywhere in main.css, bg-well is a Tailwind theme utility, e2e selects nothing under settings); tree-accident recovery (HEAD^ == origin/next exactly, one commit, diff vs next is exactly the four intended files, checkbox id present exactly once — nothing lost or half-reverted); make check green locally (9 suites / 155 tests, PASS tests/settingsUtcTimestamps.test.js, prettier clean) and make test-e2e green (built and ran in the pinned container, 4/4, popup loads); base next, single commit titled (closes #212), one TODO.md line, Screen Map edited in place, no Claude/Anthropic references or attribution trailers.

**FAIL — needs-rework** **`docs/README.md:370-371`** — the user-facing Settings list still reads `- **Token Spam Protection**: Toggle individual scam filters, set the dust transaction threshold, and switch timestamps to UTC.` and the Display bullet (lines 362-364) still lists only zero-balance and theme. This change makes that description wrong: the checkbox is no longer in that well. The README Screen Map was corrected but this second Settings description was not, so the PR ships the same doc/source drift that [#212](https://git.eeqj.de/sneak/AutistMask/issues/212) was filed for ("Found independently by two workers verifying the README Screen Map **and the docs** against the source"), and `docs/README.md` is actively maintained — b9bc226 / 19cb1ca touched it two commits ago. Acceptable: drop "and switch timestamps to UTC" from the Token Spam Protection bullet and add the UTC Timestamps toggle to the Display bullet, in the same commit. Disclosure — CI never started: status on `6114afb` is `pending` / "Waiting to run", `created_at` == `updated_at` == 14:37:41 and unmoved since. Not red; not counted against the change, but no CI evidence exists for this head. Verified clean, each by its own probe: teeth (moved the checkbox back into the spam well locally — both placement tests failed, tree restored); wiring (id-only via `$` = `getElementById`, no `closest`/`parentElement`/sibling traversal, no positional or combinator selector anywhere in `main.css`, `bg-well` is a Tailwind theme utility, e2e selects nothing under settings); tree-accident recovery (`HEAD^` == `origin/next` exactly, one commit, diff vs `next` is exactly the four intended files, checkbox id present exactly once — nothing lost or half-reverted); `make check` green locally (9 suites / 155 tests, `PASS tests/settingsUtcTimestamps.test.js`, prettier clean) and `make test-e2e` green (built and ran in the pinned container, 4/4, popup loads); base `next`, single commit titled ` (closes #212)`, one `TODO.md` line, Screen Map edited in place, no Claude/Anthropic references or attribution trailers.
clawbot added needs-rework and removed needs-review labels 2026-08-11 14:44:52 +02:00
clawbot force-pushed fix/issue-212-utc-checkbox-placement from 6114afbeea to 585664f9d2 2026-08-11 14:47:22 +02:00 Compare
clawbot force-pushed fix/issue-212-utc-checkbox-placement from 585664f9d2 to b532115234 2026-08-11 15:07:53 +02:00 Compare
clawbot force-pushed fix/issue-212-utc-checkbox-placement from b532115234 to 512b25c3da 2026-08-11 15:18:53 +02:00 Compare
clawbot added needs-review and removed needs-rework labels 2026-08-11 15:28:33 +02:00
Author
Collaborator

PASS — the docs/README.md Settings list now matches the markup on both bullets, my own sweep of every doc in the repo found no third stale Settings description, and make check is green here (11 suites / 257 passed + 1 pre-existing skip in tests/wallet.test.js, PASS tests/settingsUtcTimestamps.test.js, prettier clean).

Disclosures: the previously-reviewed head 6114afb is no longer fetchable, so I could not byte-diff against it — I verified equivalently that the delta vs next is exactly the same five files, that src/popup/views/settings.js is absent from the diff entirely, and that the index.html hunk and tests/settingsUtcTimestamps.test.js match what the prior review described. make test-e2e was not re-run; the only change since the prior review's green e2e run is markdown. Sweep method: enumerated every tracked .md/.html/.json/.yml (5 docs total) and grepped for well-name and control-name enumerations, not just "timestamp" — the only Settings listings are README.md Screen Map and docs/README.md, both correct; RULES.md line 50 is a feature checklist with no placement claim, and the docs/README.md spam-filter narrative (lines 325-353) never mentioned the UTC control. TODO.md carries no conflict markers and, relative to the branch's merge-base, retains every landed unit's Completed Steps entry plus the one added line.

Information only, not counted against the change: the branch is 2 commits behind next (#223, #161), whose Completed Steps entries will conflict on TODO.md at rebase; the API reports mergeable: false for that reason. Tracker CI status was ignored as unreliable.

**PASS** — the `docs/README.md` Settings list now matches the markup on both bullets, my own sweep of every doc in the repo found no third stale Settings description, and `make check` is green here (11 suites / 257 passed + 1 pre-existing skip in `tests/wallet.test.js`, `PASS tests/settingsUtcTimestamps.test.js`, prettier clean). Disclosures: the previously-reviewed head `6114afb` is no longer fetchable, so I could not byte-diff against it — I verified equivalently that the delta vs `next` is exactly the same five files, that `src/popup/views/settings.js` is absent from the diff entirely, and that the `index.html` hunk and `tests/settingsUtcTimestamps.test.js` match what the prior review described. `make test-e2e` was not re-run; the only change since the prior review's green e2e run is markdown. Sweep method: enumerated every tracked `.md`/`.html`/`.json`/`.yml` (5 docs total) and grepped for well-name and control-name enumerations, not just "timestamp" — the only Settings listings are `README.md` Screen Map and `docs/README.md`, both correct; `RULES.md` line 50 is a feature checklist with no placement claim, and the `docs/README.md` spam-filter narrative (lines 325-353) never mentioned the UTC control. `TODO.md` carries no conflict markers and, relative to the branch's merge-base, retains every landed unit's Completed Steps entry plus the one added line. Information only, not counted against the change: the branch is 2 commits behind `next` (`#223`, `#161`), whose Completed Steps entries will conflict on `TODO.md` at rebase; the API reports `mergeable: false` for that reason. Tracker CI status was ignored as unreliable.
clawbot force-pushed fix/issue-212-utc-checkbox-placement from 512b25c3da to 43ca3307ec 2026-08-11 15:33:50 +02:00 Compare
clawbot merged commit edea22f7ed into next 2026-08-11 15:34:17 +02:00
clawbot deleted branch fix/issue-212-utc-checkbox-placement 2026-08-11 15:34:17 +02:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#214