refactor(SOF-8040): thread extra unit tabs and gate them on unit status - #18
Merged
Merged
Conversation
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.
❌ Deploy Preview for mat3ra-workflow-designer failed. Why did it fail? →
|
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>
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>
timurbazhirov
approved these changes
Sep 10, 2026
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>
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.
Part of SOF-8040. Reworked after review on mat3ra/ave#11: "Should be convergenceTabs or some other generic param, not specific to any application."
jupyterUrlsByUnitFlowchartId→extraTabsByUnitFlowchartId, threaded unchanged throughWorkflow→WorkflowDefaultLayout→Subworkflow→Map→UnitModal→UnitModalContent.WorkflowDesignerJupyterUrls*→WorkflowDesignerExtraTab*, derived from cove'sTabItemRequired<Pick<TabItem, "id" | "itemName" | "href">>— the same shape ave renders, so the two cannot drift.UnitModalContentdoes the one lookup and gates itExecutionUnitViewer, 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:
statusis per unit, not per repetition. It is last-write-wins across branches (web-app's AMQP endpoint), while per-branch history lives instatusTrack. 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.tscclean. 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.