Skip to content

Commit 3a98642

Browse files
fix(calendar): improve propose-time messaging for CLI agents
- Replace vague "error" framing with "API Limitation" label - Add explicit "Action:" instruction to open issue tracker and click +1 - Rename JSON fields: limitation→api_limitation, error_message→upvote_action - Update tests to verify new messaging format Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 84286bc commit 3a98642

2 files changed

Lines changed: 11 additions & 7 deletions

File tree

internal/cmd/calendar_propose_time.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ import (
1414
)
1515

1616
const (
17-
proposeTimeErrorMessage = "Google Calendar API does not support proposing new times programmatically (since 2018). Open the browser and upvote the issue."
17+
proposeTimeAPILimitation = "The Google Calendar API has no endpoint for proposing new meeting times. This is a known limitation since 2018."
1818
proposeTimeIssueTrackerURL = "https://issuetracker.google.com/issues/170465098"
19+
proposeTimeUpvoteAction = "Open the issue tracker link above in a new browser tab and click the '+1' button to upvote. More votes = higher priority for Google to fix."
1920
)
2021

2122
// CalendarProposeTimeCmd generates a browser URL for proposing a new meeting time.
@@ -101,9 +102,9 @@ func (c *CalendarProposeTimeCmd) Run(ctx context.Context, flags *RootFlags) erro
101102
"calendar_id": calendarID,
102103
"summary": event.Summary,
103104
"propose_url": proposeURL,
104-
"limitation": proposeTimeErrorMessage,
105+
"api_limitation": proposeTimeAPILimitation,
105106
"issue_tracker_url": proposeTimeIssueTrackerURL,
106-
"error_message": proposeTimeErrorMessage,
107+
"upvote_action": proposeTimeUpvoteAction,
107108
}
108109
if event.Start != nil {
109110
if event.Start.DateTime != "" {
@@ -129,9 +130,9 @@ func (c *CalendarProposeTimeCmd) Run(ctx context.Context, flags *RootFlags) erro
129130
}
130131

131132
// Text output
132-
u.Out().Printf("# Error: %s\n", proposeTimeErrorMessage)
133+
u.Out().Printf("# API Limitation: %s\n", proposeTimeAPILimitation)
133134
u.Out().Printf("# Issue tracker: %s\n", proposeTimeIssueTrackerURL)
134-
u.Out().Println("# \"Propose new time\" is only available via browser")
135+
u.Out().Printf("# Action: %s\n", proposeTimeUpvoteAction)
135136
u.Out().Println("")
136137
u.Out().Printf("event\t%s\n", orEmpty(event.Summary, "(no title)"))
137138
if event.Start != nil {

internal/cmd/calendar_propose_time_test.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,11 @@ func TestCalendarProposeTimeCmd_Text(t *testing.T) {
123123
if !strings.Contains(out, proposeTimeIssueTrackerURL) {
124124
t.Errorf("output missing issue tracker URL: %q", out)
125125
}
126-
if !strings.Contains(out, "Error: "+proposeTimeErrorMessage) {
127-
t.Errorf("output missing error message: %q", out)
126+
if !strings.Contains(out, "API Limitation: "+proposeTimeAPILimitation) {
127+
t.Errorf("output missing API limitation message: %q", out)
128+
}
129+
if !strings.Contains(out, "Action: "+proposeTimeUpvoteAction) {
130+
t.Errorf("output missing upvote action: %q", out)
128131
}
129132

130133
// Verify browser was opened

0 commit comments

Comments
 (0)