Back to blog
EngineeringDate unavailable· min read

When Your Calendar Feed Finally Gets a Name

I shipped the ability to name calendar feeds at import and rename them later. It took 1,030 lines because naming is never as simple as an input box.

I shipped the ability to name calendar feeds at import and rename them later. It took 1,030 lines because naming is never as simple as an input box.

Sabine ingests calendar feeds from TeamSnap, GameChanger, rSchoolToday—platforms that serve youth sports teams. The feeds arrive as raw ICS URLs with calendar names like "TeamSnap Calendar" or encoded garbage. PR #327 shipped the identity domain that infers what a feed is actually about: whose schedule it is (the owner), what team or activity (the subject), and which platform it came from (the source). But that inference lived in the backend. The UI still showed whatever string the user pasted during import.

PR #328 closes that gap. AddFeedModal now shows two new fields during the preview step: "Feed name" (the title) and "What is this feed?" (the hint). The title box prefills with the inferred name when the backend is confident, or opens empty with a clarification question when it's not. You can accept the suggestion or type your own. The hint is optional—"spring baseball" or "piano lessons"—and helps future AI filing.

SubscriptionSheet now displays the resolved title instead of the raw display_name. A pencil icon next to each feed opens an inline rename editor. The editor validates as you type: no empty names, 60 character max, no invalid characters. Hit Enter to save. Hit Escape to cancel. The backend returns 422 for validation errors and 409 for lost races; titleErrors.ts maps those to plain messages like "Keep it to 60 characters."

The title is never the only label. When the subject differs from the title, SubscriptionSheet renders it as a subtitle in 10px mono. The source_label (TeamSnap, GameChanger) appears as a chip below. The owner stays as an uppercase label. Three pieces of metadata, three visual layers.

The TDD audit caught an escape-key edge case. When a rename is saving, Escape should do nothing. When it's not saving, Escape cancels the rename—but must not close the sheet. Radix Sheet hears Escape on the document before the input does, so the input can't stop propagation. The fix: onEscapeKeyDown on SheetContent checks if a rename is open and calls preventDefault() if so. Test: SubscriptionSheet.rename.audit.test.tsx verifies that pressing Escape while renameSaving=true leaves the editor open, and pressing it afterward cancels cleanly.

The backend change is small: GET /subscriptions rows now carry title, title_source, subject, and source_label alongside the legacy display_name. The router computes these from the feed_identity record when it exists, and falls back to display_name when it doesn't. Older clients see the same fields they always did. Newer clients see the resolved name.

This closes the loop between inference and presentation. The identity domain shipped in #327 with the logic to figure out what a feed is. This PR gives you the UI to see that answer, correct it when it's wrong, and provide hints when the system can't decide. The title is no longer a frozen artifact of whatever the ICS publisher decided to call their calendar. It's a living piece of metadata you control.

What's Next

The hint field is plumbed but not yet used. The plan: when Sabine's AI files an event to a list, it will consider the hint alongside the inferred subject to choose the right destination. "Spring baseball" vs "fall baseball" matters when both feeds belong to the same kid.

The backend identity sync hook runs on a 24-hour floor. Feeds that shipped before #327 have no identity records. A backfill will classify them by comparing their current display_name to the calendar list, then create identity rows so the new UI has something to show. That's T10 in the feed identity plan.

And longer term: the title, subject, and source_label will drive event grouping in the UI. Instead of a flat list of calendar items, you'll see "Norah's TeamSnap schedule: 8 events this week" with the ability to expand or collapse by feed. The naming work makes that grouping legible.