Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/services/licenseService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { supabase } from '../lib/supabase';

export const PRO_LIMITS = {
maxFeeds: 20,
maxFeeds: 10,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Provider import bypasses cap 🐞 Bug ✓ Correctness

External RSS provider import (Miniflux/FreshRSS/Feedbin/BazQux) adds feeds without any maxFeeds
enforcement, so free users can exceed the new 10-feed limit via this path. This undermines the PR’s
goal and creates inconsistent behavior versus AddFeed/OPML flows.
Agent Prompt
### Issue description
Free users can exceed the new 10-feed cap by importing subscriptions from an external RSS provider because that import path has no `maxFeeds` enforcement.

### Issue Context
Other flows (Add Feed modal + OPML import) enforce limits based on `PRO_LIMITS.maxFeeds`, but provider import does not. With the cap reduced to 10, this gap becomes more significant.

### Fix Focus Areas
- src/components/SettingsModal.tsx[305-320]
- src/services/providerSync.ts[89-145]
- src/services/licenseService.ts[5-8]

### Implementation notes
- Compute remaining slots for free users: `remaining = Math.max(0, PRO_LIMITS.maxFeeds - feedCount)`.
- Pass `remaining` into provider import (new optional argument), and in `ProviderSyncService.importFeeds` stop adding once `added === remaining`.
- If remote feeds exceed remaining capacity, show upgrade modal and/or a clear status message indicating partial import occurred.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

2. Pro loading mis-gates users 🐞 Bug ⛯ Reliability

isPro defaults to false until an async init completes, but feed-limit gating ignores the
loading state. With the limit now 10, more legitimate Pro users will have >10 feeds and can be
incorrectly blocked/upsold during initial load.
Agent Prompt
### Issue description
Pro users can be temporarily treated as free because `isPro` initializes to `false` and only updates after async init, while gating checks ignore `loading`. With a 10-feed cap, this misclassification is more likely to block actions/show upgrade prompts.

### Issue Context
Multiple components gate on `!isPro` and `PRO_LIMITS.maxFeeds`, but none consider `loading`.

### Fix Focus Areas
- src/contexts/ProContext.tsx[68-106]
- src/components/SourcePanel.tsx[976-999]
- src/components/AddFeedModal.tsx[179-184]
- src/components/SettingsModal.tsx[379-383]

### Implementation notes
- Option A (best UX): initialize `isPro`/`licenseKey` from `readCache()` in the `useState` initializer to avoid the initial false render.
- Option B (safest enforcement): when `loading === true`, disable actions that would trigger gating (add feed, OPML import, provider import) and show a small “checking license…” message instead of upsell.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

maxFolders: 5,
} as const;

Expand Down