Skip to content

refactor(SOF-8040): thread extra unit tabs and gate them on unit status - #18

Merged
VsevolodX merged 16 commits into
mainfrom
feature/SOF-8040
Sep 11, 2026
Merged

VsevolodX merged 16 commits into
mainfrom
feature/SOF-8040

Conversation

@VsevolodX

@VsevolodX VsevolodX commented Sep 2, 2026

Copy link
Copy Markdown
Member

Part of SOF-8040. Reworked after review on mat3ra/ave#11: "Should be convergenceTabs or some other generic param, not specific to any application."

jupyterUrlsByUnitFlowchartIdextraTabsByUnitFlowchartId, threaded unchanged through WorkflowWorkflowDefaultLayoutSubworkflowMapUnitModalUnitModalContent.

change why
WorkflowDesignerJupyterUrls*WorkflowDesignerExtraTab*, derived from cove's TabItem Required<Pick<TabItem, "id" | "itemName" | "href">> — the same shape ave renders, so the two cannot drift.
UnitModalContent does the one lookup and gates it This is the only place in the whole stack that renders ExecutionUnitViewer, so it is the single gate.

The gate that moved here

ave used to ask isJupyterExecutionUnit(unit) && unit.status === UnitStatus.active. The application half is gone — a unit publishes tabs or it does not — leaving only the status check, which is generic.

Worth knowing, and commented in place: status is per unit, not per repetition. It is last-write-wins across branches (web-app's AMQP endpoint), while per-branch history lives in statusTrack. A mapped unit with branch 1 still running can therefore pass this gate while the branch being viewed has finished, handing the user a dead link. This is not a regression — ave's own gate was equally repetition-blind — so it is recorded rather than fixed here; the per-repetition status helper belongs in wode.

tsc clean. The 6 local test failures are pre-existing and unrelated: they import through @mat3ra/workflow-designer/src/..., a self-referencing path that does not resolve, and fail identically without this diff.

Job designer computes the map with @mat3ra/jode's getJupyterEndpointUrls;
UnitModalContent looks up the unit's entry and hands ave two finished URLs
(mat3ra/ave#11 moved the URL resolution out of the viewer). Same route
jobProperties already takes.
@netlify

netlify Bot commented Sep 2, 2026

Copy link
Copy Markdown

Deploy Preview for mat3ra-workflow-designer failed. Why did it fail? →

Name Link
🔨 Latest commit 132ffcf
🔍 Latest deploy log https://app.netlify.com/projects/mat3ra-workflow-designer/deploys/6aa38361696e100008ef469f

VsevolodX and others added 7 commits September 2, 2026 18:50
Review: a unit inside a map subworkflow publishes one endpoint per branch, so
the flowchart id alone selected branch 0's token for every branch.
Follows ave's prop after review: one object cannot arrive half-set.
Review: MapWorkflowDesigner is the only path that sets a non-zero repetition,
and it forwarded neither the new map nor jobProperties to the nested workflow —
so inside a map every branch's unit modal saw undefined, and the repetition
axis was unreachable. jobProperties had the same gap already.
Carries tabs rather than Jupyter URLs, and does the one lookup in
UnitModalContent. The gate that used to live in ave — "is this a Jupyter unit
and is it active" — becomes just the unit's status: a finished unit keeps its
endpoint property, and offering that dead link is what the viewer did before.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@VsevolodX VsevolodX changed the title feat(SOF-8040): thread jupyterUrlsByUnitFlowchartId to the unit modal refactor(SOF-8040): thread extra unit tabs and gate them on unit status Sep 8, 2026
VsevolodX and others added 4 commits September 9, 2026 11:39
Follows jode and ave. The type is stated in job-domain terms and no longer
derived from cove's TabItem, since nothing here renders it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…code

Kept only what is not evident from the code: the /jupyter path contract with
rupy and the proxy, the per-unit vs per-repetition status caveat, the typed
seam on jobProperties, and the tab-id collision rule. Dropped per-property
docblocks and the review rationale.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
VsevolodX and others added 4 commits September 10, 2026 18:37
A unit outside a map subworkflow has no repetition on the stored job document,
while rupy publishes its endpoint under repetition 0 — so the lookup missed and
no endpoint tab rendered for the ordinary, non-mapped case.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The type import added here left six files warning on simple-import-sort.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@VsevolodX
VsevolodX merged commit 18b0aee into main Sep 11, 2026
4 of 8 checks passed
@VsevolodX
VsevolodX deleted the feature/SOF-8040 branch September 11, 2026 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants