Skip to content

v0.3.50: debounce moved server side, hasWorkflowChanged fixes, advanced mode/serializer fix, jira fix, billing notifs#1282

Merged
icecrasher321 merged 5 commits intomainfrom
staging
Sep 8, 2025
Merged

v0.3.50: debounce moved server side, hasWorkflowChanged fixes, advanced mode/serializer fix, jira fix, billing notifs#1282
icecrasher321 merged 5 commits intomainfrom
staging

Conversation

@icecrasher321
Copy link
Collaborator

@icecrasher321 icecrasher321 commented Sep 8, 2025

Summary

Sockets fix: move debounce to server side; cleanup unused onBlur (#1265)

Subblock param mapping fix: consolidate resolution of advanced/basic mode params using canonicalParamId; multiple related fixes, tests, and logging (#1274)

Jira fix: reading multiple issues and write — fixed read/write tools

Notifications: added notifications for usage thresholds, overages, welcome emails, etc (#1266)

icecrasher321 and others added 3 commits September 6, 2025 12:49
* fix(sockets): move debounce to server side

* remove comments / unused onBlur
…ic mode params using canonicalParamId (#1274)

* fix(serializer): block's params mapper not running first

* fix

* fix

* revert

* add canonicalParamId

* fix

* fix tests

* fix discord

* fix condition checking

* edit condition check

* fix

* fix subblock config check

* fix

* add logging

* add more logs

* fix

* fix

* attempt

* fix discord

* remove unused discord code

* mark as required correctly
fixed the read and write tools in jira
@vercel
Copy link

vercel bot commented Sep 8, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
sim (staging) Ready Ready Comment Sep 8, 2025 5:57pm
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
docs Skipped Skipped Sep 8, 2025 5:57pm

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Summary

This PR implements three major fixes to improve the reliability and consistency of the Sim workflow platform:

Server-Side Debouncing Migration: Moves debouncing logic from client-side to server-side to address critical issues where rapid user input was causing character drops and queue congestion. The server now coalesces updates within a 25ms window using Socket.IO, while the client immediately sends operations without complex local state management. This architectural change affects subblock and variable updates across the entire application.

Parameter Mapping Consolidation: Introduces a new canonicalParamId field to the SubBlockConfig interface to resolve conflicts between basic mode (UI selectors) and advanced mode (manual inputs) parameters. This system allows multiple subBlocks that represent the same logical parameter to be consolidated under a single canonical identifier, eliminating the need for custom mapper logic in individual blocks. The change affects 20+ block configurations including Microsoft Excel, Google Sheets, Jira, Slack, Discord, and others.

Jira Integration Fixes: Completely refactors Jira read/write tools to address functionality issues. The bulk read tool switches from issue picker API to search API with JQL queries and implements proper pagination with safety limits. The write tool removes strict validation for issue types and defaults to 'Task'. Parameter resolution is improved with better cloud ID handling and error messages.

Additional improvements include enhanced workflow change detection in the control bar, consolidation of workflow loading logic using helper functions, removal of Discord channel selector components as part of architectural cleanup, and improved error handling across various API endpoints. The changes maintain backward compatibility while significantly improving reliability and user experience.

Confidence score: 3/5

  • This PR contains complex architectural changes that could introduce subtle bugs, particularly around the server-side debouncing implementation and parameter mapping system
  • Score reflects the high complexity of changes across critical systems (socket handling, parameter resolution, database operations) that require careful testing in production scenarios
  • Pay close attention to the Notion and Airtable blocks which have credential parameter mismatches that could break OAuth integrations

44 files reviewed, 16 comments

Edit Code Review Bot Settings | Greptile

layout: 'full',
placeholder: 'Enter Discord server ID',
mode: 'advanced',
required: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Setting required: true on serverId but it's conditional - this could cause validation issues when operation doesn't require serverId

Comment on lines +308 to +309
useOperationQueueStore.getState().isProcessing,
useOperationQueueStore.getState().operations.length,
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Direct store state access in dependency array may cause unnecessary re-renders. Consider extracting these values as separate state variables outside the effect.

layout: 'full',
placeholder: 'Enter Discord channel ID',
mode: 'advanced',
required: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Setting required: true on channelId but it's conditional - this could cause validation issues when operation doesn't require channelId

Comment on lines +92 to 93
],
}))
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Missing new operation in the filtered operations array - this will drop the current operation

Suggested change
],
}))
],
}))
}
// Add the new operation after filtering
const queuedOp: QueuedOperation = {
...operation,
timestamp: Date.now(),
retryCount: 0,
status: 'pending',
}
set((state) => ({
operations: [...state.operations, queuedOp],

Comment on lines +114 to 115
],
}))
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Same issue here - the current operation is not added back to the filtered array

Suggested change
],
}))
],
}))
}
// Add the new operation after filtering
const queuedOp: QueuedOperation = {
...operation,
timestamp: Date.now(),
retryCount: 0,
status: 'pending',
}
set((state) => ({
operations: [...state.operations, queuedOp],

Comment on lines 100 to 102
const matchedResource = accessibleResources.find(
(r: any) => r.url.toLowerCase() === normalizedInput
)
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: No null check for matchedResource - could throw if domain doesn't match any accessible resources

Suggested change
const matchedResource = accessibleResources.find(
(r: any) => r.url.toLowerCase() === normalizedInput
)
const matchedResource = accessibleResources.find(
(r: any) => r.url.toLowerCase() === normalizedInput
)
if (!matchedResource) {
return {
success: false,
output: [],
}
}

properties: [],
}),
})
const pageData = await pageResponse.json()
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Missing error handling for failed API requests - should check pageResponse.ok before parsing JSON

Accept: 'application/json',
},
})
const pageData = await pageResponse.json()
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Missing error handling for failed API requests - should check pageResponse.ok before parsing JSON

Comment on lines +207 to 211
if (!issueForRead) {
throw new Error(
'Issue Key is required. Please select an issue or enter an issue key manually.'
'Select a project to read issues, or provide an issue key to read a single issue.'
)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Error message is misleading - says 'Select a project to read issues' but validation checks for issueKey, not project. Should validate project selection for bulk read or issue key for single issue read.

Suggested change
if (!issueForRead) {
throw new Error(
'Issue Key is required. Please select an issue or enter an issue key manually.'
'Select a project to read issues, or provide an issue key to read a single issue.'
)
}
if (!issueForRead) {
throw new Error(
'Issue Key is required. Please select an issue or enter an issue key manually.'
)
}


if (workflowExists.length === 0) {
pending.opToSocket.forEach((socketId, opId) => {
const sock = (roomManager as any).io?.sockets?.sockets?.get(socketId)
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Type assertion to any bypasses TypeScript safety - consider defining proper types for the RoomManager io property

Context Used: Context - Avoid using type assertions to 'any' in TypeScript. Instead, ensure proper type definitions are used to maintain type safety. (link)

@waleedlatif1 waleedlatif1 changed the title v0.3.50: debounce moved server side, hasWorkflowChanged fixes, advanced mode/serializer fix, jira fix v0.3.50: debounce moved server side, hasWorkflowChanged fixes, advanced mode/serializer fix, jira fix, billing notifs Sep 8, 2025
…es, and welcome emails (#1266)

* feat(notifications): added notifications for usage thresholds, overages, and welcome emails

* cleanup

* updated logo, ack PR comments

* ran migrations
* update infra and remove railway

* fix(notifications): increase precision on billing calculations

* Revert "update infra and remove railway"

This reverts commit d17603e.

* cleanup
@railway-app railway-app bot temporarily deployed to sim (sim / staging) September 8, 2025 17:46 Inactive
@vercel vercel bot temporarily deployed to Preview – docs September 8, 2025 17:46 Inactive
@icecrasher321 icecrasher321 merged commit 784992f into main Sep 8, 2025
17 checks passed
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.

3 participants