Skip to content

client: an approval card never says how long it has been waiting #2409

Closed

Description

@HugoXK

Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.

Written-by: FlyBot Lead
Claimed-by: FlyBot Lead
Claim-Id: 10ff44aeafff40f0bceea2f719c8dc75
Branch: dev/3-approval-age
Base: 482a30f
At: 2026-11-04T15:04:19Z

Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.

Written-by: FlyBot Lead

What is missing

An approval card never says how long the request has waited. Approval.createdAt (core/types/flybot.d.ts:320) is already in the client's hands — the host writes it at core/src/host/hooks.js:465 and approvals.list() returns it unchanged — and Settings itself promises a nudge after 15 minutes (core/src/client/settings.js:44), yet none of the three places that draw a card renders a time. A hold from half an hour ago and one that just arrived look identical, and reopening the window does not tell them apart.

The three surfaces: the dock card (core/src/client/flybot-slots.js:334-352), the hold bubble (core/src/client/held-reply.js:64-70), the room overview drawer (core/src/client/details-drawer.js:145-151).

Expected

The card's head line carries a quiet age next to it — Waiting for approval · 12 min; under a minute reads just now; a wait that crossed midnight falls back to a date. Reuse relativeShort() in core/src/client/text.js:64 (it already produces just now / {n} min / {n} h / {n} d / date) and the four i18n strings already in core/src/client/i18n.js:677-680: no new i18n entry, no new style, no new pure helper.

Implementation facts the PR must keep

  • The hold bubble does not have the field today: the heldOf map in core/src/host/hooks.js:557-573 keeps only id/by/status/sessionId/turn/to/toOwner/error/retry; add createdAt: a.createdAt.
  • The room card's item comes from the plugin's approvalView (plugins/social/src/social.js:235 createdAt: item.created_at) and may be an ISO string or absent. Parse it when present; draw nothing when it is missing.
  • No decision-contract change, no new endpoint, no polling.

Scope

core/src/client/flybot-slots.js, core/src/client/held-reply.js, core/src/client/details-drawer.js, core/src/host/hooks.js (one field), core/client.js + patches/ds-bot/0008 (regenerated with npm run build, never hand-edited), one new client test file, and a changelog fragment. Out of scope: P-538 (the visible reason on the same card) and P-550 (state backups in the diagnostics report).

Acceptance (red first)

Mounted with createdAt = Date.now() - 12 * 60000, each of the three surfaces shows 12 min; with createdAt absent, nothing extra is drawn. One assertion per surface, all failing on the base before the change.

Duplicate check

Live main grepped for the helper and for the three surfaces — nothing renders an age today. GitHub search: approval age → 8, all closed and all different (#1305, #349, #472, #527, #624, #2080, #675, #1289); approval age in:title → 0; waiting for approval duration → 2 closed, different; approval createdAt → 4 closed, different; time stamp approval card → 6 closed, different. Closest is #492 (closed; a nudge after 15 minutes, i.e. notification frequency, not the card's age). Inside the backlog P-538 is the same card's reason field — a different field and a different acceptance.

Activity

  1. added
    needs-humanThe agent loop stopped; a person must decide (reason in the last comment)
    on Nov 4, 2026
  2. Birfy commented on Nov 4, 2026

    @Birfy
    Collaborator

    Written-by: Triage
    Triage 点名(task triage-r9b)

    • 已在跟的 PR:client: an approval card says how long it has waited #2410(dev/3-approval-age,fork HugoXK/FlyBot),tip a1059cbc946acbc974d07e73d85bea29de313f40,当前 draft,mergeable=false,PR 上还没有评论/结论。
    • 还缺:交付(draft 未转正,tip 上没有可判的 CI/审查)+ 本 issue 上缺 pickup-ok 评论(PR body 的 Claim-Id 10ff44aeafff40f0bceea2f719c8dc75 与本 issue 一致,但正文要求的 pickup-ok 未出现)。
    • 判据自查:判据2 通过(预期行为与改动范围明确,落在 core/src/client/);判据3 通过(非 hold、非 tracking/umbrella、非群组作业)。二者不改变结论——判据1 未过(归属/交付未定),故打 H 标签,不打 agent-ready。
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

    needs-humanThe agent loop stopped; a person must decide (reason in the last comment)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions