You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(calendar): --sort start places all-day events at midnight UTC instead of the calendar's timezone #1284
For a calendar in a non-UTC timezone, calendar events --sort start orders an all-day event by midnight UTC. In Asia/Tokyo, an all-day event on 2026-11-03 sorts after an 08:00 event on the same day.
Summary
Keep this issue open: current main still discards the calendar timezone when sorting all-day events, and no open PR owns the repair.
Reproducibility: Current source proves the Tokyo example through the sort comparator and UTC date fallback; the reporter supplies a fake-API reproduction, but this review ran no executable reproduction or tests.
Next step
Establish a failing Tokyo mixed-event regression, then carry calendar timezone into date-only start and end sort keys without changing display override semantics.
Review details
Best possible solution:
Sort date-only endpoints at midnight in their containing calendar timezone while preserving timed-event instants and display-only overrides.
Do we have a high-confidence way to reproduce the issue?
Current source proves the Tokyo example through the sort comparator and UTC date fallback; the reporter supplies a fake-API reproduction, but this review ran no executable reproduction or tests.
Is this the best way to solve the issue?
A focused timezone fallback repair is appropriate, provided it retains calendar timezone separately from viewer display metadata and covers both start and end sorting.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
The wrapper's Timezone may hold a viewer override, so using it directly as the all-day sort fallback could make display settings change chronological ordering.
Codex review notes: model internal, reasoning medium; reviewed against 82e7fd6005d4.
Label changes
Label changes:
add P2: Explicit chronological sorting produces incorrect ordering for mixed all-day and timed events outside UTC, without losing events or blocking the command.
add impact:ux-friction: Calendar listings present a misleading daily schedule that users or agents must reinterpret.
add issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label.
add clawsweeper:source-repro: Current issue advisory state selects this label.
add clawsweeper:queueable-fix: Current issue advisory state selects this label.
add clawsweeper:fix-shape-clear: Current issue advisory state selects this label.
Label justifications:
P2: Explicit chronological sorting produces incorrect ordering for mixed all-day and timed events outside UTC, without losing events or blocking the command.
impact:ux-friction: Calendar listings present a misleading daily schedule that users or agents must reinterpret.
Evidence reviewed
Acceptance criteria:
Establish the failing Asia/Tokyo all-day versus 08:00 regression before implementing the fix.
go test ./internal/cmd -run 'TestListCalendarEvents|TestListSelectedCalendarsEvents|TestListAllCalendarsEvents|TestSortEventsBy|TestEventDaysOfWeek|TestDisplayTimezoneOverride' -count=1
make ci
Run the built CLI against an isolated Calendar API fixture for 2026-11-03 in Asia/Tokyo and verify allday1 precedes timed1 with --sort start, including JSON and table output.
What I checked:
Current main matches the reviewed checkout: GitHub main and local HEAD both resolve to 82e7fd6. (82e7fd6005d4)
Sort keys lose calendar timezone: Both start and end sorting pass only EventDateTime into eventDatePointInstant; its date-only branch uses dt.TimeZone without a calendar fallback. (internal/cmd/calendar_list.go:453, 82e7fd6005d4)
Empty timezone produces midnight UTC: parseEventDate uses time.Parse when no timezone loads: 2026-11-03 becomes 00:00Z, later than 2026-11-03T08:00:00+09:00, which is 2026-11-02T23:00Z. (internal/cmd/calendar_event_days.go:142, 82e7fd6005d4)
Display timezone must remain separate: calendarDisplayTimezone returns the viewer override before fetching calendar metadata; the wrapper's Timezone can therefore represent display timezone rather than the containing calendar timezone. Existing tests explicitly preserve skipped lookups for display overrides. (internal/cmd/calendar_list.go:308, 82e7fd6005d4)
Existing sorting coverage misses all-day dates: TestListAllCalendarsEvents_SortByStart covers ascending and descending ordering with two UTC timed events, without calendar-local all-day events. (internal/cmd/calendar_all_events_test.go:89, 82e7fd6005d4)
ClawSweeper keeps one durable marker-backed review comment per issue or PR.
Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
Maintainers can also comment @clawsweeper review to request a fresh review only.
Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge; those execution lanes are retired.
Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Reviewed October 30, 2026, 11:11 PM ET / October 31, 2026, 03:11 UTC.
Fixed by #1301 in d358b6c. A Tokyo all-day event now sorts before 08:00, including partial fields and a New York display-timezone override. Reproduced before and verified after through the built CLI against a synthetic Calendar API. Regression tests, independent P0–P2 review, and final-head CI pass.
Activity
clawsweeper commentedon Oct 31, 2026
Codex review: this still needs some work.
Summary
Keep this issue open: current main still discards the calendar timezone when sorting all-day events, and no open PR owns the repair.
Reproducibility: Current source proves the Tokyo example through the sort comparator and UTC date fallback; the reporter supplies a fake-API reproduction, but this review ran no executable reproduction or tests.
Next step
Establish a failing Tokyo mixed-event regression, then carry calendar timezone into date-only start and end sort keys without changing display override semantics.
Review details
Best possible solution:
Sort date-only endpoints at midnight in their containing calendar timezone while preserving timed-event instants and display-only overrides.
Do we have a high-confidence way to reproduce the issue?
Current source proves the Tokyo example through the sort comparator and UTC date fallback; the reporter supplies a fake-API reproduction, but this review ran no executable reproduction or tests.
Is this the best way to solve the issue?
A focused timezone fallback repair is appropriate, provided it retains calendar timezone separately from viewer display metadata and covers both start and end sorting.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning medium; reviewed against 82e7fd6005d4.
Label changes
Label changes:
P2: Explicit chronological sorting produces incorrect ordering for mixed all-day and timed events outside UTC, without losing events or blocking the command.impact:ux-friction: Calendar listings present a misleading daily schedule that users or agents must reinterpret.issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label.clawsweeper:source-repro: Current issue advisory state selects this label.clawsweeper:queueable-fix: Current issue advisory state selects this label.clawsweeper:fix-shape-clear: Current issue advisory state selects this label.Label justifications:
P2: Explicit chronological sorting produces incorrect ordering for mixed all-day and timed events outside UTC, without losing events or blocking the command.impact:ux-friction: Calendar listings present a misleading daily schedule that users or agents must reinterpret.Evidence reviewed
Acceptance criteria:
What I checked:
internal/cmd/calendar_list.go:453, 82e7fd6005d4)internal/cmd/calendar_event_days.go:142, 82e7fd6005d4)internal/cmd/calendar_list.go:308, 82e7fd6005d4)internal/cmd/calendar_all_events_test.go:89, 82e7fd6005d4)internal/cmd/calendar_list.go:470, 6e416bd6a868)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.Reviewed October 30, 2026, 11:11 PM ET / October 31, 2026, 03:11 UTC.
fix(calendar): preserve selection, pagination, and timezone contracts
steipete commentedon Nov 5, 2026
Fixed by #1301 in d358b6c. A Tokyo all-day event now sorts before 08:00, including partial fields and a New York display-timezone override. Reproduced before and verified after through the built CLI against a synthetic Calendar API. Regression tests, independent P0–P2 review, and final-head CI pass.