feat(ui): add chat-driven dataset review flow

Move dataset review clarification into the assistant workspace and
rework the review page into a chat-centric layout with execution rails.

Add session-scoped assistant actions for mappings, semantic fields,
and SQL preview generation. Introduce optimistic locking for dataset
review mutations, propagate session versions through API responses,
and mask imported filter values before assistant exposure.

Refresh tests, i18n, and spec artifacts to match the new workflow.

BREAKING CHANGE: dataset review mutation endpoints now require the
X-Session-Version header, and clarification is no longer handled
through ClarificationDialog-based flows
This commit is contained in:
2026-03-26 13:33:12 +03:00
parent d7911fb2f1
commit 7c85552132
74 changed files with 6122 additions and 2970 deletions

View File

@@ -12,8 +12,8 @@ tags:
- name: Mapping Review
- name: Preview and Launch
- name: Exports
- name: Assistant Integration
paths:
security:
- bearerAuth: []
@@ -85,6 +85,7 @@ paths:
summary: Update resumable session lifecycle state
parameters:
- $ref: '#/components/parameters/SessionId'
- $ref: '#/components/parameters/SessionVersionHeader'
requestBody:
required: true
content:
@@ -129,6 +130,7 @@ paths:
summary: Apply a semantic source to the current session
parameters:
- $ref: '#/components/parameters/SessionId'
- $ref: '#/components/parameters/SessionVersionHeader'
requestBody:
required: true
content:
@@ -156,6 +158,7 @@ paths:
parameters:
- $ref: '#/components/parameters/SessionId'
- $ref: '#/components/parameters/FieldId'
- $ref: '#/components/parameters/SessionVersionHeader'
requestBody:
required: true
content:
@@ -183,6 +186,7 @@ paths:
parameters:
- $ref: '#/components/parameters/SessionId'
- $ref: '#/components/parameters/FieldId'
- $ref: '#/components/parameters/SessionVersionHeader'
responses:
'200':
description: Field locked
@@ -202,6 +206,7 @@ paths:
parameters:
- $ref: '#/components/parameters/SessionId'
- $ref: '#/components/parameters/FieldId'
- $ref: '#/components/parameters/SessionVersionHeader'
responses:
'200':
description: Field unlocked
@@ -236,6 +241,7 @@ paths:
summary: Submit an answer to the current clarification question
parameters:
- $ref: '#/components/parameters/SessionId'
- $ref: '#/components/parameters/SessionVersionHeader'
requestBody:
required: true
content:
@@ -262,6 +268,7 @@ paths:
summary: Resume or start clarification mode for the next unresolved question
parameters:
- $ref: '#/components/parameters/SessionId'
- $ref: '#/components/parameters/SessionVersionHeader'
responses:
'200':
description: Clarification resumed
@@ -295,6 +302,7 @@ paths:
parameters:
- $ref: '#/components/parameters/SessionId'
- $ref: '#/components/parameters/MappingId'
- $ref: '#/components/parameters/SessionVersionHeader'
requestBody:
required: true
content:
@@ -320,6 +328,7 @@ paths:
parameters:
- $ref: '#/components/parameters/SessionId'
- $ref: '#/components/parameters/MappingId'
- $ref: '#/components/parameters/SessionVersionHeader'
requestBody:
required: false
content:
@@ -344,6 +353,7 @@ paths:
summary: Trigger Superset-side SQL compilation preview
parameters:
- $ref: '#/components/parameters/SessionId'
- $ref: '#/components/parameters/SessionVersionHeader'
responses:
'202':
description: Preview generation started
@@ -373,6 +383,7 @@ paths:
x-required-permissions: [dataset:execution:launch]
parameters:
- $ref: '#/components/parameters/SessionId'
- $ref: '#/components/parameters/SessionVersionHeader'
responses:
'201':
description: Dataset launched
@@ -480,6 +491,14 @@ components:
minimum: 1
maximum: 100
default: 20
SessionVersionHeader:
name: X-Session-Version
in: header
required: true
description: Optimistic-lock version of the current dataset review session. Requests with a stale version are rejected with conflict semantics.
schema:
type: integer
minimum: 0
securitySchemes:
bearerAuth:
@@ -586,6 +605,7 @@ components:
type: object
required:
- session_id
- version
- dataset_ref
- environment_id
- readiness_state
@@ -597,6 +617,9 @@ components:
properties:
session_id:
type: string
version:
type: integer
minimum: 0
dataset_ref:
type: string
dataset_id:
@@ -991,6 +1014,9 @@ components:
type: string
nullable: true
raw_value: {}
raw_value_masked:
type: boolean
description: Indicates whether the raw filter value has been masked or redacted before exposure to assistant or LLM-facing context.
normalized_value:
nullable: true
source:
@@ -1209,10 +1235,10 @@ components:
ClarificationState:
type: object
required: [clarification_session]
properties:
clarification_session:
$ref: '#/components/schemas/ClarificationSessionSummary'
nullable: true
current_question:
$ref: '#/components/schemas/ClarificationQuestion'
nullable: true
@@ -1398,6 +1424,7 @@ components:
type: object
required:
- session
- session_version
- profile
- findings
- semantic_sources
@@ -1408,6 +1435,10 @@ components:
properties:
session:
$ref: '#/components/schemas/SessionSummary'
session_version:
type: integer
minimum: 0
description: Convenience mirror of the current session version for assistant and workspace synchronization.
profile:
$ref: '#/components/schemas/DatasetProfile'
findings:
@@ -1444,6 +1475,24 @@ components:
$ref: '#/components/schemas/DatasetRunContextSummary'
nullable: true
AssistantMessageRequest:
type: object
required: [message]
description: Request payload accepted by the global Assistant API when the assistant is scoped to dataset review context.
properties:
conversation_id:
type: string
nullable: true
message:
type: string
minLength: 1
maxLength: 4000
dataset_review_session_id:
type: string
nullable: true
description: Optional active dataset review session binding used to ground assistant answers and route approved commands into the current orchestration session.
additionalProperties: false
ErrorResponse:
type: object
required: [error_code, message]
@@ -1476,4 +1525,4 @@ components:
errors:
type: array
items:
$ref: '#/components/schemas/ValidationErrorItem'
$ref: '#/components/schemas/ValidationErrorItem'