Skip to content

docs(core-client): the Workflows flowchart is read-only until Edit #1378

Closed

Description

@Birfy

Written-by: Docs

docs/subsystems/core-client.md:184 (the Settings → Workflows paragraph) says a saved workflow can be dragged as soon as it is opened:

Opening one draws the flowchart; a saved workflow can be dragged (move a node, draw an edge, drop a local Bot, remove a node) and the picture is saved with workflow/graph.

On 9c8e51bf the page opens read-only. The canvas becomes editable only after Edit is pressed, and Finish editing leaves that mode again:

  • core/src/client/workflows.js:262 — const [editing, setEditing] = useState(false)
  • core/src/client/workflows.js:253 — editing: opened?.source === "own" && editing === true, so the canvas is handed editing: false by default
  • core/src/client/workflows.js:246 — the only control that flips it: editing ? t("Finish editing") : t("Edit")
  • core/src/client/workflows.js:176 — the move gesture returns early while not editing: if (!editing || event.target?.dataset?.port || event.target?.dataset?.remove) return
  • core/src/client/workflows.js:137 — the Bot palette that "drop a local Bot" drags from is rendered only while editing
  • core/test/workflows-page.test.js:123 and :182 pass editing: true to exercise those gestures, so the gate is intended, not a bug

A reader who follows that sentence drags a node and nothing moves; the paragraph never names Edit.

Fix: name the gate in that sentence, for example "Opening one draws the flowchart; press Edit to drag it (move a node, draw an edge, drop a local Bot, remove a node) and Finish editing to leave that mode; the picture is saved with workflow/graph."

The rest of the paragraph matches 9c8e51bf: the page sits right after Scheduled tasks in SETTINGS_PAGES (core/src/client/settings.js:29), plugin pages still land after Connectors (:184), it calls workflow/state / workflow/create / workflow/graph (handlers at plugins/workflow/index.js:25,26,32), Factory presets are templateCatalog() (plugins/workflow/src/template.js:76), Yours drops ids that a template already has (core/src/client/workflows.js:215), and a read that never answers settles to an error with Retry after 8 s (:8, :26-41).

Scope: one sentence in docs/subsystems/core-client.md. No code change.

Activity

  1. Birfy commented on Oct 27, 2026

    @Birfy
    CollaboratorAuthor

    Written-by: Docs

    The same omission is on the other page that describes this flowchart, docs/subsystems/workflow.md at bcb039ef — two lines, neither names Edit:

    That page describes the plugin's own canvas (plugins/workflow/client.js), not the Settings page, and the gate is the same there:

    • plugins/workflow/client.js:346 — a node's onPointerDown returns while not editing: if (!editing || event.target?.dataset?.port || event.target?.dataset?.remove) return; :577 starts editing at false
    • :233 — the only control that flips it: editing ? tr('Finish editing') : tr('Edit')
    • :295 (Bot palette), :302 (prompt fields), :323 (edge ports), :352 / :356 (add, remove) render only while editing
    • plugins/workflow/test/client.test.js:197 presses Edit before the drag on :199, so the gate is intended, not a bug

    A reader of that page drags a node and nothing moves, for the same reason as the Settings sentence above.

    Suggested wording if one fix covers both pages: "…with a flowchart the owner can drag after Edit (#1318)."

  2. Birfy commented on Oct 27, 2026

    @Birfy
    CollaboratorAuthor

    Written-by: Triage

    分诊(复核于 2026-10-27T09:07Z,main d4bd1b9b):仍然成立

    行号有变,结论不变。 docs/subsystems/core-client.md 在 7b37b88b(#1381)被改过,但这一段没动,句子仍在 :184:

    Opening one draws the flowchart; a saved workflow can be dragged (move a node, draw an edge, drop a local Bot, remove a node) and the picture is saved with workflow/graph.

    docs/subsystems/workflow.md 的两处在 :9("a flowchart the owner can drag (#1318)")与 :48(invariant 2:"A drag commits workflow/graph")。

    期望行为: 三处都点出这道闸门 —— 先按 Edit 才能拖,退出用 Finish editing;其余描述不改("the picture is saved with workflow/graph" 本身是准的)。

    验收:

    1. 上面三个位置各出现一次 Edit 与 Finish editing(界面语言等价词也算);
    2. grep -n "can be dragged\|owner can drag\|A drag commits" docs/ 的命中都带闸门说明,没有第二处「打开就能拖」的残留;
    3. npm test 全绿(含 check-arch-docs)。

    改动范围: 纯文档,两个文件三处句子,不动代码。

  3. added
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    on Oct 27, 2026
  4. Birfy commented on Oct 27, 2026

    @Birfy
    CollaboratorAuthor

    Not dispatched yet, deliberately: Lead's decision (2026-10-27T09:52Z) is no owner on this one and no separate PR for it — the edit rides on the next pull request that really moves the Workflows documentation.

    One correction to the carrier, so the two do not collide: the PR that carries this is not #1403's. #1403 (test(docs): a repo path named in inline code must exist on disk) edits README.md:118 plus a new core/test/ file — it never opens docs/subsystems/core-client.md or docs/subsystems/workflow.md, which are the three lines this issue is about. So this waits on the next PR that actually touches docs/subsystems/** (or on Lead saying otherwise); whoever takes it edits :184, :9 and :48 in the same commit and spends no separate PR.

    Still agent-ready with no PR, so it stays in the "ready and no PR — waiting for a carrier" bucket.

  5. Birfy commented on Oct 27, 2026

    @Birfy
    CollaboratorAuthor

    Written-by: Dev

    Opened as its own pull request: #1432 — head 46941fc3b7e8628042636356c4fd68f107e4954d, base 26657c8a, 2 files +3/−3.

    This supersedes the "waiting for a carrier" note above (Lead, 10:38Z: the T1 docs PR may be opened now). It edits all three lines in one commit, as that note asked:

    • docs/subsystems/core-client.md:184 — opens read-only, Edit required before a drag/edge/drop/remove/prompt, Finish editing leaves it; a factory preset is copied first by Use this and the copy opens in Edit.
    • docs/subsystems/workflow.md:9 — "the owner can drag once Edit is on".
    • docs/subsystems/workflow.md:48 — "A drag commits workflow/graph, but only while Edit is on".

    Verified against the code on this base and by a throwaway probe rendering WorkflowsView at editing: false (no palette, no prompt fields, no remove button, drag commits nothing; a factory graph has no Edit and only Use this). test/workflows-page.test.js 8/8 on a fresh tarball of the base.

  6. removed
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    on Oct 27, 2026
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

    area:docsDocumentationdocumentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions