Skip to content

Conversation

@Saksham-Sirohi
Copy link
Contributor

@Saksham-Sirohi Saksham-Sirohi commented Nov 3, 2025

Fixes #1078
Screenshot 2025-11-14 at 7 35 23 PM
Screenshot 2025-11-14 at 7 36 28 PM
Screenshot 2025-11-14 at 7 36 45 PM

Summary by Sourcery

Add visibility and setup workflow for rooms by introducing new fields, admin UI for type selection and hiding rooms, and update backend and frontend to filter out hidden or incomplete rooms from scheduling and navigation.

New Features:

  • Introduce room visibility flags (hidden and sidebar_hidden) and a setup_complete state in the Room model
  • Add a type-selection step and visibility controls in the admin room edit form to finish setup and hide rooms
  • Update room list UI to display visibility icons and and context-aware buttons for configuring or completing setup

Bug Fixes:

  • Fix room reordering API call to pass a list of string IDs instead of full room objects

Enhancements:

  • Exclude hidden or incomplete rooms from sidebar, schedule counts, scheduling APIs, and frontend navigation
  • Automatically update sidebar_hidden flag when a room’s setup is completed and preserve visibility across saves
  • Add migration to initialize setup_complete and sidebar_hidden based on existing module configurations
  • Adjust backend room services, serializers, and ordering to honor new visibility constraints

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Nov 3, 2025

Reviewer's Guide

Adds support for unscheduled (hidden) rooms and a setup workflow by introducing new room visibility and state fields, filtering hidden rooms in backend queries and serializers, and updating admin and user-facing Vue components to manage and display room setup status and visibility.

Sequence diagram for room setup completion and sidebar visibility sync

sequenceDiagram
    actor Admin
    participant EditFormVue
    participant API
    participant Backend
    Admin->>EditFormVue: Select room type and complete setup
    EditFormVue->>API: PATCH room.config with setup_complete, hidden, sidebar_hidden
    API->>Backend: save_room(...)
    Backend->>Backend: If module_config and not setup_complete, set setup_complete True, sidebar_hidden False
    Backend->>API: Return updated room config
    API->>EditFormVue: Update room state
    EditFormVue->>SidebarVue: Room now visible if setup_complete and not hidden/sidebar_hidden
Loading

Entity relationship diagram for updated Room model

erDiagram
    ROOM {
        INTEGER id
        STRING name
        STRING description
        INTEGER pretalx_id
        JSON schedule_data
        BOOLEAN force_join
        BOOLEAN setup_complete
        BOOLEAN hidden
        BOOLEAN sidebar_hidden
        JSON module_config
    }
    ROOM ||--o{ AVAILABILITY : has
    ROOM ||--o{ TALK_SLOT : has
    TALK_SLOT {
        INTEGER id
        DATETIME start
        DATETIME end
        INTEGER room
        INTEGER schedule
        STRING description
    }
    AVAILABILITY {
        INTEGER id
        INTEGER room
        STRING details
    }
Loading

Class diagram for updated Room and related classes

classDiagram
    class Room {
        +int id
        +str name
        +str description
        +int pretalx_id
        +dict schedule_data
        +bool force_join
        +bool setup_complete
        +bool hidden
        +bool sidebar_hidden
        +list module_config
    }
    class TalkSlot {
        +int id
        +datetime start
        +datetime end
        +Room room
        +Schedule schedule
        +str description
    }
    class Availability {
        +int id
        +Room room
        ...
    }
    Room "1" --o "*" TalkSlot : has
    Room "1" --o "*" Availability : has
Loading

File-Level Changes

Change Details Files
Room model, migration, service and API serialization extended with setup and visibility fields
  • Added setup_complete, hidden, and sidebar_hidden fields to Room model and default values via migration
  • Persist setup_complete/sidebar_hidden toggles in save_room service
  • Expose new fields in get_room_config and API serializers
  • Include new fields in RoomQuerySet ordering and event.get_rooms
app/eventyay/base/models/room.py
app/eventyay/base/migrations/0002_room_visibility_fields.py
app/eventyay/base/services/room.py
app/eventyay/base/services/event.py
app/eventyay/api/serializers/rooms.py
Filter out hidden rooms in scheduling and Orga workflows
  • Exclude hidden rooms when counting rooms, assigning slots, and building availability in schedule views
  • Apply hidden filter in Orga CRUD room queries and submission form
  • Ensure schedule.build_data omits hidden rooms
app/eventyay/orga/views/schedule.py
app/eventyay/orga/forms/submission.py
app/eventyay/base/models/schedule.py
Enhance admin room edit form with type selection and visibility controls
  • Render a type-selection screen when no type is inferred
  • Add visibility toggles and contextual notes for hidden/sidebar_hidden
  • Watch config fields to auto-sync sidebar_hidden based on setup_complete
  • Update room.config.patch API call to include new fields and merge response
app/eventyay/webapp/src/views/admin/rooms/EditForm.vue
Update admin room list with visibility column and action buttons
  • Add Visibility and Actions columns to room list table
  • Show eye/eye-slash icon based on hidden/sidebar_hidden/setup_complete
  • Replace row link with Configure/Complete Setup button
  • Disable drag-sorting when filtered or single item
app/eventyay/webapp/src/views/admin/rooms/RoomListItem.vue
app/eventyay/webapp/src/views/admin/rooms/index.vue
Filter rooms in sidebar and main App component by visibility and setup state
  • Compute visibleRooms excluding hidden or incomplete rooms
  • Derive homeRoom from visibleRooms
  • Update RoomsSidebar links and App.vue room resolver to use filtered list
app/eventyay/webapp/src/components/RoomsSidebar.vue
app/eventyay/webapp/src/App.vue

Assessment against linked issues

Issue Objective Addressed Explanation
#1078 Synchronize room data between the Talk and Video components so that rooms created in Talk automatically appear in Video, with consistent names, slugs, and access permissions.
#1078 Add support in Eventyay Video for additional unscheduled rooms not linked to a specific Talk session, allowing organizers to create and manage these rooms.
#1078 Ensure unscheduled rooms are displayed alongside Talk-linked rooms in the Video component UI, visually distinguish scheduled vs. unscheduled rooms, and maintain synchronization (renaming/removing a Talk room updates the corresponding Video room automatically), with permission checks so only organizers can create unscheduled rooms.

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes - here's some feedback:

  • The hard-coded "Unscheduled Rooms" header should be wrapped in a translation key (using $t) to support localization.
  • There’s a lot of repetition of query: $route.query in your router-link definitions—consider abstracting that into a computed property or mixin to DRY up the code.
  • Unscheduled rooms are rendered in insertion order; consider applying the same sorting (e.g. by sorting_priority or name) as the other room categories for consistency.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The hard-coded "Unscheduled Rooms" header should be wrapped in a translation key (using $t) to support localization.
- There’s a lot of repetition of `query: $route.query` in your router-link definitions—consider abstracting that into a computed property or mixin to DRY up the code.
- Unscheduled rooms are rendered in insertion order; consider applying the same sorting (e.g. by sorting_priority or name) as the other room categories for consistency.

## Individual Comments

### Comment 1
<location> `app/eventyay/base/models/room.py:204-207` </location>
<code_context>
     pretalx_id = models.IntegerField(default=0)
     schedule_data = JSONField(null=True, blank=True)
     force_join = models.BooleanField(default=False)
+    is_unscheduled = models.BooleanField(
+        default=False,
+        help_text=_('Unscheduled rooms are video-only rooms not linked to any Talk session (e.g., networking lounges, help desks)')
+    )

</code_context>

<issue_to_address>
**suggestion (performance):** is_unscheduled field added to Room model.

If you anticipate frequent filtering by is_unscheduled, consider adding a database index to optimize query performance.

```suggestion
    is_unscheduled = models.BooleanField(
        default=False,
        db_index=True,
        help_text=_('Unscheduled rooms are video-only rooms not linked to any Talk session (e.g., networking lounges, help desks)')
    )
```
</issue_to_address>

### Comment 2
<location> `app/eventyay/base/models/schedule.py:605` </location>
<code_context>
        rooms = set() if not all_rooms else set(self.event.rooms.filter(is_unscheduled=False))

</code_context>

<issue_to_address>
**suggestion (code-quality):** Swap if/else branches of if expression to remove negation ([`swap-if-expression`](https://docs.sourcery.ai/Reference/Rules-and-In-Line-Suggestions/Python/Default-Rules/swap-if-expression))

```suggestion
        rooms = set(self.event.rooms.filter(is_unscheduled=False)) if all_rooms else set()
```

<br/><details><summary>Explanation</summary>Negated conditions are more difficult to read than positive ones, so it is best
to avoid them where we can. By swapping the `if` and `else` conditions around we
can invert the condition and make it positive.
</details>
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@mariobehling mariobehling requested a review from Copilot November 3, 2025 12:39
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for "unscheduled" rooms, which are video-only rooms not linked to any Talk session (e.g., networking lounges, help desks). These rooms exist independently of the schedule and are excluded from schedule-related views and queries.

Key changes:

  • Adds is_unscheduled boolean field to the Room model with database migration
  • Implements UI for creating unscheduled rooms via a separate button and query parameter
  • Filters unscheduled rooms from schedule-related queries and room listings
  • Displays unscheduled rooms in a dedicated section in the sidebar

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
app/eventyay/base/models/room.py Adds is_unscheduled boolean field to Room model with help text
app/eventyay/base/migrations/0002_room_is_unscheduled.py Database migration to add the new is_unscheduled field
app/eventyay/api/serializers/rooms.py Includes is_unscheduled field in room serializer
app/eventyay/base/services/event.py Includes is_unscheduled in room config response
app/eventyay/webapp/src/views/admin/rooms/index.vue Adds "Create Unscheduled Room" button with secondary styling
app/eventyay/webapp/src/views/admin/rooms/new.vue Propagates unscheduled query parameter and sets initial config values
app/eventyay/webapp/src/views/admin/rooms/EditForm.vue Sends is_unscheduled field when saving room configuration
app/eventyay/webapp/src/components/RoomsSidebar.vue Displays unscheduled rooms in a dedicated section
app/eventyay/webapp/src/views/admin/rooms/RoomListItem.vue Adds ellipsis styling to room names
app/eventyay/orga/views/schedule.py Filters out unscheduled rooms from schedule views
app/eventyay/base/models/schedule.py Excludes unscheduled rooms from talk schedule data
Comments suppressed due to low confidence (1)

app/eventyay/webapp/src/views/admin/rooms/EditForm.vue:10

  • The pretalx_id input field is only shown for scheduled rooms ('stage' or 'channel-bbb' types), but unscheduled rooms can be of any type. Consider hiding or disabling this field when config.is_unscheduled is true, as unscheduled rooms should always have pretalx_id set to 0.
					bunt-input(v-if="inferredType.id === 'stage' || inferredType.id === 'channel-bbb'", name="pretalx_id", v-model="config.pretalx_id", label="pretalx ID", :validation="v$.config.pretalx_id")

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Saksham-Sirohi Saksham-Sirohi marked this pull request as draft November 4, 2025 20:08
@Saksham-Sirohi Saksham-Sirohi force-pushed the unscheduled-room-addition branch 2 times, most recently from f3821fc to 6755553 Compare November 14, 2025 14:04
@Saksham-Sirohi Saksham-Sirohi marked this pull request as ready for review November 14, 2025 14:07
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes - here's some feedback:

  • There’s a lot of duplicated filtering logic for visibleRooms across App.vue, RoomsSidebar.vue, and other components—consider extracting this into a shared computed/helper to keep behavior consistent and reduce duplication.
  • The watchers for config.hidden, config.sidebar_hidden, and config.setup_complete contain overlapping side effects that are hard to follow—think about consolidating this into a single reactive flow (e.g. using computed setters or a dedicated method) to simplify state transitions.
  • You switched the reorder API call to send an array of string IDs—please verify the backend endpoint expects strings and not integers to avoid potential type mismatches.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- There’s a lot of duplicated filtering logic for `visibleRooms` across App.vue, RoomsSidebar.vue, and other components—consider extracting this into a shared computed/helper to keep behavior consistent and reduce duplication.
- The watchers for `config.hidden`, `config.sidebar_hidden`, and `config.setup_complete` contain overlapping side effects that are hard to follow—think about consolidating this into a single reactive flow (e.g. using computed setters or a dedicated method) to simplify state transitions.
- You switched the reorder API call to send an array of string IDs—please verify the backend endpoint expects strings and not integers to avoid potential type mismatches.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@Saksham-Sirohi Saksham-Sirohi changed the title feature: added unscheduled rooms and ensure sync feature: added hidden rooms and ensure sync Nov 14, 2025
@mariobehling mariobehling requested a review from Copilot November 14, 2025 16:59
Copilot finished reviewing on behalf of mariobehling November 14, 2025 17:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 14 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@Saksham-Sirohi Saksham-Sirohi force-pushed the unscheduled-room-addition branch from 6c99318 to b4dcc18 Compare November 16, 2025 20:43
@Saksham-Sirohi Saksham-Sirohi force-pushed the unscheduled-room-addition branch from b4dcc18 to 4ca2e01 Compare November 16, 2025 20:51
@Saksham-Sirohi
Copy link
Contributor Author

rebased and resolved conflicts

@@ -0,0 +1,61 @@
from django.db import migrations, models
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a pending migration AFAIR, shouldn't we do that before? Is it fine to ignore that one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That migration needs to run before (or along with) the deployment, otherwise the new room fields and visibility logic won’t work correctly.

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.

Feature: Synchronize Talk and Video Components

2 participants