Requested in #15.
The bookings page offers Mine/All and Upcoming/Past and nothing else. There is no filter by event type, host or status, and no search. On a busy workspace Upcoming is an undifferentiated scroll.
Why this isn't just adding dropdowns
GET /v1/bookings (internal/handler/booking_handler.go) has no pagination and no limit. It loads every booking the caller can see via ListByHost/ListAll, then issues follow-up queries whose IN clause contains every booking id returned, against a pool capped at MaxOpenConns(1).
The MCP tool list_bookings (internal/handler/mcp.go) already accepts exactly the filters being asked for (status, date_from, date_to, event_type_id, host_id) but applies them in Go after loading everything. So the filter vocabulary exists, is only reachable by an LLM, and doesn't reduce the query cost.
Client-side filtering would make the page feel faster while making it heavier and leaving both problems in place.
Scope
Team filtering caveat
Teams are a real entity (teams, team_members, CRUD at /v1/teams/*, admin page at /teams), so a team's bookings are the bookings hosted by its members. No schema change needed.
But event_types.team_id exists and is only ever written by the demo seeder. The host-roles model made a team a one-click way to populate event_type_hosts, so the association lives on the people, not the event type. Consequence: someone in two teams has their bookings appear under both. Acceptable for now; recording the team on the event type properly is separate, larger work.
Requested in #15.
The bookings page offers Mine/All and Upcoming/Past and nothing else. There is no filter by event type, host or status, and no search. On a busy workspace Upcoming is an undifferentiated scroll.
Why this isn't just adding dropdowns
GET /v1/bookings(internal/handler/booking_handler.go) has no pagination and no limit. It loads every booking the caller can see viaListByHost/ListAll, then issues follow-up queries whoseINclause contains every booking id returned, against a pool capped atMaxOpenConns(1).The MCP tool
list_bookings(internal/handler/mcp.go) already accepts exactly the filters being asked for (status,date_from,date_to,event_type_id,host_id) but applies them in Go after loading everything. So the filter vocabulary exists, is only reachable by an LLM, and doesn't reduce the query cost.Client-side filtering would make the page feel faster while making it heavier and leaving both problems in place.
Scope
GET /v1/bookingslist_bookingsat the same path and delete its Go-side filteringteam_members(see caveat below)Team filtering caveat
Teams are a real entity (
teams,team_members, CRUD at/v1/teams/*, admin page at/teams), so a team's bookings are the bookings hosted by its members. No schema change needed.But
event_types.team_idexists and is only ever written by the demo seeder. The host-roles model made a team a one-click way to populateevent_type_hosts, so the association lives on the people, not the event type. Consequence: someone in two teams has their bookings appear under both. Acceptable for now; recording the team on the event type properly is separate, larger work.