Skip to content

Fix the sidebar Workflows section vanishing on click - #1377

Merged
Birfy merged 1 commit into
mainfrom
fix-workflow-sidebar-vanish-1375
Oct 27, 2026
Merged

Birfy merged 1 commit into
mainfrom
fix-workflow-sidebar-vanish-1375

Conversation

@Birfy

@Birfy Birfy commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Written-by: Dev
Owner: Dev
Reviewer: Reviewer

Fixes #1375

What changed

Clicking a Workflow row, New, or Hand a task in the sidebar opens that chat or dialog. The Workflows section stays. Before this, createPortal was called with no container, the call threw, and the sidebar slot boundary drew nothing until reload.

The stage and the dialogs portal onto document.body. When that container is missing they stay in the section tree. Settings → Workflows from #1374 is unchanged.

Red without the change

node --test plugins/workflow/test/client.test.js on the unbroken client, with a createPortal that throws the shell's "Target container is not a DOM element.": the new test failed (doesNotThrow on the row click). The other two tests in that file passed. After the fix the same file is 3 pass, and the workflow suite is 20 pass, 0 fail.

Verification at the tip

Tip SHA: 802502d

Ran:

  • TZ=UTC npm run verify — exit 0. Core lint and arch-docs: OK (4 changed file(s)). Plugin lint (workflow reported no warnings). build-client --check. ds-bot-patches check (core/ equals ds-bot/ + patches/ds-bot/). Core tests 1795 pass. Social 525, tree 125, timeline 125, workflow 20, all 0 fail. .github/scripts 543 pass. Interop 37 pass. Live-e2e 24 pass.
  • git diff origin/main...HEAD --stat — four files, base 9c8e51bf (Rewrite Settings → Workflows as a flowchart page #1374).

Not run (and why):

  • Smoke bench (dev/bench.sh): no ../deepseek-harness checkout. core/index.js and core/src/host/ are unchanged.
  • A live Desktop click-through.
  • CI package extras (typecheck, actionlint, pack). verify is the local stand-in for tests-ok minus that job.

Checkpoint

{
  "pr": 1377,
  "claim": "Dev",
  "issue": 1375,
  "summary": "Clicking a Workflow, New, or Hand a task in the sidebar opens the chat or dialog. The Workflows section stays. The stage is portaled onto document.body, and a missing container stays in the section instead of throwing. The Settings → Workflows page from #1374 is unchanged.",
  "files": ["plugins/workflow/client.js", "plugins/workflow/test/client.test.js", "docs/subsystems/workflow.md", "changelog.d/1375-workflow-sidebar.fixed.md"],
  "checks": { "ran": "TZ=UTC npm run verify", "result": "green", "at": "802502d34ec56882d6358acfbc6468f9654319ba" },
  "next": "none — ready for review"
}
Open in Web Open in Cursor 

createPortal was called with no container, so opening a row, New, or
Hand-a-task threw. The sidebar slot boundary then drew nothing until
reload. Portal onto document.body, and keep the node in the section
when that container is missing.

The settings list from #1374 stays. That page does not replace the
sidebar stage.

Fixes #1375
@Birfy Birfy added the agent-pr Pull request opened by an agent label Oct 27, 2026 — with Cursor
@Birfy

Birfy commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator Author

Verdict: PASS at 802502d
Written-by: Reviewer
Attestation: 802502d role=Reviewer

Ran (implementer tip + GitHub Test workflow SUCCESS including plugins (workflow)):

Ready for merge queue.

@Birfy
Birfy added this pull request to the merge queue Oct 27, 2026
@github-actions github-actions Bot added the pass label Oct 27, 2026
Merged via the queue into main with commit c2a7b9c Oct 27, 2026
16 checks passed
@Birfy
Birfy deleted the fix-workflow-sidebar-vanish-1375 branch October 27, 2026 07:49
HugoXK pushed a commit to HugoXK/FlyBot that referenced this pull request Oct 27, 2026
<!-- CURSOR_AGENT_PR_BODY_BEGIN -->
Written-by: Dev

Owner: Dev
Reviewer: Reviewer

Fixes ThinkFlowLab#1373

## What changed
Starting a workflow creates one temporary Bot per node from that node's
prompt, role, model and tools. Those Bots do the step and are removed
when the run finishes, fails for good, or is cancelled. They stay out of
the sidebar. The prompt and the graph are edited in Settings → Workflow
graphs, on the flowchart, or with `define_workflow`.

Rebased onto current `main`
(`c2a7b9ce8ed57764876afb08cb132a0cf95bcedc`). The sidebar portal from
ThinkFlowLab#1377 and the Settings → Workflows page from ThinkFlowLab#1374 stay. A sidebar click
still opens the stage and leaves the Workflows section in place.

## Verification at the tip
Tip SHA: 1bb1aab
The local commit is `8c45bad11740cf45e6d0249c2579f483607d5c26`. Both
have tree `6db2784b6aadf7f36dbe5c16e21342a4a8b31434` and parent
`c2a7b9ce8ed57764876afb08cb132a0cf95bcedc`. GitHub re-encoded the
signature header; GitHub reports that signature verified.
Ran:
- On the rebased tree: `node --test plugins/workflow/test/*.test.js` —
27 pass, including the sidebar click that keeps the section and the
settings/flowchart prompt save.
- On the rebased tree: `node --import ./test/harness-resolve.mjs --test
test/flybot.test.js` in `core/` — 45 pass.
- `node scripts/ds-bot-patches.mjs check` — ok. `git merge-tree
--write-tree HEAD origin/main` — clean, same tree.
- `TZ=UTC npm run verify` reached the core suite (lint, plugin lint,
client check, patch check green). One core cleanup hook failed with
`ENOTEMPTY` on a Feishu temp dir (`core/test/feishu.test.js`); that file
reran alone and passed 9/9. It is not part of this diff.
Not run: bench smoke (`core/dev/bench.sh`). No `../deepseek-harness`
checkout.

## Checkpoint
<!-- flybot:checkpoint -->
```json
{
  "pr": 1380,
  "claim": "Dev",
  "issue": 1373,
  "summary": "Starting a workflow creates one temporary Bot for each node from that node's prompt, role, model and tools. Those Bots carry out the step and are removed when the run finishes, fails for good, or is cancelled, and they stay out of the sidebar. The same prompt and graph can be edited in Settings, on the flowchart, or with define_workflow. A fail-once retry keeps the run Bots until the run actually ends. The sidebar portal and Settings → Workflows page from main stay.",
  "files": ["plugins/workflow/src/ephemeral.js", "plugins/workflow/src/service.js", "plugins/workflow/index.js", "plugins/workflow/client.js", "core/src/host/hooks.js", "core/src/host/roster.js", "core/src/host/channel.js", "core/src/host/tools.js", "docs/subsystems/workflow.md", "changelog.d/1373.added.md"],
  "checks": { "ran": "node --test plugins/workflow/test/*.test.js", "result": "green", "at": "8c45bad11740cf45e6d0249c2579f483607d5c26" },
  "next": "none — ready for review"
}
```
<!-- /flybot:checkpoint -->

<!-- CURSOR_AGENT_PR_BODY_END -->

<div><a
href="https://cursor.com/agents/bc-ca8a6996-0dd3-585c-a8ef-8cbb3f638075?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a
href="https://cursor.com/background-agent?bcId=bc-ca8a6996-0dd3-585c-a8ef-8cbb3f638075&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img
alt="Open in Cursor" width="131" height="28"
src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;</div>

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
@github-actions github-actions Bot removed the agent-pr Pull request opened by an agent label Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sidebar: clicking a Workflow row removes the whole Workflows section

2 participants