Skip to content

[2.0] fix(ui): show tag suggestion tasks as tags, not a description (#37398, #38061, #38073) - #38114

Merged
Rohit0301 merged 4 commits into
2.0from
Rohit0301/8554-backport-2.0
Nov 18, 2026
Merged

Rohit0301 merged 4 commits into
2.0from
Rohit0301/8554-backport-2.0

Conversation

@Rohit0301

@Rohit0301 Rohit0301 commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

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 Suggestion with payload.suggestionType: Tag, as AI automations create) now shows its tags as chips instead of raw JSON under "Suggested Description":

Source PR Change
#37398 The table's Suggested Tags view reads the tags from suggestedValue.
#38061 The task view picks the right form: TagSuggestion vs DescriptionSuggestion, by the stamped taskFormSchemaId, then by suggestionType. The tag editor keeps suggestedValue a JSON string.
#38073 The feed card and task panel treat Tag suggestions as tag tasks. Suggested tags are added to the field's existing tags. The tag diff compares by tagFQN.

#38073 builds on the other two, so all three land together. The cherry-picks are in order, one commit each, with -x references.

Adapting to 2.0

2.0 branched before several UI refactors on main, so the cherry-picks were adapted rather than taken as-is:

The 2.0 backend already has everything the UI relies on: the TagSuggestion seed, Task.taskFormSchemaId, TaskFormSchemaRepository#mapSuggestionTypeToSchema, and TaskWorkflowHandler.applySuggestion for Tag. So this is UI-only.

Verification

  • Jest: 23 task-related suites pass on 2.0 (191 tests): TaskPayloadUtils, TaskFormSchemaUtils, TaskActionUtils, pages/TasksPage, components/Entity/Task, TaskFeedCard, suggestionsAPI, taskFormSchemasAPI.
  • tsc: no new errors compared with a clean origin/2.0 type-check. 2.0 has an existing baseline of about 457 errors.
  • Lint and impact map: ESLint reports 0 errors on the changed files, and generate_playwright_impact_map.py --check passes.
  • Playwright: not run. TagSuggestionTask.spec.ts and TaskSuggestionForm.spec.ts come along with the cherry-picks and should run in the release lane.

🤖 Generated with Claude Code


Summary by Gitar

  • Schema cache:
    • Bounded the form schema cache to 100 entries with oldest-first eviction
  • Stale responses:
    • Ignored late schema responses when the task changes in TaskTabNew
  • Suggestions list:
    • Populated tagLabels from suggestedValue for tag suggestions in suggestionsAPI
  • Docs:
    • Added a decision record for suggestion form schema resolution order

This will update automatically on new commits.

RetriggerView in GreptileConfidence 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.

  • Each suggestion task opens the form that matches its type.
  • Tag suggestions appear as tag changes across task views.

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

anuj-kumary and others added 3 commits November 18, 2026 16:58
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)
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

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 skip-pr-checks label.

- 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
@gitar-bot

gitar-bot Bot commented Nov 18, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 🟡 Medium risk 1 closed / 1 findings

The 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 closed
Closed: Bug: TagSuggestionTask.spec imports helpers that don't exist on 2.0

📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Tasks/TagSuggestionTask.spec.ts:17-18 📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Tasks/TagSuggestionTask.spec.ts:102 📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Tasks/TagSuggestionTask.spec.ts:128-136
TagSuggestionTask.spec.ts imports getTaskCard from playwright/utils/task and waitForResponseWithStatus from playwright/utils/waitHelpers. Neither file exports them on this branch. utils/task.ts only has the waitForTask*Response helpers and createDescriptionTask/createTagTask. waitHelpers.ts only exports clickAndWaitFor. The only getTaskCard is in utils/taskWorkflow.ts, and it takes a CreatedTask object, not a taskId string. As written, the spec fails type-checking, and at runtime getTaskCard(page, taskId) throws a TypeError. The PR doesn't run Playwright, so this would first fail in the release lane. Fix: import getTaskCard from utils/taskWorkflow and pass it the task object. For the resolve wait, use waitForTaskResolveResponse from utils/task or a plain page.waitForResponse.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@Rohit0301
Rohit0301 merged commit b0ca802 into 2.0 Nov 18, 2026
60 of 64 checks passed
@Rohit0301
Rohit0301 deleted the Rohit0301/8554-backport-2.0 branch November 18, 2026 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants