Fix #163: /new Create button broken (stale iscan/createCan path) #164

Merged
fen merged 1 commits from fix-163 into dev 2026-09-10 14:40:52 +00:00
Collaborator

Root cause: PR #126 (8104cdb) removed the Can contents UI incl. #iscan from new.html, but new.js kept the guard $("iscan").checked; PR #129 (22c6624) moved that guard into create(), so every Create click threw a TypeError before the fetch and no paste was created.

Fix: delete the dead iscan guard and the now-unreachable createCan() function (the /api/pastes/can API and can viewer remain untouched server-side; the can-creation UI path was intentionally removed in #126/#124). No dangling references remain in new.js.

Verified: go build/test pass; headless chromium CDP against a local build of this branch: #iscan absent, Create click fires POST /api/pastes, browser lands on the new paste URL, paste content confirmed via /api/public and the paste page, zero console errors, in dark and light presets.

Root cause: PR #126 (8104cdb) removed the Can contents UI incl. #iscan from new.html, but new.js kept the guard $("iscan").checked; PR #129 (22c6624) moved that guard into create(), so every Create click threw a TypeError before the fetch and no paste was created. Fix: delete the dead iscan guard and the now-unreachable createCan() function (the /api/pastes/can API and can viewer remain untouched server-side; the can-creation UI path was intentionally removed in #126/#124). No dangling references remain in new.js. Verified: go build/test pass; headless chromium CDP against a local build of this branch: #iscan absent, Create click fires POST /api/pastes, browser lands on the new paste URL, paste content confirmed via /api/public and the paste page, zero console errors, in dark and light presets.
fen added 1 commit 2026-09-10 14:36:27 +00:00
Fix #163: remove dead iscan/createCan path breaking /new Create
CI / docker (pull_request) Skipped
CI / test (pull_request) Successful in 31s
0787871f2b
fen merged commit 93fea6ad1c into dev 2026-09-10 14:40:52 +00:00
Sign in to join this conversation.