commit 1e1095c5e612e24e5cebc5b6c64c0a543d78bb33
parent 4bf3f1c6c297d02ea326b838f5b2a27060838d90
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Wed, 14 Oct 2026 05:44:31 -0400
umtool: one door to the editor's drafts — a board's hand-off goes through enqueueDraft (seed, source on its key list); focus rings no longer fade in
transition-colors also eased outline-color, so a control's Signal ring faded
in from currentColor over 150 ms. Button, badge, the reader's buttons, the
project grid's cards and VerdictRow now list the colour properties they ease
and leave the outline out; shell.spec reads the ring the moment Tab lands.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
8 files changed, 48 insertions(+), 22 deletions(-)
diff --git a/umtool/components/VerdictRow.tsx b/umtool/components/VerdictRow.tsx
@@ -106,7 +106,7 @@ export default function VerdictRow({
data-verdict={c.verdict}
disabled={!ready}
onClick={() => onChoose(c)}
- className={`flex-1 rounded-md border px-4 py-3 text-left transition disabled:opacity-40 ${TONE[c.tone]}`}
+ className={`flex-1 rounded-md border px-4 py-3 text-left transition-[color,background-color,border-color,text-decoration-color,fill,stroke,opacity] disabled:opacity-40 ${TONE[c.tone]}`}
>
<div className="flex items-center gap-2">
<kbd>{c.key}</kbd>
diff --git a/umtool/components/projects/ProjectGrid.tsx b/umtool/components/projects/ProjectGrid.tsx
@@ -41,7 +41,7 @@ export default function ProjectGrid({
data-template={p.template}
data-state={p.state}
data-routing={p.routing}
- className="block overflow-hidden rounded border border-[var(--color-line)] bg-[var(--color-panel)] transition-colors hover:border-[var(--color-sel)]"
+ className="block overflow-hidden rounded border border-[var(--color-line)] bg-[var(--color-panel)] transition-[color,background-color,border-color,text-decoration-color,fill,stroke] hover:border-[var(--color-sel)]"
>
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
diff --git a/umtool/components/ui/badge.tsx b/umtool/components/ui/badge.tsx
@@ -20,7 +20,7 @@ import { cn } from "@/lib/utils";
// ---------------------------------------------------------------------------
export const badgeVariants = cva(
- "inline-flex items-center gap-1.5 whitespace-nowrap rounded-[3px] border transition-colors",
+ "inline-flex items-center gap-1.5 whitespace-nowrap rounded-[3px] border transition-[color,background-color,border-color,text-decoration-color,fill,stroke]",
{
variants: {
variant: {
diff --git a/umtool/components/ui/button.tsx b/umtool/components/ui/button.tsx
@@ -20,8 +20,12 @@ import { cn } from "@/lib/utils";
// with for hours, so nothing here is smaller than what the existing controls
// are, and dense is the point.
+// The colours ease on hover; the focus ring does NOT: Tailwind's
+// `transition-colors` includes outline-color, which faded the ring in from
+// currentColor over 150 ms. The lit line's glide is the app's one motion, so
+// every control lists the colour properties it eases and leaves the outline out.
export const buttonVariants = cva(
- "inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-[3px] border font-medium transition-colors disabled:pointer-events-none disabled:opacity-50",
+ "inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-[3px] border font-medium transition-[color,background-color,border-color,text-decoration-color,fill,stroke] disabled:pointer-events-none disabled:opacity-50",
{
variants: {
variant: {
diff --git a/umtool/components/ui/reader-pane.tsx b/umtool/components/ui/reader-pane.tsx
@@ -24,7 +24,7 @@ import { LitLine } from "./lit-line";
export type Cue = { t: number; text: React.ReactNode; turn?: boolean; lit?: boolean; id?: string };
export const paperButtonVariants = cva(
- "inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-[3px] border px-[11px] py-[5px] text-[12.5px] font-medium transition-colors disabled:pointer-events-none disabled:opacity-50",
+ "inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-[3px] border px-[11px] py-[5px] text-[12.5px] font-medium transition-[color,background-color,border-color,text-decoration-color,fill,stroke] disabled:pointer-events-none disabled:opacity-50",
{
variants: {
variant: {
diff --git a/umtool/e2e/shell.spec.ts b/umtool/e2e/shell.spec.ts
@@ -207,6 +207,28 @@ test("j and k move the lit line, and focus goes with it", async ({ page }) => {
await expect.poll(async () => Math.round((await list.locator(".lit-head").boundingBox())?.y ?? -1)).toBe(Math.round(line!.y));
});
+test("a control's focus ring is Signal at once: it does not fade in (the lit line's glide is the one motion)", async ({ page }) => {
+ await page.goto(researchHref());
+ const search = page.getByRole("button", { name: /^Search/ });
+ await expect(search).toBeEnabled();
+ await page.getByRole("textbox", { name: "Ask" }).focus();
+ await page.keyboard.press("Tab");
+ // Read in the same task as the Tab lands: no wait, no poll.
+ const seen = await page.evaluate(() => {
+ const el = document.activeElement as HTMLElement;
+ const probe = document.createElement("i");
+ probe.style.color = "var(--signal)";
+ document.body.append(probe);
+ const signal = getComputedStyle(probe).color;
+ probe.remove();
+ const cs = getComputedStyle(el);
+ return { label: el.textContent?.trim().slice(0, 6), outline: `${cs.outlineStyle} ${cs.outlineWidth} ${cs.outlineColor}`, signal, props: cs.transitionProperty };
+ });
+ expect(seen.label).toBe("Search");
+ expect(seen.outline).toBe(`solid 2px ${seen.signal}`);
+ expect(seen.props).not.toMatch(/outline|all/);
+});
+
test("the head glides, and does not under reduced motion", async ({ page }) => {
const duration = () =>
page.locator("[data-lit-list] .lit-head").first().evaluate((el) => getComputedStyle(el).transitionDuration);
diff --git a/umtool/lib/articles/generation.ts b/umtool/lib/articles/generation.ts
@@ -296,8 +296,10 @@ export async function cancelDraftJob(id: string): Promise<void> {
}
// The body umtool sends to `report-draft`: the action's own keys, nothing else
-// (the editor refuses an unknown key; this refuses it first, by name).
-const DRAFT_KEYS = ["task", "article", "iteration", "model", "extractorModel", "feedback", "question", "channels", "from", "to", "copyOf", "maxUsd", "cards", "entries", "force", "autonomy"];
+// (the editor refuses an unknown key; this refuses it first, by name). `source`
+// and `seed` are a research board's hand-off (R2, lib/research/handoff.ts): the
+// corpus the board was read through, and the board as the sweep's seed.md.
+const DRAFT_KEYS = ["task", "article", "iteration", "model", "extractorModel", "feedback", "question", "channels", "from", "to", "copyOf", "maxUsd", "cards", "entries", "force", "autonomy", "source", "seed"];
export async function enqueueDraft(body: Record<string, unknown>): Promise<{ jobId: string; iteration: number }> {
const out: Record<string, unknown> = {};
diff --git a/umtool/lib/research/handoff.ts b/umtool/lib/research/handoff.ts
@@ -4,7 +4,7 @@ import { articleDir } from "yt-dlp-transcript-common/lib/report/registry";
import { isReportId } from "yt-dlp-transcript-common/lib/report/schema";
import { articleHref, ARTICLES_KEY } from "@/lib/articles/href";
import { projectHref } from "@/lib/hrefs";
-import { askEditor, readPolicy } from "@/lib/articles/generation";
+import { enqueueDraft, readPolicy } from "@/lib/articles/generation";
import { sitesPaths } from "@/lib/articles/sites";
import { REPORTS_ROOT } from "../paths.mjs";
import { invalidateProjects } from "../projects";
@@ -23,7 +23,7 @@ import type { ArticlePlan, CaseDoc, VideoPlan } from "./case-types";
// "Draft an article from this board" is a `report-draft` SWEEP (the editor's
// job, POST /api/ops/report-draft -- umtool writes nothing of the article
// store) over the board's question and channels, SEEDED with the board as
-// cited markdown: the editor keeps it as the iteration's seed.md and the
+// cited markdown (through enqueueDraft, the one door): the editor keeps it as the iteration's seed.md and the
// sweep's report starts from it (common/controller/reportDraft.ts `seed`,
// added for this hand-off -- the editor had no way to take a board's cites).
// A seeded sweep runs the API agent (the local pipeline writes its report from
@@ -117,19 +117,17 @@ export async function confirmArticle(id: string, over: { article?: string; model
const { plan, seed } = await planArticle(id, over);
if (plan.refusals.length) throw new CaseError(plan.refusals.join("; "), 409);
if (plan.policyError) throw new CaseError(`the editor cannot be asked: ${plan.policyError}`, 502);
- const answer = await askEditor<{ jobId: string; iteration: number }>("/api/ops/report-draft", {
- method: "POST",
- body: {
- task: "sweep",
- article: plan.article,
- question: plan.question,
- channels: plan.channels,
- ...(plan.dateFrom ? { from: plan.dateFrom } : {}),
- ...(plan.dateTo ? { to: plan.dateTo } : {}),
- ...(plan.source ? { source: plan.source } : {}),
- ...(plan.model ? { model: plan.model } : {}),
- seed,
- },
+ // The one way umtool asks the editor for a draft (lib/articles/generation.ts).
+ const answer = await enqueueDraft({
+ task: "sweep",
+ article: plan.article,
+ question: plan.question,
+ channels: plan.channels,
+ from: plan.dateFrom,
+ to: plan.dateTo,
+ source: plan.source,
+ model: plan.model,
+ seed,
});
const href = articleHref({ site: ARTICLES_KEY, id: plan.article });
await mutateBoard(id, (doc) =>