Skip to content

Meeting Notes from the calendar - #72

Merged
tedkulp merged 23 commits into
mainfrom
spec/64-meeting-notes
Oct 12, 2026
Merged

tedkulp merged 23 commits into
mainfrom
spec/64-meeting-notes

Conversation

@tedkulp

@tedkulp tedkulp commented Oct 12, 2026

Copy link
Copy Markdown
Owner

Implements #64 (Meeting Notes from the calendar), tickets #65–#71.

Summary

startup
  fetch every [[calendars]] feed (one goroutine each, 15 s timeout)
    parse → cache raw ICS at $XDG_CACHE_HOME/pholio/calendars/<sha>.ics (0600)

spc m / :meetings
  Meeting picker on Today (h/l day · t today · r refresh)
    calendar.On(day)            # expands RRULE/EXDATE/RDATE, RECURRENCE-ID overrides
    ✓ if a Meeting Note under meetings_folder has a matching meeting_uid
  enter
    has Meeting Note → open it
    else → create meetings/YYYY-MM-DD-HHmm-<slug>.md from meeting_template
           inject meeting_uid: "<UID>/<original start UTC>"
           append "- HH:mm [[note]]" under ## Meetings in that day's Daily Note
 internal/
+├── calendar/        # ICS parse, recurrence, timezones, fetch + cache, meeting details
 ├── app/
+│   ├── meetings.go     # picker, feed state, background fetch
+│   └── meetingnote.go  # create/open Meeting Note, back-link
 ├── config/          # [[calendars]] (user config only), meetings_* vault keys, CacheHome
 ├── daily/           # Render gains {{start}}/{{end}}/{{daily}}/{{attendees}}/…
 ├── palette/         # raw Detail colour, WithTitle
 ├── seam/            # FS.Create (O_EXCL)
 ├── tasks/           # SectionAt / EditFile split out of AddAt / AddFile
 └── theme/           # ParseCSSColor

Evidence

  • Before: no Meetings; spc m unbound.
    After: go test -race ./... green, golangci-lint 0 issues. Tests written red-first include:
    • TestAMovedOccurrenceKeepsItsMeetingNote: RECURRENCE-ID moves an occurrence → same Meeting Note opens
    • TestFetchNeverReportsTheSecretURL: closed server at a secret URL → info line says offline, no URL
    • TestANoteAppearingWhileAskedIsNotOverwritten: file appears during the save prompt → Note goes to -2
    • TestStartupFetchesEvenAFreshCache, TestOpeningRetriesAFailedFetch, TestAMeetingNoteInASubfolderIsFound, TestACRLFTemplateFrontmatterGetsTheMeetingUID
    • Fixture .ics coverage: BYDAY ordinals, BYSETPOS, comma EXDATE, Windows TZID, Customized Time Zone VTIMEZONE, unresolvable TZID, all-day, DURATION; httptest for 401 / timeout / non-ICS / cache not replaced.

Merge Danger

Door: two-way

Additive feature; nothing changes unless [[calendars]] is configured. Revert is clean.

Blast Radius: moderate

  • seam.FS gains Create, and openThen's before callback now returns the path to open (openDaily adapted).
  • tasks.AddAt / AddFile refactored onto SectionAt / EditFile; behaviour unchanged, covered by existing tests.
  • New deps: arran4/golang-ical, teambition/rrule-go, golang.org/x/image (CSS colour names); golang.org/x/sys 0.47 → 0.49.
  • Known limits: VTIMEZONE-only zones can be an hour off within hours of a DST change (ponytail: comment); RANGE=THISANDFUTURE not handled.

🤖 Generated with Claude Code

tedkulp and others added 23 commits October 12, 2026 14:58
[[calendars]] in the user config (name, url, optional color) lists ICS
feeds; entries missing a name or url are reported and skipped, and the
Vault config refuses them since feed URLs are secrets. spc m / :meetings
fetches every feed concurrently (15 s timeout each) and lists Today's
timed Meetings, sorted by start, with the calendar name as Detail.
All-day Meetings are left out; a failing feed shows one info line and
fails alone.

The new internal/calendar package parses (golang-ical) and fetches;
recurrence and VTIMEZONE-only TZIDs come in later tickets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
enter on a Meeting creates its Meeting Note from meeting_template (or a
built-in Template) in meetings_folder, with a meeting_uid: frontmatter
line, and opens it on its last line. A Meeting that already has a
Meeting Note shows a check in the gutter and enter re-opens it.
daily.Render takes extra time and text placeholders for the Meeting
ones. meetings_folder and meeting_template are Vault keys in config init.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Parse keeps a recurring Meeting as one series; On expands it with
rrule-go into the day's occurrences (RRULE, RDATE, EXDATE, and
RECURRENCE-ID overrides). Meeting.Original is the occurrence's original
start in UTC, so a moved occurrence keeps its identity.

A TZID resolves through Go's tz database, then Windows names, then the
feed's own VTIMEZONE (offset in force at the occurrence), else local
time; no Meeting is skipped for its timezone. End falls back to
DTSTART + DURATION.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- config.Dirs gains CacheHome ($XDG_CACHE_HOME, else ~/.cache).
- calendar.Fetch takes a cache dir: a body that parses replaces
  <cache>/pholio/calendars/<sha256(url) prefix>.ics (mode 0600, mtime is
  the fetch time); a bad body leaves it alone. calendar.Cached reads it.
- Init fetches every feed in the background. The picker shows what is
  known at once, refetches feeds older than 15 min on open, and r
  refetches all. Failing calendars get a status line: the fetch error,
  or "offline, showing data from 2h ago" when cached data is shown.
  Loading… only shows while fetching with no data at all.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rs (#70)

h/l and left/right move between days, t returns to Today; the title shows
the day with (today)/(yesterday)/(tomorrow). Meetings that have ended are
drawn in overlay.hint. The calendar name takes the calendar's colour:
[[calendars]] color, else the feed's calendar-level COLOR:, else
overlay.hint. A bad configured colour is a config problem.

palette.Item gains DetailColor (a raw colour) and palette.WithTitle;
theme.ParseCSSColor reads CSS names (golang.org/x/image/colornames) and
#rrggbb; calendar.Meeting gains CalendarColor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	internal/app/meetings.go
A moved occurrence (RECURRENCE-ID) keeps its Meeting Note.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
calendar.Meeting gains Attendees, Location, Link and Description, read in
the new internal/calendar/details.go; meetingNoteText renders them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	internal/app/meetings.go
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Creating a Meeting Note appends '- HH:mm [[name]]' under meetings_heading
(new Vault key, default '## Meetings', in config init) in the Meeting's
Daily Note, adding the heading when missing. Without that Daily Note the
back-link is skipped and the status says so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	internal/app/meetings.go
Conflicts in internal/calendar: kept both sides. Meeting has #71's
details fields and #68's Original/series; Parse extracts details on
every event (series masters and overrides) before the series/override
handling, so On's occurrence copies carry them. Cached goes through
parseFeed -> Parse, and the app reads occurrences via On.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	internal/calendar/calendar.go
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	go.mod
#	internal/calendar/calendar.go
…ackground

Every network failure other than a timeout is now "offline", so a feed's
secret URL never reaches the picker. Startup fetches every feed whatever
its cache's age, staleness on opening the picker counts from the last
successful fetch (so a failed feed is retried), and the cache is read in a
tea.Cmd instead of on the UI thread. Dedupe the RRULE build and name the
DATE-TIME layout once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Meeting Notes are found anywhere under meetings_folder. A new Meeting Note
is written with an exclusive create (seam.FS gains Create), counting up
past a file that appeared after the name was chosen. A CRLF meeting
Template's frontmatter gets the meeting_uid: line instead of a second
block.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tedkulp
tedkulp merged commit 15899e5 into main Oct 12, 2026
3 checks passed
@tedkulp
tedkulp deleted the spec/64-meeting-notes branch October 12, 2026 19:52
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.

1 participant