# Constraints and Anti-Patterns This document lists all invalid approaches and patterns to avoid when working with AgentforceConversationClient. ## Never Edit Implementation Files **CRITICAL: Only edit files where the component is USED, never the component implementation itself.** - ✅ **DO edit**: Any React files that import and use `` (for example, shared shells, route components, or feature pages) - ❌ **DO NOT edit**: AgentforceConversationClient.tsx, AgentforceConversationClient.jsx, index.tsx, index.jsx, or any files inside: - `node_modules/@salesforce/ui-bundle-template-feature-react-agentforce-conversation-client/src/` - `packages/template/feature/feature-react-agentforce-conversation-client/src/` - `src/components/AgentforceConversationClient.tsx` (patched templates) - Any path containing `/components/AgentforceConversationClient.` **If you're reading a file named `AgentforceConversationClient.tsx`, you're in the wrong place. Stop and search for the USAGE instead.** ## Invalid Props AgentforceConversationClient uses a flat prop API and does NOT accept these props: - ❌ `containerStyle` - Use `width` and `height` props directly instead - ❌ `style` - Use `styleTokens` for theming - ❌ `className` - Not supported - ❌ Any standard React div props - This wraps an embedded iframe, not a div **Why:** The component is a wrapper around an embedded iframe using Lightning Out 2.0. Standard React styling props don't apply. ## Invalid Styling Approaches **CRITICAL: For ALL styling, theming, branding, or color changes - ONLY use `styleTokens` prop.** Never use these approaches: - ❌ Creating CSS files (e.g., `agent-styles.css`, `theme.css`) - ❌ Creating ` ``` ### ✅ Correct - Using styleTokens ```tsx ``` ### ❌ Wrong - Editing implementation file Reading or editing: `node_modules/@salesforce/ui-bundle-template-feature-react-agentforce-conversation-client/src/AgentforceConversationClient.tsx` ### ✅ Correct - Editing usage file Reading and editing: usage files where the component is imported and used (for example, `src/app.tsx`, a route component, or a feature page)