Add dedicated chat and preset routes - #51
Open
johannesschiessl wants to merge 2 commits into
Open
Conversation
johannesschiessl
marked this pull request as ready for review
August 8, 2026 21:20
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 9 files
Architecture diagram
sequenceDiagram
participant User as User (Browser)
participant Router as TanStack Router
participant ShowLayout as ShowLayout
participant ChatNav as ChatNavigation
participant ChatRoute as Chat Route
participant ChatWorkspace as ChatWorkspace
participant ChatAnswers as ChatAnswerPrompts
participant PresetRoute as Presets Route
participant PresetsWS as ChatPresetsWorkspace
participant PresetDialog as ChatPresetDialog
participant Backend as Backend API
Note over User,Backend: NEW: Dedicated /chat and /presets routes
User->>Router: Navigate to /shows/$showId/chat
Router->>ShowLayout: Render ShowLayout
ShowLayout->>ChatRoute: Outlet renders ChatRoute
Note over ChatNav: CHANGED: activeShowId only for /live/ or /chat paths
ChatNav-->>ChatRoute: If notification, consumeChatOpenRequest(showId)
ChatRoute->>ChatWorkspace: Render ChatWorkspace(showId, requestedChannelId)
ChatWorkspace->>Backend: Subscribe to chat state via chatAtoms
Backend-->>ChatWorkspace: Snapshot (channels, messages)
Note over ShowLayout, ChatAnswers: ShowLayout also renders ChatAnswerPrompts outside /chat
ShowLayout->>ChatAnswers: chatOpen = isChatRoute (false here)
ChatAnswers->>Backend: Subscribe to chat state, plan answer requests
User->>Router: Navigate to /shows/$showId/presets
Router->>ShowLayout: Render ShowLayout
ShowLayout->>PresetRoute: Outlet renders PresetRoute
PresetRoute->>PresetsWS: Render ChatPresetsWorkspace(showId)
PresetsWS->>Backend: Subscribe to chat state
Backend-->>PresetsWS: Snapshot (channels, presets)
PresetsWS->>PresetsWS: Select destination channel
User->>PresetsWS: Click "Use preset"
PresetsWS->>PresetDialog: Open ChatPresetDialog(initialMode = { type:"use", preset })
User->>PresetDialog: Confirm send (fill fields)
PresetDialog->>Backend: sendMessage(channelId, preset fields, answer)
Backend-->>PresetDialog: Success
PresetDialog->>PresetsWS: Notify sent (close dialog)
alt If not on /chat route and pending answer exists
ChatAnswers->>ChatAnswers: Show ChatPresetAnswerDialog
User->>ChatAnswers: Respond to prompt
ChatAnswers->>Backend: Send answer
end
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
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.
What changed
Why
Chat and message presets need enough room to be easy to scan and operate during soundcheck. Dedicated routes make them predictable across desktop and mobile while keeping the title bar focused.
User impact
Non-live show navigation now includes Chat and Presets on desktop and mobile. Live behavior remains unchanged.
Validation
pnpm --filter @showtime/web build