fix(calendar): wire -f/-p global options through to calendar subcommands; add --past to events#3
Open
seanlee02001 wants to merge 2 commits into
Open
fix(calendar): wire -f/-p global options through to calendar subcommands; add --past to events#3seanlee02001 wants to merge 2 commits into
seanlee02001 wants to merge 2 commits into
Conversation
… to events calendar.ts's list/events/search actions read options.format/options.profile from the local subcommand options instead of command.parent?.optsWithGlobals() (the pattern gmail.ts already uses correctly) — so -f json and an explicit -p <profile> were both silently ignored for the whole calendar subtree, always falling back to table output and the config's default profile. Also adds an additive --past flag to 'calendar events': listEvents/search hardcode timeMin=now, and Google's API filters timeMin on an event's END time, so a fully-ended event was permanently unlistable via any existing subcommand. --past flips the query window to [now-days, now]; default (forward-looking) behavior is unchanged for existing callers.
Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RxX9wGuESwVBwxgvWhcjvp
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.
Problem
calendar.ts'slist/events/searchactions readoptions.format/options.profilefrom the local subcommand options instead ofcommand.parent?.optsWithGlobals()(the patterngmail.tsalready uses correctly). As a result,-f jsonand an explicit-p <profile>were silently ignored for the whole calendar subtree — always falling back to table output and the config's default profile. Anyone scripting againstgwcli calendar -p work -f jsonwas silently querying the wrong account.Fix
optsWithGlobals(), matching gmail.--pastflag tocalendar events:listEvents/searchhardcodetimeMin=now, and Google's API filterstimeMinon an event's END time, so a fully-ended event was permanently unlistable via any existing subcommand.--pastflips the query window to[now-days, now]; default forward-looking behavior is unchanged for existing callers.Also syncs
package-lock.json's name field with the earlier package rename (separate commit).Found while wiring gwcli into an automated daily calendar-ingestion job; both fixes are running in production on my fork.
🤖 Generated with Claude Code
https://claude.ai/code/session_01RxX9wGuESwVBwxgvWhcjvp