Let the host hide a subworkflow's Compute tab - #13
Open
timurbazhirov wants to merge 2 commits into
Open
Conversation
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
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.
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
hideComputeSubTabprop onWorkflow, threaded toSubworkflowviaWorkflowDefaultLayout. Defaultfalse, 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:
TAB_NAVIGATION_CONFIG, which is what lets it be dropped without renumbering the panels the remaining tabs are keyed to.COMPUTE_TAB_INDEXis derived rather than hardcoded so this stays true if the config is reordered.Verification
tscclean, eslint 0 errors, prettier clean.Note on
npm test: 6 tests fail on this branch — and identically on a cleanmaincheckout, so they're pre-existing and unrelated.tests/subworkflowDesignerUpdate.tests.tsimports 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