Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Availability treats cancelled sessions as booked

Open
#139 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
74/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
next.js, postgresql, typescript
Domain
api, backend, databases

Research direction

Start at the GET /api/availability/[userId] handler and trace how it builds bookedTimes and subtracts sessions from available slots. Add a pure interval-overlap helper under src/lib, with tests for overlapping sessions and status filtering. Done means only requested and confirmed sessions block every slot they overlap, while cancelled sessions do not.

Written by the indexing model from the issue text.

Description

API bug

GET /api/availability/[userId] builds bookedTimes from every session for the mentor regardless of status, so a cancelled session keeps blocking its slot. It also matches exact start times only, so a session that doesn't start on a slot boundary doesn't block overlapping slots.

Fix. Filter to requested + confirmed; move the subtraction into a pure, tested interval-overlap helper in src/lib (also needed later for calendar free/busy, RFC-0012 Direction).

Dominant language
TypeScript
Stars
3
Forks
6
Avg merge
1d 7h
Merged PRs (30d)
23

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from grasshopper-protocol/grsshppr

All issues in grasshopper-protocol/grsshppr

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.