Skip to content

Add onboarding flow, history tracking, and dashboard analytics#2

Open
tantshirt wants to merge 3 commits intoaffaan-m:mainfrom
tantshirt:main
Open

Add onboarding flow, history tracking, and dashboard analytics#2
tantshirt wants to merge 3 commits intoaffaan-m:mainfrom
tantshirt:main

Conversation

@tantshirt
Copy link

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.

tantshirt and others added 3 commits February 5, 2026 18:01
- 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]>
@coderabbitai
Copy link

coderabbitai bot commented Feb 5, 2026

Important

Review skipped

Too many files!

This PR contains 288 files, which is 138 over the limit of 150.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant