From c363549388eeedaa6857e79c00166b7dc90155dc Mon Sep 17 00:00:00 2001 From: tegwick Date: Wed, 22 Jul 2026 01:22:22 +0200 Subject: [PATCH] fix(dashboard): restore shift-click suggestion submit Default domain was retired slug "custodian", so POST /technical-debt/ returned 422 and the modal failed after open. Use infotech, resolve apiBase like config.js, and surface API error detail in the toast. --- dashboard/observablehq.config.js | 4 +- dashboard/src/components/improvement-modal.js | 73 +++++++++++++++++-- dashboard/test/improvement-modal.test.mjs | 46 ++++++++++++ 3 files changed, 116 insertions(+), 7 deletions(-) create mode 100644 dashboard/test/improvement-modal.test.mjs diff --git a/dashboard/observablehq.config.js b/dashboard/observablehq.config.js index e30abbe..9fdcfb2 100644 --- a/dashboard/observablehq.config.js +++ b/dashboard/observablehq.config.js @@ -10,7 +10,9 @@ const _configDir = dirname(fileURLToPath(import.meta.url)); const _modalScript = readFileSync( join(_configDir, "src/components/improvement-modal.js"), "utf-8" ) - .replace(/^export function /gm, "function ") // strip ES module export + // Strip ES module exports so the file can run as a plain