Skip to content

#681 follow-ups: a failed first send must still open the new Bot, and cells.js/parts.js must agree on kickoff lines #698

Closed

Description

@Birfy

Summary

Two loose ends left by #681 (PR #681, tip 57d69d43, PASS in hand). Both are small, both are user-visible, and both are cheaper to fix now than to remember later.

1. A failed first send leaves a Bot the user cannot see

core/src/client/new-chat.js, the created path: after the Bot is created it awaits actions.send (the user's line, as the Bot's first turn) and then close()s the card. When that send throws, the Bot already exists, the card stays open with its Create button, and a second click answers "a Bot with that name already exists" — the user is left holding a Bot they cannot reach from the card in front of them.

Fix: on a send failure, open the new Bot's chat anyway and show the failure there (an error line or the send's own failure notice), so the card cannot be clicked into a duplicate. Do not create the Bot twice, and do not swallow the error.

2. cells.js and parts.js disagree about kickoff lines

On this tip, core/src/client/cells.js no longer skips source.role === 'kickoff', while core/src/host/parts.js:107 still does (ours && (source.handoff === true || source.role === 'kickoff')). For a Bot-created Bot's old transcript that means: hidden in "earlier parts", drawn as a Message from <parent Bot> row in the current part.

Fix: agree. Both should skip a kickoff line — it was a setup prompt, never a message the parent sent to the child.

Acceptance

  • Send failure: a test drives created with a send that rejects and asserts (a) the new Bot's chat is opened, (b) the failure is visible, (c) the Create button cannot be pressed again into an "already exists" error. Reverting the fix makes that case red.
  • kickoff: a test renders a stored transcript containing a kickoff line through both the earlier-part path (historyEntry) and the current-part path (cells.js) and asserts the line appears in neither, and that a normal reply line still appears in both. Reverting either half makes it red.
  • node --test core/test/ adds no failures against the same command on main; lint clean.

Tier: core/src/client/** is T1, core/src/host/parts.js is T2 — a PR touching both takes the higher tier.

Activity

  1. added
    bugSomething isn't working
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    area:uiWeb/desktop UI and copy
    area:automationScheduled tasks and automation
    on Oct 22, 2026
  2. Birfy commented on Oct 22, 2026

    @Birfy
    CollaboratorAuthor

    Written-by: Dev2

    Claimed. Branch: fix/698-follow-ups (based on main cbce2b03, the merge of #681), one PR for this issue.

    Plan, in the issue's order:

    1. new-chat.js created: open the new Bot's chat and show the failure when the first actions.send rejects, so the card can never be clicked into "that name already exists".
    2. cells.js: skip a kickoff line like parts.js already does, so an older Bot-created-Bot transcript shows it in neither the earlier parts nor the current part.

    Tests: a unit test drives the post-create step with a rejecting send (chat opened, failure surfaced, nothing thrown back to the card), and the transcript case pins both halves.

  3. added
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    agent-prPull request opened by an agent
    and removed
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    on Oct 22, 2026
  4. self-assigned this
    on Oct 22, 2026
  5. removed
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    agent-prPull request opened by an agent
    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:automationScheduled tasks and automationarea:uiWeb/desktop UI and copybugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions