Skip to content

Inbox: closing a card opened from the queue should return to the queue #2541

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: 888af4609a0640dcae250139f00082fd
Branch: dev/1-inbox-back-to-queue
Base: 0889d8c
At: 2026-11-05T13:57:57Z

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

Written-by: FlyBot Lead

What happens

Open a card from the Inbox and the queue closes behind you with no way back: core/src/client/inbox.js:602-609 (openCard) calls actions.closeInbox() and then navigates — a workflow card to openSettings('workflows'), anything else to openSession(card.chat). Closing the surface you landed on does not restore the queue: core/src/client/index.js:518 (closeSettings) only clears settings/remoteBotSettings, and state.inbox is written in exactly one place (:522), the menu entry. Working through five cards therefore means opening the Inbox five times.

Reproduction

Probe in the clean tree at 0889d8ca (scratch, not committed): with the page state from a card click, openCard(actions, { kind: 'workflow' }) then the shell's closeSettings() leaves inbox null, so the queue stays closed. Asserting inbox === true after that pair is red today; the second probe — that openCard carries any "came from the queue" fact to the actions — is also red, because it returns nothing and passes no marker.

Expected

A surface entered from the Inbox returns to the Inbox when it is closed — closeSettings() restores { settings: null, inbox: true } for a page that was opened from the queue, and the same for the chat branch (closeSession/back) where the card opened a conversation. Opening a settings page from anywhere else is unchanged: no queue reopens behind it.

Scope

  • core/src/client/inbox.js — openCard hands the "from the queue" fact to the actions (a marker argument or a dedicated action), still closing the queue first.
  • core/src/client/index.js — closeSettings (and the chat back path) honours that marker by restoring inbox: true; the marker clears when the queue is reopened from the menu or any other surface opens.
  • Generated once: core/client.js, patches/ds-bot/0008-client-bundle.patch, the src/client/ mirrors, one docs/subsystems/core-client.md line, one changelog.d/ fragment.
  • Test: one case in core/test/ — openCard(wf) + closeSettings() leaves inbox true; a control where Settings was opened from the menu leaves inbox false.

Tier: T1 (core/src/client/**, core/test/**, changelog.d/**).

Duplicate check

Searched the tracker before filing: inbox in:title (35, none this — #471 umbrella, #2299 read-only, #2515 fixed where Open lands, not the return), dismiss in:title, badge in:title+inbox, stale in:title — no issue asks for a return to the queue; the product backlog carried it as P-598 (enhancement, not a bug). Open pull requests at filing time: #2536 touches inbox.js at :311-343 (the stale failed card), a different section from openCard at :602; nothing else touches index.js.

Done when

The return-to-queue case is red on the base and green with the fix, core/test/inbox.test.js and the workflows/read-only suites stay green, build-client --check and the patch check are clean, and a settings page opened from the menu still leaves the queue closed.

Activity

  1. HugoXK commented on Nov 5, 2026

    @HugoXK
    ContributorAuthor

    Claim-Id: 888af4609a0640dcae250139f00082fd
    Branch: dev/1-inbox-back-to-queue
    Base: main

    Flight plan: one PR (Fixes #2541) from dev/1-inbox-back-to-queue, ready, maintainer_can_modify: true, red-first evidence in the body. P-598 enhancement, T1 (core/src/client + core/test + changelog).

  2. HugoXK commented on Nov 5, 2026

    @HugoXK
    ContributorAuthor

    Release

    Written-by: FlyBot Lead
    Released: 888af4609a0640dcae250139f00082fd
    Reason: merged in PR #2542 as f36b388 (main)
    At: 2026-11-05T15:07:29Z

  3. added a commit that references this issue on Nov 5, 2026
    f36b388
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions