ui: simplify import feedback and shorten waiting status
This commit is contained in:
@@ -58,7 +58,8 @@ describe("SessionRow", () => {
|
||||
const html = render(item({ phase: "teach", pendingQuestion: true }));
|
||||
assert.ok(!html.includes("session-dot"), "no dots");
|
||||
assert.ok(!html.includes("braille-spinner"), "motion is reserved for working");
|
||||
assert.ok(html.includes("Waiting for your answer"), "the meta line's text");
|
||||
assert.ok(html.includes("Waiting for input"), "the meta line's text");
|
||||
assert.ok(!html.includes("Waiting for your answer"), "old wording is gone");
|
||||
});
|
||||
|
||||
it("a working session (turn in flight) renders the braille spinner — the ONLY indicator", () => {
|
||||
@@ -82,7 +83,7 @@ describe("SessionRow", () => {
|
||||
|
||||
it("the meta line: state replaces the count when the state is the useful fact", () => {
|
||||
const awaiting = render(item({ pendingQuestion: true, updatedAt: "2026-01-02T01:00:00.000Z" }));
|
||||
assert.ok(awaiting.includes("Waiting for your answer · "), "awaiting meta");
|
||||
assert.ok(awaiting.includes("Waiting for input · 2026-01-02"), "awaiting meta keeps the existing date");
|
||||
assert.ok(!awaiting.includes("messages"), "count yields to the state");
|
||||
assert.ok(!awaiting.includes("braille-spinner"), "…and the spinner stays off");
|
||||
|
||||
@@ -97,6 +98,22 @@ describe("SessionRow", () => {
|
||||
assert.match(idle, /\d{4}-\d{2}-\d{2}/, "idle shows the ISO date");
|
||||
});
|
||||
|
||||
it("pending questions use the same wording for teach and practice with recent and old dates", () => {
|
||||
for (const kind of ["teach", "practice"] as const) {
|
||||
for (const updatedAt of [new Date().toISOString(), "2025-06-02T12:00:00.000Z"]) {
|
||||
const html = render(item({ kind, pendingQuestion: true, updatedAt }));
|
||||
assert.ok(html.includes(`Waiting for input · ${timeAgo(updatedAt)}`));
|
||||
assert.ok(!html.includes("Waiting for your answer"));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
it("compacting retains priority over pending input", () => {
|
||||
const html = render(item({ compacting: true, pendingQuestion: true }));
|
||||
assert.match(html, /Compacting context ·/);
|
||||
assert.doesNotMatch(html, /Waiting for input/);
|
||||
});
|
||||
|
||||
it("active row is visually marked by the background alone (owner, round 5: no weight change)", () => {
|
||||
const html = render(item({}), true);
|
||||
assert.ok(html.includes("bg-accent"), "active background");
|
||||
|
||||
Reference in New Issue
Block a user