| name | dev-vue |
| description | COMPREHENSIVE Vue 3 development with Composition API, TypeScript, and advanced reactivity debugging. Create reactive components, handle props/events, implement lifecycle hooks, integrate with Pinia state management, debug reactivity issues, and optimize component performance. CRITICAL: All component changes MUST be tested with Playwright before claiming success. Use DevTools for debugging when available. |
Tier 1: Metadata
This skill provides Vue 3 component development with Composition API and TypeScript for the FlowState productivity application.
Quick Context
- Complexity: medium
- Duration: 15-45 minutes
- Dependencies: vue, typescript, pinia, @vueuse/core
Activation Triggers
- Keywords: vue, component, reactive, composable, template, script setup, props, events, lifecycle, computed, watch, ref, onmounted
- Files: .vue, src/components/, src/views/, src/composables/*
- Contexts: frontend, ui-development, component-architecture, vue-js, typescript
๐จ CRITICAL TESTING REQUIREMENTS
MANDATORY Testing Protocol
ZERO TOLERANCE POLICY: NEVER claim component functionality works without visual verification through testing.
Before Claiming Success - MANDATORY Steps:
- Start Development Server:
npm run dev (ensure port 5546 is available)
- Reactivate Playwright: Use Playwright MCP for visual testing
- Reactivate DevTools: Open browser DevTools for debugging
- Test Component Visually: Verify component renders correctly
- Test Functionality: Verify all interactions work as expected
- Test Edge Cases: Verify error handling and boundary conditions
- Document Evidence: Provide screenshots/test results as proof
Testing Tool Reactivation Instructions:
npm run test
npm run test:e2e
npm run dev
Required Testing Evidence:
- โ
Component renders without errors
- โ
Props are handled correctly
- โ
Events fire as expected
- โ
State management works (if applicable)
- โ
Responsive design works (if applicable)
- โ
Accessibility features work (if applicable)
Emergency Testing Recovery:
If testing reveals issues:
- Stop: Do NOT claim success
- Debug: Use DevTools to identify the problem
- Fix: Address the issue found during testing
- Retest: Run the full testing protocol again
- Document: Record the issue and resolution
Reactivity Debugging (Integrated from dev-debug-reactivity)
Reactivity Debugging Protocol
When Vue components don't update or state seems broken, follow this systematic approach:
1. Check Reactive References
- Always use
.value for ref() in setup()
- Never destructure reactive objects (breaks reactivity)
- Use
storeToRefs() for Pinia store destructuring
- Use
reactive() for objects, not ref()
2. Computed Properties
- Check dependencies - computed should only track what it uses
- Debug stale computed - add console.log to see when it recalculates
- Use
watchEffect() for automatic dependency tracking
3. Watcher Configuration
- Use
{ deep: true } for nested object changes
- Use
{ immediate: true } to run watcher immediately
- Check
flush: 'post' for timing issues
Quick Debug Patterns
Reactivity Checker
const debugReactivity = (ref, name) => {
console.log(`${name} initial:`, ref.value)
const stopWatcher = watch(ref, (newVal, oldVal) => {
console.log(`${name} changed:`, oldVal, 'โ', newVal)
}, { immediate: true })
return stopWatcher
}
Component Update Tracker
export default {
setup() {
onRenderTracked((e) => {
console.log('Render tracked:', e.key, e.type)
})
onRenderTriggered((e) => {
console.log('Render triggered:', e.key, e.type)
})
}
}
Navigation Map
- See
src/components/ for component examples
- See
src/composables/ for composable patterns
MANDATORY USER VERIFICATION REQUIREMENT
Policy: No Fix Claims Without User Confirmation
CRITICAL: Before claiming ANY issue, bug, or problem is "fixed", "resolved", "working", or "complete", the following verification protocol is MANDATORY:
Step 1: Technical Verification
- Run all relevant tests (build, type-check, unit tests)
- Verify no console errors
- Take screenshots/evidence of the fix
Step 2: User Verification Request
REQUIRED: Use the AskUserQuestion tool to explicitly ask the user to verify the fix:
"I've implemented [description of fix]. Before I mark this as complete, please verify:
1. [Specific thing to check #1]
2. [Specific thing to check #2]
3. Does this fix the issue you were experiencing?
Please confirm the fix works as expected, or let me know what's still not working."
Step 3: Wait for User Confirmation
- DO NOT proceed with claims of success until user responds
- DO NOT mark tasks as "completed" without user confirmation
- DO NOT use phrases like "fixed", "resolved", "working" without user verification
Step 4: Handle User Feedback
- If user confirms: Document the fix and mark as complete
- If user reports issues: Continue debugging, repeat verification cycle
Prohibited Actions (Without User Verification)
- Claiming a bug is "fixed"
- Stating functionality is "working"
- Marking issues as "resolved"
- Declaring features as "complete"
- Any success claims about fixes
Required Evidence Before User Verification Request
- Technical tests passing
- Visual confirmation via Playwright/screenshots
- Specific test scenarios executed
- Clear description of what was changed
Remember: The user is the final authority on whether something is fixed. No exceptions.