jam-cloud/jam-ui
Nuwan a60a508330 fix(05-03): expose backingTracks, jamTracks, recordedTracks from useMixerHelper
Root cause fix: useMixerHelper was reading backingTracks from Redux
but not returning it in the hook's return object, causing
mixerHelper.backingTracks to always be undefined.

The issue:
- Line 88: Reads backingTracks from Redux mediaSlice
- Line 89: Reads jamTracks from Redux mediaSlice
- Line 90: Reads recordedTracks from Redux mediaSlice
- Line 831-847: Return object MISSING these three properties

This caused:
- WebSocket MIXER_CHANGES dispatches setBackingTracks() ✓
- Redux mediaSlice.backingTracks updates ✓
- useMixerHelper reads it via selector ✓
- But doesn't expose it to components ✗
- Result: mixerHelper.backingTracks always undefined

Fix:
Added backingTracks, jamTracks, recordedTracks to return object.

Now the full data flow works:
1. WebSocket MIXER_CHANGES arrives
2. Dispatches setBackingTracks(mixers.backingTracks)
3. Redux mediaSlice updates
4. useMixerHelper reads via selector
5. Returns in hook object
6. Components access via mixerHelper.backingTracks

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-16 11:53:19 +05:30
..
cicd fix signup path 2025-03-27 12:25:28 +05:30
cypress leave session feature 2025-12-11 15:38:05 +05:30
docs feat: Phase 3 - migrate entity collections to Redux with comprehensive testing 2026-01-12 16:52:21 +05:30
public session volume modal wip 2025-11-25 01:19:24 +05:30
src fix(05-03): expose backingTracks, jamTracks, recordedTracks from useMixerHelper 2026-01-16 11:53:19 +05:30
test setup playwright e2e tests 2021-10-15 17:36:58 +05:30
tests/helpers wip session screen base 2025-09-20 22:00:36 +05:30
.browserslistrc added updated files 2021-10-13 22:51:29 +05:30
.env.development wip 2025-09-30 00:27:48 +05:30
.env.development.example wip 2025-09-30 00:27:48 +05:30
.env.production wip 2025-09-30 00:27:48 +05:30
.env.staging wip 2025-09-30 00:27:48 +05:30
.eslintrc.json MR is ready for review 2025-02-27 07:55:08 -06:00
.gitignore MR is ready for review 2025-02-27 07:55:08 -06:00
.gitlab-ci.yml added updated files 2021-10-13 22:51:29 +05:30
.nvmrc session lobby with global chat feature 2024-01-02 02:23:21 +05:30
.prettierrc added updated files 2021-10-13 22:51:29 +05:30
.python-version change to api musician filter to minimize the database queries 2022-10-18 22:07:15 +05:30
README.md Update signups aggressively as they occur (realtime), and fix some affiliate and jamtrack flows 2025-03-10 15:36:25 -05:00
cypress.config.js reduce number of sql queries in musicians filter 2022-10-20 17:53:23 +05:30
cypress.env.json auth e2e test 2021-10-13 22:51:30 +05:30
gulpfile.js MR is ready for review 2025-02-27 07:55:08 -06:00
package-lock.json feat: migrate JKSessionScreen state to Redux with comprehensive testing 2026-01-12 15:47:17 +05:30
package.json feat: migrate JKSessionScreen state to Redux with comprehensive testing 2026-01-12 15:47:17 +05:30
playwright.config.ts setup playwright e2e tests 2021-10-15 17:36:58 +05:30
run-phase-tests.sh feat: Phase 3 - migrate entity collections to Redux with comprehensive testing 2026-01-12 16:52:21 +05:30
server.js added updated files 2021-10-13 22:51:29 +05:30

README.md

JamKazam new react frontend UI/UX

jam-ui is a react app created using create-react-app utility. to run the app on your development environment you need to cd jam-ui and run npm run start

The changes to the source files are auto-loaded but sometimes you might need to force close it by crtl+c and then start manually.

The application files goes under src and the react components are placed under src/components directory. We have a convention of naming the files using JK prefix in the filename. For example JKMusicSessions.

The routes are defined in jam-ui/src/components/dashboard/JKDashboardMain.js

Running react app

In production this React app is supposed to run on beta.jamkazam.com subdomain which is same origin domain to the production Rails app (www.jamkazam.com). This way we utilize same session based user authentication of Rails web app for authenticating users. (It looks for remember_token session cookie in headers and if it is not availale redirect the user to Rails web app sign in page)

The DOMAIN and PORT running this app is defined in env.production file. This file also has env variables for connecting with Rails app. (When setting up in development you can copy the content of env.development.example in to env.development.local and change them according to your host setup)

HOST=beta.jamkazam.local PORT=4000 REACT_APP_CLIENT_BASE_URL=http://www.jamkazam.local:3000 REACT_APP_API_BASE_URL=http://www.jamkazam.local:3000/api

Subdomains setup (development)

You need 2 host records created for React and and Rails app. For example

127.0.0.1 www.jamkazam.local #for Rails app 127.0.0.1 beta.jamkazam.local #for React app

Installing npm dependencies

cd jam-ui npm install

Running the app

cd jam-ui npm run start

This will open it in a borwser window at http://beta.jamkazam.local:3000. Of course for it to work you also need Rails (web) app and websocket app (websocket-gateway) running.