Skip to content

I can approve a pitch from the dashboard #191

Description

@jamescrosswell

Context

With the reader from #190 open on a pitch, the only thing left between you and the approve gate is
the browser round trip to the Project board's Status dropdown. This slice takes your answer where
you read it. It follows the pattern #154 set for a reviewer-only write: a board.sh subcommand
whose role argument is you and which refuses lead and dev by name, a deny rule in
settings/agents.json so the gate is held by a refused command rather than a sentence, and the card
updated in place so nothing is re-read.

The reviewer decided on the pitch: no confirmation dialog — "just approve". Opening the pitch
is the deliberate act.

Needs #190 merged first: it builds the reader this key lives in.

Pitch: #180

Acceptance criteria

  • a-team board <team> approve you <n> moves a Pitched pitch to Approved.
    - lead and dev are refused by name, in one line:
    <role> may not approve a pitch; approving is the reviewer's own gate.
    - Any other role argument fails with unknown role '<role>' (you), as priority does.
    - It refuses anything that isn't a pitch-labelled Issue in Pitched, naming the status
    it found, so it can't be used as a general-purpose move.
    - It goes through write, so a-team board --dry-run <team> approve you <n> does every read
    and every check and prints the change it would have made.
  • "Bash(a-team board * approve *)" is in settings/agents.json's deny list, next to the
    priority rule.
  • a in the reader approves the pitch it's showing, with no second keystroke and no
    confirmation dialog. The reader closes.
  • The card leaves the Pitches column and the selection falls to the next card, with the board
    not re-read — what WorkView.Ranked already does after a rank. Approved isn't one of
    WorkView.Gates, so the card has nowhere to go.
  • The MessageBar says #<n> approved in its normal colour.
  • a exists only where it means something: in the reader, on a pitch-labelled item in
    Pitched. On anything else the reader's hint bar doesn't offer it and the key does nothing.
  • The reader's hint bar gains it, between scrolling and GitHub:
    Up/Down/PgUp/PgDn scroll · a approve · o on GitHub · Esc close.
  • Registered: work.approve — "Approve the pitch you're reading" — so Ctrl+E and F1
    list it.
  • A failed approve leaves the card where it was and says why on the MessageBar in its
    Error colour.
  • Work's own hint bar is unchanged. a is not advertised there and not bound there.

Tests

  • tests/scripts.sh: approve refused for lead and for dev, each in one line; refused for an
    item that isn't on the board, isn't an Issue, isn't labelled pitch, or isn't in Pitched;
    accepted for a Pitched pitch as you; --dry-run prints the change and makes none; the deny rule
    is present in settings/agents.json.
  • tests/Dashboard.Tests: a on a Pitched pitch runs approve you with that number and team; the
    card is gone from the column afterwards and the selection is on the next card; the board was not
    re-read; the message reads #<n> approved; a is not offered on an item that isn't a Pitched
    pitch; a failed approve keeps the card and shows an error; work.approve is registered with its
    label.

Out of scope

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    a-team:devClaimed by the a-team Dev

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions