Add onboarding flow, history tracking, and dashboard analytics#2
Open
tantshirt wants to merge 3 commits intoaffaan-m:mainfrom
Open
Add onboarding flow, history tracking, and dashboard analytics#2tantshirt wants to merge 3 commits intoaffaan-m:mainfrom
tantshirt wants to merge 3 commits intoaffaan-m:mainfrom
Conversation
- Add OnboardingChecklist component for first-time user activation flow - Add DiagnosticsPanel for troubleshooting when overlay not detected - Add AIConsentModal with privacy-first consent flow before AI analysis - Add Privacy & Data section in Settings for data management - Add API key validation before storage - Add comprehensive test suite (47 tests across 6 files) - Add CHANGELOG.md documenting all changes - Add consent-guard pattern with secure ref-based callbacks - Add runtime message types with discriminated unions - Add fallback composer selectors for improved reliability - Add reduced motion support and animations toggle - Add full keyboard navigation and ARIA attributes - Fix inverted tabs/onboarding logic - Fix observer cleanup to prevent memory leaks - Fix DEBUG logging (disabled in production) - Update architecture doc to remove deleted HoverPeek references - Update manifest to v0.2.0 with scripting permission Co-Authored-By: Claude Opus 4.5 <[email protected]>
…oard
Introduces explicit user-driven history tracking to address the gap where users
couldn't see saved/posted items reflected in History and Dashboard.
Key Changes:
- Extended ScoreLogEntry schema with id, status (draft/posted), source, timestamps,
tweetPreview, and AI insight fields
- Added "Save to History" and "Mark as Posted" buttons in Score tab with
confirmation messages
- Implemented UPDATE_HISTORY_ENTRY message type for patching existing entries
- All tabs (History, Dashboard, HistoryPreview) now subscribe to storage changes
for live updates without page refresh
- Dashboard shows Recent Activity section with the last 3 saved items, displaying
status badges, tweet previews, timestamps, and scores
- Dashboard separates Posted vs Draft counts and calculates stats primarily
from posted entries
- History cards enhanced with status badges, tweet previews, and AI insights
- Content script logs include source, status, and preview when posting on X
Technical:
- Background generates unique IDs using crypto.randomUUID()
- LOG_SCORE now returns {success: true, id: string} for tracking
- Storage changes trigger real-time UI updates across all components
- All data stored locally in chrome.storage.local
Co-authored-by: Cursor <[email protected]>
Co-authored-by: Cursor <[email protected]>
|
Important Review skippedToo many files! This PR contains 288 files, which is 138 over the limit of 150. You can disable this status message by setting the
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds several user-requested features that improve the first-time experience and add long-term value for tracking tweet performance.
🎯 What's New
Onboarding & Setup (v0.2.0)
First-time user checklist - Guides new users through initial setup instead of dropping them into an empty extension
Troubleshooting panel - Built-in diagnostics to help users fix common issues (overlay not showing, permissions, etc.)
AI consent flow - Privacy-first modal that explains AI features before any data is sent to Anthropic
Better accessibility - Full keyboard navigation, ARIA labels, and reduced motion support
History Tracking & Analytics
Save drafts - Users can now save tweet scores before posting
Mark as posted - Track which tweets actually went live vs stayed as drafts
Dashboard with insights - Shows Recent Activity feed, score trends, grade distribution, and content analytics
History tab - Full history list with tweet previews, AI insights, and export to CSV
Live updates - All tabs update instantly when you save something (no refresh needed)
🔧 Technical Improvements
47 tests added across 6 test files with >80% coverage
Type-safe runtime messages using discriminated unions
Unique IDs for all history entries using crypto.randomUUID()
Real-time storage sync across all popup tabs
Memory leak fixes with proper observer cleanup
Consent guard pattern for secure AI feature activation
📦 What Changed
New Components:
OnboardingChecklist, AIConsentModal, DiagnosticsPanel
DashboardTab, HistoryTab, ScoreTab, SettingsTab
ScoreGauge, VariantTester, InsightsSection
Enhanced Features:
Extended ScoreLogEntry schema with status, source, timestamps, and tweet previews
Dashboard shows Recent Activity, draft vs posted counts, score timelines
History cards display status badges, tweet previews, and AI insights
Settings panel reorganized with Privacy & Data section
Bug Fixes:
Fixed inverted tabs/onboarding logic
Fixed DEBUG logging for production builds
Improved composer detection with fallback selectors
✅ Testing
All changes include comprehensive tests and have been validated with:
npm run check (type-check + lint + test + build)
Manual testing on x.com with multiple scenarios
Accessibility testing with keyboard navigation
📝 Breaking Changes
None - all changes are backward compatible. Existing users will see the onboarding flow once, then everything works as before with new features available.
Note: This PR includes .claude/ and _bmad/ development tool files that were accidentally committed. You may want to add these to .gitignore - they're just AI development helpers and don't affect the extension itself.