Repository navigation
Conversation
knihit
force-pushed
the
wc/07a-edit-core
branch
from
October 27, 2026 15:14
90e3f33 to
9776ca3
Compare
knihit
force-pushed
the
wc/07a-edit-core
branch
5 times, most recently
from
October 27, 2026 21:25
3ea4ab5 to
9883213
Compare
knihit
force-pushed
the
wc/07a-edit-core
branch
from
October 27, 2026 22:06
9883213 to
9e85ce8
Compare
knihit
force-pushed
the
wc/07a-edit-core
branch
from
October 27, 2026 22:23
9e85ce8 to
308c0ec
Compare
knihit
force-pushed
the
wc/07a-edit-core
branch
from
October 27, 2026 23:07
308c0ec to
c589cbe
Compare
knihit
force-pushed
the
wc/07a-edit-core
branch
2 times, most recently
from
October 27, 2026 23:45
42010ee to
b7669fa
Compare
knihit
force-pushed
the
wc/07a-edit-core
branch
from
October 28, 2026 14:31
b7669fa to
23aa4ec
Compare
knihit
force-pushed
the
wc/07a-edit-core
branch
from
October 28, 2026 14:54
23aa4ec to
810f448
Compare
… editor state The IO-free part of editing a workflow in the Designer, with no UI yet: - the draft of the stages, where each stage keeps an id while it is renamed - the text a save writes, which replaces only the block of stages - the findings of a check, put on the stage and field they are about - the state of the editor and its reducer, with the selectors on it The wire types gain the hash and read-only flag of a workflow and the path and severity of a finding, and the page reads them.
The server reports a repeated stage name on the later stage only. A person who renames the first stage to a name the second one has saw no mark at the field they were editing. The problems of the draft now hold a copy of such a name problem for the earlier stages with that name. A list of problems leaves the copies out, and a message that several stages repeat is joined once.
knihit
marked this pull request as ready for review
October 28, 2026 15:37
knihit
requested review from
georgebearden,
ihmaws,
shsenior and
simonkrol
as code owners
October 28, 2026 15:37
knihit
force-pushed
the
wc/07a-edit-core
branch
from
October 28, 2026 15:39
810f448 to
c0bf97d
Compare
This branch has not been deployed
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.
Description
Layer 1 of 4 of the editing work in the Designer (the first of four PRs that replace a single large one; the stack is on #93). This layer is the editing core only: it has no UI and nothing on the page changes.
What it adds (
workflow-canvas/src/designer/core/, no IO):draft.ts: the draft of the stages. Each stage keeps an id while it is renamed or when another is deleted. Add takes the first freeagent-N; the 40 and 1 stage limits; the neighbour to select after a delete.stage-text.ts: the text a save will write. Only the block of stages of the loaded file is replaced, soname,intent,versionand the comments outside the block stay byte for byte (a CRLF file stays CRLF). Ifstagesis not a block, the whole file is written in the plain layout. Values that are not plain YAML text are double-quoted.problems.ts: puts the findings of a check on the stage and field they are about, by index or by name.edit-state.ts,edit-reducer.ts,edit-view.ts: the state of the editor, its reducer for every event (including events that do not fit, such as a check for an older draft), and the selectors (dirty, text, why Save is off, problems to show).Wire types (
src/api/types.ts,parse.ts):WorkflowDocumentcarries thehashandread_only;DiagnosticViewcarries thepathandseverity(an unknown severity counts as an error). Nothing in the page reads them yet.Tests: unit tests for every module above,
test-support/designer-purity.test.ts(the core imports only its own modules and the wire types and reads no clock, randomness, environment or network), and the stub wire test now also readshashandreadOnly.How to review
draft.ts, thenstage-text.tsand its test (the part with the most edge cases), thenproblems.ts, then the state, reducer and selectors.npm testinworkflow-canvas/is the evidence.What the next layer adds
PR #99: Properties for the selected stage, the agent list, Add stage, rename, Delete stage and the selection on the canvas, with the draft kept in
App.Fixes from the hands-on QA run
withEchoes(used byproblemsOfDraft) copies a name problem to the earlier stages with that name that have no name problem of their own;listedOfleaves the copies out of a list, andjoinMessagesjoins a message once.problems.test.tsandedit-view.test.ts; the one atproblemsOfDraftfailed before the change.Type of Change
workflow-canvas/Testing
npm test(tests/scripts/**/*.test.js): not applicable; this PR changes onlyworkflow-canvas/.cli/changed: not applicable,cli/is untouchedChecked in
workflow-canvas/on this head:npm run lint,npm run typecheck(3 projects),npm test(53 files, 807 tests),npm run test:stub(19 files, 324 tests),npm run api:lint,npm run buildandnpm run test:e2e(49 tests) all pass.npm run screenshotsgives byte-identical files, as nothing on the page changed.Screenshots
None: this layer has no UI.
Checklist
Notes for Reviewers
wc/06-execution). The four layers together give exactly the tree of the earlier single PR (Test editing in the Designer end to end and add the changelog entry #97 keeps the last layer).save,saved,conflict,refused,failed,reload*),SaveStateandstage-text.ts(the text writer) withtextOf. They belong to the edit model that this layer adds and are tested with it. Save the workflow from the Designer, with checks while typing and conflict handling #100 wiresuse-editorto them. Moving them to Save the workflow from the Designer, with checks while typing and conflict handling #100 would take that layer to about 875 lines of product code.