Skip to content

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

remove quote stripping from short & long inputs, because we previously would strip quotes since we interpolated variable types. we've since moved to a model here we take the provided value and insert it as-is, removing the need to strip any quotes

Type of Change

  • Bug fix

Testing

Tested manually.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Sep 18, 2025

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

Project Deployment Preview Comments Updated (UTC)
sim Ready Ready Preview Comment Sep 18, 2025 6:09pm
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
docs Skipped Skipped Sep 18, 2025 6:09pm

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 removes quote stripping functionality from the variable handling system across the Sim Studio AI codebase. The changes affect how user input is processed in various UI components including short inputs, long inputs, combobox components, and MCP server modals.

The core change involves modifying the formatDisplayText function signature to remove the stripQuotes parameter, which previously controlled whether surrounding quotes were automatically removed from user input. The function in apps/sim/components/ui/formatted-text.tsx has been simplified from formatDisplayText(text: string, stripQuotes = false) to formatDisplayText(text: string). Along with this, the shouldStripQuotesForDisplay method has been completely removed from the VariableManager class in apps/sim/lib/variables/variable-manager.ts.

This architectural change reflects a shift from the previous model where the system would interpolate variable types (requiring quote stripping to extract actual values) to a new approach where user-provided values are inserted exactly as entered. The formatDisplayText function retains its syntax highlighting capabilities for environment variables ({{...}}) and block references (<...>) but no longer modifies the actual content by removing quotes.

All affected UI components have been updated to use the new single-parameter function signature, including workflow input components, MCP server configuration modals, and starter block input formatters. The corresponding test suite has been updated to remove tests for the eliminated quote stripping functionality, ensuring the test coverage remains aligned with the new implementation.

Confidence score: 4/5

  • This PR is safe to merge with minimal risk as it's a well-coordinated refactoring across multiple components
  • Score reflects consistent changes across the codebase with proper test cleanup, though the architectural shift affects variable handling behavior
  • Pay close attention to variable interpolation behavior in production to ensure the 'as-is' model works correctly for all use cases

10 files reviewed, no comments

Edit Code Review Bot Settings | Greptile

@vercel vercel bot temporarily deployed to Preview – docs September 18, 2025 17:57 Inactive
@waleedlatif1 waleedlatif1 merged commit 5d96484 into staging Sep 18, 2025
5 of 6 checks passed
Acumen-Desktop pushed a commit to Acumen-Desktop/sim that referenced this pull request Sep 20, 2025
…tudioai#1375)

* fix(variables): remove quote stripping from short & long inputs

* restore env

* remove quote stripping everywhere

* remove unused file
@waleedlatif1 waleedlatif1 deleted the fix/variables branch September 23, 2025 15:57
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.

2 participants