sql-preview 0.6.6 → 0.6.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Changelog.md CHANGED
@@ -2,6 +2,30 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.6.8] - 2026-07-12
6
+
7
+ ### Added
8
+
9
+ - Comprehensive query telemetry (RFC-068): query events now carry a closed-enum `connector` dimension; a layered, connector-aware error classifier replaces the old substring matching (previously ~95% of failures were `unknown`); MCP tool calls and agent/web-originated queries are now telemetered daemon-side (fail-closed, consent inherited from the extension or explicit `SQL_PREVIEW_TELEMETRY=1` standalone opt-in); a new `mcp_tool_invoked` event measures agent usage. Telemetry schema `2.1` (additive).
10
+ - Internal/dev traffic isolation: telemetry is suppressed in Extension Development/Test hosts (override with `SQL_PREVIEW_POSTHOG_TOKEN` for debug projects), a new `sqlPreview.telemetry.internal` setting (or `SQL_PREVIEW_TELEMETRY_INTERNAL=1`) stamps every event with `internal_user`, and `SQL Preview: Show Telemetry Status` now displays the anonymous install ID for PostHog exclusion filters.
11
+
12
+ ### Changed
13
+
14
+ - Query error payloads now include an advisory machine-readable `errorKind` alongside the existing message/details (no SQL text or message content is ever sent to telemetry; only the classified enum).
15
+ - Fully implemented MCP Streamable HTTP Spec compliance (RFC-072). The `/mcp` HTTP endpoint now strictly follows the `@modelcontextprotocol/sdk` (pinned to 1.27.1) stateful session specifications, properly supporting Claude Code HTTP transports and standard MCP external clients.
16
+
17
+ ## [0.6.7] - 2026-07-08
18
+
19
+ ### Changed
20
+
21
+ - Replaced the stacked tab-close undo toast notifications with a simpler Undo button in the top action bar.
22
+ - Restored the original emoji icons (`▶️` and `▶️➕`) for the CodeLens query execution actions.
23
+ - Extracted hardcoded shadow colors and font stacks in the UI to strictly align with the `DESIGN.md` token system.
24
+
25
+ ### Fixed
26
+
27
+ - Fixed an issue where running a query in a new tab would occasionally render a blank page until the tab was manually focused.
28
+
5
29
  ## [0.6.6] - 2026-07-06
6
30
 
7
31
  ### Added
package/README.md CHANGED
@@ -6,8 +6,8 @@ Run SQL in VS Code, manage database profiles securely, inspect results in a
6
6
  high-performance grid, and expose governed database tools to Claude, Cursor,
7
7
  Copilot, and other Model Context Protocol clients.
8
8
 
9
- [![VS Code Marketplace](https://img.shields.io/visual-studio-marketplace/v/mehul.sql-preview?label=VS%20Code%20Marketplace&color=0066b8)](https://marketplace.visualstudio.com/items?itemName=mehul.sql-preview)
10
- [![Installs](https://img.shields.io/visual-studio-marketplace/i/mehul.sql-preview)](https://marketplace.visualstudio.com/items?itemName=mehul.sql-preview)
9
+ [![VS Code Marketplace](https://img.shields.io/vscode-marketplace/v/mehul.sql-preview?label=VS%20Code%20Marketplace&color=0066b8)](https://marketplace.visualstudio.com/items?itemName=mehul.sql-preview)
10
+ [![Installs](https://img.shields.io/vscode-marketplace/i/mehul.sql-preview)](https://marketplace.visualstudio.com/items?itemName=mehul.sql-preview)
11
11
  [![OpenVSX](https://img.shields.io/open-vsx/v/mehul/sql-preview?label=OpenVSX&color=a60ee5)](https://open-vsx.org/extension/mehul/sql-preview)
12
12
  [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
13
13
 
package/dist/mcp-app.html CHANGED
@@ -9,7 +9,7 @@
9
9
  body {
10
10
  margin: 0;
11
11
  padding: 0;
12
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
12
+ font-family: var(--vscode-editor-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
13
13
  background-color: transparent;
14
14
  }
15
15
 
@@ -12574,6 +12574,8 @@ const useAppStore = create((set, get) => ({
12574
12574
  mcpEnabled: false,
12575
12575
  mcpSafeMode: true,
12576
12576
  mcpPort: null,
12577
+ daemonVersion: null,
12578
+ daemonPid: null,
12577
12579
  currentVersion: null,
12578
12580
  latestVersion: null,
12579
12581
  settingsPanelTab: null,
@@ -12620,7 +12622,7 @@ const useAppStore = create((set, get) => ({
12620
12622
  showGuideHub: (state) => set({ guideHub: state, settingsPanelTab: null }),
12621
12623
  closeGuideHub: () => set({ guideHub: null }),
12622
12624
  applyConfig: (c) => set((state) => {
12623
- var _a3;
12625
+ var _a3, _b2, _c3;
12624
12626
  const newState = { ...state };
12625
12627
  if (c.fontSize !== void 0) {
12626
12628
  newState.fontSize = c.fontSize != null && c.fontSize > 0 ? c.fontSize : null;
@@ -12637,8 +12639,10 @@ const useAppStore = create((set, get) => ({
12637
12639
  if (c.mcpSafeMode !== void 0) {
12638
12640
  newState.mcpSafeMode = c.mcpSafeMode;
12639
12641
  }
12640
- if (((_a3 = c.mcpStatus) == null ? void 0 : _a3.port) !== void 0) {
12641
- newState.mcpPort = c.mcpStatus.port;
12642
+ if (c.mcpStatus !== void 0) {
12643
+ newState.mcpPort = ((_a3 = c.mcpStatus) == null ? void 0 : _a3.port) ?? null;
12644
+ newState.daemonVersion = ((_b2 = c.mcpStatus) == null ? void 0 : _b2.version) ?? null;
12645
+ newState.daemonPid = ((_c3 = c.mcpStatus) == null ? void 0 : _c3.pid) ?? null;
12642
12646
  }
12643
12647
  return newState;
12644
12648
  }),
@@ -12678,7 +12682,9 @@ const useAppStore = create((set, get) => ({
12678
12682
  setActiveTab: (id) => set({ activeTabId: id }),
12679
12683
  updateTab: (id, updates) => set((state) => ({
12680
12684
  tabs: state.tabs.map((tab) => {
12681
- if (tab.id !== id) return tab;
12685
+ if (tab.id !== id) {
12686
+ return tab;
12687
+ }
12682
12688
  const next = { ...tab, ...updates };
12683
12689
  if (updates.isLoading === true && !tab.isLoading) {
12684
12690
  next.loadingStartedAt = Date.now();
@@ -74761,16 +74767,6 @@ const ConnectionsManager = () => {
74761
74767
  reactExports.useEffect(() => {
74762
74768
  fetchData();
74763
74769
  }, [fetchData]);
74764
- reactExports.useEffect(() => {
74765
- if (isFormOpen || connections.length === 0) {
74766
- return;
74767
- }
74768
- if (selectedConnectionId && connections.some((c) => c.id === selectedConnectionId)) {
74769
- return;
74770
- }
74771
- const nextSelection = connections.find((c) => supportsActiveConnection && c.id === activeConnectionId) ?? connections[0];
74772
- setSelectedConnectionId(nextSelection == null ? void 0 : nextSelection.id);
74773
- }, [activeConnectionId, connections, isFormOpen, selectedConnectionId, supportsActiveConnection]);
74774
74770
  reactExports.useEffect(() => {
74775
74771
  if (connections.length > 0) {
74776
74772
  connections.forEach((c) => {
@@ -75027,12 +75023,14 @@ const ConnectionsManager = () => {
75027
75023
  });
75028
75024
  };
75029
75025
  const openAddForm = () => {
75026
+ setSelectedConnectionId(void 0);
75030
75027
  setSelectedType("");
75031
75028
  setIsFormOpen(true);
75032
75029
  setToast(null);
75033
75030
  };
75034
75031
  const closeForm = reactExports.useCallback(() => {
75035
75032
  setIsFormOpen(false);
75033
+ setSelectedConnectionId(void 0);
75036
75034
  setSelectedType("");
75037
75035
  setToast(null);
75038
75036
  }, []);
@@ -75246,17 +75244,16 @@ const ConnectionsManager = () => {
75246
75244
  ] });
75247
75245
  };
75248
75246
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "sp-detail", children: [
75249
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "sp-conn-detail-header", children: [
75250
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
75251
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sp-conn-detail-kicker", children: "Connection settings" }),
75252
- /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "sp-conn-detail-title", children: selectedConnection.name }),
75253
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "sp-conn-item-meta", children: [
75247
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "sp-conn-detail-header", style: { display: "flex", justifyContent: "space-between", alignItems: "center", flexWrap: "wrap", gap: "16px", paddingBottom: "16px", borderBottom: "1px solid var(--sp-border)", marginBottom: "16px" }, children: [
75248
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "12px", flexWrap: "wrap" }, children: [
75249
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { fontWeight: 600, fontSize: "14px", color: "var(--sp-fg)" }, children: selectedConnection ? "Edit Connection" : "New Connection" }),
75250
+ selectedConnection && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
75254
75251
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "sp-conn-type-badge", children: selectedConnection.type }),
75255
- isActive && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "sp-conn-active-badge", children: "Active for queries" }),
75252
+ isActive && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "sp-conn-active-badge", children: "Active" }),
75256
75253
  selectedConnection.builtIn && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "sp-conn-built-in-label", children: "Built-in" })
75257
75254
  ] })
75258
75255
  ] }),
75259
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "sp-conn-detail-actions", children: [
75256
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "sp-conn-detail-actions", style: { display: "flex", gap: "8px", flexWrap: "wrap" }, children: [
75260
75257
  supportsActiveConnection && /* @__PURE__ */ jsxRuntimeExports.jsx(
75261
75258
  "button",
75262
75259
  {
@@ -75264,7 +75261,7 @@ const ConnectionsManager = () => {
75264
75261
  onClick: () => handleSetActiveConnection(selectedConnection),
75265
75262
  disabled: isActive || status === "testing",
75266
75263
  "aria-label": `Set ${selectedConnection.name} as the active connection for queries`,
75267
- children: isActive ? "Active for queries" : "Set active for queries"
75264
+ children: isActive ? "Active" : "Set active"
75268
75265
  }
75269
75266
  ),
75270
75267
  !selectedConnection.builtIn && /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -75280,12 +75277,6 @@ const ConnectionsManager = () => {
75280
75277
  ] }),
75281
75278
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "sp-conn-detail-body", children: [
75282
75279
  renderToast(),
75283
- isActive && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "sp-callout", role: "status", children: [
75284
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sp-dot sp-dot-ok" }),
75285
- "Queries from SQL Preview and MCP use ",
75286
- /* @__PURE__ */ jsxRuntimeExports.jsx("b", { children: selectedConnection.name }),
75287
- " unless a query overrides it."
75288
- ] }),
75289
75280
  modeAwareEditSchema ? /* @__PURE__ */ jsxRuntimeExports.jsx(
75290
75281
  DynamicForm,
75291
75282
  {
@@ -75302,149 +75293,75 @@ const ConnectionsManager = () => {
75302
75293
  ] })
75303
75294
  ] });
75304
75295
  };
75305
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "sp-conn-page", children: [
75306
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "sp-conn", children: [
75307
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "sp-conn-head", children: [
75308
- /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { children: "Connections" }),
75309
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "sp-head-actions", children: [
75310
- /* @__PURE__ */ jsxRuntimeExports.jsx(
75311
- "button",
75312
- {
75313
- className: "sp-btn",
75314
- onClick: fetchData,
75315
- disabled: isLoading,
75316
- "aria-label": "Refresh connections",
75317
- title: "Refresh",
75318
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(
75319
- "svg",
75320
- {
75321
- width: "12",
75322
- height: "12",
75323
- viewBox: "0 0 16 16",
75324
- fill: "none",
75325
- xmlns: "http://www.w3.org/2000/svg",
75326
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(
75327
- "path",
75328
- {
75329
- fillRule: "evenodd",
75330
- clipRule: "evenodd",
75331
- d: "M13.627 7.25H15C14.7347 4.09068 12.1963 1.55227 9.03698 1.28698V2.66579C11.4398 2.9238 13.3638 4.84777 13.6218 7.25055L13.627 7.25ZM8.0004 0C3.58212 0 0.000396729 3.58172 0.000396729 8C0.000396729 12.4183 3.58212 16 8.0004 16C12.1643 16 15.5843 12.8124 15.9682 8.75H14.4532C14.0792 11.9772 11.3323 14.5 8.0004 14.5C4.41054 14.5 1.5004 11.5899 1.5004 8C1.5004 4.41015 4.41054 1.5 8.0004 1.5C9.72825 1.5 11.2982 2.17415 12.4578 3.27218L10.0004 5.75H15.5004V0.25L13.5186 2.23179C12.1158 0.849658 10.158 0 8.0004 0ZM2.37344 8.75C2.63873 11.9093 5.17714 14.4477 8.33644 14.713V13.3342C5.93366 13.0762 4.00969 11.1522 3.75168 8.74945L3.74646 8.75H2.37344Z",
75332
- fill: "currentColor"
75333
- }
75334
- )
75335
- }
75336
- )
75337
- }
75338
- ),
75339
- /* @__PURE__ */ jsxRuntimeExports.jsx(
75340
- "button",
75341
- {
75342
- className: "sp-btn sp-btn-primary",
75343
- onClick: openAddForm,
75344
- "aria-label": "Add new connection",
75345
- children: "Add"
75346
- }
75347
- )
75348
- ] })
75349
- ] }),
75350
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "sp-switcher-wrap", ref: switcherWrapRef, children: [
75351
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
75296
+ const renderGrid = () => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "sp-conn-grid-view", children: [
75297
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "sp-conn-head", style: { marginBottom: 16 }, children: [
75298
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { children: "DB Connections" }),
75299
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "sp-head-actions", children: [
75300
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
75352
75301
  "button",
75353
75302
  {
75354
- className: "sp-switcher",
75355
- "aria-expanded": isPopoverOpen,
75356
- onClick: () => setIsPopoverOpen((v) => !v),
75357
- children: [
75358
- selectedConnection ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
75359
- /* @__PURE__ */ jsxRuntimeExports.jsx(
75360
- "div",
75361
- {
75362
- className: `sp-dot ${statuses[selectedConnection.id] === "ok" ? "sp-dot-ok" : statuses[selectedConnection.id] === "error" ? "sp-dot-error" : statuses[selectedConnection.id] === "testing" ? "sp-dot-testing" : "sp-dot-unknown"}`
75363
- }
75364
- ),
75365
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "sp-grow", children: [
75366
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "sp-sw-name", children: selectedConnection.name }),
75367
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "sp-badge", children: selectedConnection.type.toUpperCase() }),
75368
- supportsActiveConnection && activeConnectionId === selectedConnection.id && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "sp-pill", children: "Active for queries" })
75369
- ] })
75370
- ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sp-grow", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "sp-sw-name", children: "No connection selected" }) }),
75371
- /* @__PURE__ */ jsxRuntimeExports.jsx(
75372
- "svg",
75373
- {
75374
- className: "sp-chev",
75375
- width: "16",
75376
- height: "16",
75377
- viewBox: "0 0 16 16",
75378
- fill: "none",
75379
- xmlns: "http://www.w3.org/2000/svg",
75380
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(
75381
- "path",
75382
- {
75383
- d: "M4.29303 5.29289C4.68355 4.90237 5.31672 4.90237 5.70724 5.29289L8.00014 7.58579L10.293 5.29289C10.6836 4.90237 11.3167 4.90237 11.7072 5.29289C12.0978 5.68342 12.0978 6.31658 11.7072 6.70711L8.70724 9.70711C8.31672 10.0976 7.68355 10.0976 7.29303 9.70711L4.29303 6.70711C3.90251 6.31658 3.90251 5.68342 4.29303 5.29289Z",
75384
- fill: "currentColor"
75385
- }
75386
- )
75387
- }
75388
- )
75389
- ]
75303
+ className: "sp-btn",
75304
+ onClick: fetchData,
75305
+ disabled: isLoading,
75306
+ "aria-label": "Refresh connections",
75307
+ title: "Refresh",
75308
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { width: "14", height: "14", viewBox: "0 0 16 16", xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.681 3H2V2h3.5l.5.5V6H5V4a5 5 0 1 0 4.53-.761l.302-.953A6 6 0 1 1 4.681 3z" }) })
75390
75309
  }
75391
75310
  ),
75392
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `sp-popover ${isPopoverOpen ? "open" : ""}`, children: [
75393
- connections.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { padding: "8px 10px", color: "var(--sp-muted-fg)" }, children: "No connections configured." }) : connections.map((c) => {
75394
- const status = statuses[c.id] || "unknown";
75395
- const isActive = supportsActiveConnection && activeConnectionId === c.id;
75396
- const isSelected = selectedConnectionId === c.id && !isFormOpen;
75397
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(
75398
- "button",
75399
- {
75400
- type: "button",
75401
- className: "sp-pop-row",
75402
- "aria-current": isSelected,
75403
- onClick: () => {
75404
- setSelectedConnectionId(c.id);
75405
- closeForm();
75406
- setIsPopoverOpen(false);
75407
- setToast(null);
75408
- },
75409
- children: [
75410
- /* @__PURE__ */ jsxRuntimeExports.jsx(
75411
- "div",
75412
- {
75413
- className: `sp-dot ${status === "ok" ? "sp-dot-ok" : status === "error" ? "sp-dot-error" : status === "testing" ? "sp-dot-testing" : "sp-dot-unknown"}`
75414
- }
75415
- ),
75416
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "sp-grow", children: [
75417
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "sp-nm", children: c.name }),
75418
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "sp-badge", children: c.type.toUpperCase() }),
75419
- isActive && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "sp-pill", children: "Active" }),
75420
- c.builtIn && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "sp-tag-builtin", children: "Built-in" })
75421
- ] }),
75422
- isSelected && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "sp-pop-check", children: "✓" })
75423
- ]
75424
- },
75425
- c.id
75426
- );
75427
- }),
75428
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sp-pop-sep" }),
75429
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
75430
- "button",
75431
- {
75432
- type: "button",
75433
- className: "sp-pop-row sp-pop-add",
75434
- onClick: () => {
75435
- openAddForm();
75436
- setIsPopoverOpen(false);
75437
- },
75438
- children: [
75439
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "sp-plus", children: "+" }),
75440
- " Add connection"
75441
- ]
75442
- }
75443
- )
75444
- ] })
75445
- ] }),
75446
- /* @__PURE__ */ jsxRuntimeExports.jsx("section", { "aria-label": "Connection details", children: isFormOpen ? renderConnectionForm() : renderConnectionDetails() })
75311
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
75312
+ "button",
75313
+ {
75314
+ className: "sp-btn sp-btn-primary",
75315
+ onClick: openAddForm,
75316
+ "aria-label": "Add new connection",
75317
+ children: "+ New Connection"
75318
+ }
75319
+ )
75320
+ ] })
75447
75321
  ] }),
75322
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sp-conn-grid", style: { display: "grid", gridTemplateColumns: "repeat(auto-fill, minmax(260px, 1fr))", gap: "12px" }, children: connections.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sp-conn-empty", style: { gridColumn: "1 / -1" }, children: "No connections configured." }) : connections.map((c) => {
75323
+ const status = statuses[c.id] || "unknown";
75324
+ const isActive = supportsActiveConnection && activeConnectionId === c.id;
75325
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
75326
+ "div",
75327
+ {
75328
+ className: "sp-conn-card",
75329
+ style: {
75330
+ border: "1px solid var(--sp-border)",
75331
+ borderRadius: "6px",
75332
+ padding: "12px",
75333
+ background: "var(--sp-header-bg)",
75334
+ cursor: "pointer",
75335
+ display: "flex",
75336
+ flexDirection: "column",
75337
+ gap: "8px"
75338
+ },
75339
+ onClick: () => {
75340
+ setSelectedConnectionId(c.id);
75341
+ setIsFormOpen(false);
75342
+ },
75343
+ children: [
75344
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px", fontWeight: 600 }, children: [
75345
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { display: "flex", width: 16, height: 16, alignItems: "center", justifyContent: "center", color: "var(--sp-btn-bg)" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ConnectorGlyph, { type: c.type }) }),
75346
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: c.name })
75347
+ ] }) }),
75348
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { fontSize: "12px", color: "var(--sp-muted-fg)" }, children: c.type.toUpperCase() }),
75349
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "6px", fontSize: "11px", marginTop: "4px" }, children: [
75350
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `sp-dot sp-dot-${status}` }),
75351
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { color: "var(--sp-muted-fg)" }, children: status === "ok" ? "Connected" : status === "error" ? "Error" : status === "testing" ? "Testing..." : "Disconnected" }),
75352
+ isActive && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "sp-pill", style: { marginLeft: "auto" }, children: "Active" })
75353
+ ] })
75354
+ ]
75355
+ },
75356
+ c.id
75357
+ );
75358
+ }) })
75359
+ ] });
75360
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "sp-conn-page", children: [
75361
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sp-conn", children: !isFormOpen && !selectedConnectionId ? renderGrid() : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
75362
+ /* @__PURE__ */ jsxRuntimeExports.jsx("button", { className: "sp-btn", onClick: closeForm, style: { marginBottom: 12, alignSelf: "flex-start" }, children: "← Back to connections" }),
75363
+ /* @__PURE__ */ jsxRuntimeExports.jsx("section", { "aria-label": "Connection details", style: { background: "var(--sp-bg)", border: "1px solid var(--sp-border)", borderRadius: 6 }, children: isFormOpen ? renderConnectionForm() : renderConnectionDetails() })
75364
+ ] }) }),
75448
75365
  /* @__PURE__ */ jsxRuntimeExports.jsx(
75449
75366
  ConfirmDialog,
75450
75367
  {
@@ -97209,6 +97126,7 @@ body.light-theme .ag-theme-quartz {
97209
97126
  --sp-space-lg: 24px;
97210
97127
 
97211
97128
  --sp-radius: 3px;
97129
+ --sp-shadow-floating: 0 6px 18px rgba(0, 0, 0, 0.3), 0 1px 4px rgba(0, 0, 0, 0.15);
97212
97130
  }
97213
97131
 
97214
97132
  .vscode-dark,
@@ -97295,6 +97213,7 @@ body {
97295
97213
  padding: 0 6px;
97296
97214
  flex-shrink: 0;
97297
97215
  border-left: 1px solid var(--sp-border);
97216
+ gap: 6px;
97298
97217
  }
97299
97218
 
97300
97219
  .sp-active-file-indicator {
@@ -97658,8 +97577,10 @@ body {
97658
97577
  }
97659
97578
  .sp-icon-btn.active {
97660
97579
  color: var(--sp-btn-bg);
97661
- border-color: var(--sp-btn-bg);
97662
97580
  background: var(--sp-hover-bg);
97581
+ border-color: transparent !important;
97582
+ outline: none !important;
97583
+ box-shadow: none !important;
97663
97584
  }
97664
97585
 
97665
97586
  /* ── Grid container ────────────────────────────────────────── */
@@ -98182,17 +98103,26 @@ body.vscode-high-contrast .ag-theme-quartz {
98182
98103
  .sp-trust-badge {
98183
98104
  font-size: 11px;
98184
98105
  font-weight: 600;
98185
- border: 1px solid currentColor;
98106
+ border: 1px solid transparent;
98186
98107
  border-radius: var(--sp-radius);
98187
- padding: 2px 8px;
98108
+ height: 24px;
98109
+ display: inline-flex;
98110
+ align-items: center;
98111
+ justify-content: center;
98112
+ padding: 0 8px;
98113
+ box-sizing: border-box;
98188
98114
  white-space: nowrap;
98189
98115
  cursor: default;
98190
98116
  }
98191
98117
  .sp-trust-badge.safe {
98192
- color: var(--sp-success);
98118
+ background: var(--sp-hover-bg);
98119
+ color: var(--sp-fg);
98120
+ border-color: var(--sp-border);
98193
98121
  }
98194
98122
  .sp-trust-badge.unrestricted {
98123
+ background: var(--sp-hover-bg);
98195
98124
  color: var(--sp-warning);
98125
+ border-color: var(--sp-border);
98196
98126
  }
98197
98127
 
98198
98128
  /* ── Tab context menu ──────────────────────────────────────── */
@@ -99116,8 +99046,9 @@ body.vscode-high-contrast .ag-theme-quartz {
99116
99046
  font-weight: 700;
99117
99047
  padding: 1px 7px;
99118
99048
  border-radius: 999px;
99119
- background: var(--sp-success);
99120
- color: var(--sp-bg);
99049
+ background: var(--sp-hover-bg);
99050
+ color: var(--sp-fg);
99051
+ border: 1px solid var(--sp-border);
99121
99052
  white-space: nowrap;
99122
99053
  flex-shrink: 0;
99123
99054
  }
@@ -99138,16 +99069,12 @@ body.vscode-high-contrast .ag-theme-quartz {
99138
99069
  background: var(--sp-bg);
99139
99070
  border: 1px solid var(--sp-border);
99140
99071
  border-radius: var(--sp-radius);
99141
- box-shadow: var(--sp-shadow, 0 6px 18px rgba(0, 0, 0, 0.18), 0 1px 4px rgba(0, 0, 0, 0.10));
99072
+ box-shadow: var(--sp-shadow-floating);
99142
99073
  padding: 4px;
99143
99074
  display: none;
99144
99075
  transform-origin: top center;
99145
99076
  }
99146
99077
 
99147
- .vscode-dark .sp-popover {
99148
- box-shadow: var(--sp-shadow, 0 6px 18px rgba(0, 0, 0, 0.45), 0 1px 4px rgba(0, 0, 0, 0.30));
99149
- }
99150
-
99151
99078
  .sp-popover.open {
99152
99079
  display: block;
99153
99080
  animation: pop 0.12s ease-out;
@@ -99409,8 +99336,9 @@ body.vscode-high-contrast .ag-theme-quartz {
99409
99336
  font-weight: 700;
99410
99337
  padding: 1px 6px;
99411
99338
  border-radius: 999px;
99412
- color: var(--sp-bg);
99413
- background: var(--sp-success);
99339
+ color: var(--sp-fg);
99340
+ background: var(--sp-hover-bg);
99341
+ border: 1px solid var(--sp-border);
99414
99342
  white-space: nowrap;
99415
99343
  }
99416
99344
 
@@ -99765,7 +99693,7 @@ body.vscode-high-contrast .ag-theme-quartz {
99765
99693
  justify-content: flex-end;
99766
99694
  gap: 6px;
99767
99695
  margin-top: 8px;
99768
- padding-top: 10px;
99696
+ padding: 10px 0;
99769
99697
  border-top: 1px solid var(--sp-border);
99770
99698
  }
99771
99699
 
@@ -99842,27 +99770,7 @@ body.vscode-high-contrast .ag-theme-quartz {
99842
99770
  opacity: 1;
99843
99771
  }
99844
99772
 
99845
- /* Undo toasts float above the document flow, so the Floating shadow vocabulary applies (DESIGN.md #4). */
99846
- .sp-tab-undo-stack {
99847
- position: fixed;
99848
- bottom: 16px;
99849
- left: 50%;
99850
- z-index: 100;
99851
- display: flex;
99852
- flex-direction: column;
99853
- gap: 6px;
99854
- transform: translateX(-50%);
99855
- /* Closing many tabs in quick succession shouldn't grow this stack to cover the viewport. */
99856
- max-height: min(60vh, 320px);
99857
- overflow-y: auto;
99858
- overscroll-behavior: contain;
99859
- }
99860
99773
 
99861
- .sp-tab-undo-toast {
99862
- box-shadow:
99863
- 0 6px 18px rgba(0, 0, 0, 0.3),
99864
- 0 1px 4px rgba(0, 0, 0, 0.15);
99865
- }
99866
99774
 
99867
99775
  /* Keep the user-selected type size flowing through shared UI primitives. */
99868
99776
  .sp-app,