Skip to content

Commit e4aaec8

Browse files
committed
fix(connectors): restore airtable AI Text indexing; floor sentry maxIssues
airtable: staging rendered object cells with a JSON.stringify fallback, so AI Text values and nested lookup arrays reached the index. This branch replaced that with a fixed key-probe list to stop attachment-URL hash churn, but the probe list has no fallback — aiText ({state,isStale,value}) and nested arrays rendered to the empty string and vanished from every document, and the content-derived hash never moved when the text regenerated. Read `value` last, after the existing probes, and recurse on nested arrays. The generated text is stable rather than an expiring signed URL, so this does not reintroduce churn. sentry: maxIssues now feeds the request limit, and Sentry rejects a non-integer. validateConfig accepts a fractional entry, so a config that saved cleanly would fail every sync at listing time. Staging was immune only because it sent a hardcoded page size.
1 parent 6366998 commit e4aaec8

2 files changed

Lines changed: 28 additions & 6 deletions

File tree

apps/sim/connectors/airtable/airtable.ts

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ const PAGE_SIZE = 100
1919
* Serializing them would change the record's content hash on every run and force
2020
* a full re-index of every record that holds an attachment. Only the stable,
2121
* identifying properties of the documented cell shapes are rendered: attachment
22-
* `filename`, collaborator `name` / `email` / `id`, barcode `text`, button `label`.
22+
* `filename`, collaborator `name` / `email` / `id`, barcode `text`, button `label`,
23+
* and AI Text `value`.
2324
*/
2425
function formatCellObject(value: Record<string, unknown>): string {
2526
const stable = value.filename ?? value.name ?? value.text ?? value.label
@@ -28,18 +29,32 @@ function formatCellObject(value: Record<string, unknown>): string {
2829
}
2930
if (typeof value.id === 'string') return value.id
3031
if (typeof value.email === 'string') return value.email
32+
/**
33+
* AI Text cells carry the generated text in `value` (`{ state, isStale, value }`)
34+
* and match none of the probes above. Read last so a shape carrying both `name`
35+
* and `value` keeps its name. Unlike the attachment links this renderer exists to
36+
* avoid, the generated text is stable rather than an expiring signed URL, so
37+
* including it does not reintroduce per-sync hash churn.
38+
*/
39+
if (typeof value.value === 'string') return value.value
3140
return ''
3241
}
3342

34-
/** Renders an object- or array-valued cell, dropping items that render to nothing. */
43+
/**
44+
* Renders an object- or array-valued cell, dropping items that render to nothing.
45+
* Array items recurse, so a nested lookup array — documented as
46+
* `array<number | string | boolean | unknown>` — renders its elements instead of
47+
* collapsing to an empty string.
48+
*/
3549
function formatCellValue(value: object): string {
3650
if (!Array.isArray(value)) return formatCellObject(value as Record<string, unknown>)
3751
return value
38-
.map((item) =>
39-
typeof item === 'object' && item !== null
52+
.map((item) => {
53+
if (Array.isArray(item)) return formatCellValue(item)
54+
return typeof item === 'object' && item !== null
4055
? formatCellObject(item as Record<string, unknown>)
4156
: String(item)
42-
)
57+
})
4358
.filter((item) => item.length > 0)
4459
.join(', ')
4560
}

apps/sim/connectors/sentry/sentry.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,14 @@ function readSourceConfig(sourceConfig: Record<string, unknown>): SentrySourceCo
162162
typeof sourceConfig.statsPeriod === 'string' ? sourceConfig.statsPeriod.trim() : ''
163163
const environment =
164164
typeof sourceConfig.environment === 'string' ? sourceConfig.environment.trim() : ''
165-
const maxIssues = sourceConfig.maxIssues ? Number(sourceConfig.maxIssues) : 0
165+
/**
166+
* Floored: `maxIssues` feeds the request `limit`, and Sentry rejects a
167+
* non-integer value. `validateConfig` accepts a fractional entry, so without
168+
* this a config that saves cleanly would fail every subsequent sync at listing
169+
* time. Staging was immune only because it sent a hardcoded page size.
170+
*/
171+
const rawMaxIssues = sourceConfig.maxIssues ? Number(sourceConfig.maxIssues) : 0
172+
const maxIssues = Number.isFinite(rawMaxIssues) && rawMaxIssues > 0 ? Math.floor(rawMaxIssues) : 0
166173

167174
return {
168175
host,

0 commit comments

Comments
 (0)