shopify-theme-devtools 2.2.2 → 2.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -24,13 +24,15 @@ A powerful in-browser developer tools panel for Shopify theme development. Inspe
24
24
 
25
25
  ### Core Panels
26
26
 
27
+ - **AI Assistant** — GPT-powered theme debugging with full context access (cart, metafields, analytics, accessibility, and more)
27
28
  - **Objects Inspector** — Browse `shop`, `product`, `collection`, `customer`, `cart` and more with deep search and collapsible tree view
28
29
  - **Metafields Viewer** — Explore metafields across all resources and namespaces with type labels
29
30
  - **Cart Panel** — Real-time cart state with add/remove/quantity controls, cart history with restore, and attribute editing
30
31
  - **Console** — Chrome DevTools-style console with Liquid expression evaluator, and autocomplete
31
32
  - **Localization** — Markets, currencies, languages, and country data with quick switcher
32
33
  - **SEO Inspector** — Meta tags, Open Graph, Twitter Cards, and structured data (JSON-LD) validation
33
- - **Analytics Viewer** — Detects Google Analytics, Facebook Pixel, and other tracking codes
34
+ - **Analytics Viewer** — Captures GA4, Facebook Pixel, TikTok, Pinterest, Snapchat, Klaviyo, Shopify Analytics, and dataLayer events
35
+ - **Accessibility Scanner** — WCAG compliance checker with issue severity, suggested fixes, and score
34
36
  - **Storage Inspector** — Browse and edit localStorage, sessionStorage, and cookies
35
37
  - **Apps Panel** — Lists installed Shopify apps detected on the page
36
38
  - **Info Panel** — Theme details, template info, and request metadata
@@ -119,6 +121,50 @@ The Cart Tests feature lets you create custom validation rules to ensure cart it
119
121
  - **Import/Export** — Save and share test configurations as JSON
120
122
  - **Inline Results** — Pass/fail badges show test status at a glance
121
123
 
124
+ ### AI Assistant
125
+
126
+ An intelligent GPT-powered assistant that understands your Shopify theme context. Ask questions, debug issues, and generate Liquid code with full access to your page data.
127
+
128
+ **Setup:**
129
+ 1. Open the AI panel
130
+ 2. Enter your OpenAI API key (stored locally, never sent anywhere except OpenAI)
131
+ 3. Start asking questions
132
+
133
+ **What AI Can Access:**
134
+ - Page/template info, shop details, current resource (product/collection/page)
135
+ - Customer data (if logged in)
136
+ - Cart state and cart history
137
+ - Metafields for all resources
138
+ - Section schemas (from theme editor data)
139
+ - HTML structure of the page
140
+ - Network requests and responses
141
+ - Cookies, localStorage, sessionStorage
142
+ - Liquid errors detected on the page
143
+ - Accessibility scan results
144
+ - Analytics events (GA4, Facebook Pixel, TikTok, Pinterest, Snapchat, Klaviyo, Shopify, dataLayer)
145
+
146
+ **Context Modes:**
147
+ | Mode | Description |
148
+ |------|-------------|
149
+ | **Auto** | Smart detection - includes relevant context based on your question |
150
+ | **Minimal** | Basic page info and cart only (faster responses) |
151
+ | **Full** | Everything including cookies, storage, analytics, accessibility |
152
+ | **Custom** | Pick exactly which context to include |
153
+
154
+ **Example Questions:**
155
+ - "What data is available on this page?"
156
+ - "Help me write Liquid to display the product price with compare at price"
157
+ - "Why isn't my add to cart button working?"
158
+ - "What analytics events are firing on this page?"
159
+ - "Are there any accessibility issues I should fix?"
160
+
161
+ **Features:**
162
+ - **Streaming responses** — See answers as they're generated
163
+ - **Syntax highlighting** — Code blocks with Liquid, JavaScript, and JSON highlighting
164
+ - **Conversation history** — Per-page conversations persist in session storage
165
+ - **Search** — Find text across your conversation history
166
+ - **Copy code** — One-click copy for any code block
167
+
122
168
  ### Liquid Error Detection
123
169
 
124
170
  Automatically scans the page for common Liquid issues:
@@ -129,6 +175,33 @@ Automatically scans the page for common Liquid issues:
129
175
  - Schema validation errors
130
176
  - Deprecation warnings
131
177
 
178
+ ### Analytics Panel
179
+
180
+ Captures and inspects analytics events from multiple tracking providers in real-time.
181
+
182
+ **Supported Providers:**
183
+ | Provider | Detection |
184
+ |----------|-----------|
185
+ | **Google Analytics 4** | `gtag()` calls |
186
+ | **Google Analytics Universal** | `ga()` calls |
187
+ | **Facebook Pixel** | `fbq()` calls |
188
+ | **TikTok Pixel** | `ttq.track()` calls |
189
+ | **Pinterest Tag** | `pintrk()` calls |
190
+ | **Snapchat Pixel** | `snaptr()` calls |
191
+ | **Klaviyo** | `_learnq.push()` calls |
192
+ | **Shopify Analytics** | `Shopify.analytics.publish()` |
193
+ | **Shopify Web Pixels** | `analytics.subscribe()` |
194
+ | **DataLayer** | `dataLayer.push()` |
195
+
196
+ **Features:**
197
+ - **Live capture** — Events appear as they fire
198
+ - **Conversion tracking** — Highlights purchase, add_to_cart, and other conversion events
199
+ - **Filtering** — Filter by provider or search event names/data
200
+ - **Deduplication** — Groups duplicate events fired within 500ms
201
+ - **Export** — Download captured events as JSON
202
+ - **Pause/Resume** — Stop capturing to analyze current events
203
+ - **Persistence** — Events persist across page navigations (session storage)
204
+
132
205
  ### Network Panel
133
206
 
134
207
  Captures and inspects Shopify API requests with powerful debugging tools:
@@ -232,11 +305,13 @@ The devtools panel automatically appears on **unpublished/development themes onl
232
305
 
233
306
  | Panel | Description |
234
307
  |-------|-------------|
308
+ | **AI** | GPT-powered assistant with full theme context access |
235
309
  | **Objects** | Inspect all Liquid objects with search and tree navigation |
236
310
  | **Metafields** | Browse metafields by resource (product, collection, shop, etc.) |
237
311
  | **Cart** | Live cart state, history, scenarios, tests, and manipulation tools |
238
312
  | **Locale** | Markets, currencies, languages with locale switching |
239
- | **Analytics** | Detected tracking codes and analytics configuration |
313
+ | **Analytics** | Live event capture for GA4, FB Pixel, TikTok, Pinterest, Klaviyo, Shopify |
314
+ | **Accessibility** | WCAG compliance scanner with score and suggested fixes |
240
315
  | **SEO** | Meta tags, Open Graph, Twitter Cards, JSON-LD structured data |
241
316
  | **Apps** | Installed Shopify apps detected on the page |
242
317
  | **Network** | API request monitor with edit/replay, cart diffs, and error diagnosis |
@@ -316,13 +391,17 @@ src/
316
391
  │ ├── components/
317
392
  │ │ ├── theme-devtools.js # Main component with tab management
318
393
  │ │ ├── object-inspector.js # Tree view inspector
319
- │ │ └── panels/ # Panel components
394
+ │ │ └── panels/ # Panel components (ai, cart, analytics, etc.)
320
395
  │ ├── lib/
321
396
  │ │ └── cart-test-templates.js # Pre-built cart test templates
322
397
  │ ├── services/
398
+ │ │ ├── ai.js # OpenAI API integration
399
+ │ │ ├── analytics.js # Analytics event interceptor
400
+ │ │ ├── accessibility.js # Accessibility scanning service
323
401
  │ │ ├── cart.js # Cart API with history
324
402
  │ │ ├── product.js # Product API (variants/images)
325
403
  │ │ ├── context.js # Liquid context parser
404
+ │ │ ├── context-serializer.js # AI context serialization
326
405
  │ │ ├── expression-evaluator.js # Liquid expression engine
327
406
  │ │ ├── network-interceptor.js # Fetch/XHR interceptor with persistence
328
407
  │ │ └── settings.js # User preferences