Skip to content

Support/v1#3

Open
deeedub wants to merge 12 commits into
mainfrom
support/v1
Open

Support/v1#3
deeedub wants to merge 12 commits into
mainfrom
support/v1

Conversation

@deeedub

@deeedub deeedub commented Jun 9, 2026

Copy link
Copy Markdown

No description provided.

Joseph Miller and others added 3 commits March 17, 2026 17:19
…n v1.0.1

Three fixes:

1. cancelStatement on poll timeout (acceptance criteria: 'cancel on timeout')
   pollToCompletion() now calls cancelStatement() when MAX_POLL_ATTEMPTS are
   exceeded before returning. This frees Snowflake compute resources. The
   doLookup caller now shows a descriptive error ('timed out after Xs, cancelled')
   instead of the 'Check Status' button — which would be confusing for a
   cancelled query.

2. Copy button for statement handle (acceptance criteria: 'PolarityCopyButton
   available for statement handle')
   Added copyText() action to block.js and a copy button in the metadata
   section of the template. Uses navigator.clipboard.writeText().

3. spinner-third → circle-notch
   spinner-third is Font Awesome Pro only and does not exist in FA Free (which
   Polarity bundles). circle-notch is the FA Free equivalent and renders
   correctly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- block.js: Add transformedPagedData computed property to detect JSON strings
  in VARCHAR column values and expand them into parsedEntries [{k, v}] for
  table rendering in the overlay
- block.hbs: Render JSON columns as key-value tables (.snow-j-tbl) when
  parsedEntries is present; use transformedPagedData instead of pagedData
- dataTransformations.js: Fix float precision for REAL columns using
  toPrecision(7); add timestamp/date/time column type formatting

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@deeedub

deeedub commented Jun 9, 2026

Copy link
Copy Markdown
Author

@copilot resolve the merge conflicts in this pull request

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Snowflake integration’s result rendering and query-handling behavior by adding client-side JSON expansion in the UI, formatting certain Snowflake data types during result mapping, and changing how long-running async queries are handled (cancel + error instead of “pending”).

Changes:

  • UI: Render JSON-looking attribute values as key/value tables; add a “copy statement handle” button in the metadata section.
  • Backend: Format timestamp/date/time (and round real) values when mapping result rows.
  • Backend: Cancel async statements after max polling attempts and surface a timeout error; bump package version to 3.0.0.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
templates/block.hbs Uses transformedPagedData, adds JSON table rendering and a copy button for statement handles
components/block.js Adds transformedPagedData JSON parsing and a clipboard copy action
src/dataTransformations.js Adds type-based formatting during row mapping (timestamps/dates/times/real) and related helpers
integration.js Cancels async statements after poll budget and returns a timeout error result
styles/styles.less Adds styling for the statement-handle copy button/row
package.json Bumps integration version to 3.0.0

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/dataTransformations.js Outdated
Comment thread src/dataTransformations.js Outdated
Comment on lines +5 to +8
const TIMESTAMP_TYPES = new Set(['timestamp_ntz', 'timestamp_ltz', 'timestamp_tz', 'timestamp']);
const DATE_TYPES = new Set(['date']);
const TIME_TYPES = new Set(['time']);
const SEMI_STRUCTURED_TYPES = new Set(['variant', 'object', 'array']);
Comment thread src/dataTransformations.js Outdated
Comment thread src/dataTransformations.js Outdated
raw, // retained for summary tag resolution
resultAsString: JSON.stringify(raw).toLowerCase() // for the filter input
raw,
resultAsString: JSON.stringify(raw).toLowerCase()
Comment thread integration.js Outdated
Comment on lines +153 to +157
// Timed out — query was cancelled; surface a clear error
return buildErrorResult(
entity,
data: {
summary: ['⏳ Query Running'],
details: {
complete: false,
statementHandle,
elapsedMs: pollResult.elapsedMs,
executionStats: { elapsedSeconds: (pollResult.elapsedMs / 1000).toFixed(1) }
}
}
};
`Query timed out after ${(pollResult.elapsedMs / 1000).toFixed(1)}s and was cancelled. ` +
`Try increasing the Query Timeout setting or simplifying your SQL.`
Comment thread components/block.js
Comment on lines +147 to 151
copyText(text) {
if (navigator && navigator.clipboard) {
navigator.clipboard.writeText(text).catch(() => {});
}
}
Comment thread templates/block.hbs Outdated
<div class="snow-attr-row snow-attr-row-copy">
<span class="p-key">Statement Handle:</span>
<span class="p-value snow-mono">{{details.statementHandle}}</span>
<button class="btn btn-polarity btn-xs snow-copy-btn" {{action "copyText" details.statementHandle}} title="Copy statement handle">
Comment thread package.json Outdated
{
"name": "snowflake",
"version": "1.0.0",
"version": "3.0.0",
deeedub and others added 3 commits June 8, 2026 20:32
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI commented Jun 9, 2026

Copy link
Copy Markdown

@copilot resolve the merge conflicts in this pull request

Conflicts are resolved and the branch now merges cleanly. Addressed in commit 0b23121.

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.

4 participants