@sanity/workflow-studio-plugin 0.28.0 → 0.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +295 -0
- package/dist/_chunks-cjs/index.cjs +563 -193
- package/dist/_chunks-cjs/workflows-tool-root.cjs +698 -257
- package/dist/_chunks-es/index.js +549 -189
- package/dist/_chunks-es/workflows-tool-root.js +712 -261
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,300 @@
|
|
|
1
1
|
# @sanity/workflow-studio-plugin
|
|
2
2
|
|
|
3
|
+
## 0.29.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 25bd1fb: A workflow's documents page now shows the faults its catalog card advertises.
|
|
8
|
+
Clicking a card flagged for stuck runs or overdue work used to land on a board
|
|
9
|
+
that showed neither, so a reader who came to fix something arrived with no way
|
|
10
|
+
to find it.
|
|
11
|
+
|
|
12
|
+
Each document card carries the same glyph-and-number pairs a catalog card wears,
|
|
13
|
+
in the same tones: open tasks, which recede to a dimmed zero when there are none,
|
|
14
|
+
and overdue tasks in caution, absent when nothing is late. A run that cannot
|
|
15
|
+
continue wears the critical alert glyph opposite its title, where a catalog card
|
|
16
|
+
wears its own. These replace the "3 pending tasks" chip, which said one fact in
|
|
17
|
+
words where the row now says three in the space the chip took; the affirmative it
|
|
18
|
+
used to show moves into the open-tasks hint, since a lane of finished runs
|
|
19
|
+
repeated it under a heading that already said the stage.
|
|
20
|
+
|
|
21
|
+
Stage headings carry the same two marks for the lane beneath them, so a fault on
|
|
22
|
+
a card below the fold is visible without scrolling to it. They count CARDS, the
|
|
23
|
+
unit the heading's own count already uses. That differs from a catalog card's
|
|
24
|
+
overdue tally, which counts documents: one document carrying two runs of the same
|
|
25
|
+
workflow is two cards on the board and one on the card. Both figures are right
|
|
26
|
+
for the question their surface answers, and each hint says which it means.
|
|
27
|
+
|
|
28
|
+
Overdue is measured on one shared rule for both surfaces, so a card and the board
|
|
29
|
+
under it can no longer disagree about which activities are open or which dates
|
|
30
|
+
have passed.
|
|
31
|
+
|
|
32
|
+
An activity's own due date now tones and explains itself the way a todo item's
|
|
33
|
+
already did: muted until it passes, caution once it has, and "Now overdue" on
|
|
34
|
+
hover. One rendering serves every due date a run shows, so an activity chip and a
|
|
35
|
+
todo row cannot disagree with the cards and lane headings above them about the
|
|
36
|
+
same date. It tones while editable too — a deadline is late whether or not this
|
|
37
|
+
reader can move it. Where a date
|
|
38
|
+
also carries a reason it cannot be changed, the hint leads with the lateness and
|
|
39
|
+
keeps the reason on a second line. Both surfaces render through one component
|
|
40
|
+
that owns the tone and the hint together, so neither can state a date the other
|
|
41
|
+
judges differently.
|
|
42
|
+
|
|
43
|
+
The catalog card no longer flags a rejected mapping row. That fault belongs to
|
|
44
|
+
the definition rather than to any of its runs, it stops a workflow being STARTED
|
|
45
|
+
on a document type while leaving every run already in flight untouched, and its
|
|
46
|
+
diagnostic is written for whoever maintains the host's mapping table rather than
|
|
47
|
+
for an editor — a different class, owed its own surface. Until that surface
|
|
48
|
+
exists the fault is reported on the workflow's Definition page and in the browser
|
|
49
|
+
console, and not on the landing grid.
|
|
50
|
+
|
|
51
|
+
**No upgrade action required.** No API, prop or stored shape changes, and the
|
|
52
|
+
mapping validation itself is unchanged — only where its verdict is shown.
|
|
53
|
+
|
|
54
|
+
**Docs impact:** Update the Workflows tool guide where it describes a workflow's
|
|
55
|
+
documents page, to cover the per-card signals and the stage-heading marks, and
|
|
56
|
+
note that a rejected mapping row surfaces on the Definition page rather than on
|
|
57
|
+
the catalog card.
|
|
58
|
+
|
|
59
|
+
- 25bd1fb: Each card in the Studio plugin's Workflows tab now carries what the definition
|
|
60
|
+
is doing, not just its name: how many of its documents have work in flight, when
|
|
61
|
+
one of them last changed stage, how many hold a task past its due date, and one
|
|
62
|
+
alert glyph when something is wrong. The card reports live state only — what a
|
|
63
|
+
workflow runs on and what it says about itself change on a deploy, and that
|
|
64
|
+
workflow's own Definition page already names both. The
|
|
65
|
+
grid bands into "Assigned to you" and "Other workflows", so whether the reader
|
|
66
|
+
has work in a workflow is carried by where its card sits; rows keep the
|
|
67
|
+
catalog's alphabetical order inside each band. A card wears one alert, and it
|
|
68
|
+
means a run of that workflow cannot continue without help. The engine's
|
|
69
|
+
`blocked` readiness hold earns none, because it is an expected transient state
|
|
70
|
+
and flagging it would mark most cards most of the time; a rejected
|
|
71
|
+
document-type binding earns none either, because it belongs to the definition
|
|
72
|
+
rather than to any of its runs and is reported on that workflow's Definition
|
|
73
|
+
page.
|
|
74
|
+
|
|
75
|
+
The age on a card is a STAGE ARRIVAL, not a last-modified stamp. Every engine
|
|
76
|
+
commit moves an instance's change stamp — an assignment, a date, a drained
|
|
77
|
+
effect — and a workflow can absorb a great deal of that without advancing, so
|
|
78
|
+
the arrival is the event a catalog can read as progress. The consequence is
|
|
79
|
+
deliberate: a busy workflow held inside one stage reads as old, which is the
|
|
80
|
+
pathology worth seeing. Hovering that age names the move — which document went
|
|
81
|
+
to which stage, and the exact time — resolving the document's title through the
|
|
82
|
+
preview store only once the tooltip opens.
|
|
83
|
+
|
|
84
|
+
Overdue is the only signal drawn in a tone — caution, where the alert glyph
|
|
85
|
+
takes critical — and the only one that disappears when it reads zero: it reports
|
|
86
|
+
that something is wrong rather than how things stand, so a card with nothing
|
|
87
|
+
late spends no room saying so. A
|
|
88
|
+
document counts as overdue while an unsettled task on it is past its due date;
|
|
89
|
+
a finished task's date, however old, is not a debt. Overdue is measured on one
|
|
90
|
+
shared rule with the todo rows, so a card's count and a row's face can no
|
|
91
|
+
longer disagree about a single date.
|
|
92
|
+
|
|
93
|
+
The grid counts DOCUMENTS where it used to count instances, because its reader
|
|
94
|
+
is an editor and the document is what they open. Several instances on one
|
|
95
|
+
document count once. An instance whose chain references no document counts as
|
|
96
|
+
one unit of its own, so a workflow that runs on no document does not read as
|
|
97
|
+
idle. The workflow's own page still reports instances, in those words.
|
|
98
|
+
|
|
99
|
+
Hovering that count also says how many of those documents have yet to leave the
|
|
100
|
+
stage their workflow starts from — on a line of its own, so the two facts can be
|
|
101
|
+
scanned rather than read through, and folded into the first line when the answer
|
|
102
|
+
is all of them, where a second line would repeat one number. A document counts
|
|
103
|
+
there while any of its runs still waits at the start, judged against that run's
|
|
104
|
+
own pinned snapshot, so a run begun under an earlier version answers to where
|
|
105
|
+
that version started. The count stays in the hint rather than taking a slot on
|
|
106
|
+
the rule: it is a part of a number the card already shows, meaningless without
|
|
107
|
+
that total beside it, and no glyph in the set says "waiting at the start".
|
|
108
|
+
|
|
109
|
+
The page no longer opens on a project-wide total. The band headings count the
|
|
110
|
+
workflows, so a total above them stated the same figure twice, and a total of
|
|
111
|
+
documents invited a comparison against the cards that can never add up — one
|
|
112
|
+
document running two workflows is one document in a project total and one on
|
|
113
|
+
each of their cards.
|
|
114
|
+
|
|
115
|
+
The engine gains `documentStuckCause`, which classifies an instance as stuck
|
|
116
|
+
from its persisted document and pinned snapshot alone — no evaluation, no
|
|
117
|
+
reads, no actor. It answers for the effect- and activity-level causes
|
|
118
|
+
`diagnoseInstance` reports (`failed-effect`, `failed-activity`,
|
|
119
|
+
`hung-effect`) and returns `undefined` for the transition-level ones, which
|
|
120
|
+
need GROQ results. It is sound but incomplete by construction: a cause it
|
|
121
|
+
reports is real, and the absence of one means only that no cause was provable,
|
|
122
|
+
never that the instance is healthy. Surfaces flagging on it must not word an
|
|
123
|
+
unflagged state as an all-clear. `findActivityNode` and `findStageNode`, the
|
|
124
|
+
tolerant definition tree lookups it uses, are exported alongside it.
|
|
125
|
+
|
|
126
|
+
The tool's instance read is held per engine for the session and replayed on the
|
|
127
|
+
next mount, which changes what the Workflows tab paints while it loads. A first
|
|
128
|
+
visit now waits for that read before the definitions grid appears, where it used
|
|
129
|
+
to lay out cards from the catalog and rearrange them once the instances landed —
|
|
130
|
+
the grid's bands and counts come from the instances, so the cards had no stable
|
|
131
|
+
shape until both reads were in. The grid waits on the reader's identity for the
|
|
132
|
+
same reason: which band a card sits in depends on who is looking, and a
|
|
133
|
+
project-scoped account resolves through the project member directory, so banding
|
|
134
|
+
before that answer arrived would have moved every card once it did. An account
|
|
135
|
+
the directory cannot place, or a directory that fails to load, is an answer
|
|
136
|
+
rather than a wait — the grid paints unbanded and every card reports no assigned
|
|
137
|
+
work. A later visit inside the same session paints the
|
|
138
|
+
held read at once and refreshes behind it.
|
|
139
|
+
|
|
140
|
+
The form strip's assigned-task count tells those two apart as well, so an account
|
|
141
|
+
the member directory cannot place no longer leaves a spinner turning in that slot
|
|
142
|
+
for the rest of the session. It shows no count, which is what it already did for
|
|
143
|
+
an account with nothing assigned. The hold is not local to the grid: the
|
|
144
|
+
task rows under "All documents" and "For me", and the active-instance count on a
|
|
145
|
+
workflow's Definition page, read the same stream, so they too open on held
|
|
146
|
+
numbers before the fresh read lands. A failed read is never held, and a provider remount mints a new engine and
|
|
147
|
+
so starts cold.
|
|
148
|
+
|
|
149
|
+
**No upgrade action required.** The card additions are automatic, and
|
|
150
|
+
`documentStuckCause` is a new export that changes no existing verdict —
|
|
151
|
+
`diagnoseInstance` classifies exactly as before, now sharing one
|
|
152
|
+
implementation of the document-derivable causes.
|
|
153
|
+
|
|
154
|
+
**Docs impact:** Update the Workflows tool guide where it describes the
|
|
155
|
+
definitions grid, to cover the new card signals, the assigned-work ordering, the
|
|
156
|
+
document-versus-instance split between the grid and a workflow's own page, and
|
|
157
|
+
that the tab opens on a held read after the first visit.
|
|
158
|
+
`docs/reference.md` already carries `documentStuckCause` beside
|
|
159
|
+
`diagnoseInstance` with its bound stated; the hosted engine reference needs the
|
|
160
|
+
same entry, so integrators do not read a missing cause as a health check.
|
|
161
|
+
|
|
162
|
+
- 25bd1fb: A run that cannot continue now says why, on the run itself. A card flagged it and
|
|
163
|
+
the run it opened showed nothing, so a reader who followed the flag to fix
|
|
164
|
+
something arrived at the one screen that should have explained it and found four
|
|
165
|
+
history rows to interpret.
|
|
166
|
+
|
|
167
|
+
The notice leads the detail body — above even the document, since it is what the
|
|
168
|
+
reader came for — and names the fault plus what would move it: which automated
|
|
169
|
+
step failed or never finished, or which task failed, or that every task here is
|
|
170
|
+
done and nothing routes onward. It is absent when nothing is wrong, so it never
|
|
171
|
+
becomes chrome to skip.
|
|
172
|
+
|
|
173
|
+
It is worded for an editor rather than for whoever runs the engine. The engine
|
|
174
|
+
names each remedy as a surface-neutral verb alongside a rationale written for an
|
|
175
|
+
operator; the plugin maps the verb to its own copy and does not render that
|
|
176
|
+
rationale. So an effect reads as "the automated step", matching the label its
|
|
177
|
+
activity row already wears, and aborting keeps the word the button in Manage
|
|
178
|
+
workflow uses.
|
|
179
|
+
|
|
180
|
+
One hold is drawn in caution rather than critical and offers no remedy: a route
|
|
181
|
+
out of the stage that cannot be evaluated yet clears itself once what it reads
|
|
182
|
+
becomes readable, and the engine deliberately suggests no verb for it, because
|
|
183
|
+
forcing the run onward would skip the gate doing its job. Telling a reader their
|
|
184
|
+
work is broken when they can only wait is the same error as flagging an expected
|
|
185
|
+
transient.
|
|
186
|
+
|
|
187
|
+
The detail asks a fuller question than the card that led to it. Cards classify
|
|
188
|
+
from the committed document alone, because a grid painting every workflow at once
|
|
189
|
+
cannot afford an evaluation per run; that read cannot answer the two causes needing
|
|
190
|
+
GROQ results. A detail has one run and a live session, so it uses the full
|
|
191
|
+
diagnosis and falls back to the card's classifier only when no evaluation exists.
|
|
192
|
+
A card flagging nothing never claimed the run was healthy — only that nothing was
|
|
193
|
+
provable from a document — so a detail may report a fault its card could not see.
|
|
194
|
+
|
|
195
|
+
A reader can now follow the fault down to the task that owns it. An effect is
|
|
196
|
+
declared by one activity's action, so a failed or hung effect belongs to that
|
|
197
|
+
task — resolved through the effect's name, which is unique per definition. Where
|
|
198
|
+
the pinned snapshot no longer declares the effect, no task is named rather than a
|
|
199
|
+
sibling guessed at. A task the fault belongs to carries a critical glyph beside
|
|
200
|
+
its title, suppressed where its own status already reads failed so one problem
|
|
201
|
+
never shows as two, and its dialog carries the notice. A task the fault is not
|
|
202
|
+
about stays quiet.
|
|
203
|
+
|
|
204
|
+
What can be pressed there depends on the fault. A hung effect offers the drain,
|
|
205
|
+
which is the one operation this plugin can run; every other cause carries advice
|
|
206
|
+
naming what would move the run, because the step that unsticks it is not callable
|
|
207
|
+
from a browser.
|
|
208
|
+
|
|
209
|
+
The two surfaces say different things rather than the same thing twice. The run
|
|
210
|
+
names the class of fault and offers the way in — a reader there has not decided to
|
|
211
|
+
fix anything, and the title of the step that failed is precise where they want
|
|
212
|
+
orientation. The task names the step and carries what can be pressed. Both lines
|
|
213
|
+
are titles: what is in the way, with no clause explaining that the workflow is
|
|
214
|
+
therefore stuck, which a red notice on the workflow does not need to say.
|
|
215
|
+
|
|
216
|
+
Pressing the button runs the effect handlers registered in this Studio — the same
|
|
217
|
+
operation the history feed's pending rows already offered, now reachable from the
|
|
218
|
+
fault that calls for it. It is the only remedy the plugin can run today; resetting
|
|
219
|
+
a task and forcing a stage remain advice, and aborting goes unsaid because the
|
|
220
|
+
engine offers it against nearly every cause and the run already carries its own
|
|
221
|
+
Abort control.
|
|
222
|
+
|
|
223
|
+
**No upgrade action required.** No API, prop or stored shape changes; the
|
|
224
|
+
diagnosis and remediation functions were already exported and are now consumed.
|
|
225
|
+
|
|
226
|
+
**Docs impact:** Update the Workflows tool guide where it covers a run's detail
|
|
227
|
+
view, to describe the fault notice and to state that a workflow's detail can
|
|
228
|
+
report a stuck cause its card could not prove.
|
|
229
|
+
|
|
230
|
+
- 3fd04f1: **BREAKING:** `ActionSemantic` was a closed union of action decision values; it now also includes signal values and the open `custom.${string}` form. TypeScript consumers that exhaustively map `ActionSemantic` must handle signal and custom values or narrow to the decision subset before upgrading, otherwise their build will fail. Workflow authors can attach advisory signals and validated custom semantics to workflow roots, stages, activities, and actions, and evaluation results expose them at each matching level.
|
|
231
|
+
|
|
232
|
+
Existing stored definitions and runtime behavior remain compatible. The Studio plugin continues to render decision faces when decision values are composed with signal or custom semantics, while non-decision values receive the default action face.
|
|
233
|
+
|
|
234
|
+
**Docs impact:** Update the definition and evaluation references plus the concepts guide to document level-wide advisory semantics, the signal vocabulary, custom grammar, and action-only decision values.
|
|
235
|
+
|
|
236
|
+
### Patch Changes
|
|
237
|
+
|
|
238
|
+
- 25bd1fb: The workflow documents board no longer mounts with every card blank while its
|
|
239
|
+
titles are still arriving. The board holds a loading row until each card's preview
|
|
240
|
+
title has landed, so it can mount once, sorted. Readiness now requires a board to
|
|
241
|
+
be a claim about: a workflow that has not resolved yet orders by no documents, and
|
|
242
|
+
an empty ordering no longer reads as ready.
|
|
243
|
+
|
|
244
|
+
The hold stays bounded, so a title that can never resolve — a permission-denied
|
|
245
|
+
document with an unopenable stored type — cannot keep a surface waiting forever.
|
|
246
|
+
Two bounds, because two different things go wrong: once a title has landed the wait
|
|
247
|
+
ends when answers stop, measured from the last one and re-armed by each new one, so
|
|
248
|
+
a batch still answering is waited for however long it takes; before the first answer
|
|
249
|
+
there is nothing to measure a stall against, so that case gets its own far longer
|
|
250
|
+
allowance.
|
|
251
|
+
|
|
252
|
+
**No upgrade action required.** No API, prop or stored shape changes; a surface
|
|
253
|
+
that was already mounting fully sorted behaves as before.
|
|
254
|
+
|
|
255
|
+
**Docs impact: None.** The loading behaviour of these lists is not described in
|
|
256
|
+
the docs, and no guide states the previous timing.
|
|
257
|
+
|
|
258
|
+
- 25bd1fb: Loading cues no longer flash on fast reads. A read that settles quickly now
|
|
259
|
+
paints nothing at all, while a slow one still announces itself. The wait covers
|
|
260
|
+
the whole cue rather than the spinner alone: where a spinner and its label share
|
|
261
|
+
a row, both are held and both arrive on the same frame, so a cue never assembles
|
|
262
|
+
itself a piece at a time. A spinner standing on its own beside a heading is held
|
|
263
|
+
the same way, because the tool's loading rows and headings share one reserved
|
|
264
|
+
slot. That slot already reserved its square whether or not the glyph rendered, which is what
|
|
265
|
+
makes the wait free — nothing moves when the cue arrives late, and no caller
|
|
266
|
+
needs a delay of its own. Two surfaces that delayed their own busy flag to dodge
|
|
267
|
+
this flash no longer do, since they would otherwise wait twice; one figure
|
|
268
|
+
governs every cue that rides the slot. The document view's discovery spinner
|
|
269
|
+
keeps a longer wait of its own.
|
|
270
|
+
|
|
271
|
+
The Workflows tool's first line also sits at one height across its states. A
|
|
272
|
+
tab's loading note, a workflow page's picker and the definitions grid's band
|
|
273
|
+
headings each sat at a different offset, which showed as the line jumping when a
|
|
274
|
+
read landed. The status row takes the panel step plus the heading inset that
|
|
275
|
+
every other first line gets from the box it sits in, and the picker's inset moved
|
|
276
|
+
off the button onto the row around it, because a button clamps its own vertical
|
|
277
|
+
padding below that step. The picker keeps its full-height hit area by reclaiming
|
|
278
|
+
that inset. Its row moves down by the correction, so the page's own strip and the
|
|
279
|
+
board below it follow.
|
|
280
|
+
|
|
281
|
+
**No upgrade action required.** Both are internal to the plugin's own chrome and
|
|
282
|
+
change no API, prop or stored shape.
|
|
283
|
+
|
|
284
|
+
**Docs impact: None.** Neither the spinner timing nor the tool's internal
|
|
285
|
+
line-up is described in the docs; no guide, reference or example states the old
|
|
286
|
+
behaviour.
|
|
287
|
+
|
|
288
|
+
- Updated dependencies [f44fc33]
|
|
289
|
+
- Updated dependencies [26f25e0]
|
|
290
|
+
- Updated dependencies [25bd1fb]
|
|
291
|
+
- Updated dependencies [3fd04f1]
|
|
292
|
+
- @sanity/workflow-engine@0.29.0
|
|
293
|
+
- @sanity/workflow-components@0.29.0
|
|
294
|
+
- @sanity/workflow-diagram@0.29.0
|
|
295
|
+
- @sanity/workflow-react@0.29.0
|
|
296
|
+
- @sanity/workflow-studio@0.29.0
|
|
297
|
+
|
|
3
298
|
## 0.28.0
|
|
4
299
|
|
|
5
300
|
### Minor Changes
|