Add Phoenix LiveView POC shell: /chat and /timetable with persistent player#54
Draft
mcfiredrill with Copilot wants to merge 3 commits into
Draft
Add Phoenix LiveView POC shell: /chat and /timetable with persistent player#54mcfiredrill with Copilot wants to merge 3 commits into
mcfiredrill with Copilot wants to merge 3 commits into
Conversation
…ayer Agent-Logs-Url: https://github.com/datafruits/hotdog_lounge/sessions/0a21218d-6fe5-48f8-bfb8-c4f52d4276d7 Co-authored-by: mcfiredrill <66243+mcfiredrill@users.noreply.github.com>
…s and patch navigation tests Agent-Logs-Url: https://github.com/datafruits/hotdog_lounge/sessions/0a21218d-6fe5-48f8-bfb8-c4f52d4276d7 Co-authored-by: mcfiredrill <66243+mcfiredrill@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add initial Phoenix and LiveView POC shell for migration
Add Phoenix LiveView POC shell: /chat and /timetable with persistent player
Apr 8, 2026
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.
POC migration of datafruits off Ember/Rails onto Phoenix+LiveView, built directly in
hotdog_lounge. Adds two live routes (/chat,/timetable) inside a persistent site shell with top nav and fixed bottom player — player survives navigation without reloading or stopping audio.Routing & LiveView shell
live "/chat", SiteLive, :chatandlive "/timetable", SiteLive, :timetable— singleSiteLivemodule handles both viahandle_params/3Layouts.site_shell/1component inlayouts.ex: top nav with<.link patch>links, scrollable main slot, fixed bottom playerphx-update="ignore"+phx-hook="Player"— LiveView never re-renders it, JS hook initializes onceDirect Postgres access (no Rails API)
HotdogLounge.Streampushercontext withlist_scheduled_shows/1replicating the RailsApi::ScheduledShowsController#indexfilter logic:show_series_id IS NOT NULLshow_serieswherestatus = 0(active)start_at >= start_dt AND end_at <= end_dt, orderedstart_at ASCScheduledShow,ShowSeries) mirror the existing Rails table structure with@primary_key {:id, :id, autogenerate: false}— no new migrations against the Rails DBpriv/repo/migrations/creates these tables in the local dev/test DB onlyAmerica/Los_Angelesconversion (viatz/tzdata) is a follow-upTimetable page
start,end,timezonequery params (same interface as the Rails endpoint)group_shows_by_day/2Player JS hook
PlayerHookinapp.js— play/pause toggle, volume control withlocalStoragepersistence, initializes once on mount and survives all patch navigations.Styling
Added
--df-pink,--df-dark,--df-pink-lightCSS vars and corresponding Tailwind utility classes toapp.cssfor datafruits brand colors.Original prompt
Create a draft PR in
datafruits/hotdog_loungeimplementing the initial Phoenix+LiveView POC shell for migrating off Ember/Rails.Goals (POC scope):
/chatand/timetable./chatand/timetable.phx-update="ignore"(or equivalent) and JS hook if needed./timetablemust read scheduled shows directly from Postgres using Ecto.scheduled_showsandshow_seriesat minimum.Api::ScheduledShowsController#index(streampusher-api):show_series_id IS NOT NULLshow_serieswhereshow_series.status == 0(enum[:active, :archived, :disabled])start_at >= start_dtandend_at <= end_dtstart_at ASCstart,end, andtimezone(defaults:America/Los_Angeles/chatcan initially be a placeholder page in the new shell (integration with existing chat can be done later), but route must exist.Styling/layout:
/chatand/timetableTechnical notes:
phoenix_ecto,ecto_sql, andpostgrex. Ensure Repo config usesDATABASE_URLin runtime.lib/hotdog_lounge/streampusher/or similar for DB schema/context.@primary_key {:id, :id, autogenerate: false}for schemas mapping existing tables./socketchat functionality.Deliverables:
phx-update="ignore").Out of scope:
Reference repos (for understanding only; do not modify):
datafruits/streampusher-apihasdb/schema.rbandShowSeriesenum mapping.Create the PR as a draft.
The following is the prior conversation context from the user's chat exploration (may be truncated):
User: Can you make a proof of concept PLAN to migrate streampusher/datafruits to use only phoenix + liveview , no rails or ember?
backend: https://github.com/datafruits/streampusher-api/
frontend: https://github.com/datafruits/datafruits/
Perhaps we could migrate directly to the chat app:
https://github.com/datafruits/hotdog_lounge/
Assistant: Here’s a proof-of-concept migration plan to get datafruits + streampusher onto Phoenix + LiveView only (no Rails backend, no Ember frontend), with an option to migrate “directly to chat” by building on
hotdog_lounge.Repos referenced:
datafruits/streampusher-api(Ruby)datafruits/datafruits(JS/Ember; points atCHAT_SOCKET_URLandAPI_HOST)datafruits/hotdog_lounge(Phoenix; currently a chat app + Redis)0) Choose a POC target (keep it small but end-to-end)
POC goal: replace one real user journey with LiveView backed by a Phoenix app, while still talking to existing systems where necessary.
Suggested POC slice (minimal but representative):
This proves:
1) Decide migration strategy: “New Phoenix app” vs “Evolve hotdog_lounge”
Option A (recommended for clarity): Create a new Phoenix umbrella/app
Create something like
datafruits_web(Phoenix + LiveView) that:Pros: clean architecture, easier to incrementally port Rails endpoints without dragging old chat design constraints.
Cons: you will run two Phoenix apps during transition (new app + hotdog_lounge) unless you port chat early.
Option B (your idea): “Migrate directly to th...
This pull request was created from Copilot chat.