Repository navigation
Fixes #38033: Suggestion tasks render the correct form (tag vs description) - #38061
Merged
harsh-vador merged 2 commits intoNov 18, 2026
Conversation
…drop stale responses - tagSelector reads a string-typed field (TagSuggestion's suggestedValue) as JSON tags and writes edits back as a JSON string, so the tag form no longer crashes on the string payload. - A failed fetch of the stamped schema id falls through to the name/type lookup instead of the built-in default. - TaskTabNew ignores a schema response that lands after the task changed. - Add TaskSuggestionForm.spec.ts covering both suggestion variants.
harsh-vador
approved these changes
Nov 18, 2026
harsh-vador
enabled auto-merge (squash)
November 18, 2026 07:23
harsh-vador
disabled auto-merge
November 18, 2026 08:37
harsh-vador
enabled auto-merge (squash)
November 18, 2026 08:37
ShaileshParmar11
approved these changes
Nov 18, 2026
harsh-vador
deleted the
detail/bug-fix/fixes-38033-suggestion-tasks-render-the-correct-fo-83833a
branch
November 18, 2026 08:59
11 tasks done
Rohit0301
added a commit
that referenced
this pull request
Nov 18, 2026
- TagSuggestionTask.spec creates the suggestion task in beforeAll and hard-deletes it in afterAll, and asserts the exact tag text - isTagsTaskType compares against SuggestionType.Tag - Rename the decision record to match the resolution order it describes, noting it documents #38061 after the fact
Rohit0301
added a commit
that referenced
this pull request
Nov 18, 2026
* fix(ui): show tag suggestion tasks as tags, not a description A Suggestion task with suggestionType Tag carries its tag labels as a JSON string in suggestedValue. The task views only treated TagUpdate as a tag task, and the form schema lookup by type and category always returned DescriptionSuggestion, so reviewers saw "Suggested Description: [json]". - isTagsTaskType takes the task and covers Tag suggestions; payload normalization, the feed card, the task tab and TagsTaskFromTask use it - suggestion tasks resolve their form schema by name (TagSuggestion / DescriptionSuggestion) instead of the first type+category match - the tag selector edits the parsed tags and resolution sends them back as the JSON string the server applies - the Inbox detail shows a tag suggestion as a tags change Refs open-metadata/openmetadata-collate#8554 * fix(ui): keep tag suggestion payloads valid and additive Address review on #38073: - The tagSelector widget keeps a string-typed field (TagSuggestion's suggestedValue) a JSON string, so the panel and Inbox approvals send a payload that validates against the schema (it was rejected with "array found, string expected") - A Tag suggestion's tags are added to the field's current tags, matching how the server applies it, instead of current tags hiding the suggestion - Tag diffs compare labels by tagFQN, so an unchanged tag no longer shows as removed and re-added - Record the <suggestionType>Suggestion form schema naming as a decision * chore(playwright): add TagSuggestionTask spec to the impact map * fix(ui): list only added tags in the Inbox and drop the schema-name wait - The Inbox tags change for a Tag suggestion lists only the tags approval adds; tags the field already has no longer show as additions - TagSuggestionTask.spec no longer waits on /taskFormSchemas/name/TagSuggestion: the server stamps taskFormSchemaId on new suggestions, so the panel fetches the schema by id and the name request never happens * chore(ui): address review on tag suggestion task test and record - TagSuggestionTask.spec creates the suggestion task in beforeAll and hard-deletes it in afterAll, and asserts the exact tag text - isTagsTaskType compares against SuggestionType.Tag - Rename the decision record to match the resolution order it describes, noting it documents #38061 after the fact * test(ui): clean up the table even when the tag suggestion task was not created afterAll skips the task delete when beforeAll failed before creating it, so the table is still deleted, and both hooks release their API session in a finally.
Rohit0301
added a commit
that referenced
this pull request
Nov 18, 2026
…37398, #38061, #38073) (#38114) * fix(ui): read tag suggestions from suggestedValue (#37398) Suggestion tasks carry proposed tags as a JSON string in suggestedValue; the UI only read tagsToAdd, so tag suggestion cards showed no tags and accepting one cleared the displayed tags until a refetch. (cherry picked from commit 3ad9990) * Fixes #38033: Suggestion tasks render the correct form (tag vs description) (#38061) * Fixes #38033: Suggestion tasks render the correct form (tag vs description) * Parse JSON tag suggestions in tagSelector; keep schema fallbacks and drop stale responses - tagSelector reads a string-typed field (TagSuggestion's suggestedValue) as JSON tags and writes edits back as a JSON string, so the tag form no longer crashes on the string payload. - A failed fetch of the stamped schema id falls through to the name/type lookup instead of the built-in default. - TaskTabNew ignores a schema response that lands after the task changed. - Add TaskSuggestionForm.spec.ts covering both suggestion variants. --------- Co-authored-by: detail-app[bot] <180357370+detail-app[bot]@users.noreply.github.com> Co-authored-by: Harsh Vador <[email protected]> (cherry picked from commit 94f6191) * fix(ui): show tag suggestion tasks as tags, not a description (#38073) * fix(ui): show tag suggestion tasks as tags, not a description A Suggestion task with suggestionType Tag carries its tag labels as a JSON string in suggestedValue. The task views only treated TagUpdate as a tag task, and the form schema lookup by type and category always returned DescriptionSuggestion, so reviewers saw "Suggested Description: [json]". - isTagsTaskType takes the task and covers Tag suggestions; payload normalization, the feed card, the task tab and TagsTaskFromTask use it - suggestion tasks resolve their form schema by name (TagSuggestion / DescriptionSuggestion) instead of the first type+category match - the tag selector edits the parsed tags and resolution sends them back as the JSON string the server applies - the Inbox detail shows a tag suggestion as a tags change Refs open-metadata/openmetadata-collate#8554 * fix(ui): keep tag suggestion payloads valid and additive Address review on #38073: - The tagSelector widget keeps a string-typed field (TagSuggestion's suggestedValue) a JSON string, so the panel and Inbox approvals send a payload that validates against the schema (it was rejected with "array found, string expected") - A Tag suggestion's tags are added to the field's current tags, matching how the server applies it, instead of current tags hiding the suggestion - Tag diffs compare labels by tagFQN, so an unchanged tag no longer shows as removed and re-added - Record the <suggestionType>Suggestion form schema naming as a decision * chore(playwright): add TagSuggestionTask spec to the impact map * fix(ui): list only added tags in the Inbox and drop the schema-name wait - The Inbox tags change for a Tag suggestion lists only the tags approval adds; tags the field already has no longer show as additions - TagSuggestionTask.spec no longer waits on /taskFormSchemas/name/TagSuggestion: the server stamps taskFormSchemaId on new suggestions, so the panel fetches the schema by id and the name request never happens * chore(ui): address review on tag suggestion task test and record - TagSuggestionTask.spec creates the suggestion task in beforeAll and hard-deletes it in afterAll, and asserts the exact tag text - isTagsTaskType compares against SuggestionType.Tag - Rename the decision record to match the resolution order it describes, noting it documents #38061 after the fact * test(ui): clean up the table even when the tag suggestion task was not created afterAll skips the task delete when beforeAll failed before creating it, so the table is still deleted, and both hooks release their API session in a finally. (cherry picked from commit f853a82) * fix(ui): adapt the backported task specs and schema cache to 2.0 - TagSuggestionTask.spec uses 2.0's getTaskCard (utils/taskWorkflow, takes the CreatedTask) and waitForTaskResolveResponse; both specs import expect from @playwright/test, since 2.0's fixtures/pages exports only test - Bound the task form schema cache (100 entries, oldest evicted), as on main --------- Co-authored-by: Anujkumar Yadav <[email protected]> Co-authored-by: detail-app[bot] <180357370+detail-app[bot]@users.noreply.github.com> Co-authored-by: Harsh Vador <[email protected]>
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:
Fixes #38033
I worked on disambiguating
TaskFormSchemaresolution for Suggestion tasks (the new task UI) because every tag-suggestion task was rendering theDescriptionSuggestionform — a mislabeled textarea labeled "Suggested Description" — instead of theTagSuggestionform'stagSelectorwidget / "Suggested Tags (JSON)" label. As a result, tag suggestions silently failed to apply at resolve when a user edited the free-text area: the resolve body carried a non-JSON string the backend'sJsonUtils.readValuethen threw on (logged and ignored), marking the task Resolved with no entity change.Root cause:
resolveTaskFormSchemaqueried/v1/taskFormSchemasfiltered only bytaskType/taskCategorywithlimit: 1and took the first row, even though the two seeded Suggestion schemas (DescriptionSuggestion,TagSuggestion) share that one binding. The list endpoint orders by name, so the first row was deterministicallyDescriptionSuggestion. The cache ingetResolvedTaskFormSchemawas keyed only on${taskType}::${taskCategory}, so description- and tag-suggestion tasks shared one (wrong) schema for the whole session. The UI ignored bothtask.taskFormSchemaId(already stamped by the backend's payload-aware resolver at task creation) andpayload.suggestionType(the very discriminator the backend uses inTaskFormSchemaRepository#mapSuggestionTypeToSchema).Type of change:
High-level design:
The fix wires the two existing backend discriminators into the frontend resolver:
rest/taskFormSchemasAPI.ts— addedgetTaskFormSchemaById(GET/v1/taskFormSchemas/{id}) andgetTaskFormSchemaByFqn(GET/v1/taskFormSchemas/name/{fqn}), both of which the backend already exposes; addedgetSuggestionSchemaName(case-insensitivedescription/tag→DescriptionSuggestion/TagSuggestion, mirroring the backend'smapSuggestionTypeToSchema); extendedresolveTaskFormSchemato take an optionalpayload, and for Suggestion tasks disambiguate via the FQN endpoint, falling through to the originallimit: 1list query for non-Suggestion paths.utils/TaskFormSchemaUtils.ts—getResolvedTaskFormSchemanow takes an optionalTaskFormSchemaResolution({ taskFormSchemaId, payload }). It prefers fetch-by-id whentask.taskFormSchemaIdis present (the most precise path the backend already disambiguated), then falls back to the payload-awareresolveTaskFormSchema, then the built-in defaults. The cache key now includes both discriminators:${taskType}::${taskCategory}::${taskFormSchemaId}::${suggestionType}, so description- and tag-suggestion tasks can never share a cache entry. A__resetTaskFormSchemaCachehelper is exported for tests.TaskTabNew.component.tsx(activity-feed task tab) andTaskDetailPanel.tsx(Inbox legacy-task detail) pass{ taskFormSchemaId: task.taskFormSchemaId, payload: task.payload }and add those fields to their resolveruseEffectdependency array.The two-argument form of
getResolvedTaskFormSchema(type, category)remains valid (third arg optional), so callers without a task in scope (RequestTagPage,RequestDescriptionPage,UpdateTagPage,UpdateDescriptionPage,TaskFormSettingsPage) keep working unchanged — only the Suggestion rendering path is affected.Alternatives considered: keeping the
limit: 1list query but raising the limit and picking by payload server-side (would not require adding fetch-by-id). Rejected because the backend already stampstask.taskFormSchemaIdfor the same disambiguation — using that is exact for all task types (not only Suggestion) and avoids the ambiguous query path entirely.Tests:
Use cases covered
type: Suggestion,payload.suggestionType: Tag) rendersTagSuggestion(thetagSelectorwidget / "Suggested Tags (JSON)"), notDescriptionSuggestion's textarea.DescriptionSuggestion's textarea.taskFormSchemaIdresolves through fetch-by-id, bypassing the ambiguous list query.limit: 1list query — no behaviour change for the legacy/Requestspages andTaskFormSettingsPage.Unit tests
TaskFormSchemaUtils.test.tscoveringgetSuggestionSchemaName, the payload-awareresolveTaskFormSchema, the cache-key discriminator, deep-clone behavior, fetch-by-id preference, the fallback chain, and backward-compat for the two-arg call shape.TaskTabNew.component.test.tsxandTaskDetailPanel.test.tsxto the new 3-arg call shape (these tests would otherwise fail because the resolver signature changed).taskFormSchemasAPI.tsis 100% branch / 87.5% line; the uncovered lines are pre-existingcreateTaskFormSchema/updateTaskFormSchemaPOST/PUT helpers, untouched by this fix and not exercised by their callers' Jest suites.Backend integration tests
Ingestion integration tests
Playwright (UI) tests
Visual regression baselines
TagSuggestionschema'stagSelectorwidget is already exercised by other tag-update surfaces.Manual testing performed
UI screen recording:
Not applicable — this is a standalone fix to form-schema resolution on a task tab. The fix code is exercised by 23 new unit tests against the real resolver paths through an axios mock; the merge queue's full Playwright suite (which runs on a built-from-source 2.0.0-SNAPSHOT stack) is the appropriate lane for end-to-end UI verification of the exact rendering change.
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.TaskFormSchemaRepository.javaandtask.taskFormSchemaIdin theTaskschema.)End-to-end verification (tests that could not be run here)
The Jest unit tests for the changed files all pass (200 tests across
TaskFormSchemaUtils.test.ts,TaskTabNew.component.test.tsx,TaskDetailPanel.test.tsx; plus the four sibling consumer suites andsuggestionsAPI.test.tsare unchanged-green),yarn tsc:checkintroduces no new errors (only the pre-existingOMSelectWidget.tsxone, verified by stash baseline),yarn lint:base --fixreports 0 errors with 6 pre-existing warnings (unchanged), andyarn pretty:base --checkpasses. The full-task UI build is exercised via Jest with the realresolveTaskFormSchema/getResolvedTaskFormSchemathrough an axios mock.Manual / Playwright E2E verification of the rendered UI (tag-suggestion task viewed in the activity-feed Tasks tab showing the tag widget, edit + resolve actually applying tags; description-suggestion task still showing the textarea; cache key disambiguating between two Suggestion variants viewed back-to-back; workflow-driven task with stamped
taskFormSchemaIdcontinuing to render its custom form) could not be run here: the published Docker images for2.0.0-SNAPSHOTserver don't exist (the Collate registry only has the released1.0.0, which predates the/v1/taskFormSchemasand/v1/tasksendpoints introduced in commit51ecf4502f"Task redesign (#25894)"). Building a 2.0.0-SNAPSHOT server image from the local source via Maven is the workaround but is outside the scope of this fix's verification. Playwright infrastructure itself (browser launch, screenshots) was verified working afternpx playwright install chromiumandnpx playwright install-deps; tests fail only withError: apiRequestContext.post: connect ECONNREFUSED ::1:8585, i.e. purely on the missing server. The merge-queue Playwright pipeline, which builds a 2.0.0-SNAPSHOT server from source and runs the full impacted spec set, is the right lane for this verification.For sanity on the backend half of the resolve path,
mvn test -pl openmetadata-service -Dtest='TaskWorkflowHandlerTest'passes 31/31; the test logs confirm the existing backend applies tag suggestions frompayload.suggestedValuecorrectly (Applied tag suggestion: 1 tags for entity 'orders'), so the silent-no-op described in the bug only reproduces when the UI submits free text from the wrong textarea — exactly the path this fix removes.Automatic Fixes PRs can be configured here.


Confidence Score: 5/5
The reviewed changes appear safe to merge; no new blocking issues were found.Summary
Suggestion tasks now choose the correct tag or description form and keep tag edits in the format the server expects.
Reviews (6) · Last reviewed commit: "Parse JSON tag suggestions in tagSelecto..." · Reviewed by Greptile