fix: spell every weekday correctly in the Routines schedule preview - #369
fix: spell every weekday correctly in the Routines schedule preview#369Sma1lboy wants to merge 1 commit into
Conversation
The composer restated a single-day schedule by appending "days" to the three-letter cron code, which mangles four of the seven — TUE→"Tuedays", WED→"Weddays", THU→"Thudays", SAT→"Satdays". Each is one arrow-step away in the weekday cell, so the live preview showed the wrong plural for a majority of weekday schedules. Restate from a full-name lookup instead.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Claude finished @Sma1lboy's task in 3m 5s —— View job Verdict: ✅ Clean, correctly-scoped bug fix — no blocking issues, safe to mergeHouse rules: all pass — commit/PR body carry no AI/Anthropic attribution, changeset is present and correctly scoped to Six specialized review passes (code-reviewer, silent-failure-hunter, pr-test-analyzer, type-design-analyzer, comment-analyzer, code-simplifier) converged on the same read: the diff is a minimal, correct, well-tested fix for exactly the bug described, no architectural or UX concerns, and the Nits (non-blocking)
|
Codecov Report❌ Patch coverage is
🚀 New features to boost your workflow:
|
Direction
Bugs / correctness — self-found during a review of the recently-shipped Routines / cron-composer slice.
Problem
The Routines composer restates a schedule in plain English in its live preview (
describeCron, rendered atautomation-composer-dialog.tsx). For a single-day schedule it built the plural by taking the three-letter cron code, lowercasing the tail, and appendingdays:`${dow.charAt(0)}${dow.slice(1).toLowerCase()}days ${at}`That only produces correct English for
MON/FRI/SUN. The other four are mangled:TUEWEDTHUSATEvery one of these is reachable in the UI — the weekday cell's
DOW_LADDERcontains all seven days, so a single ↑/↓ step lands the draft on a mangled value, and the composer renders the preview verbatim. So a majority of weekday schedules showed a misspelled restatement in the one field whose entire job is to restate the schedule correctly.Fix
Replace the mechanical
code + "days"with a full-name lookup table (DOW_PLURAL) inpackages/kobe/src/tui/component/cron-segments.ts. Pure, single-function change; no behavior change for the shapes that were already correct.Verification
describeCroncases for TUE/WED/THU/FRI/SAT/SUN topackages/kobe/test/tui/cron-segments.test.ts.bun test packages/kobe/test/tui/cron-segments.test.ts— 15 pass / 0 fail.bun run lint— clean.bun run typecheck— clean (all three packages).patch).Follow-ups (deliberately out of scope)
Two unrelated bugs surfaced in the adjacent work-items slice during the same review and are left for separate PRs, since that slice is a different scope (and is CLI-only / not yet on the rail):
work-items-page.tsx:reloadTick > 0makesrefresh: truesticky after the firstr, so every later repo-switch / filter-toggle bypasses the daemon's 60s cache instead of feeling instant.work-items.tsclassifyGhFailure: a repo with only a non-GitHub remote is misreported as "not authenticated" instead of "no GitHub remote" (checks auth before no-remote and omits gh'snone of the git remoteswording — the tested siblingpr-status.tsgets the order and patterns right).Generated by Claude Code