Skip to content

Conversation

@Saksham-Sirohi
Copy link
Contributor

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

Fixes #1343

Summary by Sourcery

Adjust room visibility and sidebar behavior for newly created rooms to ensure they remain visible in the schedule editor while staying hidden from the sidebar until configured.

Bug Fixes:

  • Prevent rooms from disappearing from the schedule editor by keeping them unhidden by default on creation.
  • Avoid showing unconfigured rooms in the sidebar by tying sidebar visibility to room hidden state and setup completion.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Nov 24, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adjusts default room visibility and sidebar behavior so rooms stay visible in the schedule editor while only appearing in the sidebar once configured.

Flow diagram for room visibility and sidebar behavior during creation

flowchart TD
    A["Start room creation with data"] --> B["Check 'module_config' in data"]
    B --> C["Set 'has_modules' = boolean of data['module_config']"]
    C --> D["If 'setup_complete' not in data, set data['setup_complete'] = has_modules"]
    D --> E["If 'hidden' not in data, set data['hidden'] = False"]
    E --> F["If 'sidebar_hidden' not in data, set data['sidebar_hidden'] = data['hidden'] OR NOT data['setup_complete']"]
    F --> G["Room created with final 'hidden' and 'sidebar_hidden' values"]

    subgraph "Resulting behavior"
        H["Schedule editor visibility"]
        I["Sidebar visibility"]
    end

    G --> H
    G --> I

    H --- H1["Rooms are visible by default because 'hidden' defaults to False"]
    I --- I1["Rooms only appear in sidebar when 'setup_complete' is True and 'hidden' is False"]
Loading

File-Level Changes

Change Details Files
Refine default visibility flags when creating rooms to decouple schedule visibility from sidebar display.
  • Stop using sidebar_hidden as a proxy for overall room visibility and instead introduce an explicit hidden flag defaulting to false
  • Ensure rooms remain visible by default in the schedule editor by not marking them as hidden initially
  • Update sidebar_hidden default logic so a room is hidden from the sidebar until it is configured or explicitly marked hidden
app/eventyay/base/services/event.py

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:

  • When computing sidebar_hidden, consider using data.get("hidden", False) and the existing has_modules flag instead of relying on data["hidden"] and data["setup_complete"] so the logic is more robust to missing keys and less dependent on the ordering of the preceding setdefault calls.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- When computing `sidebar_hidden`, consider using `data.get("hidden", False)` and the existing `has_modules` flag instead of relying on `data["hidden"]` and `data["setup_complete"]` so the logic is more robust to missing keys and less dependent on the ordering of the preceding `setdefault` calls.

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.

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 fixes an issue where newly created rooms would disappear from the schedule editor by explicitly setting default values for the hidden and sidebar_hidden fields during room creation.

  • Sets hidden to False by default to keep rooms visible in the schedule editor
  • Sets sidebar_hidden based on both the hidden state and setup_complete status to prevent unconfigured rooms from appearing in the sidebar
  • Adds clear inline comments explaining the purpose of each field

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

@mariobehling mariobehling merged commit b0d2953 into fossasia:enext Nov 25, 2025
2 checks passed
hongquan pushed a commit to hongquan/eventyay-tickets that referenced this pull request Dec 6, 2025
Co-authored-by: Srivatsav Auswin <75414859+Sak1012@users.noreply.github.com>
Co-authored-by: Mario Behling <mb@mariobehling.de>
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.

Bug (Video): Unable to Create Rooms in Video Component – All Attempts Return “Fatal Server Error”

3 participants