feat(sync): connect auth → payment → sync flow with license gating#154
Conversation
…token system - Delete packages/design-system (unused — zero imports across the app) - Create apps/desktop/src/renderer/ui/ architecture (tokens, primitives, patterns, components) - Create canonical ui/tokens/tokens.css as single source of truth - Define all previously-undefined CSS variables (--surface-hover, --surface-elevated, --text-normal, --link, --error, --error-bg/border/fg, --border-primary, --status-error) - Add --color-* compatibility aliases for sync/auth CSS modules - Update docs references (README, CONTRIBUTING, LICENSE, CODEOWNERS) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add scrollable .sidebar-content wrapper between header and footer - Increase section spacing (4px → 8px/12px between sections) - Add subtle border separator below quick filters - Improve section header padding and margin-bottom - Fix footer cramped padding (4px → 8px) and add flex-column gap - Replace hardcoded sync status colors with semantic tokens - Improve sync prompt with border and better radius - Add thin scrollbar styling for sidebar overflow - Increase header height for better macOS traffic light alignment Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add native HTML5 drag events to NotebookItem (draggable, dragOver, drop) - Support three drop zones: above (reorder before), inside (move into parent), below (reorder after) - Wire moveNotebook and reorderNotebooks mutations from useNotebookMutations into NotebookList - Pass siblingIds down the tree for same-parent reorder calculations - Inbox accepts drop-inside (move into) but is not draggable - Add CSS drop indicators: accent line for above/below, accent outline for inside - Expand parent folder on drop-inside for immediate feedback Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- authStore now checks IPC result.success before proceeding - EnableSyncModal watches authError from store during sent step - MagicLinkFlow watches isAuthenticated to auto-complete on deep link - MagicLinkFlow shows verification errors in the sent step - Replace hardcoded colors with design token variables Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Gate auto-sync behind license check (prevents 403 for free users) - Rewrite EnableSyncModal with license-aware step routing (value-prop → pricing → email → success) - Add pricing step with monthly/annual plan selection via Stripe checkout - Make useSyncOnboarding license-aware - Replace hardcoded colors in SyncStatusIndicator with design tokens - Fix sidebar drag-and-drop: add grip handle, prevent circular refs, update child depths - Align product-config pricing with Stripe (EUR: €2/mo, €20/year) - Add CI/CD workflow for automatic API deployment to Cloudflare Workers Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThe pull request migrates design tokens from packages/design-system to apps/desktop/src/renderer/ui/tokens, implements drag-and-drop notebook reordering with circular reference prevention, adds license-aware sync/auth flows with pricing steps, introduces a GitHub Actions deployment workflow, removes the design-system package, reorganizes package ownership metadata, and updates pricing from USD to EUR. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant NotebookItem
participant NotebookList
participant Desktop as Desktop API
User->>NotebookItem: dragStart on notebook
NotebookItem->>NotebookItem: collect descendant IDs
User->>NotebookItem: dragOver target notebook
NotebookItem->>NotebookItem: detect drop position (above/inside/below)
NotebookItem->>NotebookItem: check for circular reference
alt Circular Reference Detected
NotebookItem->>User: reject drop
else Valid Drop
User->>NotebookItem: drop on target
NotebookItem->>NotebookList: onMove(id, newParentId)
NotebookList->>Desktop: moveNotebook(id, newParentId)
Desktop->>Desktop: update notebook depth recursively
Desktop->>NotebookList: return updated tree
NotebookList->>NotebookItem: trigger re-render
end
sequenceDiagram
participant User
participant EnableSyncModal
participant AuthStore
participant License as License Service
participant Checkout as Checkout API
User->>EnableSyncModal: open sync modal
EnableSyncModal->>License: check license state
alt Not Authenticated
License->>EnableSyncModal: return state
EnableSyncModal->>User: show magic link step
else Authenticated + Not Sync Capable
License->>EnableSyncModal: return non-capable status
EnableSyncModal->>User: show pricing step
User->>EnableSyncModal: select plan (annual/monthly)
EnableSyncModal->>Checkout: open subscription checkout
EnableSyncModal->>User: show waiting-payment step
Checkout->>License: process payment
License->>AuthStore: update license state
AuthStore->>EnableSyncModal: license state changed
EnableSyncModal->>User: transition to success
else Authenticated + Sync Capable
License->>EnableSyncModal: return capable status
EnableSyncModal->>User: show success
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
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 |
## Release v0.9.0 ### Highlights - **Auth → Payment → Sync flow**: License-gated sync with smart step routing in EnableSyncModal - **Stripe checkout**: Monthly (€2/mo) and annual (€20/year) plan selection - **Sidebar drag-and-drop**: Grip handle, circular reference prevention, child depth propagation - **CI/CD**: Auto-deploy API — develop → staging, main → production - **Design tokens**: SyncStatusIndicator uses CSS variables instead of hardcoded colors - **AI features**: Command execution, plugin bridge, knowledge system (Phase 4-5) - **UI cleanup**: Tailwind v4 canonical classes, removed dead design-system package ### Changes since v0.8.0 - feat(sync): connect auth → payment → sync flow with license gating (#154) - chore: Tailwind v4 canonical classes + tsconfig cleanup (#151) - feat(ai): complete Phase 4-5 — AI command execution + plugin bridge (#150) - feat(ai,plugins): complete Phase 4-5 — AI knowledge & extensibility - feat(desktop,api): complete Phase 1-3 roadmap implementation ### Checklist - [x] `pnpm typecheck` passes - [x] `pnpm test` passes - [x] `package.json` version is `0.9.0` - [x] All features merged to develop first - [x] API production secrets configured (Stripe, Resend) 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit # Release Notes * **New Features** * Added AI-powered text commands (summarize, rewrite, tweet) with plugin integration. * Introduced drag-and-drop notebook reordering with automatic circular reference protection. * Enhanced sync onboarding with license-based feature gating. * Improved magic link authentication with automatic verification. * **Bug Fixes** * Fixed token refresh infinite loop handling. * Added URL encoding for verification links. * Improved cleanup for animated UI components. * **Improvements** * Enhanced error handling for authentication and sync failures. * Added accessibility attributes (ARIA labels, semantic HTML). * Updated visual styling with new token-driven design system. * **Refactor** * Migrated from design-system package to plugin-api package. * Consolidated design tokens and theme system. * **Chores** * Updated GitHub Actions release automation. * Refreshed project documentation and contribution guidelines. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Summary
Files changed
authStore.ts,useSyncOnboarding.ts,EnableSyncModal.tsxLoginModal.module.css,SyncStatusIndicator.tsx/.module.css,global.cssNotebookItem.tsx,index.ts(main process)product-config/facade.ts.github/workflows/deploy-api.ymlTest plan
pnpm typecheckpassespnpm testpasses🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes
Style
Chores