Skip to content

Fix Discover swipe bounce-back, dice icon, homepage button, and Feeling Lucky improvements#15

Draft
Copilot wants to merge 8 commits into
mainfrom
copilot/add-im-feeling-lucky-button
Draft

Fix Discover swipe bounce-back, dice icon, homepage button, and Feeling Lucky improvements#15
Copilot wants to merge 8 commits into
mainfrom
copilot/add-im-feeling-lucky-button

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 16, 2026

Bounce-back on button/keyboard swipes persisted because forcedSwipe was set and swipeRight/swipeLeft called simultaneously — the store update removed the card before forcedSwipe was cleared, so the next card inherited the animation and snapped back.

Changes

  • DiscoverModal.svelte — Move swipeRight/swipeLeft calls into the 400 ms timeout alongside forcedSwipe = null. Both happen in the same synchronous batch, so the incoming top card always sees forcedSwipe = null. Also updated title and stats labels to be mode-aware (library vs. home).

    // Before: store updated immediately while forcedSwipe still set
    forcedSwipe = 'right'
    setTimeout(() => { forcedSwipe = null }, 400)
    void swipeRight(topCard)  // ← removes card NOW; next card inherits forcedSwipe
    
    // After: store update deferred until forcedSwipe is already cleared
    const card = topCard
    forcedSwipe = 'right'
    setTimeout(() => {
      forcedSwipe = null
      swipeInFlight = false
      void swipeRight(card)   // ← card removed after forcedSwipe is gone
    }, 400)
  • SwipeCard.svelte — Removed the internal 350 ms reset timer from the forcedSwipe $effect. The card now stays in its exit position until the parent unmounts it, eliminating the snap-back window between the timer firing and the store update.

  • library/+page.svelte — Changed "Feeling Lucky" button icon from star to dice (Lucide Dice5). Updated button to open in library mode.

  • +page.svelte — Added "Feeling Lucky" button (with dice icon) below the homepage search input.

  • discover.ts (store) — Dismissed (swiped-left) items are now persisted to localStorage and excluded from future opens of the interface. Introduces a 'home' | 'library' mode for openDiscover(). In library mode, the deck is pre-populated with onMediaServer watchlist items (shuffled) first, then pending watchlist items, before padding with TMDB recommendations. Swipe-right on already-watchlisted items skips the addToWatchlist call.

  • /api/discover — Results are now interleaved 3:1 (movies:TV) so the deck is ~75% movies, reducing the proportion of TV show suggestions.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits March 16, 2026 23:21
…point

Co-authored-by: BetaHuhn <51766171+BetaHuhn@users.noreply.github.com>
Co-authored-by: BetaHuhn <51766171+BetaHuhn@users.noreply.github.com>
@BetaHuhn
Copy link
Copy Markdown
Owner

@copilot when using the arrows it continues swiping even after releasing the key.

Also ran into the case quickly where it ran out of recommendations.

…stion

Co-authored-by: BetaHuhn <51766171+BetaHuhn@users.noreply.github.com>
Co-authored-by: BetaHuhn <51766171+BetaHuhn@users.noreply.github.com>
Copilot AI changed the title [WIP] Add I'm feeling lucky button for movie recommendations Fix Discover: card bounce-back after swipe and dialog focus outline Mar 17, 2026
@BetaHuhn
Copy link
Copy Markdown
Owner

@copilot the card bouncing back issue still happens when using the buttons or arrow keys.

Also change the button's icon to dice

Also pls add the button to the homepage below the search input

Co-authored-by: BetaHuhn <51766171+BetaHuhn@users.noreply.github.com>
Copilot AI changed the title Fix Discover: card bounce-back after swipe and dialog focus outline Fix Discover swipe bounce-back for buttons/arrows, dice icon, homepage button Mar 17, 2026
@BetaHuhn
Copy link
Copy Markdown
Owner

@copilot the recommendations seem to differ a lot from the other ones in the app, they feel worse. Also if you swipe left / dismiss an item it shouldn't show up again the next time you open the feeling lucky interface.

Also reduce the amount of tv shows and focus on movies.

Also make the feeling lucky button / interface in the library show items that are ready to watch first. The one on the home page doesn't need that filter.

Co-authored-by: BetaHuhn <51766171+BetaHuhn@users.noreply.github.com>
Copy link
Copy Markdown
Author

Copilot AI commented Mar 17, 2026

@copilot the recommendations seem to differ a lot from the other ones in the app, they feel worse. Also if you swipe left / dismiss an item it shouldn't show up again the next time y...

Done in commit 3907e55:

  • Dismissed items persist — swiped-left items are stored in localStorage under cinelist:discover:dismissed and excluded from future opens. They also won't reappear in library mode's pre-populated deck.

  • More movies, fewer TV shows — the /api/discover endpoint now interleaves results 3:1 (3 movies per TV show), keeping the deck ~75% movies.

  • Library "Feeling Lucky" shows ready-to-watch first — opening from the library page calls openDiscover('library'), which pre-populates the deck with onMediaServer items (shuffled) followed by pending watchlist items (shuffled), then pads with TMDB recommendations. Swipe-right on already-watchlisted items skips the addToWatchlist call. The modal title also changes to "What to Watch" in library mode. The homepage button is unchanged (home mode — pure TMDB recommendations, no library pre-population).

Copilot AI changed the title Fix Discover swipe bounce-back for buttons/arrows, dice icon, homepage button Fix Discover swipe bounce-back, dice icon, homepage button, and Feeling Lucky improvements Mar 17, 2026
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