Skip to content

fix: restore full SQL Editor features on agent branch - #117

Draft
huyplb wants to merge 6 commits into
mainfrom
cursor/cloud-agent-1785109452769-k0unh
Draft

fix: restore full SQL Editor features on agent branch#117
huyplb wants to merge 6 commits into
mainfrom
cursor/cloud-agent-1785109452769-k0unh

Conversation

@huyplb

@huyplb huyplb commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Full SQL Editor restore on the agent branch, including the Indexes section in the table blueprint modal.

Indexes (table blueprint)

  • Section between Primary Key and Foreign Keys
  • Add index — unique / accept-duplicates, ASC/DESC, optional WHERE (dialect-aware)
  • Edit / drop existing indexes
  • E2E: create table + UNIQUE index → Insert SQL emits CREATE … INDEX

Also included

  • Secrets panel, New table / Edit table entry points
  • Connection selection persist across refresh
  • DB2 Windows login path

Blueprint Indexes section

Test plan

  • Playwright blueprint suite (5/5) including Indexes Add-index
  • Hard-refresh agent localhost:5173 → Edit table → scroll to IndexesAdd index

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

cursoragent and others added 6 commits July 27, 2026 04:46
After refresh, connections briefly load as [] which cleared the SQL
schema-explorer selection, and sync source/target IDs were never
persisted. Wait for store rehydrate, persist selection IDs only, and
skip wiping explorer state during the empty-list window.

Co-authored-by: huy.phan9 <huyplb@users.noreply.github.com>
IBM DB2 on Windows often connected without Authentication=SERVER, lost
passwords containing ';', or skipped clidriver install scripts — then
schema load returned zero tables and table edit looked missing.

- Always rebuild DB2 strings with Authentication=SERVER; ODBC-brace PWD
- Strip IBM GSKit from PATH; clear error when clidriver is missing
- Require schema on /schema/load for schemaRequired dialects
- foxschema drivers install db2 uses --foreground-scripts like the UI

Co-authored-by: huy.phan9 <huyplb@users.noreply.github.com>
The Edit/open-blueprint control only appeared on loaded table rows, so an
empty schema (or missing DB2 schema) looked like the feature was deleted.
Label New/Edit, add empty-state Create table, surface schema-required
hints, and keep the DB2 Windows login path so tables can load again.

Co-authored-by: huy.phan9 <huyplb@users.noreply.github.com>
Your Schema screenshot matched a build where the only controls were the
connection dropdown + refresh. Put New table in the Schema section header
and render Edit table under each table name so add-column stays reachable
in a narrow sidebar. Secrets + blueprint code remain in the tree.

Co-authored-by: huy.phan9 <huyplb@users.noreply.github.com>
Edit table is always visible under each table name now; the old page
object looked for a removed Tailwind group ancestor and timed out.

Co-authored-by: huy.phan9 <huyplb@users.noreply.github.com>
…erage

Indexes (add/edit/drop, unique, ASC/DESC, optional WHERE) already live in
the table blueprint modal; add stable data-testids and a Playwright flow
that adds a UNIQUE index and inserts CREATE INDEX SQL.

Co-authored-by: huy.phan9 <huyplb@users.noreply.github.com>
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.

2 participants