Repository navigation
fix(ui): show tag suggestion tasks as tags, not a description - #38073
Conversation
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
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
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
# Conflicts: # .github/playwright/impact-map.generated.json # openmetadata-ui/src/main/resources/ui/src/components/Entity/Task/TaskTab/TaskTabNew.component.test.tsx # openmetadata-ui/src/main/resources/ui/src/components/Entity/Task/TaskTab/TaskTabNew.component.tsx # openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/InboxPage/components/TaskDetailPanel.test.tsx # openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/InboxPage/components/TaskDetailPanel.tsx # openmetadata-ui/src/main/resources/ui/src/pages/TasksPage/shared/TaskPayloadSchemaFields.test.tsx # openmetadata-ui/src/main/resources/ui/src/pages/TasksPage/shared/TaskPayloadSchemaFields.tsx # openmetadata-ui/src/main/resources/ui/src/utils/TaskFormSchemaUtils.ts
- 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
- 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
…t 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.
Code Review ✅ Approved 🟡 Medium risk 2 closed / 2 findingsTag suggestions now use tag-specific schema and payload handling, changing what reviewers see and submit and potentially affecting tags applied on approval. Renders Tag suggestion tasks as tag chips in the feed card, task panel, and Inbox detail instead of raw JSON under "Suggested Description", and applies the tags on accept. One open minor issue: the Playwright ✅ 2 closed✅ Quality: Schema-name derivation
|
| Compact |
|
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source
…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]>
Describe your changes:
Fixes open-metadata/openmetadata-collate#8554 (the OpenMetadata UI part)
An AI automation proposes tags as a
Suggestiontask withpayload.suggestionType: "Tag"and the tag labels as a JSON string inpayload.suggestedValue. The task views showed that JSON as a Suggested Description, so a reviewer could not see which tags they were accepting.There were two causes:
DescriptionSuggestionandTagSuggestionshare the same task type and category (Suggestion/MetadataUpdate).resolveTaskFormSchemalooks them up by those two values withlimit: 1, so it always gotDescriptionSuggestion. Suggestion tasks now resolve their schema by name (${suggestionType}Suggestion), using the existingGET /taskFormSchemas/name/{fqn}.TagUpdatewas treated as a tag task.isTagsTaskTypenow takes the whole task and also covers Tag suggestions. Payload normalization, the feed card, the task tab,TagsTaskFromTaskand the Inbox detail all use it.The
TagSuggestionschema'stagSelectorwidget edits a list of tag labels.getEditableTaskPayloadturns the JSON string into that list, andgetTaskResolutionNewValueturns it back into the JSON string the server applies (TaskWorkflowHandler.applySuggestion).Not in this PR:
mainby fix(ui): show tag suggestions by reading suggestedValue #37398. It needs a backport to 2.0.lastRunStatus.tsxnever readsimpact.pending).TagSuggestion.json, and seeding doesn't update rows that already exist.Screenshots
Entity → Activity Feeds & Tasks: the card and the task panel show tag chips
Inbox task detail: the suggestion is shown as a tags change
Playwright:
TagSuggestionTask.spec.tspassed (local run)Type of change:
Tests:
Use cases covered
Unit tests
TaskPayloadUtils.test.ts: a Tag suggestion givessuggestedTagsand nonewDescription. A Description suggestion is unchanged.TaskFormSchemaUtils.test.ts: the schema name comes fromsuggestionType. The editable payload parses the tags, and the resolution value turns them back into the JSON string.taskDetail.utils.test.ts: in the Inbox, a Tag suggestion shows a tags change and no JSON box.TaskTabNew.component.test.tsxandTaskDetailPanel.test.tsx. I removed a module-wideisTagsTaskType → truemock, which now leaked into payload handling.Local Jest: 64 suites, 952 tests passed.
tsc, ESLint and Prettier are clean on the changed files.Backend integration tests
Ingestion integration tests
Playwright (UI) tests
playwright/e2e/Features/Tasks/TagSuggestionTask.spec.ts: creates a Tag suggestion on a column. It checks that the card and the panel show the tag (no JSON, no "Suggested Description"), approves it, and verifies the column has the tag.--project=chromium --no-depsagainst a 2.0.0-SNAPSHOT server: passed.yarn lint:playwrighthas 0 errors.Visual regression baselines
Manual testing performed
Created a Tag suggestion task with
POST /api/v1/tasks(type: Suggestion,payload.suggestionType: Tag). I checked the entity's Activity Feeds & Tasks tab and/tasks/<taskId>: both screenshots above are from that check.Checklist:
🤖 Generated with Claude Code
Summary by Gitar
getTaskFormSchemaByNametagFQNviauniqBysuggestionTypeTagSuggestionTask.spec.tscovering card, panel, and accept flowimpact-map.generated.jsonThis will update automatically on new commits.


Confidence Score: 5/5
The PR appears safe to merge; no new blocking issues were found.Summary
Tag suggestion tasks now show tags instead of raw JSON across the feed, task panel, and Inbox.
No new actionable issues were found in the latest changes. The earlier findings are addressed in the current code.
Reviews (6) · Last reviewed commit: "test(ui): clean up the table even when t..." · Reviewed by Greptile