Dataface Tasks

M1 Visual ASQL mode in cloud chart editor

IDCLOUD_SUITE-M1_VISUAL_ASQL_MODE_IN_CLOUD_CHART_EDITOR
Statusnot_started
Priorityp1
Milestonem2-internal-adoption-design-partners
Ownerui-design-frontend-dev

Problem

Implement SQL/Visual query mode in cloud chart editor, integrating Visual ASQL alongside existing CodeMirror SQL mode. Use ai_notes/suite/features/VISUAL_ASQL_CHART_EDITOR_INTEGRATION_PLAN.md as execution spec and deliver phased rollout behind feature flag.

Context

  • The current cloud chart editor already supports SQL authoring and chart configuration, and the execution spec for Visual ASQL lives in ai_notes/suite/features/VISUAL_ASQL_CHART_EDITOR_INTEGRATION_PLAN.md.
  • This change has to preserve the existing hosted editor flow, saved chart/query representation, and fallback to raw SQL when the visual mode cannot express a case cleanly.
  • The main risk is introducing a second authoring mode that looks promising but cannot round-trip reliably through preview, save, and reopen flows in apps/cloud/.

Possible Solutions

  • A - Build a separate visual-only editor flow: simpler UI boundaries, but it duplicates state and splits the chart-authoring experience.
  • B - Recommended: add Visual ASQL as a first-class mode inside the existing cloud editor: reuse the current shell, define clear mode-switching and round-trip boundaries, and preserve SQL escape hatches.
  • C - Keep SQL-only for now: lowest immediate risk, but it misses the analyst-facing workflow this milestone is meant to unlock.

Plan

  1. Review the Visual ASQL integration spec and the existing cloud chart editor implementation to define mode state, persistence, and unsupported-case behavior.
  2. Design the in-editor UX for switching between visual and SQL modes, including how preview, validation, and dirty-state handling behave.
  3. Implement the minimal end-to-end path for creating, editing, saving, and reopening a visual query while preserving a reliable SQL fallback.
  4. Add focused browser and server-side tests for mode switching, persistence, and error states, then record follow-up gaps discovered during QA.

Implementation Progress

QA Exploration

  • [ ] QA exploration completed (or N/A for non-UI tasks)

Review Feedback

  • [ ] Review cleared