Skip to content

feat(reciprocity): dedicated post-gate slide + daily-cap countdown#185

Merged
GraysonCAdams merged 2 commits into
mainfrom
feat/queue-gate-slide
May 31, 2026
Merged

feat(reciprocity): dedicated post-gate slide + daily-cap countdown#185
GraysonCAdams merged 2 commits into
mainfrom
feat/queue-gate-slide

Conversation

@GraysonCAdams
Copy link
Copy Markdown
Collaborator

Why

Two problems with the current reciprocity gate, both surfaced by a real member report:

  1. The gate opened the slide-up QueueSheet. It needed to be its own dedicated in-feed slide — a hard checkpoint you advance past via an explicit Skip or Post, not a draggable bottom sheet.
  2. Hitting the daily post cap failed silently. Selecting queued clips and pressing Post just said "Posted 0" with no explanation. A member literally asked "does the 10 include videos not uploaded with credits?" — yes, the daily cap counts every clip that reached the feed, and nothing told them when they could post again.

What changed

  • New QueueGateSlide.svelte — a full-screen reciprocity gate slide (NOT a BaseSheet). 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 manual QueueSheet stays for explicit queue access (Queue nav / ?queue=true).
  • Skip is a soft nudge — it grants a short grace window (a few clips) before the gate can re-arm, rather than blocking the very next swipe.
  • Daily-capped users are exempt from the gate (they can't post anyway). 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".
  • Fixed a re-open loop: posting spends a credit, and watching the very next reel earns it straight back to the cap. Keying the gate's re-arm to activeIndex progression (not the live credit balance) stops the gate from instantly re-opening after every post.

Test plan

  • npm run check — 0 errors
  • npm run lint — clean
  • npm test — 488 unit/API tests pass (added: nextPostAvailableAt, formatPostCooldown, queue/post daily-cap)
  • npm run test:e2e (desktop + mobile-ios + mobile-android) — new e2e/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
  • Manual: at cap with queued clips, scroll → gate slide; Skip → scroll a few then re-gate; Post → publishes + advances; with a daily cap set and hit, gate suppressed and post attempt shows the countdown

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
@GraysonCAdams GraysonCAdams merged commit 90a6324 into main May 31, 2026
20 of 23 checks passed
@GraysonCAdams GraysonCAdams deleted the feat/queue-gate-slide branch May 31, 2026 18:19
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.

2 participants