Skip to content

Feat/security hardening#62

Open
webmaster-vadf wants to merge 96 commits intoShopify:mainfrom
webmaster-vadf:feat/security-hardening
Open

Feat/security hardening#62
webmaster-vadf wants to merge 96 commits intoShopify:mainfrom
webmaster-vadf:feat/security-hardening

Conversation

@webmaster-vadf
Copy link
Copy Markdown

No description provided.

webmaster-vadf and others added 30 commits September 9, 2025 10:13
Problem:
- Intent "salutation" was detected but returned error response
- JSON file was not included in build output (Remix doesn't copy non-imported files)
- fs.readFile with process.cwd() path failed in production

Solution:
- Changed from fs.readFile to direct ES6 import
- JSON is now bundled with the application code
- Added extensive debug logging to trace loading issues

Changes:
- app/services/vadf-response-manager.js: Use import instead of fs.readFile
- CLAUDE.md: Updated documentation with architecture improvements

This ensures vadf_reponses.json is always available in production builds.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Changes:
- Updated meta version to 1.1.0
- Refined tone to be more professional and welcoming
- Added example utterances for each intent to improve documentation
- Improved response messages:
  * Removed excessive emojis for cleaner professional look
  * More natural, conversational French
  * Better structured activation responses
  * Enhanced password reset guidance with spam folder reminder
  * Clearer escalation messages
- Updated common phrases for better user experience
- Maintained all existing intent categories and conditions

The responses are now more aligned with B2B customer expectations while
remaining helpful and accessible.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
New features:
- Added 'creation_compte' intent for account registration
  * Directs users to https://vadf.fr/account/register
  * Includes link to FAQ for more information

- Added 'faq' intent for general questions
  * Redirects to https://vadf.fr/pages/faq
  * Provides fallback to contact@vadf.fr

- Updated intent detection in vadf-response-manager.js:
  * Better keywords for account creation detection
  * Added FAQ keywords detection
  * Separated creation from activation intents

Changes:
- app/prompts/vadf_reponses.json: Added creation_compte and faq intents
- app/services/vadf-response-manager.js: Updated intent mapping

This ensures users asking to create an account get directed to the
registration page instead of the activation flow.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…ntation

- Enhanced CLAUDE.md with complete VADF intent list (17 intents) and SSE event types
- Added detailed console.log at all key points in VADF flow:
  * Backend intent detection in vadf-response-manager.js
  * Backend session handling in chat.jsx
  * Frontend SSE event processing in chat.js
- Logs include emoji markers for easy filtering:
  🔍 Intent detection
  ✅ Success/confirmation
  ⚠️ Warnings/fallbacks
  📦 Event reception
  📡 Event transmission
  🎯 Mode activation

This enables complete end-to-end tracing of VADF responses from user message
to UI display, making debugging much easier.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…n_compte detection

- Added all 6 missing FAQ intents to specificMapping:
  * materiaux: matériaux, tissus, matières
  * reliquat: reliquat, réapprovisionnement, rupture
  * stock_indisponible: indisponible, non disponible
  * devis: devis, prix mesure, devis personnalisé
  * tarifs: voir tarifs, voir prix, tarifs produits
  * fiches_techniques: fiche technique, photos produits, documentation

- Enhanced activation_compte keywords to better match user queries:
  * Added "activer votre compte"
  * Added "activer mon compte"

- Organized specificMapping with comments by category (17 total intents):
  * Compte (4 intents)
  * Support (2 intents)
  * Produits (9 intents)

This ensures all intents defined in vadf_reponses.json can be properly detected.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@semgrep-pr-bot
Copy link
Copy Markdown

semgrep-pr-bot Bot commented Mar 25, 2026

⚠️ Deprecated LLM Models Detected

This PR contains references to 1 deprecated model(s). Consider migrating to the recommended replacements.

⚠️ claude-sonnet-4-20250514 (anthropic)

  • Occurrences: 1
  • Severity: WARNING
  • Shopify Replacement: claude-sonnet-4-5
  • Hotswap Date: 2026-01-15

Locations:

  • app/services/config.server.js:12

Recommended Action: Replace with claude-sonnet-4-5 before 2026-01-15


📚 Resources

💡 This is an informational warning - it will not block your PR. However, please plan to migrate away from deprecated models before their shutdown dates.
💡 Please reach out to #help-proxy-shopify-ai if you have any questions.

🤖 Posted by Deprecated Models GitHub App

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant