Skip to content

Let the host hide a subworkflow's Compute tab - #13

Open
timurbazhirov wants to merge 2 commits into
mainfrom
feature/SOF-8023-single-compute-tab
Open

Let the host hide a subworkflow's Compute tab#13
timurbazhirov wants to merge 2 commits into
mainfrom
feature/SOF-8023-single-compute-tab

Conversation

@timurbazhirov

@timurbazhirov timurbazhirov commented Aug 16, 2026

Copy link
Copy Markdown
Member

Summary

The job designer renders its own Compute tab, so a job screen currently offers two things called "Compute" — the job's, and one inside every subworkflow — leaving the reader to guess which one the job will actually run with.

New hideComputeSubTab prop on Workflow, threaded to Subworkflow via WorkflowDefaultLayout. Default false, so nothing changes for hosts that don't set it. Phase 1.2 of SOF-8023 (plan); the job designer will pass it in the matching PR there.

Two details worth a look:

  • Compute is the last entry in TAB_NAVIGATION_CONFIG, which is what lets it be dropped without renumbering the panels the remaining tabs are keyed to. COMPUTE_TAB_INDEX is derived rather than hardcoded so this stays true if the config is reordered.
  • A subworkflow whose Compute tab was open when the host hides it falls back to Overview, instead of leaving an empty panel behind. The panel isn't rendered at all when hidden, so the compute form doesn't mount either.

Verification

tsc clean, eslint 0 errors, prettier clean.

Note on npm test: 6 tests fail on this branch — and identically on a clean main checkout, so they're pre-existing and unrelated. tests/subworkflowDesignerUpdate.tests.ts imports through the self-referential path @mat3ra/workflow-designer/src/utils/subworkflowDesignerUpdate, which resolves to the installed published copy rather than the working tree, and the exports it wants aren't there (isWodeSubworkflowInstance is not a function). Worth a separate fix — a relative import would do it — but I've left it alone rather than widen this PR.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DK8KomMescJvMQNSEfeRR8


Generated by Claude Code

The job designer renders its own Compute tab, so a job screen offered two
things called 'Compute' - the job's, and one per subworkflow - leaving the
reader to guess which one the job would actually run with.

New hideComputeSubTab prop on Workflow, threaded to Subworkflow through
WorkflowDefaultLayout. Default false, so nothing changes for hosts that do
not set it. Compute is the last tab, which is what lets it be dropped
without renumbering the panels; an active index pointing at it falls back
to Overview rather than leaving an empty panel behind.

SOF-8023 phase 1.2.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DK8KomMescJvMQNSEfeRR8
dist/ is tracked in this repo and the published package ships it. The husky
pre-commit hook regenerates and stages it automatically (npm run transpile
&& git add dist/), but only once hooks are installed - there is no
'prepare: husky install' script here, so a fresh clone commits without it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DK8KomMescJvMQNSEfeRR8
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