Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 24, 2025

Per-user playlist routing should not depend on shared .env defaults; users must choose their default, uncertain playlist, and similarity threshold from the dashboard.

  • Data model & defaults

    • Added D1 columns (default_playlist, uncertain_playlist, similarity_threshold) with migration; new users seeded from env defaults if present.
    • Preference resolver centralizes similarity threshold (clamped 0–1) and per-user vs env fallback selection.
  • API behavior

    • /add now resolves target playlists using user preferences first, with env fallbacks normalized; guards missing playlists early.
    • Auth middleware/user context extended with preference fields; new helper unit tests cover resolver logic.
  • Dashboard UI & persistence

    • Added preferences form (default playlist, uncertain playlist, similarity threshold) to dashboard with server-side update handler and result validation.
    • Docs/schema updated to reflect per-user configuration instead of .env reliance.
const { targetPlaylist } = resolvePlaylistTarget({
  requestedPlaylist,
  similarity,
  preferences: userPrefs,
  envDefault,
  envUncertain
});
Original prompt

The app should be per user isolated and not depend on the .env for user specific configurations. For example the user cannot select which playlist songs should go depending on the similarity level. This should be added to the dashboard so everyone can choose where songs go. Things that should be manaeged by the server owner like API keys (Groq, gemini etc) should stay in the .env ofcourse


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: Copystrike <26123873+Copystrike@users.noreply.github.com>
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 24, 2025

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
playlisturlify 2bf48b2 Commit Preview URL

Branch Preview URL
Dec 24 2025, 04:35 PM

Copilot AI and others added 6 commits December 24, 2025 16:28
Co-authored-by: Copystrike <26123873+Copystrike@users.noreply.github.com>
Co-authored-by: Copystrike <26123873+Copystrike@users.noreply.github.com>
Co-authored-by: Copystrike <26123873+Copystrike@users.noreply.github.com>
Co-authored-by: Copystrike <26123873+Copystrike@users.noreply.github.com>
Co-authored-by: Copystrike <26123873+Copystrike@users.noreply.github.com>
Co-authored-by: Copystrike <26123873+Copystrike@users.noreply.github.com>
Copilot AI changed the title [WIP] Add per user playlist management on dashboard Add per-user playlist routing preferences to replace env-driven defaults Dec 24, 2025
Copilot AI requested a review from Copystrike December 24, 2025 16:37
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