Skip to content

Commit 84d4128

Browse files
waleedlatif1claude
andcommitted
fix(rippling): fix grammar typos and revert unnecessary migration
- Fix "a object" → "an object" in update/delete object category descriptions - Revert OPERATION_VALUE_MIGRATIONS (unnecessary for low-usage integration) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 817de75 commit 84d4128

File tree

3 files changed

+15
-63
lines changed

3 files changed

+15
-63
lines changed

apps/sim/lib/workflows/migrations/subblock-migrations.ts

Lines changed: 13 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -53,33 +53,6 @@ export const SUBBLOCK_ID_MIGRATIONS: Record<string, Record<string, string>> = {
5353
},
5454
}
5555

56-
/**
57-
* Maps old Rippling operation values to their current equivalents.
58-
*
59-
* When the integration was expanded from 16 to 86 tools, several
60-
* operations were renamed or removed. Saved workflows still carry
61-
* the old operation value. Without this mapping the tool selector
62-
* returns an unregistered tool ID, causing a runtime error.
63-
*/
64-
export const OPERATION_VALUE_MIGRATIONS: Record<string, Record<string, string>> = {
65-
rippling: {
66-
list_employees: 'list_workers',
67-
get_employee: 'get_worker',
68-
list_employees_with_terminated: 'list_workers',
69-
get_company: 'list_companies',
70-
get_company_activity: '_removed_get_company_activity',
71-
list_levels: '_removed_list_levels',
72-
list_leave_requests: '_removed_list_leave_requests',
73-
process_leave_request: '_removed_process_leave_request',
74-
list_leave_balances: '_removed_list_leave_balances',
75-
get_leave_balance: '_removed_get_leave_balance',
76-
list_leave_types: '_removed_list_leave_types',
77-
create_group: '_removed_create_group',
78-
update_group: '_removed_update_group',
79-
push_candidate: '_removed_push_candidate',
80-
},
81-
}
82-
8356
/**
8457
* Migrates legacy subblock IDs inside a single block's subBlocks map.
8558
* Returns a new subBlocks record if anything changed, or the original if not.
@@ -130,43 +103,22 @@ export function migrateSubblockIds(blocks: Record<string, BlockState>): {
130103

131104
for (const [blockId, block] of Object.entries(blocks)) {
132105
const renames = SUBBLOCK_ID_MIGRATIONS[block.type]
133-
const opMigrations = OPERATION_VALUE_MIGRATIONS[block.type]
134-
let currentBlock = block
135-
136-
if (renames && block.subBlocks) {
137-
const { subBlocks, migrated } = migrateBlockSubblockIds(block.subBlocks, renames)
138-
if (migrated) {
139-
logger.info('Migrated legacy subblock IDs', {
140-
blockId: block.id,
141-
blockType: block.type,
142-
})
143-
anyMigrated = true
144-
currentBlock = { ...currentBlock, subBlocks }
145-
}
106+
if (!renames || !block.subBlocks) {
107+
result[blockId] = block
108+
continue
146109
}
147110

148-
if (opMigrations && currentBlock.subBlocks?.operation) {
149-
const oldOp = String(currentBlock.subBlocks.operation.value ?? '')
150-
const newOp = opMigrations[oldOp]
151-
if (newOp) {
152-
logger.info('Migrated legacy operation value', {
153-
blockId: currentBlock.id,
154-
blockType: currentBlock.type,
155-
from: oldOp,
156-
to: newOp,
157-
})
158-
anyMigrated = true
159-
currentBlock = {
160-
...currentBlock,
161-
subBlocks: {
162-
...currentBlock.subBlocks,
163-
operation: { ...currentBlock.subBlocks.operation, value: newOp },
164-
},
165-
}
166-
}
111+
const { subBlocks, migrated } = migrateBlockSubblockIds(block.subBlocks, renames)
112+
if (migrated) {
113+
logger.info('Migrated legacy subblock IDs', {
114+
blockId: block.id,
115+
blockType: block.type,
116+
})
117+
anyMigrated = true
118+
result[blockId] = { ...block, subBlocks }
119+
} else {
120+
result[blockId] = block
167121
}
168-
169-
result[blockId] = currentBlock
170122
}
171123

172124
return { blocks: result, migrated: anyMigrated }

apps/sim/tools/rippling/delete_object_category.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type { ToolConfig } from '@/tools/types'
44
export const ripplingDeleteObjectCategoryTool: ToolConfig<RipplingDeleteObjectCategoryParams> = {
55
id: 'rippling_delete_object_category',
66
name: 'Rippling Delete ObjectCategory',
7-
description: 'Delete a object category',
7+
description: 'Delete an object category',
88
version: '1.0.0',
99
params: {
1010
apiKey: {

apps/sim/tools/rippling/update_object_category.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type { ToolConfig } from '@/tools/types'
44
export const ripplingUpdateObjectCategoryTool: ToolConfig<RipplingUpdateObjectCategoryParams> = {
55
id: 'rippling_update_object_category',
66
name: 'Rippling Update ObjectCategory',
7-
description: 'Update a object category',
7+
description: 'Update an object category',
88
version: '1.0.0',
99
params: {
1010
apiKey: {

0 commit comments

Comments
 (0)