Skip to content

fix(calendar): exclude ended sessions from upcoming week view#1237

Open
mayurigade-hub wants to merge 1 commit into
durdana3105:mainfrom
mayurigade-hub:fix/calendar-week-view-filter
Open

fix(calendar): exclude ended sessions from upcoming week view#1237
mayurigade-hub wants to merge 1 commit into
durdana3105:mainfrom
mayurigade-hub:fix/calendar-week-view-filter

Conversation

@mayurigade-hub

@mayurigade-hub mayurigade-hub commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Related Issue

Closes #1073

Description

Fixed an inconsistency between the calendar list view and week view where ended sessions were still displayed under the "Upcoming Sessions" section.

Previously, the list view correctly filtered out sessions with status === "ended", but the week view continued to include them when building sessionsByDay. This caused users to see sessions that had already ended in a section intended only for upcoming sessions.

Changes Made

  • Added filtering to exclude sessions with status === "ended" when building sessionsByDay
  • Aligned week view behavior with existing list view logic
  • Ensured only active and upcoming sessions appear in the "Upcoming Sessions" section
  • Improved consistency across calendar views

Steps to Test

  1. Open the calendar/session schedule view
  2. Create or use a session with status = "ended"
  3. Create or use a future session with a non-ended status
  4. Switch to the week view
  5. Verify the ended session does not appear
  6. Verify active/upcoming sessions still appear correctly
  7. Compare with list view and confirm consistent behavior

Expected Result

  • Ended sessions are hidden from the week view
  • Upcoming Sessions only shows active/upcoming sessions
  • Week view and list view behave consistently

Files Changed

  • src/components/CalendarView.tsx

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Summary by CodeRabbit

  • Bug Fixes
    • Calendar grid no longer displays sessions with ended status.

@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

@mayurigade-hub is attempting to deploy a commit to the durdana3105's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 03e26766-7077-4664-8e86-63bbf0bb9227

📥 Commits

Reviewing files that changed from the base of the PR and between 32f6685 and 69cf027.

📒 Files selected for processing (1)
  • src/components/CalendarView.tsx

📝 Walkthrough

Walkthrough

CalendarView's sessionsByDay filter predicate now also rejects sessions whose status is "ended", preventing them from appearing in the week grid columns. A export default CalendarView declaration is added at the end of the file.

Changes

Calendar week view ended-session filter

Layer / File(s) Summary
sessionsByDay filter and default export
src/components/CalendarView.tsx
The per-day sessions.filter(...) predicate adds status !== "ended" as an additional condition alongside the existing scheduled_at and isSameDay checks. export default CalendarView is added at module level.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested labels

gssoc26, gssoc:approved, quality:clean, type:bug, level:beginner

Poem

🐇 Hop hop, the calendar's clear!
No "ended" sessions lurking here.
The week grid shows only what's ahead,
No ghosts of sessions long since dead.
A default export joins the fray —
Clean code hops along the way! 🗓️

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: excluding ended sessions from the calendar week view.
Linked Issues check ✅ Passed The PR correctly implements the requested fix by filtering out sessions with status 'ended' from sessionsByDay in CalendarView.tsx, directly addressing issue #1073.
Out of Scope Changes check ✅ Passed The changes are limited to CalendarView.tsx with filtering logic and a default export addition, both directly related to the linked issue requirements.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch fix/calendar-week-view-filter

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed: dependency version conflict. Check your lock file or package.json.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@durdana3105

Copy link
Copy Markdown
Owner

please resolve merge conflicts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Calendar week view shows ended sessions under Upcoming Sessions

2 participants