Repository navigation
Fixes #38363: open a form modal for inbox workflow transitions with required fields - #38400
Merged
harsh-vador merged 15 commits intoNov 24, 2026
Conversation
- Required-field guard treats false/0 as valid answers, not missing (only absent/null/empty-string block confirm), so a required boolean set to false or a required number set to 0 can be submitted. - Distinguish a failed schema lookup from a confirmed-missing schema: getResolvedTaskFormSchema gains an opt-in allowFallback flag; the inbox passes it for workflow-driven tasks so a fetch failure blocks the transition (with a retry) instead of falling back to the built-in default and letting a required-form transition fire with no payload. - Keep the form schema helpers and TaskPayloadSchemaFields real in the modal tests (mock only the modal shell and the heavy editor widgets); drop comments that restate the test calls. Addresses greptile review threads on #38400.
… bulk resolve - Key the no-fallback lookup apart so other callers never get its undefined - Resolve the schema on click instead of hiding the inbox actions until it loads - Leave a bulk-resolved task whose transition form requires fields for the inbox - Type the modal test's task fixture so tsc passes
The PR's diff added a symlink at src/generated/antlr pointing to a developer's local machine path (/Users/deuex/...). This path does not exist on CI, and generated/antlr is not a generated output directory on main (the antlr parser sources live in src/antlr/). The stray symlink makes the generate-types CI fail because regenerating sources produces a diff against it. Remove it.
4 tasks done
ShaileshParmar11
approved these changes
Nov 24, 2026
harsh-vador
enabled auto-merge (squash)
November 24, 2026 05:46
Contributor
UI browser testsRan: all test files (no impact map from main yet) Result: ✅ 1070 passed · 154 skipped Changed files no browser test loads
|
harsh-vador
disabled auto-merge
November 24, 2026 06:32
harsh-vador
enabled auto-merge (squash)
November 24, 2026 06:32
chirag-madlani
approved these changes
Nov 24, 2026
harsh-vador
deleted the
detail/bug-fix/fixes-38363-open-a-form-modal-for-inbox-workflow-t-a15b7e
branch
November 24, 2026 06:33
harsh-vador
added a commit
that referenced
this pull request
Nov 24, 2026
…with required fields (backport 2.1 #38400) (#38445) * fix(ui): open a form modal for inbox workflow transitions with required fields (cherry picked from commit 44c61ab) * fix(ui): address review on inbox transition form modal - Required-field guard treats false/0 as valid answers, not missing (only absent/null/empty-string block confirm), so a required boolean set to false or a required number set to 0 can be submitted. - Distinguish a failed schema lookup from a confirmed-missing schema: getResolvedTaskFormSchema gains an opt-in allowFallback flag; the inbox passes it for workflow-driven tasks so a fetch failure blocks the transition (with a retry) instead of falling back to the built-in default and letting a required-form transition fire with no payload. - Keep the form schema helpers and TaskPayloadSchemaFields real in the modal tests (mock only the modal shell and the heavy editor widgets); drop comments that restate the test calls. Addresses greptile review threads on #38400. (cherry picked from commit bb1c991) * fix(ui): keep strict schema lookups out of the shared cache and guard bulk resolve - Key the no-fallback lookup apart so other callers never get its undefined - Resolve the schema on click instead of hiding the inbox actions until it loads - Leave a bulk-resolved task whose transition form requires fields for the inbox - Type the modal test's task fixture so tsc passes (cherry picked from commit 70b6b62) * fix(ui): lock task actions while the transition form schema loads (cherry picked from commit a6d6214) * fix(ui): style the transition form required hint with the error token (cherry picked from commit 0e02467) * fix(ui): collect a transition's required form fields before its comment (cherry picked from commit 1b58e30) * test(ui): stub the provider's getContributions in the TaskDetailPanel cache test * test(ui): stub the transition form helpers in the TaskDetailPanel cache test * fix(ui): require the comment in the transition form when the transition requires one (cherry picked from commit d9b3748) * test(playwright): resolve a custom task's required transition form from the Inbox (cherry picked from commit 5252389) * chore(playwright): regenerate the impact map * chore(ui): document the two intentional lint exceptions in the transition form * refactor(ui): lazy-load the task form renderer instead of suppressing lint * fix(ui): show a loader instead of the form controls while the transition form loads --------- Co-authored-by: detail-app[bot] <180357370+detail-app[bot]@users.noreply.github.com>
This was referenced Dec 1, 2026
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.
Detail bug report: View on Detail
Describe your changes:
Closes #38363
I worked on the inbox (Personal space › Tasks) task-resolution flow because a workflow transition whose
transitionFormsschema declared required non-comment fields was being fired immediately with no modal, sending a resolve body with onlytransitionId+resolutionTypeand nopayload/newValue. The task then showed Resolved with none of the required form data collected or applied to the entity — silent data loss. The entity page's task tab (TaskTabNew) already handled this correctly viashouldOpenWorkflowTransitionModal; the inbox'shandleTransitionguard only consultedrequiresCommentand never inspected the transition's form schema.Root cause:
TaskDetailPanelonly fetched aTaskFormSchemafor legacy (non-workflow) tasks, so the inbox never sawtransitionForms; thegetTaskActionInput/needsTaskActionInputguard had no form-field check; andbuildResolveBody's transition branch never derivednewValuefrom a form payload. On the server,TaskFieldValidator.validateResolutionPayloadAgainstFormSchemaearly-returned onresolvedPayload == null && newValue == null, so the empty submission bypassed schema validation entirely.Type of change:
High-level design:
N/A — small change. The fix mirrors
TaskTabNew's existing transition-modal path:TaskFormSchemaUtils.hasRequiredTaskFormFields— new helper that checks a form schema'srequiredarray. The inbox's guard uses this (rather than the broaderhasTaskFormFields) so transitions whose form only carries optional fields (e.g. the seeded DARapprovewith an optional comment) keep firing straight through.taskResolve.utils.ts—getTaskActionInput/needsTaskActionInputgained an optionalschema?param and arequiresFormflag (true when the transition'stransitionFormsschema has required fields).buildResolveBody's transition branch now derivesnewValuefrom the collectedpayload+ the transition's uiSchema (mirroringTaskTabNew.runWorkflowTransition); a payload-mode transition (ui:resolution.mode: 'payload') yields nonewValue.TaskDetailPanel— resolvesTaskFormSchemafor every typed task (was: legacy only), so the guard can seetransitionForms; gates resolve actions onformSchemaLoaded(a fast click before the schema loads cannot fire a form-bearing transition with no data); routesrequiresForm && !requiresCommenttransitions to a newTaskTransitionFormModal;requiresCommentkeeps precedence (comment / incident-root-cause modal unchanged).TaskTransitionFormModal(new) — reusesTaskPayloadSchemaFields(the same form the entity-page tab uses), seeds it from the task payload + schema defaults, blocks confirm while arequiredfield is missing, and returns the payload torunTransition.The server-side
TaskFieldValidatorearly-return was intentionally not changed: removing it would reject the existing DARrejectflow (the inbox sendscommenttop-level, but the seededtransitionForms.rejectrequirescommentin the payload) and would not even catch the reported scenario (the task's create payload already satisfies the approve form'srequired). The frontend fix is the complete fix; server hardening is a defense-in-depth follow-up.Tests:
Use cases covered
requiresComment: falsewhose form declares required fields opens the form modal and does not fire until the user confirms.transitionId,resolutionType,payload, and a derivednewValue(field-mode) or nonewValue(payload-mode).requiresCommenttransitions (DAR reject, incident resolve) keep the comment / root-cause modal — unchanged.required) keep firing in one click — unchanged.requiresFormasfalseand behaves as before.Unit tests
openmetadata-ui/.../InboxPage/taskResolve.utils.test.ts—requiresFormcases (incident, custom-approve, no-required, no-schema);buildResolveBodytransition-branchnewValuederivation (field-mode, payload-mode, no-schema).openmetadata-ui/.../InboxPage/components/TaskTransitionFormModal.test.tsx(new) — seeding, required-field guard, confirm-on-fill, loading-suppress, cancel, overlay-dismiss, closed-render.openmetadata-ui/.../InboxPage/components/TaskDetailPanel.test.tsx— form-modal routing (opens-not-fires, sends-payload-on-confirm, cancel, fires-immediately-when-no-required), schema-fetch-for-workflow, typeless-task skip.openmetadata-ui/.../utils/TaskFormSchemaUtils.test.ts—hasRequiredTaskFormFields(required/non-required/empty/undefined, DAR-rejectcommentrequired).Backend integration tests
Ingestion integration tests
Playwright (UI) tests
TaskCustomFormWorkflow.spec.tsexercises the entity-page path (TaskTabNew), which already had the form modal and is unchanged by this fix. An inbox-path E2E for the new modal is a worthwhile follow-up but requires a running server with the workflow engine, which is not available in this session.Manual testing performed
openmetadata-serveron:8585(the API proxy returns 502), and building the server distribution (mvn package -pl openmetadata-dist -am -DskipTests) exceeded the session time budget. The new component-level Jest tests assert the same behavior the smoke would check (modal opens-not-fires, payload+newValueon confirm, cancel, no-required fires immediately) against the realgetTaskActionInput/buildResolveBody/TaskTransitionFormModal/TaskDetailPanelcode without a server.UI screen recording:
Not applicable — bug fix with no new user-facing feature surface beyond mirroring the existing entity-page transition modal; the Vite dev server is up but the backend (
:8585) is not available in this session, so a Docker-stack recording could not be captured.Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.REVIEW.md(thepr-checklistskill runs it) and fixed every 🔴 finding, or answered it on the line below.TaskTabNewtransition-modal pattern; the one judgment call (not changingTaskFieldValidator's early-return) is explained above and is a deferral, not a new contract.Automatic Fixes PRs can be configured here.


Confidence Score: 5/5
The PR appears safe to merge; no new blocking issues were found.Summary
The PR makes Inbox workflow actions collect required form answers before resolving a task.
Reviews (10) · Last reviewed commit: "chore(playwright): regenerate the impact..." · Reviewed by Greptile