Skip to content

feat(i18n): update translations - #1609

Closed
waleedlatif1 wants to merge 6 commits into
stagingfrom
auto-translate/staging-merge-18438200314
Closed

feat(i18n): update translations#1609
waleedlatif1 wants to merge 6 commits into
stagingfrom
auto-translate/staging-merge-18438200314

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

Automated translation updates triggered by changes to documentation.

This PR was automatically created after content changes were made, updating translations for all supported languages using Lingo.dev AI translation engine.

Original trigger: feat(guardrails): added guardrails block/tools and docs (#1605)

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other: ___________

Testing

This PR includes automated translations for modified English documentation content:

  • 🇪🇸 Spanish (es) translations
  • 🇫🇷 French (fr) translations
  • 🇨🇳 Chinese (zh) translations
  • 🇯🇵 Japanese (ja) translations
  • 🇩🇪 German (de) translations

What reviewers should focus on:

  • Verify translated content accuracy and context
  • Check that all links and references work correctly in translated versions
  • Ensure formatting, code blocks, and structure are preserved
  • Validate that technical terms are appropriately translated

Checklist

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

Screenshots/Videos

waleedlatif1and others added 6 commits October 10, 2025 18:03
* updated privacy policy for google
* update terms, privacy, and emails to incl address and update verbiage
* Adding guardrails block
* ack PR comments
* cleanup checkbox in dark mode
* cleanup
* fix supabase tools
@vercel

vercelBot commented Oct 12, 2025

Copy link
Copy Markdown

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

ProjectDeploymentPreviewCommentsUpdated (UTC)
docsErrorErrorOct 12, 2025 4:10am

@greptile-appsgreptile-appsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Greptile Overview

Summary

This PR adds a comprehensive Guardrails block for AI workflow validation and includes automated translation updates.

Main Changes:

  • Guardrails Block: New validation block supporting 4 types - JSON validation, regex matching, hallucination detection (RAG+LLM), and PII detection (Microsoft Presidio)
  • PII Detection: Python-based implementation with 40+ entity types across multiple countries, supporting both block and mask modes
  • Hallucination Detection: RAG-based validation using knowledge base queries with LLM confidence scoring (0-10 scale)
  • UI Components: New grouped checkbox list component for PII entity selection with modal dialog interface
  • Supabase Tools: Fixed visibility settings for table (user-or-llm) and apiKey (user-only) parameters in query/delete tools
  • Translations: Automated updates for documentation in 5 languages (es, fr, de, ja, zh)
  • Database: Performance optimization removing unused indices and adding index on state_snapshot_id
  • Dark Mode: Improved checkbox visibility with border and stroke adjustments

Architecture:

  • Block configuration → Tool → API route → Validation functions (TypeScript for JSON/regex, Python subprocess for PII, LLM calls for hallucination)
  • Proper error handling and timeout management throughout
  • Comprehensive input/output schemas with conditional field visibility

Confidence Score: 4/5

  • This PR is safe to merge with minimal risk - well-structured guardrails implementation with proper error handling
  • Score reflects solid implementation with proper error handling, but requires environment verification for Python dependencies and potential runtime issues with subprocess execution
  • Check apps/sim/lib/guardrails/validate_pii.ts for Python/Presidio installation requirements in deployment environment

Important Files Changed

File Analysis

FilenameScoreOverview
apps/sim/blocks/blocks/guardrails.ts4/5Defines Guardrails block configuration with 4 validation types (JSON, regex, hallucination, PII), comprehensive UI options, and proper input/output schemas
apps/sim/app/api/guardrails/validate/route.ts4/5API route handling validation requests with proper error handling, input validation, and delegation to appropriate validators
apps/sim/lib/guardrails/validate_pii.ts4/5PII detection wrapper that spawns Python subprocess, handles timeouts, parses results with proper error handling
apps/sim/lib/guardrails/validate_hallucination.ts4/5RAG-based hallucination detection querying knowledge base and using LLM to score confidence (0-10 scale)
apps/sim/tools/guardrails/validate.ts5/5Tool configuration defining guardrails validation API interface with comprehensive input/output schemas
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/grouped-checkbox-list.tsx5/5New UI component for grouped checkbox selection with modal dialog, used for PII entity type selection
apps/sim/tools/supabase/query.ts5/5Fixed visibility settings - table changed to user-or-llm, apiKey changed from hidden to user-only for proper tool access
apps/sim/tools/supabase/delete.ts5/5Fixed visibility settings - table changed to user-or-llm, apiKey changed from hidden to user-only for proper tool access

Sequence Diagram

sequenceDiagram
participant User
participant GuardrailsBlock
participant GuardrailsTool
participant API as /api/guardrails/validate
participant Validators
participant Python as Python Subprocess
participant LLM as LLM Provider
participant KB as Knowledge Base
User->>GuardrailsBlock: Configure validation type
GuardrailsBlock->>GuardrailsTool: Execute with params
GuardrailsTool->>API: POST validation request
alt JSON Validation
API->>Validators: validateJson(input)
Validators-->>API: {passed, error?}
else Regex Validation
API->>Validators: validateRegex(input, pattern)
Validators-->>API: {passed, error?}
else Hallucination Check
API->>Validators: validateHallucination(params)
Validators->>KB: Query knowledge base
KB-->>Validators: Retrieved chunks
Validators->>LLM: Score with context + input
LLM-->>Validators: {score, reasoning}
Validators-->>API: {passed, score, reasoning}
else PII Detection
API->>Validators: validatePII(params)
Validators->>Python: Spawn Python script
Python->>Python: Microsoft Presidio analysis
Python-->>Validators: {passed, detectedEntities, maskedText?}
Validators-->>API: PII result
end
API-->>GuardrailsTool: Validation result
GuardrailsTool-->>GuardrailsBlock: Output
GuardrailsBlock-->>User: Display result
Loading

80 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

min: 1,
max: 20,
step: 1,
defaultValue: 5,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

logic: Inconsistent default value - UI shows defaultValue: 5 but the validation logic in validate_hallucination.ts:219 uses 10 as the default when topK is undefined. These should match.

Suggested change
defaultValue: 5,
defaultValue: 10,
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/blocks/blocks/guardrails.ts
Line: 139:139
Comment:
**logic:** Inconsistent default value - UI shows `defaultValue: 5` but the validation logic in `validate_hallucination.ts:219` uses `10` as the default when topK is undefined. These should match.
```suggestion defaultValue: 10,```
How can I resolve this? If you propose a fix, please make it concise.

@waleedlatif1
waleedlatif1 deleted the auto-translate/staging-merge-18438200314 branch October 13, 2025 17:37
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@waleedlatif1@aadamgough