UN-3102 [FIX] confirmation alert alway asking issue fix - #1711
Conversation
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings. WalkthroughAdded internal flags to ConfigureConnectorModal to track schema/session initialization and Rule Engine dirty state; capture baseline form/connector after schema-defaults settle; update hasUnsavedChanges to be mode-specific (API: RuleEngine-only; others: form/connector/or rule engine); wire RuleEngine onDirtyStateChange in API and DATABASE modes. Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant Modal as ConfigureConnectorModal
participant Schema as Schema Loader
participant Form as Form Component
participant RuleEngine as RuleEngine
participant State as Internal State
User->>Modal: Open modal
Modal->>State: reset init/session/dirty flags
Modal->>Schema: fetch schema (or mark loaded if no endpoint)
Schema-->>Modal: schema loaded
Modal->>Form: apply defaults
Note over Modal,Form: brief delay to let defaults settle
Modal->>State: capture initial formDataConfig & connector id (hasInitializedFormData=true)
alt API or DATABASE (MANUALREVIEW)
Modal->>RuleEngine: render with onDirtyStateChange -> setRuleEngineHasChanges
User->>RuleEngine: edit rules
RuleEngine-->>Modal: onDirtyStateChange(true)
Modal->>State: ruleEngineHasChanges = true
end
rect rgb(220,230,255)
Note over Modal,State: Unsaved changes evaluation
alt API mode
Modal->>State: hasUnsavedChanges = ruleEngineHasChanges
else Other modes
Modal->>State: hasUnsavedChanges = formChanged ∨ connectorChanged ∨ ruleEngineHasChanges
end
end
User->>Modal: Save/Submit
Modal->>Modal: enable/perform save considering ruleEngineHasChanges
User->>Modal: Close modal
Modal->>State: reset init/session/dirty flags
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro Cache: Disabled due to Reviews > Disable Cache setting Knowledge base: Disabled due to 📒 Files selected for processing (1)
🧰 Additional context used🧬 Code graph analysis (1)frontend/src/components/agency/configure-connector-modal/ConfigureConnectorModal.jsx (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (6)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
frontend/src/components/agency/configure-connector-modal/ConfigureConnectorModal.jsx (1)
657-663: Verify that RuleEngine supports onDirtyStateChange in DATABASE mode.Same concern as the API mode usage above: ensure that the
RuleEnginecomponent properly handles theonDirtyStateChangecallback for the DATABASE/MANUALREVIEW mode. The verification script in the previous comment will check both usages.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to Reviews > Disable Cache setting
Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting
📒 Files selected for processing (1)
frontend/src/components/agency/configure-connector-modal/ConfigureConnectorModal.jsx(7 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
frontend/src/components/agency/configure-connector-modal/ConfigureConnectorModal.jsx (2)
frontend/src/components/agency/ds-settings-card/DsSettingsCard.jsx (3)
connMode(30-30)formDataConfig(33-33)connDetails(32-32)frontend/src/components/settings/users/Users.jsx (1)
open(33-33)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
🔇 Additional comments (6)
frontend/src/components/agency/configure-connector-modal/ConfigureConnectorModal.jsx (6)
73-75: LGTM! Clear state flag declarations.The three new state flags appropriately track initialization lifecycle and RuleEngine dirty state with clear, self-documenting names.
106-107: LGTM! Consistent schema loading lifecycle tracking.Correctly marks schema as loaded when no endpoint exists, allowing the initialization flow to proceed.
283-294: LGTM! Improved unsaved changes detection.The logic correctly handles API mode separately and normalizes connector ID comparison to avoid false positives from
undefinedvsnullmismatch. The integration ofruleEngineHasChangesfor DATABASE mode ensures rule changes are detected.
442-450: LGTM! Comprehensive cleanup on modal close.Properly resets all initialization flags and baseline values when the modal closes, ensuring a fresh state for the next session.
623-627: Let me revise my comment.Actually, I already generated the comment for 623-627. I should just add another comment for 657-663 that references the same concern but notes it's for DATABASE mode.
Hmm, but the guideline says "Don't create multiple review comments for the same issue within the same code segment."
But these are NOT the same code segment - they're in different parts of the file.
Let me just add a note to my existing comment that both usages need verification.
Actually, I'll modify my comment to include both line ranges.
[scratchpad_end] -->Also applies to: 657-663
623-627: Verify that RuleEngine supports the onDirtyStateChange prop.The
RuleEnginecomponent is loaded dynamically from../../../plugins/manual-review/rule-engine, but this plugin directory does not exist in the repository. The component is invoked with anonDirtyStateChangecallback in two places (API mode and DATABASE mode), but without access to the plugin implementation, verify that:
- The plugin is properly available at runtime (external dependency, build artifact, or generated code).
- The
RuleEnginecomponent actually accepts and uses theonDirtyStateChangeprop.- The callback is invoked with a boolean value when rules are modified.
If the plugin is missing or doesn't support this prop, the unsaved-changes detection will fail silently.
…odel-always-asking-close-without-saving-confirmation-alert-coming-pfa
|
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
frontend/src/components/agency/configure-connector-modal/ConfigureConnectorModal.jsx (2)
391-398: Modal may close with unsaved RuleEngine changes.When "Save and Close" is clicked from the unsaved changes dialog (lines 754-761),
handleSave()returnstrueeven when it doesn't persist RuleEngine changes. This causes the modal to close (line 396) while leaving RuleEngine changes unsaved, which contradicts user expectations.This is related to the issue flagged in lines 299-352.
299-352: Save button remains enabled after saving, even when only RuleEngine changes exist—these changes are not persisted.The Save button is enabled when
hasUnsavedChanges()returns true (line 542), which includesruleEngineHasChangesfor DATABASE mode (line 296). However,handleValidateAndSubmit()only persists form configuration and connector changes (lines 307–315); it does not include RuleEngine changes in theupdatePayload.After a successful save,
initialFormDataConfigandinitialConnectorIdare reset (lines 318–319), butruleEngineHasChangesis not, leaving the Save button permanently enabled if only RuleEngine changes exist. Additionally,ruleEngineHasChangesis only reset when the modal closes (line 451), not after save.This creates confusing UX in DATABASE mode:
- User modifies a rule → Save button enables
- User clicks Save → only form/connector config persists; RuleEngine changes are not sent to backend
- Save button remains enabled because
ruleEngineHasChangeswas never resetClarify whether RuleEngine persists its own changes independently, or if the Save button should trigger RuleEngine persistence. If RuleEngine saves independently, either exclude
ruleEngineHasChangesfromhasUnsavedChanges()for DATABASE mode, or provide clearer UX (separate save controls or messaging). If RuleEngine changes must be persisted via the endpoint update, include them in the payload and reset the state after successful save.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to Reviews > Disable Cache setting
Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting
📒 Files selected for processing (1)
frontend/src/components/agency/configure-connector-modal/ConfigureConnectorModal.jsx
🧰 Additional context used
🧬 Code graph analysis (1)
frontend/src/components/agency/configure-connector-modal/ConfigureConnectorModal.jsx (1)
frontend/src/components/agency/ds-settings-card/DsSettingsCard.jsx (3)
connMode(30-30)formDataConfig(33-33)connDetails(32-32)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
🔇 Additional comments (6)
frontend/src/components/agency/configure-connector-modal/ConfigureConnectorModal.jsx (6)
73-75: Good addition of initialization state flags.The three new state flags properly track the initialization lifecycle and RuleEngine dirty state, enabling precise detection of actual changes versus false positives from schema defaults.
107-132: Schema loading lifecycle properly tracked.The logic correctly marks the schema as loaded both when no endpoint exists (line 109-111) and after the schema fetch completes (line 130), ensuring the initialization effect can proceed appropriately in both scenarios.
285-297: Unsaved changes detection is now correct and mode-aware.The normalization of connector IDs at line 293 (
connDetails?.id || null) properly fixes the undefined vs. null mismatch bug. The mode-specific logic correctly returns only RuleEngine changes for API mode, while checking all sources for DATABASE mode.
444-453: Proper cleanup of initialization state on modal close.All initialization flags and baseline values are correctly reset when the modal closes, ensuring a clean state for the next open.
362-389: RuleEngine state not reverted when discarding changes.When the user chooses "Close without Saving" (line 749-753), form data and connector selection are reverted to their initial values (lines 367-384), but RuleEngine changes are not reverted. If RuleEngine maintains its own internal state, this could leave unsaved rule changes in place after the modal closes and reopens.
Verify whether RuleEngine needs explicit state reset when discarding changes. If RuleEngine re-initializes from
workflowDetailson each render, this may not be an issue. Otherwise, consider resetting RuleEngine state or calling a cleanup method here.
626-630: Verify RuleEngine plugin supportsonDirtyStateChangeprop.The RuleEngine component is loaded from an external plugin not included in this repository. Cannot verify that the
onDirtyStateChangeprop is supported by the plugin. Confirm this prop is documented and supported in the rule-engine plugin implementation before merging.
* UN-3008 [FIX] Pass word-level confidence setting to Structure Tool (#1714) * UN-3008 [FIX] Pass word-level confidence setting to Structure Tool Fix missing propagation of word confidence setting: - Add ENABLE_WORD_CONFIDENCE constant to SettingsKeys - Read and pass word confidence setting through tool_settings * Bump Structure Tool version to 0.0.95 * UN-3099 [FIX] Disable issue in hitl tab in configure destination and table line iss… (#1707) * disable issue in hitl tab in configure destination and table line issue in logs * sonar issue fix * [MISC] Clear search filter when switching adapter settings pages (#1712) MISC [FIX] Clear search filter when switching adapter settings pages Fixed the search filter not clearing when switching between LLMs, Vector DBs, Embedding, and Text Extractor pages. The fix uses React's key prop to force remount the Search component when page type changes. Changes: - Added searchKey prop to ToolNavBar and Search component - Added clearSearch function to useListSearch hook - Call clearSearch when adapter type changes in ToolSettings 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Kirtiman Mishra <110175055+kirtimanmishrazipstack@users.noreply.github.com> * [MISC] Add back button to Add Adapter/Connector modals (#1710) * MISC [FEAT] Add back button to Add Adapter/Connector modals Added a back button in the modal title when configuring a new adapter/connector. This allows users to return to the adapter selection screen without closing the entire modal. - Back button only shown when adding new (not when editing) - Clicking back resets selectedSourceId and clears metadata 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Update frontend/src/components/input-output/add-source-modal/AddSourceModal.jsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> * Update frontend/src/components/input-output/add-source-modal/AddSourceModal.jsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> --------- Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Kirtiman Mishra <110175055+kirtimanmishrazipstack@users.noreply.github.com> * [MISC] Load pdfjs worker from node_modules instead of CDN (#1716) * MISC [FIX] Load pdfjs worker from node_modules instead of CDN Use ?url import for pdfjs-dist worker to load from local node_modules instead of relying on CDN URL. Resolves version mismatch issues between package and worker versions. 🤖 Generated with Claude Code Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * MISC [FIX] Use centralized pdfWorkerConfig with CRA/Vite compatible new URL() pattern 🤖 Generated with Claude Code Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Hari John Kuriakose <hari@zipstack.com> * [FIX] Fix PDF.js worker require is not defined error in staging (#1717) * [FIX] Updated pdf js worker to load from cdn (#1718) * updated pdf js worker to load from cdn * lint issue fix * UN-1722 [FEAT] Add export reminder for Prompt Studio projects in use (#1547) * UN-1722 [FEAT] Add export reminder for Prompt Studio projects in use - Add backend API endpoint to check if project is used in deployments - Implement frontend change tracking for prompt modifications - Create yellow notification bar component with export action - Track changes when editing, adding, or deleting prompts - Clear notification after successful export - Check usage in API Deployments, ETL/Task Pipelines, and Manual Review This ensures users are reminded to export their Prompt Studio changes when the project is actively being used in deployments, preventing confusion about why changes don't take effect immediately. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix: Remove trailing commas to fix Prettier/ESLint build errors Removed 10 trailing commas from 4 files that were causing the Docker build to fail with Prettier violations: - DocumentParser.jsx: 3 locations (lines 86, 124, 179) - Header.jsx: 3 locations (lines 73, 176, 277) - ToolIde.jsx: 2 locations (lines 97, 223) - custom-tool-store.js: 2 locations (lines 83, 106) These changes ensure the code passes ESLint/Prettier checks during the build process without modifying any functionality. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor: Fix CodeRabbit major issues - state carryover and useCallback pattern Fixed two major issues identified by CodeRabbit review: 1. Fixed state carryover bug in custom-tool-store.js - When switching tools, deploymentUsageInfo and lastExportedAt now properly reset to null instead of carrying over from previous tool - Prevents incorrect export reminders showing for wrong projects 2. Fixed useCallback pattern issue in ToolIde.jsx - Replaced isCheckingUsage state in useCallback deps with useRef - Prevents unnecessary callback recreations and potential race conditions - Simplified useEffect dependencies to only depend on the callback - Removed unused isCheckingUsage state variable These changes improve code quality and prevent potential bugs without affecting functionality. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: Address all PR #1547 review comments from chandrasekharan-zipstack This commit addresses all actionable review comments from the code reviewer: ## Backend Changes (views.py, constants.py, exceptions.py) 1. **Import Location Fix** ✅ - Moved APIDeployment, Pipeline, and WorkflowEndpoint imports to top of file - Removed lazy imports from check_deployment_usage method - Follows Python best practices for import organization 2. **Deployment Type Enum** ✅ - Created DeploymentType class in constants.py with deployment type constants - Updated check_deployment_usage to use DeploymentType constants - Replaced hardcoded strings: "API Deployment", "ETL Pipeline", etc. - Improves maintainability and prevents typos 3. **Error Handling** ✅ - Created DeploymentUsageCheckError exception class - Changed check_deployment_usage to raise exception instead of returning error response - Provides better error handling and follows DRF exception patterns 4. **Function Naming** ✅ - Renamed _check_tool_usage to _check_tool_usage_in_workflows - More explicit function name clarifies it checks workflow usage specifically - Updated all calls in destroy() and check_deployment_usage() methods ## Frontend Changes (ToolIde.jsx, CustomToolsHelper.js) 5. **Store State Race Condition Fix** ✅ - Added explicit reset of hasUnsavedChanges, deploymentUsageInfo, lastExportedAt - Ensures fields don't carry over when switching between tools - Prevents incorrect export reminders showing for wrong projects 6. **Stale State Race Condition Fix** ✅ - Added check for current hasUnsavedChanges state after API response - Prevents showing export reminder if user exported during in-flight check - Uses customToolStore.getState() to get real-time state value ## Not Addressed (Requires Discussion) - Active filtering question: Needs product/architecture discussion - UX enhancement for clickable links: May be future enhancement All code quality and bug fix comments have been fully addressed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: PR review comments * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix: PR review comments * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * coderabbit fixes commit * Fixes for export conditions --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * UN-3113 [FEAT] Add custom data support in Prompt Studio (#1719) support for custom data Co-authored-by: Deepak K <89829542+Deepak-Kesavan@users.noreply.github.com> * UN-1725 [FIX] Remove CheckableTag enabled/disabled toggle from LLM profiles (#1704) Remove the enabled/disabled toggle feature from prompt card LLM profiles as it caused newly added profiles to appear disabled by default. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> * fix: Replace CDN URL with local import for PDF worker (#1720) * fix: Replace CDN URL with local import for PDF worker Replace the external CDN URL (unpkg.com) for pdf.js worker with a local import from the installed pdfjs-dist package using Webpack 5's asset module feature. Changes: - Use 'pdfjs-dist/build/pdf.worker.min.js?url' import syntax - Export the imported worker URL instead of hardcoded CDN URL Benefits: - Eliminates external network dependency for PDF rendering - Worker version automatically stays in sync with installed package - Enables offline functionality - Faster loading as worker is bundled with the application - Consistent with existing pattern used in ExtractionModal.jsx * refactor: Use export...from syntax for re-exporting PDF worker URL Addresses SonarCloud code smell by using the more concise 'export { default as X } from' syntax instead of separate import and export statements. * UN-3124 [FIX] : Add security headers and HTTP method restrictions to nginx (#1726) * feat: Add security headers and HTTP method restrictions to nginx - Add X-Content-Type-Options header to prevent MIME sniffing - Add X-Frame-Options header to prevent clickjacking - Add X-XSS-Protection header for XSS protection - Add Referrer-Policy header for referrer control - Disable TRACE and TRACK HTTP methods - Limit allowed HTTP methods to GET, HEAD, POST in location block * fix: Remove deprecated X-XSS-Protection header X-XSS-Protection is deprecated and ignored by modern browsers. Chrome removed support in 2019. Content-Security-Policy (CSP) is the recommended replacement for XSS protection. * fix: Limit HTTP methods to GET and HEAD only Static file serving only requires GET and HEAD methods. POST is not needed as API calls go directly to the backend. * UN-3102 [FIX] confirmation alert alway asking issue fix (#1711) confirmation alert alway asking issue fix * AH-87 [FIX]: Restore user session on verticals routes refresh (#1731) Move verticalsRouter inside PersistentLogin wrapper to ensure session validation runs before rendering verticals pages. This fixes the issue where refreshing /verticals/subscriptions showed 'Please login' even for authenticated users. * UN-2081 [FIX] Surface underlying library errors for database destination connectors in the UI (#1734) * handling error * handling error * handling error * small change * change base query exception class * change base query exception class * feat/agentic-prompt-studio * feat/agentic-prompt-studio * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Signed-off-by: harini-venkataraman <115449948+harini-venkataraman@users.noreply.github.com> Co-authored-by: Deepak K <89829542+Deepak-Kesavan@users.noreply.github.com> Co-authored-by: vishnuszipstack <117254672+vishnuszipstack@users.noreply.github.com> Co-authored-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Kirtiman Mishra <110175055+kirtimanmishrazipstack@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Hari John Kuriakose <hari@zipstack.com> Co-authored-by: Athul <89829560+athul-rs@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jagadeesh <jagadeeswaran@zipstack.com> Co-authored-by: Jaseem Jas <89440144+jaseemjaskp@users.noreply.github.com>
* UN-3008 [FIX] Pass word-level confidence setting to Structure Tool (#1714) * UN-3008 [FIX] Pass word-level confidence setting to Structure Tool Fix missing propagation of word confidence setting: - Add ENABLE_WORD_CONFIDENCE constant to SettingsKeys - Read and pass word confidence setting through tool_settings * Bump Structure Tool version to 0.0.95 * UN-3099 [FIX] Disable issue in hitl tab in configure destination and table line iss… (#1707) * disable issue in hitl tab in configure destination and table line issue in logs * sonar issue fix * [MISC] Clear search filter when switching adapter settings pages (#1712) MISC [FIX] Clear search filter when switching adapter settings pages Fixed the search filter not clearing when switching between LLMs, Vector DBs, Embedding, and Text Extractor pages. The fix uses React's key prop to force remount the Search component when page type changes. Changes: - Added searchKey prop to ToolNavBar and Search component - Added clearSearch function to useListSearch hook - Call clearSearch when adapter type changes in ToolSettings 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Kirtiman Mishra <110175055+kirtimanmishrazipstack@users.noreply.github.com> * [MISC] Add back button to Add Adapter/Connector modals (#1710) * MISC [FEAT] Add back button to Add Adapter/Connector modals Added a back button in the modal title when configuring a new adapter/connector. This allows users to return to the adapter selection screen without closing the entire modal. - Back button only shown when adding new (not when editing) - Clicking back resets selectedSourceId and clears metadata 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Update frontend/src/components/input-output/add-source-modal/AddSourceModal.jsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> * Update frontend/src/components/input-output/add-source-modal/AddSourceModal.jsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> --------- Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Kirtiman Mishra <110175055+kirtimanmishrazipstack@users.noreply.github.com> * [MISC] Load pdfjs worker from node_modules instead of CDN (#1716) * MISC [FIX] Load pdfjs worker from node_modules instead of CDN Use ?url import for pdfjs-dist worker to load from local node_modules instead of relying on CDN URL. Resolves version mismatch issues between package and worker versions. 🤖 Generated with Claude Code Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * MISC [FIX] Use centralized pdfWorkerConfig with CRA/Vite compatible new URL() pattern 🤖 Generated with Claude Code Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Hari John Kuriakose <hari@zipstack.com> * [FIX] Fix PDF.js worker require is not defined error in staging (#1717) * [FIX] Updated pdf js worker to load from cdn (#1718) * updated pdf js worker to load from cdn * lint issue fix * UN-1722 [FEAT] Add export reminder for Prompt Studio projects in use (#1547) * UN-1722 [FEAT] Add export reminder for Prompt Studio projects in use - Add backend API endpoint to check if project is used in deployments - Implement frontend change tracking for prompt modifications - Create yellow notification bar component with export action - Track changes when editing, adding, or deleting prompts - Clear notification after successful export - Check usage in API Deployments, ETL/Task Pipelines, and Manual Review This ensures users are reminded to export their Prompt Studio changes when the project is actively being used in deployments, preventing confusion about why changes don't take effect immediately. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix: Remove trailing commas to fix Prettier/ESLint build errors Removed 10 trailing commas from 4 files that were causing the Docker build to fail with Prettier violations: - DocumentParser.jsx: 3 locations (lines 86, 124, 179) - Header.jsx: 3 locations (lines 73, 176, 277) - ToolIde.jsx: 2 locations (lines 97, 223) - custom-tool-store.js: 2 locations (lines 83, 106) These changes ensure the code passes ESLint/Prettier checks during the build process without modifying any functionality. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor: Fix CodeRabbit major issues - state carryover and useCallback pattern Fixed two major issues identified by CodeRabbit review: 1. Fixed state carryover bug in custom-tool-store.js - When switching tools, deploymentUsageInfo and lastExportedAt now properly reset to null instead of carrying over from previous tool - Prevents incorrect export reminders showing for wrong projects 2. Fixed useCallback pattern issue in ToolIde.jsx - Replaced isCheckingUsage state in useCallback deps with useRef - Prevents unnecessary callback recreations and potential race conditions - Simplified useEffect dependencies to only depend on the callback - Removed unused isCheckingUsage state variable These changes improve code quality and prevent potential bugs without affecting functionality. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: Address all PR #1547 review comments from chandrasekharan-zipstack This commit addresses all actionable review comments from the code reviewer: ## Backend Changes (views.py, constants.py, exceptions.py) 1. **Import Location Fix** ✅ - Moved APIDeployment, Pipeline, and WorkflowEndpoint imports to top of file - Removed lazy imports from check_deployment_usage method - Follows Python best practices for import organization 2. **Deployment Type Enum** ✅ - Created DeploymentType class in constants.py with deployment type constants - Updated check_deployment_usage to use DeploymentType constants - Replaced hardcoded strings: "API Deployment", "ETL Pipeline", etc. - Improves maintainability and prevents typos 3. **Error Handling** ✅ - Created DeploymentUsageCheckError exception class - Changed check_deployment_usage to raise exception instead of returning error response - Provides better error handling and follows DRF exception patterns 4. **Function Naming** ✅ - Renamed _check_tool_usage to _check_tool_usage_in_workflows - More explicit function name clarifies it checks workflow usage specifically - Updated all calls in destroy() and check_deployment_usage() methods ## Frontend Changes (ToolIde.jsx, CustomToolsHelper.js) 5. **Store State Race Condition Fix** ✅ - Added explicit reset of hasUnsavedChanges, deploymentUsageInfo, lastExportedAt - Ensures fields don't carry over when switching between tools - Prevents incorrect export reminders showing for wrong projects 6. **Stale State Race Condition Fix** ✅ - Added check for current hasUnsavedChanges state after API response - Prevents showing export reminder if user exported during in-flight check - Uses customToolStore.getState() to get real-time state value ## Not Addressed (Requires Discussion) - Active filtering question: Needs product/architecture discussion - UX enhancement for clickable links: May be future enhancement All code quality and bug fix comments have been fully addressed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: PR review comments * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix: PR review comments * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * coderabbit fixes commit * Fixes for export conditions --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * UN-3113 [FEAT] Add custom data support in Prompt Studio (#1719) support for custom data Co-authored-by: Deepak K <89829542+Deepak-Kesavan@users.noreply.github.com> * UN-1725 [FIX] Remove CheckableTag enabled/disabled toggle from LLM profiles (#1704) Remove the enabled/disabled toggle feature from prompt card LLM profiles as it caused newly added profiles to appear disabled by default. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> * fix: Replace CDN URL with local import for PDF worker (#1720) * fix: Replace CDN URL with local import for PDF worker Replace the external CDN URL (unpkg.com) for pdf.js worker with a local import from the installed pdfjs-dist package using Webpack 5's asset module feature. Changes: - Use 'pdfjs-dist/build/pdf.worker.min.js?url' import syntax - Export the imported worker URL instead of hardcoded CDN URL Benefits: - Eliminates external network dependency for PDF rendering - Worker version automatically stays in sync with installed package - Enables offline functionality - Faster loading as worker is bundled with the application - Consistent with existing pattern used in ExtractionModal.jsx * refactor: Use export...from syntax for re-exporting PDF worker URL Addresses SonarCloud code smell by using the more concise 'export { default as X } from' syntax instead of separate import and export statements. * UN-3124 [FIX] : Add security headers and HTTP method restrictions to nginx (#1726) * feat: Add security headers and HTTP method restrictions to nginx - Add X-Content-Type-Options header to prevent MIME sniffing - Add X-Frame-Options header to prevent clickjacking - Add X-XSS-Protection header for XSS protection - Add Referrer-Policy header for referrer control - Disable TRACE and TRACK HTTP methods - Limit allowed HTTP methods to GET, HEAD, POST in location block * fix: Remove deprecated X-XSS-Protection header X-XSS-Protection is deprecated and ignored by modern browsers. Chrome removed support in 2019. Content-Security-Policy (CSP) is the recommended replacement for XSS protection. * fix: Limit HTTP methods to GET and HEAD only Static file serving only requires GET and HEAD methods. POST is not needed as API calls go directly to the backend. * UN-3102 [FIX] confirmation alert alway asking issue fix (#1711) confirmation alert alway asking issue fix * AH-87 [FIX]: Restore user session on verticals routes refresh (#1731) Move verticalsRouter inside PersistentLogin wrapper to ensure session validation runs before rendering verticals pages. This fixes the issue where refreshing /verticals/subscriptions showed 'Please login' even for authenticated users. * UN-2081 [FIX] Surface underlying library errors for database destination connectors in the UI (#1734) * handling error * handling error * handling error * small change * change base query exception class * change base query exception class * feat/agentic-prompt-studio * feat/agentic-prompt-studio * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * feat/agentic-prompt-studio * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Signed-off-by: harini-venkataraman <115449948+harini-venkataraman@users.noreply.github.com> Co-authored-by: Deepak K <89829542+Deepak-Kesavan@users.noreply.github.com> Co-authored-by: vishnuszipstack <117254672+vishnuszipstack@users.noreply.github.com> Co-authored-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Kirtiman Mishra <110175055+kirtimanmishrazipstack@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Hari John Kuriakose <hari@zipstack.com> Co-authored-by: Athul <89829560+athul-rs@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jagadeesh <jagadeeswaran@zipstack.com> Co-authored-by: Jaseem Jas <89440144+jaseemjaskp@users.noreply.github.com>
* UN-3008 [FIX] Pass word-level confidence setting to Structure Tool (#1714) * UN-3008 [FIX] Pass word-level confidence setting to Structure Tool Fix missing propagation of word confidence setting: - Add ENABLE_WORD_CONFIDENCE constant to SettingsKeys - Read and pass word confidence setting through tool_settings * Bump Structure Tool version to 0.0.95 * UN-3099 [FIX] Disable issue in hitl tab in configure destination and table line iss… (#1707) * disable issue in hitl tab in configure destination and table line issue in logs * sonar issue fix * [MISC] Clear search filter when switching adapter settings pages (#1712) MISC [FIX] Clear search filter when switching adapter settings pages Fixed the search filter not clearing when switching between LLMs, Vector DBs, Embedding, and Text Extractor pages. The fix uses React's key prop to force remount the Search component when page type changes. Changes: - Added searchKey prop to ToolNavBar and Search component - Added clearSearch function to useListSearch hook - Call clearSearch when adapter type changes in ToolSettings 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Kirtiman Mishra <110175055+kirtimanmishrazipstack@users.noreply.github.com> * [MISC] Add back button to Add Adapter/Connector modals (#1710) * MISC [FEAT] Add back button to Add Adapter/Connector modals Added a back button in the modal title when configuring a new adapter/connector. This allows users to return to the adapter selection screen without closing the entire modal. - Back button only shown when adding new (not when editing) - Clicking back resets selectedSourceId and clears metadata 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Update frontend/src/components/input-output/add-source-modal/AddSourceModal.jsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> * Update frontend/src/components/input-output/add-source-modal/AddSourceModal.jsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> --------- Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Kirtiman Mishra <110175055+kirtimanmishrazipstack@users.noreply.github.com> * [MISC] Load pdfjs worker from node_modules instead of CDN (#1716) * MISC [FIX] Load pdfjs worker from node_modules instead of CDN Use ?url import for pdfjs-dist worker to load from local node_modules instead of relying on CDN URL. Resolves version mismatch issues between package and worker versions. 🤖 Generated with Claude Code Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * MISC [FIX] Use centralized pdfWorkerConfig with CRA/Vite compatible new URL() pattern 🤖 Generated with Claude Code Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Hari John Kuriakose <hari@zipstack.com> * [FIX] Fix PDF.js worker require is not defined error in staging (#1717) * [FIX] Updated pdf js worker to load from cdn (#1718) * updated pdf js worker to load from cdn * lint issue fix * UN-1722 [FEAT] Add export reminder for Prompt Studio projects in use (#1547) * UN-1722 [FEAT] Add export reminder for Prompt Studio projects in use - Add backend API endpoint to check if project is used in deployments - Implement frontend change tracking for prompt modifications - Create yellow notification bar component with export action - Track changes when editing, adding, or deleting prompts - Clear notification after successful export - Check usage in API Deployments, ETL/Task Pipelines, and Manual Review This ensures users are reminded to export their Prompt Studio changes when the project is actively being used in deployments, preventing confusion about why changes don't take effect immediately. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix: Remove trailing commas to fix Prettier/ESLint build errors Removed 10 trailing commas from 4 files that were causing the Docker build to fail with Prettier violations: - DocumentParser.jsx: 3 locations (lines 86, 124, 179) - Header.jsx: 3 locations (lines 73, 176, 277) - ToolIde.jsx: 2 locations (lines 97, 223) - custom-tool-store.js: 2 locations (lines 83, 106) These changes ensure the code passes ESLint/Prettier checks during the build process without modifying any functionality. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor: Fix CodeRabbit major issues - state carryover and useCallback pattern Fixed two major issues identified by CodeRabbit review: 1. Fixed state carryover bug in custom-tool-store.js - When switching tools, deploymentUsageInfo and lastExportedAt now properly reset to null instead of carrying over from previous tool - Prevents incorrect export reminders showing for wrong projects 2. Fixed useCallback pattern issue in ToolIde.jsx - Replaced isCheckingUsage state in useCallback deps with useRef - Prevents unnecessary callback recreations and potential race conditions - Simplified useEffect dependencies to only depend on the callback - Removed unused isCheckingUsage state variable These changes improve code quality and prevent potential bugs without affecting functionality. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: Address all PR #1547 review comments from chandrasekharan-zipstack This commit addresses all actionable review comments from the code reviewer: ## Backend Changes (views.py, constants.py, exceptions.py) 1. **Import Location Fix** ✅ - Moved APIDeployment, Pipeline, and WorkflowEndpoint imports to top of file - Removed lazy imports from check_deployment_usage method - Follows Python best practices for import organization 2. **Deployment Type Enum** ✅ - Created DeploymentType class in constants.py with deployment type constants - Updated check_deployment_usage to use DeploymentType constants - Replaced hardcoded strings: "API Deployment", "ETL Pipeline", etc. - Improves maintainability and prevents typos 3. **Error Handling** ✅ - Created DeploymentUsageCheckError exception class - Changed check_deployment_usage to raise exception instead of returning error response - Provides better error handling and follows DRF exception patterns 4. **Function Naming** ✅ - Renamed _check_tool_usage to _check_tool_usage_in_workflows - More explicit function name clarifies it checks workflow usage specifically - Updated all calls in destroy() and check_deployment_usage() methods ## Frontend Changes (ToolIde.jsx, CustomToolsHelper.js) 5. **Store State Race Condition Fix** ✅ - Added explicit reset of hasUnsavedChanges, deploymentUsageInfo, lastExportedAt - Ensures fields don't carry over when switching between tools - Prevents incorrect export reminders showing for wrong projects 6. **Stale State Race Condition Fix** ✅ - Added check for current hasUnsavedChanges state after API response - Prevents showing export reminder if user exported during in-flight check - Uses customToolStore.getState() to get real-time state value ## Not Addressed (Requires Discussion) - Active filtering question: Needs product/architecture discussion - UX enhancement for clickable links: May be future enhancement All code quality and bug fix comments have been fully addressed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: PR review comments * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix: PR review comments * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * coderabbit fixes commit * Fixes for export conditions --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * UN-3113 [FEAT] Add custom data support in Prompt Studio (#1719) support for custom data Co-authored-by: Deepak K <89829542+Deepak-Kesavan@users.noreply.github.com> * UN-1725 [FIX] Remove CheckableTag enabled/disabled toggle from LLM profiles (#1704) Remove the enabled/disabled toggle feature from prompt card LLM profiles as it caused newly added profiles to appear disabled by default. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> * fix: Replace CDN URL with local import for PDF worker (#1720) * fix: Replace CDN URL with local import for PDF worker Replace the external CDN URL (unpkg.com) for pdf.js worker with a local import from the installed pdfjs-dist package using Webpack 5's asset module feature. Changes: - Use 'pdfjs-dist/build/pdf.worker.min.js?url' import syntax - Export the imported worker URL instead of hardcoded CDN URL Benefits: - Eliminates external network dependency for PDF rendering - Worker version automatically stays in sync with installed package - Enables offline functionality - Faster loading as worker is bundled with the application - Consistent with existing pattern used in ExtractionModal.jsx * refactor: Use export...from syntax for re-exporting PDF worker URL Addresses SonarCloud code smell by using the more concise 'export { default as X } from' syntax instead of separate import and export statements. * UN-3124 [FIX] : Add security headers and HTTP method restrictions to nginx (#1726) * feat: Add security headers and HTTP method restrictions to nginx - Add X-Content-Type-Options header to prevent MIME sniffing - Add X-Frame-Options header to prevent clickjacking - Add X-XSS-Protection header for XSS protection - Add Referrer-Policy header for referrer control - Disable TRACE and TRACK HTTP methods - Limit allowed HTTP methods to GET, HEAD, POST in location block * fix: Remove deprecated X-XSS-Protection header X-XSS-Protection is deprecated and ignored by modern browsers. Chrome removed support in 2019. Content-Security-Policy (CSP) is the recommended replacement for XSS protection. * fix: Limit HTTP methods to GET and HEAD only Static file serving only requires GET and HEAD methods. POST is not needed as API calls go directly to the backend. * UN-3102 [FIX] confirmation alert alway asking issue fix (#1711) confirmation alert alway asking issue fix * AH-87 [FIX]: Restore user session on verticals routes refresh (#1731) Move verticalsRouter inside PersistentLogin wrapper to ensure session validation runs before rendering verticals pages. This fixes the issue where refreshing /verticals/subscriptions showed 'Please login' even for authenticated users. * UN-2081 [FIX] Surface underlying library errors for database destination connectors in the UI (#1734) * handling error * handling error * handling error * small change * change base query exception class * change base query exception class * feat/agentic-prompt-studio * feat/agentic-prompt-studio * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * feat/agentic-prompt-studio * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * feat/agentic-prompt-studio * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Signed-off-by: harini-venkataraman <115449948+harini-venkataraman@users.noreply.github.com> Co-authored-by: Deepak K <89829542+Deepak-Kesavan@users.noreply.github.com> Co-authored-by: vishnuszipstack <117254672+vishnuszipstack@users.noreply.github.com> Co-authored-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Kirtiman Mishra <110175055+kirtimanmishrazipstack@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Hari John Kuriakose <hari@zipstack.com> Co-authored-by: Athul <89829560+athul-rs@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jagadeesh <jagadeeswaran@zipstack.com> Co-authored-by: Jaseem Jas <89440144+jaseemjaskp@users.noreply.github.com>
* UN-3008 [FIX] Pass word-level confidence setting to Structure Tool (#1714) * UN-3008 [FIX] Pass word-level confidence setting to Structure Tool Fix missing propagation of word confidence setting: - Add ENABLE_WORD_CONFIDENCE constant to SettingsKeys - Read and pass word confidence setting through tool_settings * Bump Structure Tool version to 0.0.95 * UN-3099 [FIX] Disable issue in hitl tab in configure destination and table line iss… (#1707) * disable issue in hitl tab in configure destination and table line issue in logs * sonar issue fix * [MISC] Clear search filter when switching adapter settings pages (#1712) MISC [FIX] Clear search filter when switching adapter settings pages Fixed the search filter not clearing when switching between LLMs, Vector DBs, Embedding, and Text Extractor pages. The fix uses React's key prop to force remount the Search component when page type changes. Changes: - Added searchKey prop to ToolNavBar and Search component - Added clearSearch function to useListSearch hook - Call clearSearch when adapter type changes in ToolSettings 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Kirtiman Mishra <110175055+kirtimanmishrazipstack@users.noreply.github.com> * [MISC] Add back button to Add Adapter/Connector modals (#1710) * MISC [FEAT] Add back button to Add Adapter/Connector modals Added a back button in the modal title when configuring a new adapter/connector. This allows users to return to the adapter selection screen without closing the entire modal. - Back button only shown when adding new (not when editing) - Clicking back resets selectedSourceId and clears metadata 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Update frontend/src/components/input-output/add-source-modal/AddSourceModal.jsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> * Update frontend/src/components/input-output/add-source-modal/AddSourceModal.jsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> --------- Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Kirtiman Mishra <110175055+kirtimanmishrazipstack@users.noreply.github.com> * [MISC] Load pdfjs worker from node_modules instead of CDN (#1716) * MISC [FIX] Load pdfjs worker from node_modules instead of CDN Use ?url import for pdfjs-dist worker to load from local node_modules instead of relying on CDN URL. Resolves version mismatch issues between package and worker versions. 🤖 Generated with Claude Code Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * MISC [FIX] Use centralized pdfWorkerConfig with CRA/Vite compatible new URL() pattern 🤖 Generated with Claude Code Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Hari John Kuriakose <hari@zipstack.com> * [FIX] Fix PDF.js worker require is not defined error in staging (#1717) * [FIX] Updated pdf js worker to load from cdn (#1718) * updated pdf js worker to load from cdn * lint issue fix * UN-1722 [FEAT] Add export reminder for Prompt Studio projects in use (#1547) * UN-1722 [FEAT] Add export reminder for Prompt Studio projects in use - Add backend API endpoint to check if project is used in deployments - Implement frontend change tracking for prompt modifications - Create yellow notification bar component with export action - Track changes when editing, adding, or deleting prompts - Clear notification after successful export - Check usage in API Deployments, ETL/Task Pipelines, and Manual Review This ensures users are reminded to export their Prompt Studio changes when the project is actively being used in deployments, preventing confusion about why changes don't take effect immediately. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix: Remove trailing commas to fix Prettier/ESLint build errors Removed 10 trailing commas from 4 files that were causing the Docker build to fail with Prettier violations: - DocumentParser.jsx: 3 locations (lines 86, 124, 179) - Header.jsx: 3 locations (lines 73, 176, 277) - ToolIde.jsx: 2 locations (lines 97, 223) - custom-tool-store.js: 2 locations (lines 83, 106) These changes ensure the code passes ESLint/Prettier checks during the build process without modifying any functionality. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor: Fix CodeRabbit major issues - state carryover and useCallback pattern Fixed two major issues identified by CodeRabbit review: 1. Fixed state carryover bug in custom-tool-store.js - When switching tools, deploymentUsageInfo and lastExportedAt now properly reset to null instead of carrying over from previous tool - Prevents incorrect export reminders showing for wrong projects 2. Fixed useCallback pattern issue in ToolIde.jsx - Replaced isCheckingUsage state in useCallback deps with useRef - Prevents unnecessary callback recreations and potential race conditions - Simplified useEffect dependencies to only depend on the callback - Removed unused isCheckingUsage state variable These changes improve code quality and prevent potential bugs without affecting functionality. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: Address all PR #1547 review comments from chandrasekharan-zipstack This commit addresses all actionable review comments from the code reviewer: ## Backend Changes (views.py, constants.py, exceptions.py) 1. **Import Location Fix** ✅ - Moved APIDeployment, Pipeline, and WorkflowEndpoint imports to top of file - Removed lazy imports from check_deployment_usage method - Follows Python best practices for import organization 2. **Deployment Type Enum** ✅ - Created DeploymentType class in constants.py with deployment type constants - Updated check_deployment_usage to use DeploymentType constants - Replaced hardcoded strings: "API Deployment", "ETL Pipeline", etc. - Improves maintainability and prevents typos 3. **Error Handling** ✅ - Created DeploymentUsageCheckError exception class - Changed check_deployment_usage to raise exception instead of returning error response - Provides better error handling and follows DRF exception patterns 4. **Function Naming** ✅ - Renamed _check_tool_usage to _check_tool_usage_in_workflows - More explicit function name clarifies it checks workflow usage specifically - Updated all calls in destroy() and check_deployment_usage() methods ## Frontend Changes (ToolIde.jsx, CustomToolsHelper.js) 5. **Store State Race Condition Fix** ✅ - Added explicit reset of hasUnsavedChanges, deploymentUsageInfo, lastExportedAt - Ensures fields don't carry over when switching between tools - Prevents incorrect export reminders showing for wrong projects 6. **Stale State Race Condition Fix** ✅ - Added check for current hasUnsavedChanges state after API response - Prevents showing export reminder if user exported during in-flight check - Uses customToolStore.getState() to get real-time state value ## Not Addressed (Requires Discussion) - Active filtering question: Needs product/architecture discussion - UX enhancement for clickable links: May be future enhancement All code quality and bug fix comments have been fully addressed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: PR review comments * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix: PR review comments * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * coderabbit fixes commit * Fixes for export conditions --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * UN-3113 [FEAT] Add custom data support in Prompt Studio (#1719) support for custom data Co-authored-by: Deepak K <89829542+Deepak-Kesavan@users.noreply.github.com> * UN-1725 [FIX] Remove CheckableTag enabled/disabled toggle from LLM profiles (#1704) Remove the enabled/disabled toggle feature from prompt card LLM profiles as it caused newly added profiles to appear disabled by default. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> * fix: Replace CDN URL with local import for PDF worker (#1720) * fix: Replace CDN URL with local import for PDF worker Replace the external CDN URL (unpkg.com) for pdf.js worker with a local import from the installed pdfjs-dist package using Webpack 5's asset module feature. Changes: - Use 'pdfjs-dist/build/pdf.worker.min.js?url' import syntax - Export the imported worker URL instead of hardcoded CDN URL Benefits: - Eliminates external network dependency for PDF rendering - Worker version automatically stays in sync with installed package - Enables offline functionality - Faster loading as worker is bundled with the application - Consistent with existing pattern used in ExtractionModal.jsx * refactor: Use export...from syntax for re-exporting PDF worker URL Addresses SonarCloud code smell by using the more concise 'export { default as X } from' syntax instead of separate import and export statements. * UN-3124 [FIX] : Add security headers and HTTP method restrictions to nginx (#1726) * feat: Add security headers and HTTP method restrictions to nginx - Add X-Content-Type-Options header to prevent MIME sniffing - Add X-Frame-Options header to prevent clickjacking - Add X-XSS-Protection header for XSS protection - Add Referrer-Policy header for referrer control - Disable TRACE and TRACK HTTP methods - Limit allowed HTTP methods to GET, HEAD, POST in location block * fix: Remove deprecated X-XSS-Protection header X-XSS-Protection is deprecated and ignored by modern browsers. Chrome removed support in 2019. Content-Security-Policy (CSP) is the recommended replacement for XSS protection. * fix: Limit HTTP methods to GET and HEAD only Static file serving only requires GET and HEAD methods. POST is not needed as API calls go directly to the backend. * UN-3102 [FIX] confirmation alert alway asking issue fix (#1711) confirmation alert alway asking issue fix * AH-87 [FIX]: Restore user session on verticals routes refresh (#1731) Move verticalsRouter inside PersistentLogin wrapper to ensure session validation runs before rendering verticals pages. This fixes the issue where refreshing /verticals/subscriptions showed 'Please login' even for authenticated users. * UN-2081 [FIX] Surface underlying library errors for database destination connectors in the UI (#1734) * handling error * handling error * handling error * small change * change base query exception class * change base query exception class * feat/agentic-prompt-studio * feat/agentic-prompt-studio * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * feat/agentic-prompt-studio * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * feat/agentic-prompt-studio * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * feat/agentic-prompt-studio * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Signed-off-by: harini-venkataraman <115449948+harini-venkataraman@users.noreply.github.com> Co-authored-by: Deepak K <89829542+Deepak-Kesavan@users.noreply.github.com> Co-authored-by: vishnuszipstack <117254672+vishnuszipstack@users.noreply.github.com> Co-authored-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Kirtiman Mishra <110175055+kirtimanmishrazipstack@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Hari John Kuriakose <hari@zipstack.com> Co-authored-by: Athul <89829560+athul-rs@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jagadeesh <jagadeeswaran@zipstack.com> Co-authored-by: Jaseem Jas <89440144+jaseemjaskp@users.noreply.github.com>
* Add agentic prompt studio UI components (#1713) - Update package dependencies for frontend - Add styling updates to ListOfTools component - Update ListOfTools and PdfViewer components - Modify main app routes * Add Agentic Prompt Studio route (#1715) * prettier fix * loggers Signed-off-by: harini-venkataraman <115449948+harini-venkataraman@users.noreply.github.com> * debug logs Signed-off-by: harini-venkataraman <115449948+harini-venkataraman@users.noreply.github.com> * enabling debug logs Signed-off-by: harini-venkataraman <115449948+harini-venkataraman@users.noreply.github.com> * Update plugin.py Signed-off-by: harini-venkataraman <115449948+harini-venkataraman@users.noreply.github.com> * adding debug logs Signed-off-by: harini-venkataraman <115449948+harini-venkataraman@users.noreply.github.com> * adding debug logs Signed-off-by: harini-venkataraman <115449948+harini-venkataraman@users.noreply.github.com> * Improvements * feat/agentic-prompt-studio * feat/agentic-prompt-studio * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Feat/agentic prompt studio1 (#1740) * UN-3008 [FIX] Pass word-level confidence setting to Structure Tool (#1714) * UN-3008 [FIX] Pass word-level confidence setting to Structure Tool Fix missing propagation of word confidence setting: - Add ENABLE_WORD_CONFIDENCE constant to SettingsKeys - Read and pass word confidence setting through tool_settings * Bump Structure Tool version to 0.0.95 * UN-3099 [FIX] Disable issue in hitl tab in configure destination and table line iss… (#1707) * disable issue in hitl tab in configure destination and table line issue in logs * sonar issue fix * [MISC] Clear search filter when switching adapter settings pages (#1712) MISC [FIX] Clear search filter when switching adapter settings pages Fixed the search filter not clearing when switching between LLMs, Vector DBs, Embedding, and Text Extractor pages. The fix uses React's key prop to force remount the Search component when page type changes. Changes: - Added searchKey prop to ToolNavBar and Search component - Added clearSearch function to useListSearch hook - Call clearSearch when adapter type changes in ToolSettings 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Kirtiman Mishra <110175055+kirtimanmishrazipstack@users.noreply.github.com> * [MISC] Add back button to Add Adapter/Connector modals (#1710) * MISC [FEAT] Add back button to Add Adapter/Connector modals Added a back button in the modal title when configuring a new adapter/connector. This allows users to return to the adapter selection screen without closing the entire modal. - Back button only shown when adding new (not when editing) - Clicking back resets selectedSourceId and clears metadata 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Update frontend/src/components/input-output/add-source-modal/AddSourceModal.jsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> * Update frontend/src/components/input-output/add-source-modal/AddSourceModal.jsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> --------- Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Kirtiman Mishra <110175055+kirtimanmishrazipstack@users.noreply.github.com> * [MISC] Load pdfjs worker from node_modules instead of CDN (#1716) * MISC [FIX] Load pdfjs worker from node_modules instead of CDN Use ?url import for pdfjs-dist worker to load from local node_modules instead of relying on CDN URL. Resolves version mismatch issues between package and worker versions. 🤖 Generated with Claude Code Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * MISC [FIX] Use centralized pdfWorkerConfig with CRA/Vite compatible new URL() pattern 🤖 Generated with Claude Code Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Hari John Kuriakose <hari@zipstack.com> * [FIX] Fix PDF.js worker require is not defined error in staging (#1717) * [FIX] Updated pdf js worker to load from cdn (#1718) * updated pdf js worker to load from cdn * lint issue fix * UN-1722 [FEAT] Add export reminder for Prompt Studio projects in use (#1547) * UN-1722 [FEAT] Add export reminder for Prompt Studio projects in use - Add backend API endpoint to check if project is used in deployments - Implement frontend change tracking for prompt modifications - Create yellow notification bar component with export action - Track changes when editing, adding, or deleting prompts - Clear notification after successful export - Check usage in API Deployments, ETL/Task Pipelines, and Manual Review This ensures users are reminded to export their Prompt Studio changes when the project is actively being used in deployments, preventing confusion about why changes don't take effect immediately. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix: Remove trailing commas to fix Prettier/ESLint build errors Removed 10 trailing commas from 4 files that were causing the Docker build to fail with Prettier violations: - DocumentParser.jsx: 3 locations (lines 86, 124, 179) - Header.jsx: 3 locations (lines 73, 176, 277) - ToolIde.jsx: 2 locations (lines 97, 223) - custom-tool-store.js: 2 locations (lines 83, 106) These changes ensure the code passes ESLint/Prettier checks during the build process without modifying any functionality. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor: Fix CodeRabbit major issues - state carryover and useCallback pattern Fixed two major issues identified by CodeRabbit review: 1. Fixed state carryover bug in custom-tool-store.js - When switching tools, deploymentUsageInfo and lastExportedAt now properly reset to null instead of carrying over from previous tool - Prevents incorrect export reminders showing for wrong projects 2. Fixed useCallback pattern issue in ToolIde.jsx - Replaced isCheckingUsage state in useCallback deps with useRef - Prevents unnecessary callback recreations and potential race conditions - Simplified useEffect dependencies to only depend on the callback - Removed unused isCheckingUsage state variable These changes improve code quality and prevent potential bugs without affecting functionality. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: Address all PR #1547 review comments from chandrasekharan-zipstack This commit addresses all actionable review comments from the code reviewer: ## Backend Changes (views.py, constants.py, exceptions.py) 1. **Import Location Fix** ✅ - Moved APIDeployment, Pipeline, and WorkflowEndpoint imports to top of file - Removed lazy imports from check_deployment_usage method - Follows Python best practices for import organization 2. **Deployment Type Enum** ✅ - Created DeploymentType class in constants.py with deployment type constants - Updated check_deployment_usage to use DeploymentType constants - Replaced hardcoded strings: "API Deployment", "ETL Pipeline", etc. - Improves maintainability and prevents typos 3. **Error Handling** ✅ - Created DeploymentUsageCheckError exception class - Changed check_deployment_usage to raise exception instead of returning error response - Provides better error handling and follows DRF exception patterns 4. **Function Naming** ✅ - Renamed _check_tool_usage to _check_tool_usage_in_workflows - More explicit function name clarifies it checks workflow usage specifically - Updated all calls in destroy() and check_deployment_usage() methods ## Frontend Changes (ToolIde.jsx, CustomToolsHelper.js) 5. **Store State Race Condition Fix** ✅ - Added explicit reset of hasUnsavedChanges, deploymentUsageInfo, lastExportedAt - Ensures fields don't carry over when switching between tools - Prevents incorrect export reminders showing for wrong projects 6. **Stale State Race Condition Fix** ✅ - Added check for current hasUnsavedChanges state after API response - Prevents showing export reminder if user exported during in-flight check - Uses customToolStore.getState() to get real-time state value ## Not Addressed (Requires Discussion) - Active filtering question: Needs product/architecture discussion - UX enhancement for clickable links: May be future enhancement All code quality and bug fix comments have been fully addressed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: PR review comments * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix: PR review comments * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * coderabbit fixes commit * Fixes for export conditions --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * UN-3113 [FEAT] Add custom data support in Prompt Studio (#1719) support for custom data Co-authored-by: Deepak K <89829542+Deepak-Kesavan@users.noreply.github.com> * UN-1725 [FIX] Remove CheckableTag enabled/disabled toggle from LLM profiles (#1704) Remove the enabled/disabled toggle feature from prompt card LLM profiles as it caused newly added profiles to appear disabled by default. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> * fix: Replace CDN URL with local import for PDF worker (#1720) * fix: Replace CDN URL with local import for PDF worker Replace the external CDN URL (unpkg.com) for pdf.js worker with a local import from the installed pdfjs-dist package using Webpack 5's asset module feature. Changes: - Use 'pdfjs-dist/build/pdf.worker.min.js?url' import syntax - Export the imported worker URL instead of hardcoded CDN URL Benefits: - Eliminates external network dependency for PDF rendering - Worker version automatically stays in sync with installed package - Enables offline functionality - Faster loading as worker is bundled with the application - Consistent with existing pattern used in ExtractionModal.jsx * refactor: Use export...from syntax for re-exporting PDF worker URL Addresses SonarCloud code smell by using the more concise 'export { default as X } from' syntax instead of separate import and export statements. * UN-3124 [FIX] : Add security headers and HTTP method restrictions to nginx (#1726) * feat: Add security headers and HTTP method restrictions to nginx - Add X-Content-Type-Options header to prevent MIME sniffing - Add X-Frame-Options header to prevent clickjacking - Add X-XSS-Protection header for XSS protection - Add Referrer-Policy header for referrer control - Disable TRACE and TRACK HTTP methods - Limit allowed HTTP methods to GET, HEAD, POST in location block * fix: Remove deprecated X-XSS-Protection header X-XSS-Protection is deprecated and ignored by modern browsers. Chrome removed support in 2019. Content-Security-Policy (CSP) is the recommended replacement for XSS protection. * fix: Limit HTTP methods to GET and HEAD only Static file serving only requires GET and HEAD methods. POST is not needed as API calls go directly to the backend. * UN-3102 [FIX] confirmation alert alway asking issue fix (#1711) confirmation alert alway asking issue fix * AH-87 [FIX]: Restore user session on verticals routes refresh (#1731) Move verticalsRouter inside PersistentLogin wrapper to ensure session validation runs before rendering verticals pages. This fixes the issue where refreshing /verticals/subscriptions showed 'Please login' even for authenticated users. * UN-2081 [FIX] Surface underlying library errors for database destination connectors in the UI (#1734) * handling error * handling error * handling error * small change * change base query exception class * change base query exception class * feat/agentic-prompt-studio * feat/agentic-prompt-studio * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Signed-off-by: harini-venkataraman <115449948+harini-venkataraman@users.noreply.github.com> Co-authored-by: Deepak K <89829542+Deepak-Kesavan@users.noreply.github.com> Co-authored-by: vishnuszipstack <117254672+vishnuszipstack@users.noreply.github.com> Co-authored-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Kirtiman Mishra <110175055+kirtimanmishrazipstack@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Hari John Kuriakose <hari@zipstack.com> Co-authored-by: Athul <89829560+athul-rs@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jagadeesh <jagadeeswaran@zipstack.com> Co-authored-by: Jaseem Jas <89440144+jaseemjaskp@users.noreply.github.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * feat/agentic-prompt-studio * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Feat/agentic prompt studio1 (#1742) * UN-3008 [FIX] Pass word-level confidence setting to Structure Tool (#1714) * UN-3008 [FIX] Pass word-level confidence setting to Structure Tool Fix missing propagation of word confidence setting: - Add ENABLE_WORD_CONFIDENCE constant to SettingsKeys - Read and pass word confidence setting through tool_settings * Bump Structure Tool version to 0.0.95 * UN-3099 [FIX] Disable issue in hitl tab in configure destination and table line iss… (#1707) * disable issue in hitl tab in configure destination and table line issue in logs * sonar issue fix * [MISC] Clear search filter when switching adapter settings pages (#1712) MISC [FIX] Clear search filter when switching adapter settings pages Fixed the search filter not clearing when switching between LLMs, Vector DBs, Embedding, and Text Extractor pages. The fix uses React's key prop to force remount the Search component when page type changes. Changes: - Added searchKey prop to ToolNavBar and Search component - Added clearSearch function to useListSearch hook - Call clearSearch when adapter type changes in ToolSettings 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Kirtiman Mishra <110175055+kirtimanmishrazipstack@users.noreply.github.com> * [MISC] Add back button to Add Adapter/Connector modals (#1710) * MISC [FEAT] Add back button to Add Adapter/Connector modals Added a back button in the modal title when configuring a new adapter/connector. This allows users to return to the adapter selection screen without closing the entire modal. - Back button only shown when adding new (not when editing) - Clicking back resets selectedSourceId and clears metadata 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Update frontend/src/components/input-output/add-source-modal/AddSourceModal.jsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> * Update frontend/src/components/input-output/add-source-modal/AddSourceModal.jsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> --------- Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Kirtiman Mishra <110175055+kirtimanmishrazipstack@users.noreply.github.com> * [MISC] Load pdfjs worker from node_modules instead of CDN (#1716) * MISC [FIX] Load pdfjs worker from node_modules instead of CDN Use ?url import for pdfjs-dist worker to load from local node_modules instead of relying on CDN URL. Resolves version mismatch issues between package and worker versions. 🤖 Generated with Claude Code Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * MISC [FIX] Use centralized pdfWorkerConfig with CRA/Vite compatible new URL() pattern 🤖 Generated with Claude Code Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Hari John Kuriakose <hari@zipstack.com> * [FIX] Fix PDF.js worker require is not defined error in staging (#1717) * [FIX] Updated pdf js worker to load from cdn (#1718) * updated pdf js worker to load from cdn * lint issue fix * UN-1722 [FEAT] Add export reminder for Prompt Studio projects in use (#1547) * UN-1722 [FEAT] Add export reminder for Prompt Studio projects in use - Add backend API endpoint to check if project is used in deployments - Implement frontend change tracking for prompt modifications - Create yellow notification bar component with export action - Track changes when editing, adding, or deleting prompts - Clear notification after successful export - Check usage in API Deployments, ETL/Task Pipelines, and Manual Review This ensures users are reminded to export their Prompt Studio changes when the project is actively being used in deployments, preventing confusion about why changes don't take effect immediately. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix: Remove trailing commas to fix Prettier/ESLint build errors Removed 10 trailing commas from 4 files that were causing the Docker build to fail with Prettier violations: - DocumentParser.jsx: 3 locations (lines 86, 124, 179) - Header.jsx: 3 locations (lines 73, 176, 277) - ToolIde.jsx: 2 locations (lines 97, 223) - custom-tool-store.js: 2 locations (lines 83, 106) These changes ensure the code passes ESLint/Prettier checks during the build process without modifying any functionality. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor: Fix CodeRabbit major issues - state carryover and useCallback pattern Fixed two major issues identified by CodeRabbit review: 1. Fixed state carryover bug in custom-tool-store.js - When switching tools, deploymentUsageInfo and lastExportedAt now properly reset to null instead of carrying over from previous tool - Prevents incorrect export reminders showing for wrong projects 2. Fixed useCallback pattern issue in ToolIde.jsx - Replaced isCheckingUsage state in useCallback deps with useRef - Prevents unnecessary callback recreations and potential race conditions - Simplified useEffect dependencies to only depend on the callback - Removed unused isCheckingUsage state variable These changes improve code quality and prevent potential bugs without affecting functionality. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: Address all PR #1547 review comments from chandrasekharan-zipstack This commit addresses all actionable review comments from the code reviewer: ## Backend Changes (views.py, constants.py, exceptions.py) 1. **Import Location Fix** ✅ - Moved APIDeployment, Pipeline, and WorkflowEndpoint imports to top of file - Removed lazy imports from check_deployment_usage method - Follows Python best practices for import organization 2. **Deployment Type Enum** ✅ - Created DeploymentType class in constants.py with deployment type constants - Updated check_deployment_usage to use DeploymentType constants - Replaced hardcoded strings: "API Deployment", "ETL Pipeline", etc. - Improves maintainability and prevents typos 3. **Error Handling** ✅ - Created DeploymentUsageCheckError exception class - Changed check_deployment_usage to raise exception instead of returning error response - Provides better error handling and follows DRF exception patterns 4. **Function Naming** ✅ - Renamed _check_tool_usage to _check_tool_usage_in_workflows - More explicit function name clarifies it checks workflow usage specifically - Updated all calls in destroy() and check_deployment_usage() methods ## Frontend Changes (ToolIde.jsx, CustomToolsHelper.js) 5. **Store State Race Condition Fix** ✅ - Added explicit reset of hasUnsavedChanges, deploymentUsageInfo, lastExportedAt - Ensures fields don't carry over when switching between tools - Prevents incorrect export reminders showing for wrong projects 6. **Stale State Race Condition Fix** ✅ - Added check for current hasUnsavedChanges state after API response - Prevents showing export reminder if user exported during in-flight check - Uses customToolStore.getState() to get real-time state value ## Not Addressed (Requires Discussion) - Active filtering question: Needs product/architecture discussion - UX enhancement for clickable links: May be future enhancement All code quality and bug fix comments have been fully addressed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: PR review comments * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix: PR review comments * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * coderabbit fixes commit * Fixes for export conditions --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * UN-3113 [FEAT] Add custom data support in Prompt Studio (#1719) support for custom data Co-authored-by: Deepak K <89829542+Deepak-Kesavan@users.noreply.github.com> * UN-1725 [FIX] Remove CheckableTag enabled/disabled toggle from LLM profiles (#1704) Remove the enabled/disabled toggle feature from prompt card LLM profiles as it caused newly added profiles to appear disabled by default. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> * fix: Replace CDN URL with local import for PDF worker (#1720) * fix: Replace CDN URL with local import for PDF worker Replace the external CDN URL (unpkg.com) for pdf.js worker with a local import from the installed pdfjs-dist package using Webpack 5's asset module feature. Changes: - Use 'pdfjs-dist/build/pdf.worker.min.js?url' import syntax - Export the imported worker URL instead of hardcoded CDN URL Benefits: - Eliminates external network dependency for PDF rendering - Worker version automatically stays in sync with installed package - Enables offline functionality - Faster loading as worker is bundled with the application - Consistent with existing pattern used in ExtractionModal.jsx * refactor: Use export...from syntax for re-exporting PDF worker URL Addresses SonarCloud code smell by using the more concise 'export { default as X } from' syntax instead of separate import and export statements. * UN-3124 [FIX] : Add security headers and HTTP method restrictions to nginx (#1726) * feat: Add security headers and HTTP method restrictions to nginx - Add X-Content-Type-Options header to prevent MIME sniffing - Add X-Frame-Options header to prevent clickjacking - Add X-XSS-Protection header for XSS protection - Add Referrer-Policy header for referrer control - Disable TRACE and TRACK HTTP methods - Limit allowed HTTP methods to GET, HEAD, POST in location block * fix: Remove deprecated X-XSS-Protection header X-XSS-Protection is deprecated and ignored by modern browsers. Chrome removed support in 2019. Content-Security-Policy (CSP) is the recommended replacement for XSS protection. * fix: Limit HTTP methods to GET and HEAD only Static file serving only requires GET and HEAD methods. POST is not needed as API calls go directly to the backend. * UN-3102 [FIX] confirmation alert alway asking issue fix (#1711) confirmation alert alway asking issue fix * AH-87 [FIX]: Restore user session on verticals routes refresh (#1731) Move verticalsRouter inside PersistentLogin wrapper to ensure session validation runs before rendering verticals pages. This fixes the issue where refreshing /verticals/subscriptions showed 'Please login' even for authenticated users. * UN-2081 [FIX] Surface underlying library errors for database destination connectors in the UI (#1734) * handling error * handling error * handling error * small change * change base query exception class * change base query exception class * feat/agentic-prompt-studio * feat/agentic-prompt-studio * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * feat/agentic-prompt-studio * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Signed-off-by: harini-venkataraman <115449948+harini-venkataraman@users.noreply.github.com> Co-authored-by: Deepak K <89829542+Deepak-Kesavan@users.noreply.github.com> Co-authored-by: vishnuszipstack <117254672+vishnuszipstack@users.noreply.github.com> Co-authored-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Kirtiman Mishra <110175055+kirtimanmishrazipstack@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Hari John Kuriakose <hari@zipstack.com> Co-authored-by: Athul <89829560+athul-rs@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jagadeesh <jagadeeswaran@zipstack.com> Co-authored-by: Jaseem Jas <89440144+jaseemjaskp@users.noreply.github.com> * feat/agentic-prompt-studio * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Feat/agentic prompt studio1 (#1743) * UN-3008 [FIX] Pass word-level confidence setting to Structure Tool (#1714) * UN-3008 [FIX] Pass word-level confidence setting to Structure Tool Fix missing propagation of word confidence setting: - Add ENABLE_WORD_CONFIDENCE constant to SettingsKeys - Read and pass word confidence setting through tool_settings * Bump Structure Tool version to 0.0.95 * UN-3099 [FIX] Disable issue in hitl tab in configure destination and table line iss… (#1707) * disable issue in hitl tab in configure destination and table line issue in logs * sonar issue fix * [MISC] Clear search filter when switching adapter settings pages (#1712) MISC [FIX] Clear search filter when switching adapter settings pages Fixed the search filter not clearing when switching between LLMs, Vector DBs, Embedding, and Text Extractor pages. The fix uses React's key prop to force remount the Search component when page type changes. Changes: - Added searchKey prop to ToolNavBar and Search component - Added clearSearch function to useListSearch hook - Call clearSearch when adapter type changes in ToolSettings 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Kirtiman Mishra <110175055+kirtimanmishrazipstack@users.noreply.github.com> * [MISC] Add back button to Add Adapter/Connector modals (#1710) * MISC [FEAT] Add back button to Add Adapter/Connector modals Added a back button in the modal title when configuring a new adapter/connector. This allows users to return to the adapter selection screen without closing the entire modal. - Back button only shown when adding new (not when editing) - Clicking back resets selectedSourceId and clears metadata 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Update frontend/src/components/input-output/add-source-modal/AddSourceModal.jsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> * Update frontend/src/components/input-output/add-source-modal/AddSourceModal.jsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> --------- Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Kirtiman Mishra <110175055+kirtimanmishrazipstack@users.noreply.github.com> * [MISC] Load pdfjs worker from node_modules instead of CDN (#1716) * MISC [FIX] Load pdfjs worker from node_modules instead of CDN Use ?url import for pdfjs-dist worker to load from local node_modules instead of relying on CDN URL. Resolves version mismatch issues between package and worker versions. 🤖 Generated with Claude Code Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * MISC [FIX] Use centralized pdfWorkerConfig with CRA/Vite compatible new URL() pattern 🤖 Generated with Claude Code Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Hari John Kuriakose <hari@zipstack.com> * [FIX] Fix PDF.js worker require is not defined error in staging (#1717) * [FIX] Updated pdf js worker to load from cdn (#1718) * updated pdf js worker to load from cdn * lint issue fix * UN-1722 [FEAT] Add export reminder for Prompt Studio projects in use (#1547) * UN-1722 [FEAT] Add export reminder for Prompt Studio projects in use - Add backend API endpoint to check if project is used in deployments - Implement frontend change tracking for prompt modifications - Create yellow notification bar component with export action - Track changes when editing, adding, or deleting prompts - Clear notification after successful export - Check usage in API Deployments, ETL/Task Pipelines, and Manual Review This ensures users are reminded to export their Prompt Studio changes when the project is actively being used in deployments, preventing confusion about why changes don't take effect immediately. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix: Remove trailing commas to fix Prettier/ESLint build errors Removed 10 trailing commas from 4 files that were causing the Docker build to fail with Prettier violations: - DocumentParser.jsx: 3 locations (lines 86, 124, 179) - Header.jsx: 3 locations (lines 73, 176, 277) - ToolIde.jsx: 2 locations (lines 97, 223) - custom-tool-store.js: 2 locations (lines 83, 106) These changes ensure the code passes ESLint/Prettier checks during the build process without modifying any functionality. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor: Fix CodeRabbit major issues - state carryover and useCallback pattern Fixed two major issues identified by CodeRabbit review: 1. Fixed state carryover bug in custom-tool-store.js - When switching tools, deploymentUsageInfo and lastExportedAt now properly reset to null instead of carrying over from previous tool - Prevents incorrect export reminders showing for wrong projects 2. Fixed useCallback pattern issue in ToolIde.jsx - Replaced isCheckingUsage state in useCallback deps with useRef - Prevents unnecessary callback recreations and potential race conditions - Simplified useEffect dependencies to only depend on the callback - Removed unused isCheckingUsage state variable These changes improve code quality and prevent potential bugs without affecting functionality. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: Address all PR #1547 review comments from chandrasekharan-zipstack This commit addresses all actionable review comments from the code reviewer: ## Backend Changes (views.py, constants.py, exceptions.py) 1. **Import Location Fix** ✅ - Moved APIDeployment, Pipeline, and WorkflowEndpoint imports to top of file - Removed lazy imports from check_deployment_usage method - Follows Python best practices for import organization 2. **Deployment Type Enum** ✅ - Created DeploymentType class in constants.py with deployment type constants - Updated check_deployment_usage to use DeploymentType constants - Replaced hardcoded strings: "API Deployment", "ETL Pipeline", etc. - Improves maintainability and prevents typos 3. **Error Handling** ✅ - Created DeploymentUsageCheckError exception class - Changed check_deployment_usage to raise exception instead of returning error response - Provides better error handling and follows DRF exception patterns 4. **Function Naming** ✅ - Renamed _check_tool_usage to _check_tool_usage_in_workflows - More explicit function name clarifies it checks workflow usage specifically - Updated all calls in destroy() and check_deployment_usage() methods ## Frontend Changes (ToolIde.jsx, CustomToolsHelper.js) 5. **Store State Race Condition Fix** ✅ - Added explicit reset of hasUnsavedChanges, deploymentUsageInfo, lastExportedAt - Ensures fields don't carry over when switching between tools - Prevents incorrect export reminders showing for wrong projects 6. **Stale State Race Condition Fix** ✅ - Added check for current hasUnsavedChanges state after API response - Prevents showing export reminder if user exported during in-flight check - Uses customToolStore.getState() to get real-time state value ## Not Addressed (Requires Discussion) - Active filtering question: Needs product/architecture discussion - UX enhancement for clickable links: May be future enhancement All code quality and bug fix comments have been fully addressed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: PR review comments * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix: PR review comments * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * coderabbit fixes commit * Fixes for export conditions --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * UN-3113 [FEAT] Add custom data support in Prompt Studio (#1719) support for custom data Co-authored-by: Deepak K <89829542+Deepak-Kesavan@users.noreply.github.com> * UN-1725 [FIX] Remove CheckableTag enabled/disabled toggle from LLM profiles (#1704) Remove the enabled/disabled toggle feature from prompt card LLM profiles as it caused newly added profiles to appear disabled by default. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> * fix: Replace CDN URL with local import for PDF worker (#1720) * fix: Replace CDN URL with local import for PDF worker Replace the external CDN URL (unpkg.com) for pdf.js worker with a local import from the installed pdfjs-dist package using Webpack 5's asset module feature. Changes: - Use 'pdfjs-dist/build/pdf.worker.min.js?url' import syntax - Export the imported worker URL instead of hardcoded CDN URL Benefits: - Eliminates external network dependency for PDF rendering - Worker version automatically stays in sync with installed package - Enables offline functionality - Faster loading as worker is bundled with the application - Consistent with existing pattern used in ExtractionModal.jsx * refactor: Use export...from syntax for re-exporting PDF worker URL Addresses SonarCloud code smell by using the more concise 'export { default as X } from' syntax instead of separate import and export statements. * UN-3124 [FIX] : Add security headers and HTTP method restrictions to nginx (#1726) * feat: Add security headers and HTTP method restrictions to nginx - Add X-Content-Type-Options header to prevent MIME sniffing - Add X-Frame-Options header to prevent clickjacking - Add X-XSS-Protection header for XSS protection - Add Referrer-Policy header for referrer control - Disable TRACE and TRACK HTTP methods - Limit allowed HTTP methods to GET, HEAD, POST in location block * fix: Remove deprecated X-XSS-Protection header X-XSS-Protection is deprecated and ignored by modern browsers. Chrome removed support in 2019. Content-Security-Policy (CSP) is the recommended replacement for XSS protection. * fix: Limit HTTP methods to GET and HEAD only Static file serving only requires GET and HEAD methods. POST is not needed as API calls go directly to the backend. * UN-3102 [FIX] confirmation alert alway asking issue fix (#1711) confirmation alert alway asking issue fix * AH-87 [FIX]: Restore user session on verticals routes refresh (#1731) Move verticalsRouter inside PersistentLogin wrapper to ensure session validation runs before rendering verticals pages. This fixes the issue where refreshing /verticals/subscriptions showed 'Please login' even for authenticated users. * UN-2081 [FIX] Surface underlying library errors for database destination connectors in the UI (#1734) * handling error * handling error * handling error * small change * change base query exception class * change base query exception class * feat/agentic-prompt-studio * feat/agentic-prompt-studio * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * feat/agentic-prompt-studio * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * feat/agentic-prompt-studio * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Signed-off-by: harini-venkataraman <115449948+harini-venkataraman@users.noreply.github.com> Co-authored-by: Deepak K <89829542+Deepak-Kesavan@users.noreply.github.com> Co-authored-by: vishnuszipstack <117254672+vishnuszipstack@users.noreply.github.com> Co-authored-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Kirtiman Mishra <110175055+kirtimanmishrazipstack@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Hari John Kuriakose <hari@zipstack.com> Co-authored-by: Athul <89829560+athul-rs@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jagadeesh <jagadeeswaran@zipstack.com> Co-authored-by: Jaseem Jas <89440144+jaseemjaskp@users.noreply.github.com> * feat/agentic-prompt-studio * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fixing sorce refs * fixing sorce refs * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fixing sorce refs * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fixing sorce refs * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fixing sorce refs * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fixing sorce refs * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fixing sorce refs * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update backend/tool_instance_v2/tool_processor.py Co-authored-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Signed-off-by: harini-venkataraman <115449948+harini-venkataraman@users.noreply.github.com> * fixing sorce refs * fixing sorce refs * fixing sorce refs * Address review comments * Address review comments * Address review comments * Address review comments * Address review comments --------- Signed-off-by: harini-venkataraman <115449948+harini-venkataraman@users.noreply.github.com> Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Co-authored-by: Deepak K <89829542+Deepak-Kesavan@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: vishnuszipstack <117254672+vishnuszipstack@users.noreply.github.com> Co-authored-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Kirtiman Mishra <110175055+kirtimanmishrazipstack@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Hari John Kuriakose <hari@zipstack.com> Co-authored-by: Athul <89829560+athul-rs@users.noreply.github.com> Co-authored-by: Jagadeesh <jagadeeswaran@zipstack.com> Co-authored-by: Jaseem Jas <89440144+jaseemjaskp@users.noreply.github.com> Co-authored-by: ali <117142933+muhammad-ali-e@users.noreply.github.com>
* Add agentic prompt studio UI components (#1713) - Update package dependencies for frontend - Add styling updates to ListOfTools component - Update ListOfTools and PdfViewer components - Modify main app routes * Add Agentic Prompt Studio route (#1715) * prettier fix * loggers Signed-off-by: harini-venkataraman <115449948+harini-venkataraman@users.noreply.github.com> * debug logs Signed-off-by: harini-venkataraman <115449948+harini-venkataraman@users.noreply.github.com> * enabling debug logs Signed-off-by: harini-venkataraman <115449948+harini-venkataraman@users.noreply.github.com> * Update plugin.py Signed-off-by: harini-venkataraman <115449948+harini-venkataraman@users.noreply.github.com> * adding debug logs Signed-off-by: harini-venkataraman <115449948+harini-venkataraman@users.noreply.github.com> * adding debug logs Signed-off-by: harini-venkataraman <115449948+harini-venkataraman@users.noreply.github.com> * Improvements * feat/agentic-prompt-studio * feat/agentic-prompt-studio * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Feat/agentic prompt studio1 (#1740) * UN-3008 [FIX] Pass word-level confidence setting to Structure Tool (#1714) * UN-3008 [FIX] Pass word-level confidence setting to Structure Tool Fix missing propagation of word confidence setting: - Add ENABLE_WORD_CONFIDENCE constant to SettingsKeys - Read and pass word confidence setting through tool_settings * Bump Structure Tool version to 0.0.95 * UN-3099 [FIX] Disable issue in hitl tab in configure destination and table line iss… (#1707) * disable issue in hitl tab in configure destination and table line issue in logs * sonar issue fix * [MISC] Clear search filter when switching adapter settings pages (#1712) MISC [FIX] Clear search filter when switching adapter settings pages Fixed the search filter not clearing when switching between LLMs, Vector DBs, Embedding, and Text Extractor pages. The fix uses React's key prop to force remount the Search component when page type changes. Changes: - Added searchKey prop to ToolNavBar and Search component - Added clearSearch function to useListSearch hook - Call clearSearch when adapter type changes in ToolSettings 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Kirtiman Mishra <110175055+kirtimanmishrazipstack@users.noreply.github.com> * [MISC] Add back button to Add Adapter/Connector modals (#1710) * MISC [FEAT] Add back button to Add Adapter/Connector modals Added a back button in the modal title when configuring a new adapter/connector. This allows users to return to the adapter selection screen without closing the entire modal. - Back button only shown when adding new (not when editing) - Clicking back resets selectedSourceId and clears metadata 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Update frontend/src/components/input-output/add-source-modal/AddSourceModal.jsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> * Update frontend/src/components/input-output/add-source-modal/AddSourceModal.jsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> --------- Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Kirtiman Mishra <110175055+kirtimanmishrazipstack@users.noreply.github.com> * [MISC] Load pdfjs worker from node_modules instead of CDN (#1716) * MISC [FIX] Load pdfjs worker from node_modules instead of CDN Use ?url import for pdfjs-dist worker to load from local node_modules instead of relying on CDN URL. Resolves version mismatch issues between package and worker versions. 🤖 Generated with Claude Code Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * MISC [FIX] Use centralized pdfWorkerConfig with CRA/Vite compatible new URL() pattern 🤖 Generated with Claude Code Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Hari John Kuriakose <hari@zipstack.com> * [FIX] Fix PDF.js worker require is not defined error in staging (#1717) * [FIX] Updated pdf js worker to load from cdn (#1718) * updated pdf js worker to load from cdn * lint issue fix * UN-1722 [FEAT] Add export reminder for Prompt Studio projects in use (#1547) * UN-1722 [FEAT] Add export reminder for Prompt Studio projects in use - Add backend API endpoint to check if project is used in deployments - Implement frontend change tracking for prompt modifications - Create yellow notification bar component with export action - Track changes when editing, adding, or deleting prompts - Clear notification after successful export - Check usage in API Deployments, ETL/Task Pipelines, and Manual Review This ensures users are reminded to export their Prompt Studio changes when the project is actively being used in deployments, preventing confusion about why changes don't take effect immediately. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix: Remove trailing commas to fix Prettier/ESLint build errors Removed 10 trailing commas from 4 files that were causing the Docker build to fail with Prettier violations: - DocumentParser.jsx: 3 locations (lines 86, 124, 179) - Header.jsx: 3 locations (lines 73, 176, 277) - ToolIde.jsx: 2 locations (lines 97, 223) - custom-tool-store.js: 2 locations (lines 83, 106) These changes ensure the code passes ESLint/Prettier checks during the build process without modifying any functionality. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor: Fix CodeRabbit major issues - state carryover and useCallback pattern Fixed two major issues identified by CodeRabbit review: 1. Fixed state carryover bug in custom-tool-store.js - When switching tools, deploymentUsageInfo and lastExportedAt now properly reset to null instead of carrying over from previous tool - Prevents incorrect export reminders showing for wrong projects 2. Fixed useCallback pattern issue in ToolIde.jsx - Replaced isCheckingUsage state in useCallback deps with useRef - Prevents unnecessary callback recreations and potential race conditions - Simplified useEffect dependencies to only depend on the callback - Removed unused isCheckingUsage state variable These changes improve code quality and prevent potential bugs without affecting functionality. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: Address all PR #1547 review comments from chandrasekharan-zipstack This commit addresses all actionable review comments from the code reviewer: ## Backend Changes (views.py, constants.py, exceptions.py) 1. **Import Location Fix** ✅ - Moved APIDeployment, Pipeline, and WorkflowEndpoint imports to top of file - Removed lazy imports from check_deployment_usage method - Follows Python best practices for import organization 2. **Deployment Type Enum** ✅ - Created DeploymentType class in constants.py with deployment type constants - Updated check_deployment_usage to use DeploymentType constants - Replaced hardcoded strings: "API Deployment", "ETL Pipeline", etc. - Improves maintainability and prevents typos 3. **Error Handling** ✅ - Created DeploymentUsageCheckError exception class - Changed check_deployment_usage to raise exception instead of returning error response - Provides better error handling and follows DRF exception patterns 4. **Function Naming** ✅ - Renamed _check_tool_usage to _check_tool_usage_in_workflows - More explicit function name clarifies it checks workflow usage specifically - Updated all calls in destroy() and check_deployment_usage() methods ## Frontend Changes (ToolIde.jsx, CustomToolsHelper.js) 5. **Store State Race Condition Fix** ✅ - Added explicit reset of hasUnsavedChanges, deploymentUsageInfo, lastExportedAt - Ensures fields don't carry over when switching between tools - Prevents incorrect export reminders showing for wrong projects 6. **Stale State Race Condition Fix** ✅ - Added check for current hasUnsavedChanges state after API response - Prevents showing export reminder if user exported during in-flight check - Uses customToolStore.getState() to get real-time state value ## Not Addressed (Requires Discussion) - Active filtering question: Needs product/architecture discussion - UX enhancement for clickable links: May be future enhancement All code quality and bug fix comments have been fully addressed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: PR review comments * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix: PR review comments * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * coderabbit fixes commit * Fixes for export conditions --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * UN-3113 [FEAT] Add custom data support in Prompt Studio (#1719) support for custom data Co-authored-by: Deepak K <89829542+Deepak-Kesavan@users.noreply.github.com> * UN-1725 [FIX] Remove CheckableTag enabled/disabled toggle from LLM profiles (#1704) Remove the enabled/disabled toggle feature from prompt card LLM profiles as it caused newly added profiles to appear disabled by default. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> * fix: Replace CDN URL with local import for PDF worker (#1720) * fix: Replace CDN URL with local import for PDF worker Replace the external CDN URL (unpkg.com) for pdf.js worker with a local import from the installed pdfjs-dist package using Webpack 5's asset module feature. Changes: - Use 'pdfjs-dist/build/pdf.worker.min.js?url' import syntax - Export the imported worker URL instead of hardcoded CDN URL Benefits: - Eliminates external network dependency for PDF rendering - Worker version automatically stays in sync with installed package - Enables offline functionality - Faster loading as worker is bundled with the application - Consistent with existing pattern used in ExtractionModal.jsx * refactor: Use export...from syntax for re-exporting PDF worker URL Addresses SonarCloud code smell by using the more concise 'export { default as X } from' syntax instead of separate import and export statements. * UN-3124 [FIX] : Add security headers and HTTP method restrictions to nginx (#1726) * feat: Add security headers and HTTP method restrictions to nginx - Add X-Content-Type-Options header to prevent MIME sniffing - Add X-Frame-Options header to prevent clickjacking - Add X-XSS-Protection header for XSS protection - Add Referrer-Policy header for referrer control - Disable TRACE and TRACK HTTP methods - Limit allowed HTTP methods to GET, HEAD, POST in location block * fix: Remove deprecated X-XSS-Protection header X-XSS-Protection is deprecated and ignored by modern browsers. Chrome removed support in 2019. Content-Security-Policy (CSP) is the recommended replacement for XSS protection. * fix: Limit HTTP methods to GET and HEAD only Static file serving only requires GET and HEAD methods. POST is not needed as API calls go directly to the backend. * UN-3102 [FIX] confirmation alert alway asking issue fix (#1711) confirmation alert alway asking issue fix * AH-87 [FIX]: Restore user session on verticals routes refresh (#1731) Move verticalsRouter inside PersistentLogin wrapper to ensure session validation runs before rendering verticals pages. This fixes the issue where refreshing /verticals/subscriptions showed 'Please login' even for authenticated users. * UN-2081 [FIX] Surface underlying library errors for database destination connectors in the UI (#1734) * handling error * handling error * handling error * small change * change base query exception class * change base query exception class * feat/agentic-prompt-studio * feat/agentic-prompt-studio * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Signed-off-by: harini-venkataraman <115449948+harini-venkataraman@users.noreply.github.com> Co-authored-by: Deepak K <89829542+Deepak-Kesavan@users.noreply.github.com> Co-authored-by: vishnuszipstack <117254672+vishnuszipstack@users.noreply.github.com> Co-authored-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Kirtiman Mishra <110175055+kirtimanmishrazipstack@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Hari John Kuriakose <hari@zipstack.com> Co-authored-by: Athul <89829560+athul-rs@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jagadeesh <jagadeeswaran@zipstack.com> Co-authored-by: Jaseem Jas <89440144+jaseemjaskp@users.noreply.github.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * feat/agentic-prompt-studio * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Feat/agentic prompt studio1 (#1742) * UN-3008 [FIX] Pass word-level confidence setting to Structure Tool (#1714) * UN-3008 [FIX] Pass word-level confidence setting to Structure Tool Fix missing propagation of word confidence setting: - Add ENABLE_WORD_CONFIDENCE constant to SettingsKeys - Read and pass word confidence setting through tool_settings * Bump Structure Tool version to 0.0.95 * UN-3099 [FIX] Disable issue in hitl tab in configure destination and table line iss… (#1707) * disable issue in hitl tab in configure destination and table line issue in logs * sonar issue fix * [MISC] Clear search filter when switching adapter settings pages (#1712) MISC [FIX] Clear search filter when switching adapter settings pages Fixed the search filter not clearing when switching between LLMs, Vector DBs, Embedding, and Text Extractor pages. The fix uses React's key prop to force remount the Search component when page type changes. Changes: - Added searchKey prop to ToolNavBar and Search component - Added clearSearch function to useListSearch hook - Call clearSearch when adapter type changes in ToolSettings 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Kirtiman Mishra <110175055+kirtimanmishrazipstack@users.noreply.github.com> * [MISC] Add back button to Add Adapter/Connector modals (#1710) * MISC [FEAT] Add back button to Add Adapter/Connector modals Added a back button in the modal title when configuring a new adapter/connector. This allows users to return to the adapter selection screen without closing the entire modal. - Back button only shown when adding new (not when editing) - Clicking back resets selectedSourceId and clears metadata 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Update frontend/src/components/input-output/add-source-modal/AddSourceModal.jsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> * Update frontend/src/components/input-output/add-source-modal/AddSourceModal.jsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> --------- Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Kirtiman Mishra <110175055+kirtimanmishrazipstack@users.noreply.github.com> * [MISC] Load pdfjs worker from node_modules instead of CDN (#1716) * MISC [FIX] Load pdfjs worker from node_modules instead of CDN Use ?url import for pdfjs-dist worker to load from local node_modules instead of relying on CDN URL. Resolves version mismatch issues between package and worker versions. 🤖 Generated with Claude Code Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * MISC [FIX] Use centralized pdfWorkerConfig with CRA/Vite compatible new URL() pattern 🤖 Generated with Claude Code Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Hari John Kuriakose <hari@zipstack.com> * [FIX] Fix PDF.js worker require is not defined error in staging (#1717) * [FIX] Updated pdf js worker to load from cdn (#1718) * updated pdf js worker to load from cdn * lint issue fix * UN-1722 [FEAT] Add export reminder for Prompt Studio projects in use (#1547) * UN-1722 [FEAT] Add export reminder for Prompt Studio projects in use - Add backend API endpoint to check if project is used in deployments - Implement frontend change tracking for prompt modifications - Create yellow notification bar component with export action - Track changes when editing, adding, or deleting prompts - Clear notification after successful export - Check usage in API Deployments, ETL/Task Pipelines, and Manual Review This ensures users are reminded to export their Prompt Studio changes when the project is actively being used in deployments, preventing confusion about why changes don't take effect immediately. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix: Remove trailing commas to fix Prettier/ESLint build errors Removed 10 trailing commas from 4 files that were causing the Docker build to fail with Prettier violations: - DocumentParser.jsx: 3 locations (lines 86, 124, 179) - Header.jsx: 3 locations (lines 73, 176, 277) - ToolIde.jsx: 2 locations (lines 97, 223) - custom-tool-store.js: 2 locations (lines 83, 106) These changes ensure the code passes ESLint/Prettier checks during the build process without modifying any functionality. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor: Fix CodeRabbit major issues - state carryover and useCallback pattern Fixed two major issues identified by CodeRabbit review: 1. Fixed state carryover bug in custom-tool-store.js - When switching tools, deploymentUsageInfo and lastExportedAt now properly reset to null instead of carrying over from previous tool - Prevents incorrect export reminders showing for wrong projects 2. Fixed useCallback pattern issue in ToolIde.jsx - Replaced isCheckingUsage state in useCallback deps with useRef - Prevents unnecessary callback recreations and potential race conditions - Simplified useEffect dependencies to only depend on the callback - Removed unused isCheckingUsage state variable These changes improve code quality and prevent potential bugs without affecting functionality. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: Address all PR #1547 review comments from chandrasekharan-zipstack This commit addresses all actionable review comments from the code reviewer: ## Backend Changes (views.py, constants.py, exceptions.py) 1. **Import Location Fix** ✅ - Moved APIDeployment, Pipeline, and WorkflowEndpoint imports to top of file - Removed lazy imports from check_deployment_usage method - Follows Python best practices for import organization 2. **Deployment Type Enum** ✅ - Created DeploymentType class in constants.py with deployment type constants - Updated check_deployment_usage to use DeploymentType constants - Replaced hardcoded strings: "API Deployment", "ETL Pipeline", etc. - Improves maintainability and prevents typos 3. **Error Handling** ✅ - Created DeploymentUsageCheckError exception class - Changed check_deployment_usage to raise exception instead of returning error response - Provides better error handling and follows DRF exception patterns 4. **Function Naming** ✅ - Renamed _check_tool_usage to _check_tool_usage_in_workflows - More explicit function name clarifies it checks workflow usage specifically - Updated all calls in destroy() and check_deployment_usage() methods ## Frontend Changes (ToolIde.jsx, CustomToolsHelper.js) 5. **Store State Race Condition Fix** ✅ - Added explicit reset of hasUnsavedChanges, deploymentUsageInfo, lastExportedAt - Ensures fields don't carry over when switching between tools - Prevents incorrect export reminders showing for wrong projects 6. **Stale State Race Condition Fix** ✅ - Added check for current hasUnsavedChanges state after API response - Prevents showing export reminder if user exported during in-flight check - Uses customToolStore.getState() to get real-time state value ## Not Addressed (Requires Discussion) - Active filtering question: Needs product/architecture discussion - UX enhancement for clickable links: May be future enhancement All code quality and bug fix comments have been fully addressed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: PR review comments * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix: PR review comments * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * coderabbit fixes commit * Fixes for export conditions --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * UN-3113 [FEAT] Add custom data support in Prompt Studio (#1719) support for custom data Co-authored-by: Deepak K <89829542+Deepak-Kesavan@users.noreply.github.com> * UN-1725 [FIX] Remove CheckableTag enabled/disabled toggle from LLM profiles (#1704) Remove the enabled/disabled toggle feature from prompt card LLM profiles as it caused newly added profiles to appear disabled by default. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> * fix: Replace CDN URL with local import for PDF worker (#1720) * fix: Replace CDN URL with local import for PDF worker Replace the external CDN URL (unpkg.com) for pdf.js worker with a local import from the installed pdfjs-dist package using Webpack 5's asset module feature. Changes: - Use 'pdfjs-dist/build/pdf.worker.min.js?url' import syntax - Export the imported worker URL instead of hardcoded CDN URL Benefits: - Eliminates external network dependency for PDF rendering - Worker version automatically stays in sync with installed package - Enables offline functionality - Faster loading as worker is bundled with the application - Consistent with existing pattern used in ExtractionModal.jsx * refactor: Use export...from syntax for re-exporting PDF worker URL Addresses SonarCloud code smell by using the more concise 'export { default as X } from' syntax instead of separate import and export statements. * UN-3124 [FIX] : Add security headers and HTTP method restrictions to nginx (#1726) * feat: Add security headers and HTTP method restrictions to nginx - Add X-Content-Type-Options header to prevent MIME sniffing - Add X-Frame-Options header to prevent clickjacking - Add X-XSS-Protection header for XSS protection - Add Referrer-Policy header for referrer control - Disable TRACE and TRACK HTTP methods - Limit allowed HTTP methods to GET, HEAD, POST in location block * fix: Remove deprecated X-XSS-Protection header X-XSS-Protection is deprecated and ignored by modern browsers. Chrome removed support in 2019. Content-Security-Policy (CSP) is the recommended replacement for XSS protection. * fix: Limit HTTP methods to GET and HEAD only Static file serving only requires GET and HEAD methods. POST is not needed as API calls go directly to the backend. * UN-3102 [FIX] confirmation alert alway asking issue fix (#1711) confirmation alert alway asking issue fix * AH-87 [FIX]: Restore user session on verticals routes refresh (#1731) Move verticalsRouter inside PersistentLogin wrapper to ensure session validation runs before rendering verticals pages. This fixes the issue where refreshing /verticals/subscriptions showed 'Please login' even for authenticated users. * UN-2081 [FIX] Surface underlying library errors for database destination connectors in the UI (#1734) * handling error * handling error * handling error * small change * change base query exception class * change base query exception class * feat/agentic-prompt-studio * feat/agentic-prompt-studio * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * feat/agentic-prompt-studio * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Signed-off-by: harini-venkataraman <115449948+harini-venkataraman@users.noreply.github.com> Co-authored-by: Deepak K <89829542+Deepak-Kesavan@users.noreply.github.com> Co-authored-by: vishnuszipstack <117254672+vishnuszipstack@users.noreply.github.com> Co-authored-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Kirtiman Mishra <110175055+kirtimanmishrazipstack@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Hari John Kuriakose <hari@zipstack.com> Co-authored-by: Athul <89829560+athul-rs@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jagadeesh <jagadeeswaran@zipstack.com> Co-authored-by: Jaseem Jas <89440144+jaseemjaskp@users.noreply.github.com> * feat/agentic-prompt-studio * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Feat/agentic prompt studio1 (#1743) * UN-3008 [FIX] Pass word-level confidence setting to Structure Tool (#1714) * UN-3008 [FIX] Pass word-level confidence setting to Structure Tool Fix missing propagation of word confidence setting: - Add ENABLE_WORD_CONFIDENCE constant to SettingsKeys - Read and pass word confidence setting through tool_settings * Bump Structure Tool version to 0.0.95 * UN-3099 [FIX] Disable issue in hitl tab in configure destination and table line iss… (#1707) * disable issue in hitl tab in configure destination and table line issue in logs * sonar issue fix * [MISC] Clear search filter when switching adapter settings pages (#1712) MISC [FIX] Clear search filter when switching adapter settings pages Fixed the search filter not clearing when switching between LLMs, Vector DBs, Embedding, and Text Extractor pages. The fix uses React's key prop to force remount the Search component when page type changes. Changes: - Added searchKey prop to ToolNavBar and Search component - Added clearSearch function to useListSearch hook - Call clearSearch when adapter type changes in ToolSettings 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Kirtiman Mishra <110175055+kirtimanmishrazipstack@users.noreply.github.com> * [MISC] Add back button to Add Adapter/Connector modals (#1710) * MISC [FEAT] Add back button to Add Adapter/Connector modals Added a back button in the modal title when configuring a new adapter/connector. This allows users to return to the adapter selection screen without closing the entire modal. - Back button only shown when adding new (not when editing) - Clicking back resets selectedSourceId and clears metadata 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Update frontend/src/components/input-output/add-source-modal/AddSourceModal.jsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> * Update frontend/src/components/input-output/add-source-modal/AddSourceModal.jsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> --------- Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Kirtiman Mishra <110175055+kirtimanmishrazipstack@users.noreply.github.com> * [MISC] Load pdfjs worker from node_modules instead of CDN (#1716) * MISC [FIX] Load pdfjs worker from node_modules instead of CDN Use ?url import for pdfjs-dist worker to load from local node_modules instead of relying on CDN URL. Resolves version mismatch issues between package and worker versions. 🤖 Generated with Claude Code Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * MISC [FIX] Use centralized pdfWorkerConfig with CRA/Vite compatible new URL() pattern 🤖 Generated with Claude Code Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Hari John Kuriakose <hari@zipstack.com> * [FIX] Fix PDF.js worker require is not defined error in staging (#1717) * [FIX] Updated pdf js worker to load from cdn (#1718) * updated pdf js worker to load from cdn * lint issue fix * UN-1722 [FEAT] Add export reminder for Prompt Studio projects in use (#1547) * UN-1722 [FEAT] Add export reminder for Prompt Studio projects in use - Add backend API endpoint to check if project is used in deployments - Implement frontend change tracking for prompt modifications - Create yellow notification bar component with export action - Track changes when editing, adding, or deleting prompts - Clear notification after successful export - Check usage in API Deployments, ETL/Task Pipelines, and Manual Review This ensures users are reminded to export their Prompt Studio changes when the project is actively being used in deployments, preventing confusion about why changes don't take effect immediately. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix: Remove trailing commas to fix Prettier/ESLint build errors Removed 10 trailing commas from 4 files that were causing the Docker build to fail with Prettier violations: - DocumentParser.jsx: 3 locations (lines 86, 124, 179) - Header.jsx: 3 locations (lines 73, 176, 277) - ToolIde.jsx: 2 locations (lines 97, 223) - custom-tool-store.js: 2 locations (lines 83, 106) These changes ensure the code passes ESLint/Prettier checks during the build process without modifying any functionality. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor: Fix CodeRabbit major issues - state carryover and useCallback pattern Fixed two major issues identified by CodeRabbit review: 1. Fixed state carryover bug in custom-tool-store.js - When switching tools, deploymentUsageInfo and lastExportedAt now properly reset to null instead of carrying over from previous tool - Prevents incorrect export reminders showing for wrong projects 2. Fixed useCallback pattern issue in ToolIde.jsx - Replaced isCheckingUsage state in useCallback deps with useRef - Prevents unnecessary callback recreations and potential race conditions - Simplified useEffect dependencies to only depend on the callback - Removed unused isCheckingUsage state variable These changes improve code quality and prevent potential bugs without affecting functionality. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: Address all PR #1547 review comments from chandrasekharan-zipstack This commit addresses all actionable review comments from the code reviewer: ## Backend Changes (views.py, constants.py, exceptions.py) 1. **Import Location Fix** ✅ - Moved APIDeployment, Pipeline, and WorkflowEndpoint imports to top of file - Removed lazy imports from check_deployment_usage method - Follows Python best practices for import organization 2. **Deployment Type Enum** ✅ - Created DeploymentType class in constants.py with deployment type constants - Updated check_deployment_usage to use DeploymentType constants - Replaced hardcoded strings: "API Deployment", "ETL Pipeline", etc. - Improves maintainability and prevents typos 3. **Error Handling** ✅ - Created DeploymentUsageCheckError exception class - Changed check_deployment_usage to raise exception instead of returning error response - Provides better error handling and follows DRF exception patterns 4. **Function Naming** ✅ - Renamed _check_tool_usage to _check_tool_usage_in_workflows - More explicit function name clarifies it checks workflow usage specifically - Updated all calls in destroy() and check_deployment_usage() methods ## Frontend Changes (ToolIde.jsx, CustomToolsHelper.js) 5. **Store State Race Condition Fix** ✅ - Added explicit reset of hasUnsavedChanges, deploymentUsageInfo, lastExportedAt - Ensures fields don't carry over when switching between tools - Prevents incorrect export reminders showing for wrong projects 6. **Stale State Race Condition Fix** ✅ - Added check for current hasUnsavedChanges state after API response - Prevents showing export reminder if user exported during in-flight check - Uses customToolStore.getState() to get real-time state value ## Not Addressed (Requires Discussion) - Active filtering question: Needs product/architecture discussion - UX enhancement for clickable links: May be future enhancement All code quality and bug fix comments have been fully addressed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: PR review comments * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix: PR review comments * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * coderabbit fixes commit * Fixes for export conditions --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * UN-3113 [FEAT] Add custom data support in Prompt Studio (#1719) support for custom data Co-authored-by: Deepak K <89829542+Deepak-Kesavan@users.noreply.github.com> * UN-1725 [FIX] Remove CheckableTag enabled/disabled toggle from LLM profiles (#1704) Remove the enabled/disabled toggle feature from prompt card LLM profiles as it caused newly added profiles to appear disabled by default. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> * fix: Replace CDN URL with local import for PDF worker (#1720) * fix: Replace CDN URL with local import for PDF worker Replace the external CDN URL (unpkg.com) for pdf.js worker with a local import from the installed pdfjs-dist package using Webpack 5's asset module feature. Changes: - Use 'pdfjs-dist/build/pdf.worker.min.js?url' import syntax - Export the imported worker URL instead of hardcoded CDN URL Benefits: - Eliminates external network dependency for PDF rendering - Worker version automatically stays in sync with installed package - Enables offline functionality - Faster loading as worker is bundled with the application - Consistent with existing pattern used in ExtractionModal.jsx * refactor: Use export...from syntax for re-exporting PDF worker URL Addresses SonarCloud code smell by using the more concise 'export { default as X } from' syntax instead of separate import and export statements. * UN-3124 [FIX] : Add security headers and HTTP method restrictions to nginx (#1726) * feat: Add security headers and HTTP method restrictions to nginx - Add X-Content-Type-Options header to prevent MIME sniffing - Add X-Frame-Options header to prevent clickjacking - Add X-XSS-Protection header for XSS protection - Add Referrer-Policy header for referrer control - Disable TRACE and TRACK HTTP methods - Limit allowed HTTP methods to GET, HEAD, POST in location block * fix: Remove deprecated X-XSS-Protection header X-XSS-Protection is deprecated and ignored by modern browsers. Chrome removed support in 2019. Content-Security-Policy (CSP) is the recommended replacement for XSS protection. * fix: Limit HTTP methods to GET and HEAD only Static file serving only requires GET and HEAD methods. POST is not needed as API calls go directly to the backend. * UN-3102 [FIX] confirmation alert alway asking issue fix (#1711) confirmation alert alway asking issue fix * AH-87 [FIX]: Restore user session on verticals routes refresh (#1731) Move verticalsRouter inside PersistentLogin wrapper to ensure session validation runs before rendering verticals pages. This fixes the issue where refreshing /verticals/subscriptions showed 'Please login' even for authenticated users. * UN-2081 [FIX] Surface underlying library errors for database destination connectors in the UI (#1734) * handling error * handling error * handling error * small change * change base query exception class * change base query exception class * feat/agentic-prompt-studio * feat/agentic-prompt-studio * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * feat/agentic-prompt-studio * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * feat/agentic-prompt-studio * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Signed-off-by: harini-venkataraman <115449948+harini-venkataraman@users.noreply.github.com> Co-authored-by: Deepak K <89829542+Deepak-Kesavan@users.noreply.github.com> Co-authored-by: vishnuszipstack <117254672+vishnuszipstack@users.noreply.github.com> Co-authored-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Kirtiman Mishra <110175055+kirtimanmishrazipstack@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Hari John Kuriakose <hari@zipstack.com> Co-authored-by: Athul <89829560+athul-rs@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jagadeesh <jagadeeswaran@zipstack.com> Co-authored-by: Jaseem Jas <89440144+jaseemjaskp@users.noreply.github.com> * feat/agentic-prompt-studio * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fixing sorce refs * fixing sorce refs * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fixing sorce refs * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fixing sorce refs * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fixing sorce refs * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fixing sorce refs * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fixing sorce refs * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update backend/tool_instance_v2/tool_processor.py Co-authored-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Signed-off-by: harini-venkataraman <115449948+harini-venkataraman@users.noreply.github.com> * fixing sorce refs * fixing sorce refs * fixing sorce refs * Address review comments * Address review comments * Address review comments * Address review comments * Address review comments * Fixing agentic tools for HITL * Fixing agentic tools for HITL --------- Signed-off-by: harini-venkataraman <115449948+harini-venkataraman@users.noreply.github.com> Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Co-authored-by: Deepak K <89829542+Deepak-Kesavan@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: vishnuszipstack <117254672+vishnuszipstack@users.noreply.github.com> Co-authored-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Kirtiman Mishra <110175055+kirtimanmishrazipstack@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Hari John Kuriakose <hari@zipstack.com> Co-authored-by: Athul <89829560+athul-rs@users.noreply.github.com> Co-authored-by: Jagadeesh <jagadeeswaran@zipstack.com> Co-authored-by: Jaseem Jas <89440144+jaseemjaskp@users.noreply.github.com>



What
Why
How
Can this PR break any existing features. If yes, please list possible items. If no, please explain why. (PS: Admins do not merge the PR without this section filled)
Database Migrations
Env Config
Relevant Docs
Related Issues or PRs
-https://github.com/Zipstack/unstract-cloud/pull/1184
Dependencies Versions
Notes on Testing
Screenshots
Checklist
I have read and understood the Contribution Guidelines.