Make every URL the console page uses page-relative, guarded by a source test

AI Assisted
This commit is contained in:
Seth committed 2026-12-05 00:10:44 -08:00
1 parent 4ced32be5c
commit 1d007737b1
47 files changed
+401 -202

No files matched your search

+4 -4
View File
@@ -195,7 +195,7 @@ let loopLessons = { key: null, line: "" };
function loopLessonsFor(key) {
if (loopLessons.key === key) return loopLessons.line;
loopLessons = { key, line: "" };
fetch("/learning/state", { cache: "no-store" })
fetch("learning/state", { cache: "no-store" })
.then((res) => (res.ok ? res.json() : null))
.then((learning) => {
const line = loopLessonsLine(learning);
@@ -907,7 +907,7 @@ const AFTER_FINISH_REPLIES = { review: REVIEW_REPLY, done: DONE_REPLY, dashboard
async function sendAfterBuild(kind, launch = null) {
if (page.gone || page.pendingResult || page.local.afterBuild) return;
try {
const res = await fetch("/submit", {
const res = await fetch("submit", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
@@ -1100,7 +1100,7 @@ async function goHome() {
const payload = hooks.stagedPayload();
payload.actions.push({ i: "__dashboard", type: "dashboard" });
try {
const res = await fetch("/submit", {
const res = await fetch("submit", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({ actions: payload.actions, reply: [...payload.replyLines, HOME_REPLY].join("\n") }),
@@ -1180,7 +1180,7 @@ async function stopSession(handoff = false) {
const payload = hooks.stagedPayload();
payload.actions.push(stopAction({ handoff }));
try {
const res = await fetch("/submit", {
const res = await fetch("submit", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({ actions: payload.actions, reply: [...payload.replyLines, handoff ? STOP_HANDOFF_REPLY : STOP_REPLY].join("\n") }),