Repository navigation
[2.0] fix(ui): show tag suggestion tasks as tags, not a description (#37398, #38061, #38073) - #38114
Conversation
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)
…ption) (#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 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)
❌ 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 |
- 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
Code Review ✅ Approved 🟡 Medium risk 1 closed / 1 findingsThe UI renders tag suggestions as editable tags and includes them in approval, so misclassification could apply unintended metadata labels. Backports the tag suggestion task fixes so Tag suggestions render as tag chips instead of raw JSON, with the matching task form selected by stamped schema ID then suggestion type. No open findings remain; the browser spec importing helpers missing on 2.0 was closed without a fix in this PR. ✅ 1 closedClosed: Bug: TagSuggestionTask.spec imports helpers that don't exist on 2.0
VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Backports #37398, #38061 and #38073 to
2.0.Fixes open-metadata/openmetadata-collate#8554 on 2.0. The issue was reported against the 2.0 branches.
What
A Tag suggestion task (a
Suggestionwithpayload.suggestionType: Tag, as AI automations create) now shows its tags as chips instead of raw JSON under "Suggested Description":suggestedValue.TagSuggestionvsDescriptionSuggestion, by the stampedtaskFormSchemaId, then bysuggestionType. The tag editor keepssuggestedValuea JSON string.tagFQN.#38073builds on the other two, so all three land together. The cherry-picks are in order, one commit each, with-xreferences.Adapting to 2.0
2.0branched before several UI refactors onmain, so the cherry-picks were adapted rather than taken as-is:InboxPage/taskDetail.utils.ts,TaskDetailPanel), so the Inbox parts of Fixes #38033: Suggestion tasks render the correct form (tag vs description) #38061 and fix(ui): show tag suggestion tasks as tags, not a description #38073 are dropped. The Inbox fixes don't apply here.TaskPayloadSchemaFields.tsx: 2.0 still uses the Ant DesignForm.Itemlayout. Fixes #38033: Suggestion tasks render the correct form (tag vs description) #38061's tag-selector fix (parse a JSON-string field, write it back as a string) is ported into that block, withoutmain's renderer refactor.TaskPayloadUtils.ts,TaskActionUtils.ts,TagsTaskFromTask.tsx,TaskTabNew.component.tsx: kept 2.0's structure (inline flags, nocomputeSuggestedTags/computeSuggestionStatehelpers) and applied only fix(ui): show tag suggestion tasks as tags, not a description #38073's logic:isTagsTaskType(task)covers Tag suggestions.suggestedValueis the tags to add, de-duplicated.diffTagLabelscompares bytagFQN.TaskPayloadUtils.test.tsdoesn't exist on 2.0, so it is added with only fix(ui): show tag suggestion tasks as tags, not a description #38073's tests.TaskFormSchemaUtils.test.tsmocks../rest/index(2.0's API client) instead of../rest/axiosClient.TaskPayloadSchemaFields.test.tsximportsLabelType/State.main-only tests inTaskTabNew.component.test.tsxconflicted and were left out.SuggestionsSliderPermissions.spec.ts: deleted on 2.0, so it stays deleted.The 2.0 backend already has everything the UI relies on: the
TagSuggestionseed,Task.taskFormSchemaId,TaskFormSchemaRepository#mapSuggestionTypeToSchema, andTaskWorkflowHandler.applySuggestionforTag. So this is UI-only.Verification
TaskPayloadUtils,TaskFormSchemaUtils,TaskActionUtils,pages/TasksPage,components/Entity/Task,TaskFeedCard,suggestionsAPI,taskFormSchemasAPI.tsc: no new errors compared with a cleanorigin/2.0type-check. 2.0 has an existing baseline of about 457 errors.generate_playwright_impact_map.py --checkpasses.TagSuggestionTask.spec.tsandTaskSuggestionForm.spec.tscome along with the cherry-picks and should run in the release lane.🤖 Generated with Claude Code
Summary by Gitar
TaskTabNewtagLabelsfromsuggestedValuefor tag suggestions insuggestionsAPIThis will update automatically on new commits.


Confidence Score: 5/5
The changes since the previous review appear safe to merge; no new blocking issues were found.Summary
Tag suggestion tasks now show tag chips and use the matching tag form instead of displaying raw JSON as a description.
No new actionable issues found in the changes since the previous review.
Reviews (2) · Last reviewed commit: "fix(ui): adapt the backported task specs..." · Reviewed by Greptile