Repository navigation
workflow: a read-only window still offers Edit in Settings → Workflows - #2181
Merged
Birfy merged 1 commit intoNov 2, 2026
Merged
Conversation
ThinkFlowLab#2176) The page read the roster but never looked at `roster.readOnly`, so a window that holds the team read-only still offered Edit, Rename and Delete and let the canvas be rearranged. `workflow/graph` is not in the channel's READS list, so the host refused only at the save: the layout the user built was discarded with one technical line. `Use this` writes `workflow/create`, which the same list does not hold, so that button was a second refusal waiting to happen. The host's own sentence now replaces Edit in the editor bar, the rename and delete actions are dropped from the list, `Use this` goes with them, and the editor never opens, so the page does not build either write. The read side is untouched: the list, the graph, its cards and the run chips render as before, and a window with no `readOnly` keeps every control and the commit path it had.
HugoXK
marked this pull request as draft
November 2, 2026 14:51
HugoXK
marked this pull request as ready for review
November 2, 2026 14:52
This was referenced Nov 2, 2026
Contributor
Author
|
Tip of record: State at this tip, read from the API just now:
Nothing is pending on this branch and no one is waiting on a decision from its author. This is the first comment on the PR; the branch stays frozen at |
This was referenced Nov 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2176
Written-by: Dev-2
Owner: Dev-2
Reviewer: Birfy
Claim-Id: fef2fca5e225483fa915d820aea28d28
Branch: dev/2-workflows-readonly-hides-edit
Base: c21e6da
Tier: T1 — risk-gate: 119 changed lines in 4 files, 4 generated files not counted; basis
core/src/client/workflows.js=T1,core/test/workflows-page.test.js=T1,changelog.d/2176-workflows-readonly-hides-edit.fixed.md=T1,docs/subsystems/core-client.md=T0What changed
WorkflowsViewfinally readsroster.readOnly(the same field the sidebar uses): a trimmed, non-empty sentence means the window does not own the team. Edit is replaced where it stood, in thebt-wf-actionsrow, by the host's own sentence —hostText(readOnly), not new wording — in the page's own.bt-wf-statusclass (styles.js:535); no CSS file is touched.data-port, the palette, the prompt fields and the drag handlers are not rendered at all rather than rendered and then refused.Rowtakeseditable, so a read-only window offers no ✎ / × on its own workflows.!lockedtoo: copying a preset writesworkflow/create, whichcore/src/host/channel.js:227'sREADSdoes not hold either.WorkflowsPagecomputesreadOnlyonce, returns fromcommit()before buildingworkflow/graph, and only enters editing fromuseTemplatewhen the window is not read-only.workflow/state, the list, the canvas, the cards, the run chips. The host side is untouched —core/src/host/channel.jshas a zero-line diff and keeps answeringfail(readOnly, 'bot/read-only').Red first
Clean
git archive c21e6da0with only the new test file,core/test/workflows-page.test.js: 47 tests / 44 pass / 3 failnot ok 43 - #2176: a read-only window renders the host sentence instead of Edit and offers no rename or delete—error: a read-only window offers no editing control, actual['Edit'], expected[]not ok 44 - #2176: a read-only window never asks the host to save a graph the user drags—error: a read-only window never writes the graph, actual['workflow/graph'], expected[]not ok 46 - #2176: a read-only window offers no Use this on a preset and never creates a copy— expectedfalse, actualtrueok 45(a normal window keeps Edit, rename and delete) andok 47(a normal window keeps Use this and copies the preset once).At the tip: 47/47.
Ran
Clean committed tree, head
e3ae3eb6a057dfb51a6c741eae80eafedec0ba0c, treebf08b47535e185da54da1cf1f31618ae92fb5631:TZ=UTC ARCH_DOCS_BASE=c21e6da05dd6c287b044ea84f5d2612421e03a72 DSH_HARNESS=/home/xuke/.dsh/bot/workspace/a1727 npm run verify— exit 0. core 2656/2656/0 · social 555 (554 + 1 skip) · tree 127 (126 + 1) · timeline 140 (139 + 1) · workflow 354/354 ·.github/scripts598/598 · interop 37/37 · live-e2e 24/24. Lint 74/36/9/2/16 warnings, 0 errors;arch-docs: OK (8 changed file(s)).node core/scripts/build-client.mjs --check— exit 0.node scripts/ds-bot-patches.mjs check—ok ds-bot/ = Fei2411/DeepSeek-Bot@2b10c70 (tree 5834c00, v0.1.5),ok 10 patches apply cleanly in order,ok core/ equals ds-bot/ + patches/ds-bot/. (Read from a tarball without.git, the pin line printsskipped; the other two lines read the same.)node scripts/ds-bot-patches.mjs canonical—ok patches/ds-bot/ is what generate writes (generate is a no-op); re-runninggenerateleavesgit status --porcelainempty.Not run
core/test/workflows-page.test.js, which renders the real component.core/dev/smoke.mjsnot run —core/index.jsandcore/src/host/are untouched.packagejob's pack/typecheck/actionlint steps are not part ofnpm run verifyand were not run here.Files (8, +309/−99)
changelog.d/2176-workflows-readonly-hides-edit.fixed.md064490a562da822e599dbc054675e8d05b8e3b06core/client.js(generated)ed9b16813b4c39fd35d519772ab58e2118979e9ecore/src/client/workflows.js63a3105961ab026dc1d2f782daa2d83731691edfcore/test/workflows-page.test.jse2e04de393c1aaa29828ca8a8159af1e36ce8f04docs/subsystems/core-client.md6268e33246dc71808b88d54d2488058f797dfb85patches/ds-bot/0008-client-bundle.patch(generated)113afefd7d37d312f84bd4bfc2fa86e7a5d7177fpatches/ds-bot/files/src/client/workflows.js(mirror)63a3105961ab026dc1d2f782daa2d83731691edfpatches/ds-bot/files/test/workflows-page.test.js(mirror)e2e04de393c1aaa29828ca8a8159af1e36ce8f04{
"pr": 2181,
"claim": "Dev-2",
"issue": 2176,
"summary": "Settings → Workflows reads
roster.readOnlynow: in a window a second dsh holds read-only it replaces Edit with the host's own sentence instead of offering a save the channel refuses. Rename, Delete, the drag editor andUse thisare not rendered in that state, so the page never buildsworkflow/graphorworkflow/create. Reads, the list, the canvas and the run chips are untouched, and a window withoutreadOnlykeeps every control and the commit path it had. The host side is unchanged.","files": [
"changelog.d/2176-workflows-readonly-hides-edit.fixed.md",
"core/client.js",
"core/src/client/workflows.js",
"core/test/workflows-page.test.js",
"docs/subsystems/core-client.md",
"patches/ds-bot/0008-client-bundle.patch",
"patches/ds-bot/files/src/client/workflows.js",
"patches/ds-bot/files/test/workflows-page.test.js"
],
"checks": {
"ran": "TZ=UTC ARCH_DOCS_BASE=c21e6da05dd6c287b044ea84f5d2612421e03a72 npm run verify; node core/scripts/build-client.mjs --check; node scripts/ds-bot-patches.mjs check; node scripts/ds-bot-patches.mjs canonical",
"result": "green",
"at": "e3ae3eb6a057dfb51a6c741eae80eafedec0ba0c"
},
"next": "none — ready for review"
}