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.
This pull request includes several changes to the
HostView.svelte
andParticipantView.svelte
components, as well as the addition of a new server-side handler for removing participants from a session. The changes improve session initialization, participant management, and UI updates for different session stages.Changes to session initialization and participant management:
src/lib/components/session/HostView.svelte
: Refactored session initialization to useonSnapshot
for real-time updates and added aninitializeSession
function for better error handling. [1] [2] [3]src/lib/components/session/HostView.svelte
: Added a newhandleRemoveParticipant
function to allow hosts to remove participants from a session.src/routes/api/session/[id]/group/[group_number]/join/[participant]/+server.ts
: Implemented a DELETE handler to remove participants from a session and delete their conversation records. (src/routes/api/session/[id]/group/[group_number]/join/[participant]/+server.tsR1-R55)UI updates for session stages:
src/lib/components/session/HostView.svelte
: Updated the UI to display the current session stage and adjusted the layout based on the session status. [1] [2] [3] [4]Other improvements:
src/lib/components/session/HostView.svelte
: Imported theX
icon fromlucide-svelte
for use in the participant removal button.src/lib/components/session/ParticipantView.svelte
: Updated the participant display to show user details using thegetUser
function. [1] [2]