fix: always paginate Notion blocks to fetch all content#1954
fix: always paginate Notion blocks to fetch all content#1954
Conversation
Previously getBlocks only paginated when the 'all' flag was true, but this flag was always false because ParserRules.UNLIMITED was never loaded from the database. This caused pages with 100+ blocks to be silently truncated, resulting in missing flashcards for subscribers.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (18)
📝 WalkthroughWalkthroughThe PR removes the user-facing Changes
Sequence DiagramsequenceDiagram
actor User
participant Client
participant StripeController
participant AuthService
participant StripeAPI
participant JobConversion
participant CreateWorkspaceUseCase
participant DeckParser
User->>Client: Request conversion with session_id
Client->>JobConversion: performConversion(isPaying flag)
JobConversion->>CreateWorkspaceUseCase: execute({api, id, owner, isPaying})
CreateWorkspaceUseCase->>CreateWorkspaceUseCase: Set bl.useAll = isPaying
CreateWorkspaceUseCase-->>JobConversion: Return workspace with useAll flag
JobConversion->>DeckParser: Initialize with useAll setting
DeckParser->>DeckParser: extractToggleLists(isAll: false)
alt isPaying = true
Note over DeckParser: Could process more toggles in other flow
else isPaying = false
DeckParser->>DeckParser: Only process first-page toggles
end
DeckParser-->>JobConversion: Return parsed deck
User->>Client: Check subscription status
Client->>StripeController: checkSubscriptionStatus(session_id)
StripeController->>AuthService: getAuthenticatedUser(cookies)
AuthService-->>StripeController: User object
alt Patreon user
StripeController->>StripeController: hasActiveSubscription = true
else Has valid session_id
StripeController->>StripeAPI: Retrieve checkout session
StripeAPI-->>StripeController: Session with payment_status
StripeController->>StripeController: persistStripeSession(sessionId)
else Has active subscription
StripeController->>StripeController: hasActiveSubscription = true
end
StripeController-->>Client: {hasActiveSubscription: boolean}
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
The request can hang otherwise Signed-off-by: Alexander Alemayhu <alexander@alemayhu.com>
Signed-off-by: Alexander Alemayhu <alexander@alemayhu.com>
Signed-off-by: Alexander Alemayhu <alexander@alemayhu.com>
Signed-off-by: Alexander Alemayhu <alexander@alemayhu.com>
Signed-off-by: Alexander Alemayhu <alexander@alemayhu.com>
Signed-off-by: Alexander Alemayhu <alexander@alemayhu.com>
Signed-off-by: Alexander Alemayhu <alexander@alemayhu.com>
Signed-off-by: Alexander Alemayhu <alexander@alemayhu.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|



Previously getBlocks only paginated when the 'all' flag was true, but this flag was always false because ParserRules.UNLIMITED was never loaded from the database. This caused pages with 100+ blocks to be silently truncated, resulting in missing flashcards for subscribers.
Summary by CodeRabbit
New Features
Bug Fixes
Removed Features