fix: final review pass — email collision, orphaned-run loop, null confidence guards

- changeEmail validates and refuses an address another account owns (users.email is UNIQUE; a collision was a 500 inside the settings form).
- /app/[id] no longer redirects a 'running' row to itself; it renders what exists and says the run was interrupted.
- ScoreBar / OptionRow / VerdictBlock survive null numbers from the model instead of throwing and losing the block (seen live: '[openui] runtime/render-error: Component ScoreBar render failed').
- drop the ad-hoc render-debug scripts now that Playwright covers the browser.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
ahmed mohammed
2026-09-22 09:10:29 +03:00
co-authored by Claude Opus 4.7
parent 07dd3d6bf8
commit 5160a00db5
12 changed files with 101 additions and 80 deletions
+3 -2
View File
@@ -19,7 +19,8 @@ test("every settings field has a visible label", async ({ page }) => {
await page.goto("/settings");
// Scoped to the form: the rail's rename boxes are labelled for assistive tech with aria-label, not visibly.
const orphans = await page.evaluate(() => [...document.querySelectorAll("form input")]
.filter((i) => i.type !== "hidden" && (!i.id || !document.querySelector(`label[for="${i.id}"]`)))
.map((i) => i.name || i.type));
.filter((el) => { const i = el as HTMLInputElement;
return i.type !== "hidden" && (!i.id || !document.querySelector(`label[for="${i.id}"]`)); })
.map((el) => (el as HTMLInputElement).name || (el as HTMLInputElement).type));
expect(orphans).toEqual([]);
});