Adarsh-Me opened a new pull request, #18670: URL: https://github.com/apache/dolphinscheduler/pull/18670
## Was this PR generated or assisted by AI? YES. An AI assistant drafted this two-line change and this description under my direction; I reviewed the diff and ran the repo's own frontend checks locally before pushing. ## Purpose of the pull request Fixes #18448 `startDisplay` and `menuDisplay` in `dolphinscheduler-ui/src/views/projects/workflow/components/dag/index.tsx` guarded `props.definition` but then read `props.definition!.workflowDefinition.releaseState`. `!` is a TypeScript-only assertion with no runtime effect, so when `workflowDefinition` is `undefined` the right-click node menu throws `TypeError: Cannot read properties of undefined (reading 'releaseState')` and the DAG stops rendering. ## Brief change log - `dag/index.tsx`: both computeds now read the release state through `props.definition.workflowDefinition?.releaseState`, so the start button and the "other" menu items are hidden in that transient state instead of throwing. This is the pattern the same module already uses — `dag-toolbar.tsx` guards with `props.definition?.workflowDefinition?.releaseState` (lines 276 and 512). Behaviour is unchanged whenever `workflowDefinition` is present. ## Verify this pull request Ran the two steps of the `Frontend` workflow from `dolphinscheduler-ui`: - `pnpm install` (pnpm 7, as CI does) and `pnpm run lint` — exit 0, no problems reported, and the formatter left my two lines as written. - `pnpm run build:prod` (`vue-tsc --noEmit && vite build --mode production`) — exit 0: the type check reported no errors and the production bundle completed. Two honesty notes: this host runs Node 24 while that workflow pins Node 16, and `dolphinscheduler-ui` has no test runner (`package.json` defines no test script and no test dependency: `dev, build:prod, preview, lint, prettier`), so I could not add the unit test for these computeds that I mentioned when claiming the issue. Introducing vitest plus its config and CI wiring does not belong in a bugfix; I am happy to do it in a follow-up PR if you want it. Related: #18449 and #18542 are both still open with no review; SbloodyS assigned this issue to me on 2026-10-02, so here is the implementation. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
