Skip to content

Commit e4c912d

Browse files
committed
Merge remote-tracking branch 'origin/staging' into feat/granola-expansion
# Conflicts: # apps/sim/tools/generated/tool-ids.ts # apps/sim/tools/generated/tool-metadata.ts # apps/sim/tools/generated/tool-outputs.ts
2 parents 214d699 + a9cf760 commit e4c912d

112 files changed

Lines changed: 24904 additions & 4 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/docs/components/icons.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9340,3 +9340,18 @@ export function ZohoDeskIcon(props: SVGProps<SVGSVGElement>) {
93409340
</svg>
93419341
)
93429342
}
9343+
9344+
export function PitchBookIcon(props: SVGProps<SVGSVGElement>) {
9345+
return (
9346+
<svg
9347+
{...props}
9348+
viewBox='-3.16 0 102 101.7'
9349+
fill='currentColor'
9350+
xmlns='http://www.w3.org/2000/svg'
9351+
aria-hidden='true'
9352+
>
9353+
<path d='M75.43,0C16.66,4.78-7.6,53.48,2.06,84.09c5.67-8.73,16.21-18.24,37.78-21.76-1.25-25.79,8.08-43.79,35.59-62.33Z' />
9354+
<path d='M45.3,66.03c-14.85,2.43-25.18,6.46-31.65,12.57.2,8.16,2.53,16.13,6.77,23.1,5.02-12.27,21.5-20.95,46.55-21.01-6.1-29.4,7.53-56.33,28.71-74.41-10.48,1.55-20.75,4.31-30.61,8.21-16.13,15.54-22.14,35.57-19.77,51.55Z' />
9355+
</svg>
9356+
)
9357+
}

apps/docs/components/ui/icon-mapping.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ import {
176176
PersonaIcon,
177177
PineconeIcon,
178178
PipedriveIcon,
179+
PitchBookIcon,
179180
PolymarketIcon,
180181
PostgresIcon,
181182
PosthogIcon,
@@ -466,6 +467,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
466467
persona: PersonaIcon,
467468
pinecone: PineconeIcon,
468469
pipedrive: PipedriveIcon,
470+
pitchbook: PitchBookIcon,
469471
polymarket: PolymarketIcon,
470472
postgresql: PostgresIcon,
471473
posthog: PosthogIcon,

apps/docs/content/docs/en/integrations/meta.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@
188188
"pinecone",
189189
"pipedrive",
190190
"pipedrive-service-account",
191+
"pitchbook",
191192
"polymarket",
192193
"postgresql",
193194
"posthog",

apps/docs/content/docs/en/integrations/pitchbook.mdx

Lines changed: 3484 additions & 0 deletions
Large diffs are not rendered by default.

apps/sim/blocks/blocks/pitchbook.ts

Lines changed: 3618 additions & 0 deletions
Large diffs are not rendered by default.

apps/sim/blocks/registry-maps.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ import { PersonaBlock, PersonaBlockMeta } from '@/blocks/blocks/persona'
249249
import { PiBlock } from '@/blocks/blocks/pi'
250250
import { PineconeBlock, PineconeBlockMeta } from '@/blocks/blocks/pinecone'
251251
import { PipedriveBlock, PipedriveBlockMeta } from '@/blocks/blocks/pipedrive'
252+
import { PitchBookBlock, PitchBookBlockMeta } from '@/blocks/blocks/pitchbook'
252253
import { PolymarketBlock, PolymarketBlockMeta } from '@/blocks/blocks/polymarket'
253254
import { PostgreSQLBlock, PostgreSQLBlockMeta } from '@/blocks/blocks/postgresql'
254255
import { PostHogBlock, PostHogBlockMeta } from '@/blocks/blocks/posthog'
@@ -578,6 +579,7 @@ export const BLOCK_REGISTRY: Record<string, BlockConfig> = {
578579
pi: PiBlock,
579580
pinecone: PineconeBlock,
580581
pipedrive: PipedriveBlock,
582+
pitchbook: PitchBookBlock,
581583
polymarket: PolymarketBlock,
582584
postgresql: PostgreSQLBlock,
583585
posthog: PostHogBlock,
@@ -886,6 +888,7 @@ export const BLOCK_META_REGISTRY: Record<string, BlockMeta> = {
886888
persona: PersonaBlockMeta,
887889
pinecone: PineconeBlockMeta,
888890
pipedrive: PipedriveBlockMeta,
891+
pitchbook: PitchBookBlockMeta,
889892
polymarket: PolymarketBlockMeta,
890893
postgresql: PostgreSQLBlockMeta,
891894
posthog: PostHogBlockMeta,

apps/sim/components/icons.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9340,3 +9340,18 @@ export function ZohoDeskIcon(props: SVGProps<SVGSVGElement>) {
93409340
</svg>
93419341
)
93429342
}
9343+
9344+
export function PitchBookIcon(props: SVGProps<SVGSVGElement>) {
9345+
return (
9346+
<svg
9347+
{...props}
9348+
viewBox='-3.16 0 102 101.7'
9349+
fill='currentColor'
9350+
xmlns='http://www.w3.org/2000/svg'
9351+
aria-hidden='true'
9352+
>
9353+
<path d='M75.43,0C16.66,4.78-7.6,53.48,2.06,84.09c5.67-8.73,16.21-18.24,37.78-21.76-1.25-25.79,8.08-43.79,35.59-62.33Z' />
9354+
<path d='M45.3,66.03c-14.85,2.43-25.18,6.46-31.65,12.57.2,8.16,2.53,16.13,6.77,23.1,5.02-12.27,21.5-20.95,46.55-21.01-6.1-29.4,7.53-56.33,28.71-74.41-10.48,1.55-20.75,4.31-30.61,8.21-16.13,15.54-22.14,35.57-19.77,51.55Z' />
9355+
</svg>
9356+
)
9357+
}

apps/sim/ee/workspace-forking/components/fork-sync/use-fork-sync.test.tsx

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ import {
4949
} from '@/ee/workspace-forking/components/fork-sync/dependent-value'
5050
import {
5151
type ForkSyncController,
52+
shouldReconfigureEntry,
5253
useForkSync,
5354
} from '@/ee/workspace-forking/components/fork-sync/use-fork-sync'
5455

@@ -556,3 +557,71 @@ describe('useForkSync post-sync reset', () => {
556557
expect(get().dirty).toBe(true)
557558
})
558559
})
560+
561+
describe('shouldReconfigureEntry', () => {
562+
const entry = (overrides: Partial<ForkMappingEntry> = {}): ForkMappingEntry =>
563+
({
564+
kind: 'credential',
565+
sourceId: 'cred-src',
566+
targetId: 'cred-tgt',
567+
suggested: false,
568+
...overrides,
569+
}) as ForkMappingEntry
570+
571+
it('is false for a settled non-custom-block mapping', () => {
572+
// An unchanged credential mapping leaves its stored dependent picks valid, so its fields
573+
// stay out of the way until something actually changes.
574+
expect(shouldReconfigureEntry(entry(), {})).toBe(false)
575+
})
576+
577+
it('is true for a custom block mapped to a DIFFERENT block, even once saved', () => {
578+
// The regression: `parentChanged` drove the reconfigure UI off "was this edited in this
579+
// session", so a saved mapping read as settled and the modal showed "no changes required"
580+
// with no inputs. A custom block pointed elsewhere has sub-blocks keyed by the SOURCE
581+
// block's field ids — they describe nothing on the target and nothing carries over — so it
582+
// needs configuring for as long as the mapping stands, not just the session it was made in.
583+
const saved = entry({
584+
kind: 'custom-block',
585+
sourceId: 'custom_block_prod01',
586+
targetId: 'custom_block_uat0001',
587+
})
588+
589+
expect(shouldReconfigureEntry(saved, {})).toBe(true)
590+
})
591+
592+
it('is false for a custom block mapped to itself', () => {
593+
// "Keep the same block across environments": the type never changes, so the source's own
594+
// field ids still describe it and its values carry across untouched.
595+
const identity = entry({
596+
kind: 'custom-block',
597+
sourceId: 'custom_block_prod01',
598+
targetId: 'custom_block_prod01',
599+
})
600+
601+
expect(shouldReconfigureEntry(identity, {})).toBe(false)
602+
})
603+
604+
it('follows an in-session custom-block re-pick rather than the saved target', () => {
605+
const saved = entry({
606+
kind: 'custom-block',
607+
sourceId: 'custom_block_prod01',
608+
targetId: 'custom_block_uat0001',
609+
})
610+
const key = `${saved.kind}:${saved.sourceId}`
611+
612+
// Re-pointed back at itself in-session: nothing to configure.
613+
expect(shouldReconfigureEntry(saved, { [key]: 'custom_block_prod01' })).toBe(false)
614+
// Re-pointed at a third block: configure against that one.
615+
expect(shouldReconfigureEntry(saved, { [key]: 'custom_block_sbx0001' })).toBe(true)
616+
})
617+
618+
it('is false for an unmapped custom block, which the promote blocks instead', () => {
619+
const unmapped = entry({
620+
kind: 'custom-block',
621+
sourceId: 'custom_block_prod01',
622+
targetId: null,
623+
})
624+
625+
expect(shouldReconfigureEntry(unmapped, {})).toBe(false)
626+
})
627+
})

apps/sim/ee/workspace-forking/components/fork-sync/use-fork-sync.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,21 @@ const entryKey = (entry: ForkMappingEntry) => forkRefKey(entry)
236236
* the dependents). Pure over (entry, in-session targets) so the inline render, the Sync
237237
* gate, and the payload build share one predicate instead of drifting copies.
238238
*/
239-
function shouldReconfigureEntry(entry: ForkMappingEntry, targets: Record<string, string>): boolean {
239+
export function shouldReconfigureEntry(
240+
entry: ForkMappingEntry,
241+
targets: Record<string, string>
242+
): boolean {
240243
const next = targets[entryKey(entry)] ?? entry.targetId ?? ''
241244
if (next === '') return false
245+
// A custom block pointed at a DIFFERENT block needs its inputs configured for as long as
246+
// that mapping stands, not only in the session where it was picked. Every other kind can
247+
// fall through to the in-session test because an unchanged mapping leaves its stored
248+
// dependent values valid — a Gmail label picked under the same credential still resolves.
249+
// A custom block has no such continuity: its sub-blocks are keyed by the SOURCE block's
250+
// Start field ids, so under a different target they describe fields that do not exist and
251+
// nothing carries over. Treating it as settled once saved is what left the fields hidden
252+
// behind "no changes required" on every sync after the first.
253+
if (entry.kind === 'custom-block') return next !== entry.sourceId
242254
return entry.suggested || next !== (entry.targetId ?? '')
243255
}
244256

apps/sim/lib/integrations/icon-mapping.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ import {
174174
PersonaIcon,
175175
PineconeIcon,
176176
PipedriveIcon,
177+
PitchBookIcon,
177178
PolymarketIcon,
178179
PostgresIcon,
179180
PosthogIcon,
@@ -449,6 +450,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
449450
persona: PersonaIcon,
450451
pinecone: PineconeIcon,
451452
pipedrive: PipedriveIcon,
453+
pitchbook: PitchBookIcon,
452454
polymarket: PolymarketIcon,
453455
postgresql: PostgresIcon,
454456
posthog: PosthogIcon,

0 commit comments

Comments
 (0)