Skip to content

Comments

feat(calendar): improve parity for recurrence, availability, and selection#319

Open
salmonumbrella wants to merge 11 commits intosteipete:mainfrom
salmonumbrella:feat/calendar-parity
Open

feat(calendar): improve parity for recurrence, availability, and selection#319
salmonumbrella wants to merge 11 commits intosteipete:mainfrom
salmonumbrella:feat/calendar-parity

Conversation

@salmonumbrella
Copy link
Contributor

Summary

  • Add --cal, --calendars, and --all flags to freebusy and conflicts commands for calendar selection by name/index
  • Fix recurring event instance ID handling in edit/delete scope operations (--scope single and --scope future now work when given an instance event ID instead of the master)
  • Add day_of_week/dayOfWeek to calendar time JSON and text output
  • Add GOG_FORCE_OUTPUT env alias and --non-interactive auto-JSON when stdout is non-TTY
  • Fix contacts helper function signatures and remove unused primaryURL
  • Extract shared calendar resolution helpers and introduce scopeResult struct (code review follow-up)

Test plan

  • All existing tests pass (go test ./... -count=1)
  • New tests for resolveRecurringSeriesID (master, instance, non-recurring)
  • New tests for dedupeCalendarTargets and collectCalendarInputs
  • New tests for --plain overriding GOG_FORCE_OUTPUT and --non-interactive
  • New integration tests for freebusy name resolution and conflicts --all
  • go vet ./... clean
  • go build ./... clean

🤖 Generated with Claude Code

salmonumbrella and others added 11 commits February 18, 2026 03:07
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add tests verifying --plain overrides GOG_FORCE_OUTPUT and
--non-interactive auto-JSON. Add comment explaining why TTY-positive
path cannot be tested (captureStdout uses os.Pipe, always non-TTY).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Rewrite if-else chain to switch statement (gocritic)
- Rename `clear` to `clearAll` to avoid shadowing builtin (predeclared)
- Remove unused `primaryURL` helper (unused)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Deduplicate --all calendar resolution and input collection between
freebusy and conflicts commands into resolveAllCalendarIDs and
collectCalendarInputs helpers in calendar_selection.go.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace 4-value positional return (targetEventID, parentEventID,
parentRecurrence, error) with a named struct for clarity.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…-recurring paths

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…alendarInputs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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