feat(reciprocity): dedicated post-gate slide + daily-cap countdown#185
Merged
Conversation
Replace the bottom-sheet feed gate with a dedicated full-screen QueueGateSlide: when a member is at the credit cap with queued clips, forward scroll yields to an in-feed slide offering SKIP (soft nudge, re-arms after a grace window) or POST (publish a queued clip, then advance). The manual QueueSheet stays for explicit queue access. The gate re-arm is keyed to activeIndex progression, not the live credit balance, so the credit a post spends being earned straight back by watching the next reel can't instantly re-open the gate. Daily-cap users are exempt from the gate (they can't post anyway); nextPostAvailableAt surfaces on the watch and queue-post responses and the layout seed so the gate stays suppressed and an explicit post attempt shows a 'you can post again in Xh Ym' countdown instead of a silent 'Posted 0'.
…ilableAt - unit: nextPostAvailableAt (no cap / under cap / at cap / over cap) - unit: formatPostCooldown formatting - api: queue/post reports nextPostAt and posts nothing when daily-capped - e2e: QueueGateSlide engages at cap, SKIP dismisses, POST publishes + dismisses (and stays dismissed despite the re-earned credit), and the gate never engages with an empty queue - e2e: drop queue-interactions' seeded user below the cap so the manual QueueSheet isn't shadowed by the auto-showing gate slide
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.
Why
Two problems with the current reciprocity gate, both surfaced by a real member report:
What changed
QueueGateSlide.svelte— a full-screen reciprocity gate slide (NOT aBaseSheet). When you're at the credit cap with queued clips, forward scroll yields to this slide. Scroll your queued items inside it; Skip for now (soft nudge) or Post to advance. You can't scroll to the next reel or back to the previous one until you act. The manualQueueSheetstays for explicit queue access (Queue nav /?queue=true).nextPostAvailableAt()computes when the rolling-24h window next frees a slot; it's surfaced on the watch + queue-post responses and the layout seed, so the gate stays suppressed and an explicit post attempt shows a "you can post again in 3h 20m" countdown instead of "Posted 0".activeIndexprogression (not the live credit balance) stops the gate from instantly re-opening after every post.Test plan
npm run check— 0 errorsnpm run lint— cleannpm test— 488 unit/API tests pass (added:nextPostAvailableAt,formatPostCooldown, queue/post daily-cap)npm run test:e2e(desktop + mobile-ios + mobile-android) — newe2e/reciprocity/gate-slide.spec.ts: gate engages at cap, Skip dismisses, Post publishes + stays dismissed, empty queue never gates; existing queue-interactions adjusted to a non-gated user; verified stable across 5 consecutive runs at CI worker count