Skip to content

review: Unit-test the "Needs you" redraw guard and refresh row ages while the list is unchanged #326

Closed

Description

@cgwalters-bot

Repo: cgwalters-forge/review

Task: From the review#35 pre-review: the draft guard in src/github/main.ts (needsDraft / paintNeeds: no redraw while an unsent answer exists, only a note; the note is cleared when a redraw happens) has no unit test, and needsSignature leaves out ages so "3h" labels never refresh while nothing else changed. Move the guard decision (draft or not, signature compare, note set/clear) into a pure function in needsview.ts (or needs.ts) that the DOM code calls, unit-test it, and include a coarse age bucket (e.g. the label text the row shows) in the signature so ages refresh, without redrawing under a half-typed answer.

Acceptance: tests cover: unchanged signature skips the redraw; changed signature with typed text or a picked radio only sets the note; changed signature without a draft redraws and clears the note; force bypasses the guard; an age label change alone changes the signature; npm run check (typecheck, tests, build) passes.

Constraints: code and tests only, no GitHub writes (the coordinator opens the PR); no design decisions; do not touch .github/ workflows; keep the change small and match the surrounding style; commit message in the project's style with a Generated-by: AI trailer, no Signed-off-by.

Generated-by: https://github.com/cgwalters/#llms

Activity

  1. added
    dispatchOpt in to the dispatcher's auto-dispatch of a devspace run
    and removed
    dispatchOpt in to the dispatcher's auto-dispatch of a devspace run
    on Oct 3, 2026
  2. moved this from In Progress to Draft in Workstreamon Oct 3, 2026
  3. cgwalters-bot commented on Oct 7, 2026

    @cgwalters-bot
    CollaboratorAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions