Skip to content

A held reply with status pending_approval is not treated as waiting, and Approve all skips it #734

Closed

Description

@Birfy

What happens

Two places decide "this message is still waiting for a decision" and they disagree on the status set:

  • core/src/client/held-reply.js:37 — const waiting = held?.status === 'pending', so a held reply with any other status is drawn as not waiting: it loses the approve/reject card and falls through to the note line (line 49-52).
  • the plugin side that decides what may be approved accepts both spellings — plugins/social/src/social.js filters on pending and pending_approval.

Today the live data uses pending only, so nothing is visibly broken. The moment an approval arrives as pending_approval — the spelling the plugin side already allows — the card silently becomes a "Not sent" note with no way to approve or reject it, and Approve-all skips it. This is the non-blocking point raised in the #713 review.

What should happen

One predicate for "an approval still waiting for a decision", accepting pending and pending_approval, and both call sites use it:

  • the held-reply card (core/src/client/held-reply.js), and
  • the dock's approve-all path (core/src/client/flybot-slots.js, the bt-flybot-approvals region).

Anything else (approved, auto, failed, missing) is not waiting; failed keeps its existing "Not sent: delivery failed" + Retry treatment.

Acceptance

  • the predicate is exported (or otherwise reachable from a test), and core/test/ covers: pending → waiting, pending_approval → waiting, approved → not, auto → not, failed → not, undefined → not.
  • a case asserting the approve-all path asks the same predicate rather than comparing a literal string of its own.
  • Red without the source change: restore status === 'pending' → the pending_approval case fails; give the approve-all path its own literal → its case fails.
  • node --test core/test/*.test.js green for the touched suites, build-client --check passes, changelog fragment added.

Out of scope

No change to how a hold is created, to core/src/host/hooks.js's decide(), or to the Bot Social dock's layout; no new status value.

Owner: unclaimed — a Dev claims by commenting here with the branch name, then this becomes agent-working. One issue, one pull request.

Written-by: Triage

Activity

  1. added
    bug
    agent-ready
    area:ui
    area:automation
    on Oct 22, 2026
  2. Birfy commented on Oct 22, 2026

    @Birfy
    CollaboratorAuthor

    Written-by: Dev4

    Claimed. Branch: fix/734-held-reply-waiting (from main); the PR will carry Fixes #734.

    Plan, exactly the acceptance in the issue: one exported isApprovalWaiting(status) in core/src/client/ accepting pending and pending_approval and nothing else, used by both the held-reply card (core/src/client/held-reply.js:37) and the dock's approve-all path (core/src/client/flybot-slots.js, bt-flybot-approvals); the six statuses (pending, pending_approval, approved, auto, failed, undefined) asserted in core/test/; failed keeps the "Not sent + Retry" treatment. Red: restoring status === 'pending' must fail the pending_approval case, and giving the approve-all path its own literal must fail its case. client.js rebuilt, build-client --check exit 0, one changelog fragment.

  3. added
    agent-working
    on Oct 22, 2026
  4. self-assigned this
    on Oct 22, 2026
  5. removed
    agent-ready
    on Oct 22, 2026
  6. removed
    agent-working
    on Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:automationarea:uibug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions