fix(chat-deploy): fixed form submission access patterns, fixed kb block filters#839
fix(chat-deploy): fixed form submission access patterns, fixed kb block filters#839waleedlatif1 merged 3 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
There was a problem hiding this comment.
Greptile Summary
This PR addresses two main issues in the Sim platform: form submission access patterns for chat deployment and knowledge base (KB) block filtering functionality.
Chat Deployment Form Submission Fixes:
The changes refactor how chat deployment forms are handled in the DeployModal component. Previously, the system relied on DOM event listeners and querySelector to manage form submission, which could be unreliable. The new approach uses direct form access via getElementById and introduces a handleWorkflowPreDeploy function that ensures the main workflow is properly deployed before chat deployment begins. A new onPreDeployWorkflow callback prop is passed to the ChatDeploy component, establishing cleaner separation of concerns. The SuccessView component has been extracted to its own file, following the project's pattern of keeping rendered components separate from configuration.
Knowledge Base Block Filter Consolidation:
The PR consolidates the knowledge base tag filtering system by removing the singular KnowledgeTagFilter component and its associated type definition, standardizing on the plural KnowledgeTagFilters component. The KnowledgeTagFilters component receives a significant upgrade, transforming from a simple list-based interface to a comprehensive table-based UI with integrated TagDropdown functionality for variable suggestions. This new interface provides better visual organization, hover-to-delete patterns, and filter count indicators while maintaining backward compatibility with the existing JSON storage format.
Supporting Infrastructure:
A new barrel export file (hooks/index.ts) centralizes access to chat deployment hooks, and various UI improvements include adding autoComplete='new-password' to prevent browser interference with generated passwords and enhanced table row management with unique ID generation in the DocumentTagEntry component.
These changes integrate well with the existing ReactFlow-based workflow builder, maintaining consistency with other components that use tag dropdowns and following established patterns for component organization and state management.
Confidence score: 4/5
• This PR appears safe to merge with well-structured refactoring that improves reliability and user experience
• The score reflects the significant scope of changes across multiple components, particularly the complete rewrite of KnowledgeTagFilters, which increases the surface area for potential issues
• The KnowledgeTagFilters component needs careful testing due to its complete transformation from list-based to table-based UI
Context used:
Context - When defining properties for components, use a dedicated config file (.ts) for configuration and keep rendered components in their respective component files. (link)
10 files reviewed, 1 comment
...[workspaceId]/w/[workflowId]/components/control-bar/components/deploy-modal/deploy-modal.tsx
Show resolved
Hide resolved
…ck filters (#839) * fix(chat-deploy): fixed form submission access patterns * fix(kb-block): fix tag filters component, removed unused component * fixed kb block subcomponents --------- Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local>
…ck filters (#839) * fix(chat-deploy): fixed form submission access patterns * fix(kb-block): fix tag filters component, removed unused component * fixed kb block subcomponents --------- Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local>
…n, deployed chat improvements (#843) * fix(domain): fix telemetry endpoint, only add redirects for hosted version (#822) * fix(otel): change back telemetry endpoint * only add redirects for hosted version --------- Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local> * fix(search-modal): fixed search modal keyboard nav (#823) * fixed search modal keyboard nav * break down file --------- Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local> * improvement(docs): add base exec charge info to docs (#826) * improvement(doc-tags-subblock): use table for doc tags subblock in create_document tool for KB (#827) * improvement(doc-tags-subblock): use table for doc tags create doc tool in KB block * enforce max tags * remove red warning text * fix(bugs): fixed rb2b csp, fixed overly-verbose logs, fixed x URLs (#828) Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local> * feat(wand): subblock level wand configuration + migrate old wand usage to this (#829) * feat(wand): subblock level wand configuration + migrate old wand usage to this * fix build issue * Update apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/wand-prompt-bar/wand-prompt-bar.tsx Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * remove optional param * remove unused test file * address greptile comments * change to enum for gen type * fix caching issue --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * feat(tools): added hunter.io tools/block, added default values of first option in dropdowns to avoid operation selector issue, added descriptions & param validation & updated docs (#825) * feat(tools): added hunter.io tools/block, added default values of first option in dropdowns to avoid operation selector issue * fix * added description for all outputs, fixed param validation for tools * cleanup * add dual validation, once during serialization and once during execution * improvement(docs): add base exec charge info to docs (#826) * improvement(doc-tags-subblock): use table for doc tags subblock in create_document tool for KB (#827) * improvement(doc-tags-subblock): use table for doc tags create doc tool in KB block * enforce max tags * remove red warning text * fix(bugs): fixed rb2b csp, fixed overly-verbose logs, fixed x URLs (#828) Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local> * fixed serialization errors to appear like execution errors, also fixed contrast on cmdk modal * fixed required for tools, added tag dropdown for kb tags * fix remaining tools with required fields * update utils * update docs * fix kb tags * fix types for exa * lint * updated contributing guide + pr template * Test pre-commit hook with linting * Test pre-commit hook again * remove test files * fixed wealthbox tool * update telemetry endpoints --------- Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local> Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com> * fix(deployed-chat): trigger blocks should not interfere with deployed chat exec (#832) * fix(deployed-chat): allow non-streaming responses in deployed chat, allow partial failure responses in deployed chat (#833) * fix(deployed-chat): allow non-streaming responses in deployed chat, allow partial failure responses in deployed chat * fix(csp): runtime variable resolution for CSP * cleanup --------- Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local> * fix(sockets): duplicate block op should go through debounced path (#834) * improvement(sockets): add batch subblock updates for duplicate to clear queue faster (#835) * improvement(sockets): duplicate op should let addBlock take subblock values instead of separate looped op (#836) * improvement(sockets): addBlock can accept subblock values * cleanup unused code * fix(deploy-modal): break down deploy modal into separate components (#837) Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local> * fix(kb-tags): docs page kb tags ui (#838) * fix(kb-tags): docs page kb tags ui * remove console logs * remove console error * fix(chat-deploy): fixed form submission access patterns, fixed kb block filters (#839) * fix(chat-deploy): fixed form submission access patterns * fix(kb-block): fix tag filters component, removed unused component * fixed kb block subcomponents --------- Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local> * fix(kb-tags): ui fixes, delete persistence for doc page header (#841) * fix deletion of tags + refactor next slot calc * fix kb tag filters count ui * fix(chat-deploy): added new image upload component, fixed some state issues with success view (#842) * fix(chat-deploy): added new image upload component, fixed some state issues with success view * cleanup --------- Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local> * feat(deploy-chat): added a logo upload for the chat, incr font size * fix(deploy-modal): break down deploy modal into separate components (#837) Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local> --------- Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local> Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com> Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
…ck filters (#839) * fix(chat-deploy): fixed form submission access patterns * fix(kb-block): fix tag filters component, removed unused component * fixed kb block subcomponents --------- Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local>
…ck filters (simstudioai#839) * fix(chat-deploy): fixed form submission access patterns * fix(kb-block): fix tag filters component, removed unused component * fixed kb block subcomponents --------- Co-authored-by: waleedlatif <waleedlatif@waleedlatifs-MacBook-Pro.local>
Description
Fixed form submission access patterns, fixed kb block filters
Type of change
How Has This Been Tested?
Tested manually
Checklist:
bun run test)Security Considerations: