Add Export to .ics#17
Open
Copilot wants to merge 2 commits into
Open
Conversation
✅ Deploy Preview for pocketcal ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Co-authored-by: cassidoo <1454517+cassidoo@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] [11] Fix export to .ics feature in sidebar
Add Export to .ics
Mar 13, 2026
|
This pull request is now considered stale! 😭 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements client-side export of all event group date ranges as a standard iCalendar (.ics) file, resolving issue #11.
Changes
src/utils/icsExport.ts— new utility with two exports:generateIcsContent(eventGroups): builds aVCALENDARstring with one all-dayVEVENTperDateRangeper group (SUMMARY= group name;DTENDis exclusive per RFC 5545; group names escaped per RFC 5545 §3.3.11)downloadIcsFile(content, filename?): triggers browser download aspocketcal.icsvia atext/calendarBlobsrc/components/Sidebar.tsx— adds "Export to .ics" button above "Go Pro" infooterGroups(); disabled when no groups have any rangessrc/components/icons/DownloadIcon.tsx— new icon following existing icon component conventionsNo new dependencies — uses
date-fns(already in use) andnanoid(already in use) for date formatting and UID generation respectively.Original prompt
Implement the plan in a new branch and make a pull request that fixes #11
**Chronological Review:** 1. User requested implementation of issue #11 - "Export to .ics" feature 2. Agent fetched GitHub issue #11 from cassidoo/pocketcal repo - confirmed it's about exporting calendar to .ics file 3. Agent launched background explore agent (agent-0) to analyze codebase 4. Agent read git remotes to find correct repo owner (cassidoo) 5. Agent read `src/store.ts` directly while waiting for explore agent 6. Explore agent completed - provided comprehensive analysis of the codebase 7. Agent read `src/components/Sidebar.tsx` in parallel 8. Agent created the plan file and SQL todos 9. Agent exited plan modeIntent Mapping:
Technical Inventory:
Code Archaeology:
src/store.ts: Zustand store with EventGroup, DateRange interfaces; all state managementsrc/components/Sidebar.tsx: Contains footerGroups() function with proButton and helpAndCopyButtonsC:\Users\cassi\.copilot\session-state\62a1b4f0-ea87-4a9f-a58c-09a7a89ff6e1\plan.mdProgress Assessment:
Context Validation:
Recent Commands Analysis:
1. Conversation Overview: - Primary Objectives: Implement GitHub issue #11 — add an "Export to .ics" button above the "Go Pro" button in the sidebar that exports all selected date ranges as all-day calendar events, with each event titled after its group name. - Session Context: Planning phase only — agent explored the codebase, fetched the GitHub issue, created a structured plan file, inserted SQL todos, and exited plan mode. No implementation code has been written yet. - User Intent Evolution: User provided a clear, specific request (button placement, event title = group name, all-day events). No clarification was needed; agent proceeded directly to planning.-
- React 19 + TypeScript + Vite: Core framework and build tool for the
- Zustand: State management library (
- date-fns: Date utility library already in use (formatISO, parseISO, eachDayOfInterval, etc.)
- nanoid: Already used for generating unique IDs (event group IDs); will be reused for iCal VEVENT UIDs
- lz-string: URL compression for shareable links (not relevant to this feature)
- iCalendar (.ics) format: Will be generated client-side as a string — no new npm packages needed
-
- Purpose: Single Zustand store containing all app state and actions
- Current State: Unmodified; contains EventGroup/DateRange interfaces and all state logic
- Key Code Segments:
- Dependencies: All components import from here via
- Purpose: Left sidebar panel containing event groups list, settings, and footer buttons
- Current State: Unmodified; contains the Go Pro button that the export button must be placed above
- Key Code Segments:
Technical Foundation:
pocketcalproject atC:\Users\cassi\Documents\github\pocketcalsrc/store.ts); all app state is in one store accessed viauseStore()hookCodebase Status:
src/store.ts:useStore()src/components/Sidebar.tsx:...
Created from Copilot CLI via the copilot delegate command.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.