Skip to content

feat(calendar): show LOCATION column by default in events list#582

Open
gado-ships-it wants to merge 1 commit into
openclaw:mainfrom
gado-ships-it:feat/calendar-events-location
Open

feat(calendar): show LOCATION column by default in events list#582
gado-ships-it wants to merge 1 commit into
openclaw:mainfrom
gado-ships-it:feat/calendar-events-location

Conversation

@gado-ships-it
Copy link
Copy Markdown

@gado-ships-it gado-ships-it commented May 13, 2026

Summary

event.location (the Calendar API field that holds the place / address / venue free-form string) was never rendered in calendar events table output. Reading the list in a terminal — or feeding it to an agent — required JSON output or a follow-up calendar event get to learn where each thing was happening. For the "plan today" workflow this PR is aimed at, location is the most useful column after the time and the title.

This PR adds a LOCATION column after SUMMARY in every table variant produced by renderCalendarEventsTable:

  • --all aggregated view (with CALENDAR prefix)
  • Single-calendar view
  • Both of the above with --weekday

eventDisplayLocation collapses embedded \r\n, \n, and \t into single spaces so multi-line postal addresses (which the Calendar UI happily accepts) do not split a row. JSON output already exposes location and is unchanged.

Example (placeholder data):

$ gog calendar events --all --today --max=3 -p
CALENDAR     ID   START                 END                   SUMMARY        LOCATION
holidays     ...  2026-05-14            2026-05-15            Holiday
personal-cal ...  2026-05-14T16:00:00Z  2026-05-14T16:30:00Z  Class trip     123 Example St, Anytown
work-cal     ...  2026-05-13            2026-05-14            All-day task

Test plan

  • make fmt clean
  • make lint clean
  • make test green
  • New TestListCalendarEvents_TableIncludesLocation asserts the LOCATION header appears, an event without a location renders as an empty cell, and an embedded \n in the location is collapsed.
  • Smoke-tested live: rows show full multi-segment addresses (street + city + country) on one line; empty-location events render an empty trailing cell.

🤖

The Calendar API populates `event.location` (a free-form place / address /
venue string), but `calendar events` never surfaced it in the table view —
users had to read JSON or open the event in another tool to find out where
something happened. That made the listing meaningfully less useful for
"plan the day" workflows, especially when an agent is generating context
from the output.

Add a LOCATION column after SUMMARY in every variant of the events list
table — `--all` aggregated view, single calendar, with and without
`--weekday`. JSON output already exposes `location` and is unchanged.

eventDisplayLocation collapses embedded newlines, carriage returns, and
tabs into single spaces so a multi-line postal address from the API does
not break the row layout.

Tests: new TestListCalendarEvents_TableIncludesLocation verifies the
LOCATION header appears, that an event without a location renders as an
empty cell, and that a location with an embedded newline is collapsed
into a single line.

Co-Authored-By: Claude Opus 4.7 (1M context) <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.

2 participants