Skip to content

Commit efdfc68

Browse files
committed
fix(google-vault): isolate list-optional-id fields from required-elsewhere counterparts
Cursor Bugbot: exportId/holdId/savedQueryId were shared between their respective list operation (optional filter) and update/delete/held-account operations (required). A stale ID left over from a delete/update on the same block instance would silently narrow the corresponding list operation to a single-resource get instead of listing the collection. Gave each list operation its own dedicated optional field (listExportId, listHoldId, listSavedQueryId), remapped in tools.config.params — same pattern already used for listMatterId.
1 parent aefd69d commit efdfc68

1 file changed

Lines changed: 51 additions & 15 deletions

File tree

apps/sim/blocks/blocks/google_vault.ts

Lines changed: 51 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -448,34 +448,45 @@ Return ONLY the search query - no explanations, no quotes, no extra text.`,
448448
id: 'exportId',
449449
title: 'Export ID',
450450
type: 'short-input',
451+
placeholder: 'Enter Export ID',
452+
condition: { field: 'operation', value: 'delete_matters_export' },
453+
required: true,
454+
},
455+
// Dedicated optional export-id filter for list_matters_export — kept separate from
456+
// the required exportId above so a value left over from Delete Export can never
457+
// silently turn "List Exports" into a single-export get.
458+
{
459+
id: 'listExportId',
460+
title: 'Export ID',
461+
type: 'short-input',
451462
placeholder: 'Enter Export ID (optional to fetch a specific export)',
452-
condition: { field: 'operation', value: ['list_matters_export', 'delete_matters_export'] },
453-
required: () => ({ field: 'operation', value: 'delete_matters_export' }),
463+
condition: { field: 'operation', value: 'list_matters_export' },
454464
},
455465
{
456466
id: 'holdId',
457467
title: 'Hold ID',
458468
type: 'short-input',
459-
placeholder: 'Enter Hold ID (optional to fetch a specific hold)',
469+
placeholder: 'Enter Hold ID',
460470
condition: {
461471
field: 'operation',
462472
value: [
463-
'list_matters_holds',
464473
'update_matters_holds',
465474
'delete_matters_holds',
466475
'add_held_accounts',
467476
'remove_held_accounts',
468477
],
469478
},
470-
required: () => ({
471-
field: 'operation',
472-
value: [
473-
'update_matters_holds',
474-
'delete_matters_holds',
475-
'add_held_accounts',
476-
'remove_held_accounts',
477-
],
478-
}),
479+
required: true,
480+
},
481+
// Dedicated optional hold-id filter for list_matters_holds — kept separate from the
482+
// required-everywhere holdId above so a value left over from another operation can
483+
// never silently turn "List Holds" into a single-hold get.
484+
{
485+
id: 'listHoldId',
486+
title: 'Hold ID',
487+
type: 'short-input',
488+
placeholder: 'Enter Hold ID (optional to fetch a specific hold)',
489+
condition: { field: 'operation', value: 'list_matters_holds' },
479490
},
480491
{
481492
id: 'pageSize',
@@ -608,9 +619,19 @@ Return ONLY the description text - no explanations, no quotes, no extra text.`,
608619
id: 'savedQueryId',
609620
title: 'Saved Query ID',
610621
type: 'short-input',
622+
placeholder: 'Enter Saved Query ID',
623+
condition: { field: 'operation', value: 'delete_saved_query' },
624+
required: true,
625+
},
626+
// Dedicated optional saved-query-id filter for list_saved_queries — kept separate
627+
// from the required savedQueryId above so a value left over from Delete Saved Query
628+
// can never silently turn "List Saved Queries" into a single-query get.
629+
{
630+
id: 'listSavedQueryId',
631+
title: 'Saved Query ID',
632+
type: 'short-input',
611633
placeholder: 'Enter Saved Query ID (optional to fetch a specific saved query)',
612-
condition: { field: 'operation', value: ['list_saved_queries', 'delete_saved_query'] },
613-
required: () => ({ field: 'operation', value: 'delete_saved_query' }),
634+
condition: { field: 'operation', value: 'list_saved_queries' },
614635
},
615636
],
616637
tools: {
@@ -702,6 +723,9 @@ Return ONLY the description text - no explanations, no quotes, no extra text.`,
702723
updateHoldOrgUnitId,
703724
savedQueryAccountEmails,
704725
savedQueryOrgUnitId,
726+
listExportId,
727+
listHoldId,
728+
listSavedQueryId,
705729
...rest
706730
} = params
707731
return {
@@ -720,6 +744,9 @@ Return ONLY the description text - no explanations, no quotes, no extra text.`,
720744
...(updateHoldOrgUnitId && { orgUnitId: updateHoldOrgUnitId }),
721745
...(savedQueryAccountEmails && { accountEmails: savedQueryAccountEmails }),
722746
...(savedQueryOrgUnitId && { orgUnitId: savedQueryOrgUnitId }),
747+
...(listExportId && { exportId: listExportId }),
748+
...(listHoldId && { holdId: listHoldId }),
749+
...(listSavedQueryId && { savedQueryId: listSavedQueryId }),
723750
}
724751
},
725752
},
@@ -810,6 +837,15 @@ Return ONLY the description text - no explanations, no quotes, no extra text.`,
810837
description:
811838
'Org unit ID to scope the saved query (create_saved_query, alternative to emails)',
812839
},
840+
listExportId: {
841+
type: 'string',
842+
description: 'Specific export ID to fetch (list_matters_export)',
843+
},
844+
listHoldId: { type: 'string', description: 'Specific hold ID to fetch (list_matters_holds)' },
845+
listSavedQueryId: {
846+
type: 'string',
847+
description: 'Specific saved query ID to fetch (list_saved_queries)',
848+
},
813849
},
814850
outputs: {
815851
matters: {

0 commit comments

Comments
 (0)