From Video to Pull Request: A Complete Causly Workflow Tutorial
From Video to Pull Request: A Complete Causly Workflow Tutorial
In this tutorial, we'll walk through the complete Causly workflow: taking a customer's screen recording of a bug and turning it into a merged pull request. By the end, you'll understand how to leverage AI to dramatically speed up your debugging process.
Prerequisites
Before starting, make sure you have:
- A Causly account with an active subscription
- The Causly VSCode extension installed
- A GitHub connection set up in Causly
- At least one codebase indexed
The Scenario
A customer named Sarah reports: "I can't complete my purchase. When I click the checkout button, nothing happens."
She's attached a 90-second screen recording. Let's fix this.
Step 1: Upload the Video
Option A: Web Dashboard
- Navigate to your Causly dashboard
- Click "Upload Video" or drag-and-drop the file
- Select the project/codebase to search against
- (Optional) Add any context Sarah provided
Option B: VSCode Extension
- Open Command Palette (Cmd/Ctrl + Shift + P)
- Run "Causly: Analyze Video"
- Select the video file
- Choose your codebase
Option C: Slack Integration
If Sarah shared the video in Slack:
- React to the message with the :causly: emoji
- Or reply with
@Causly analyze this
Step 2: Wait for Analysis (1-2 minutes)
Causly is now:
- Extracting key frames from the video
- Transcribing any audio narration
- Running AI vision analysis to understand the UI
- Detecting frustration signals (we found Sarah's rage clicks!)
- Generating search queries for your codebase
- Finding relevant code files
You'll see real-time progress updates.
Step 3: Review the Analysis
Once complete, you'll see:
Summary
Issue Type: Click Handler Failure
Frustration Score: 8.2/10 (High)
Primary Issue: Checkout button click event not triggering payment flow
Expected Behavior: Clicking "Complete Purchase" should initiate payment
Actual Behavior: Button appears to be clicked but no action occurs
Key Moments
The timeline highlights:
- 0:23 - Sarah fills out payment form ✓
- 0:45 - First checkout button click (no response)
- 0:48 - Second click (no response)
- 0:52-1:05 - Rage clicking begins
- 1:10 - Sarah tries refreshing the page
Matched Code Files
1. src/components/checkout/CheckoutButton.tsx (92% match)
- Contains the checkout button click handler
- Lines 45-67: handleCheckout function
2. src/services/payment.ts (78% match)
- Payment processing logic
- Lines 23-45: processPayment function
3. src/hooks/useCart.ts (65% match)
- Cart state management
- Lines 89-102: getCartTotal function
Step 4: Examine the AI's Findings
Click into the first matched file. Causly highlights the suspicious code:
// src/components/checkout/CheckoutButton.tsx
const handleCheckout = async () => {
if (isProcessing) return;
setIsProcessing(true);
try {
const total = await getCartTotal();
// BUG: getCartTotal returns undefined when cart has discount
// This causes processPayment to fail silently
await processPayment(total);
router.push('/confirmation');
} catch (error) {
// Error is caught but not displayed to user!
console.error(error);
} finally {
setIsProcessing(false);
}
};
Step 5: Review the Suggested Fix
Causly generates a fix suggestion:
// SUGGESTED FIX
const handleCheckout = async () => {
if (isProcessing) return;
setIsProcessing(true);
setError(null);
try {
const total = await getCartTotal();
// Add validation for cart total
if (total === undefined || total === null) {
throw new Error('Unable to calculate cart total');
}
await processPayment(total);
router.push('/confirmation');
} catch (error) {
// Display error to user
setError(error instanceof Error ? error.message : 'Payment failed');
console.error('Checkout error:', error);
} finally {
setIsProcessing(false);
}
};
The AI also suggests investigating getCartTotal for the root cause.
Step 6: Apply the Fix
In VSCode
- Click "Apply Fix" in the Causly panel
- The suggested changes appear as a diff
- Review and modify if needed
- Save the file
Additional Fix Needed
Looking at useCart.ts, we find the root cause:
// Before
const getCartTotal = () => {
if (cart.discount) {
return cart.subtotal - cart.discount.amount;
// BUG: Returns undefined if discount.amount is undefined
}
return cart.subtotal;
};
// After (fixed)
const getCartTotal = () => {
const discountAmount = cart.discount?.amount ?? 0;
return cart.subtotal - discountAmount;
};
Step 7: Create the Pull Request
- Click "Create Pull Request" in Causly
- Review the auto-generated PR description:
## Fix: Checkout button not responding when cart has discount
### Problem
When a customer's cart contains a discount with an undefined amount,
the checkout button fails silently because `getCartTotal()` returns
undefined, causing `processPayment()` to fail.
### Solution
1. Added null-coalescing for discount amount in `getCartTotal()`
2. Added validation in checkout handler before processing payment
3. Added user-facing error display when checkout fails
### Testing
- [ ] Checkout with no discount
- [ ] Checkout with percentage discount
- [ ] Checkout with fixed amount discount
- [ ] Checkout with discount that has undefined amount
### Video Analysis
This fix addresses the issue reported in video analysis #VA-1234
Frustration Score: 8.2/10
User: Sarah (customer)
- Click "Create PR"
- Causly creates the branch, commits changes, and opens the PR
Step 8: Merge and Close
- Review the PR in GitHub
- Run your CI/CD tests
- Get code review approval
- Merge!
Total Time: ~8 minutes
| Step | Time |
|---|---|
| Upload video | 30 seconds |
| AI analysis | 90 seconds |
| Review findings | 2 minutes |
| Apply fix | 2 minutes |
| Create PR | 1 minute |
| Total | ~8 minutes |
Compare this to the traditional workflow of reproducing the bug, searching the codebase, debugging, and writing the PR description manually—often 2+ hours.
Tips for Best Results
- Index your entire codebase - More context means better matches
- Include customer context - Any details help the AI understand intent
- Review before applying - AI suggestions are starting points, not final solutions
- Link related issues - Helps track patterns across similar bugs
Ready to try it yourself? Upload your first video and experience the future of debugging.
Written by
Founder at Causly