Skip to content

Fix hidden-course filtering when event summaries normalize differently - #258

Merged
kordianbruck merged 3 commits into
masterfrom
copilot/fix-filter-feature
Sep 12, 2026
Merged

kordianbruck merged 3 commits into
masterfrom
copilot/fix-filter-feature

Conversation

Copilot AI commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Users could select courses to hide and get hide params in the generated URL, but filtering sometimes failed because backend matching used raw event summaries while course keys were effectively normalized.

  • Filtering key alignment

    • In getCleanedCalendar, hidden-course checks now match against cleanEventSummary(summary) instead of raw SUMMARY values.
    • This makes hide matching resilient to trailing formatting differences (e.g. whitespace / trailing " ,") between parsed events and course keys.
  • Deduplication behavior preserved

    • Dedup keys remain based on raw summary + start time, avoiding unintended changes in event collapse behavior.
  • Regression coverage

    • Added a focused fixture and test for a summary that differs only by trailing suffix formatting:
      • internal/testdata/coursefiltering_cleanedsummary.ics
      • TestCourseFilteringWithCleanedSummaryKey in internal/app_test.go
eventSummary := cleanEventSummary(event.GetProperty(ics.ComponentPropertySummary).Value)
if hiddenCourses[eventSummary] {
    continue
}

Copilot AI and others added 2 commits September 12, 2026 15:01
Co-authored-by: kordianbruck <298860+kordianbruck@users.noreply.github.com>
Co-authored-by: kordianbruck <298860+kordianbruck@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix filter feature not applying to calendar events Fix hidden-course filtering when event summaries normalize differently Sep 12, 2026
Copilot AI requested a review from kordianbruck September 12, 2026 15:03
@kordianbruck
kordianbruck marked this pull request as ready for review September 12, 2026 15:05
@kordianbruck
kordianbruck merged commit 98f885c into master Sep 12, 2026
3 checks passed
@kordianbruck
kordianbruck deleted the copilot/fix-filter-feature branch September 12, 2026 15:07
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.

Filter feature dosen't seem to work.

2 participants