Skip to content

[P1][bug] Events folder/drag-to-editor/system-DB toggle/columns-as-nodes are missing (FR-4.1.1, FR-4.1.4, FR-4.1.6) #291

Description

@EVWorth

Context

FR-4.1.1: "Connection > Database > [Tables, Views, Stored Procedures, Functions, Triggers, Events]". FR-4.1.4: "Drag any object (table, column, function) into the SQL editor". FR-4.1.6: "Toggle to show/hide system databases".

Problem

No Events folder or backend event query exists. System databases are always hidden with no toggle. No schema object is draggable (only double-click insertion exists for tables/views, not functions). Columns are not tree nodes. The schema browser skips ~30% of the documented surface.

Files

  • src/components/schema/SchemaTree.tsx:293
  • src-tauri/crates/mas-core/src/schema/inspector.rs (no event query)
  • src/lib/tauri-api.ts (no event command, no system-db toggle)

Repro

Inspect the schema tree — no Events. Search for "system database toggle" — none. Try to drag a users table to the editor — it inserts on double-click but cannot be dragged.

Expected

Tree includes Events (with edit/drop), system-DB toggle in settings, columns are child nodes, all object types have drag payloads consumed by Monaco.

Proposed fix

Scope L. Add get_events, get_event_ddl backend IPC; column child nodes; system-DB visibility state in useSchemaCache; drag payload API on FolderNode; Monaco onDrop consumer.

Acceptance

Tree includes events, optionally shows all four system DBs, and any object can be dragged into the editor with its escaped name inserted at drop position.

Needs human verify

No.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/schemaAudit areaauditTracks a feature-by-feature codebase audit findingkind/bugAudit finding categorykind/doc-driftAudit finding categoryseverity/p1Audit finding severity

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions