Skip to content

feat(comments): add --since=<RFC3339> filter on docs/drive comments list #688

@sebsnyk

Description

@sebsnyk

Motivation

Polling for new comments without a since-filter forces clients to pull all comments and diff client-side. The Drive comments REST API supports startModifiedTime on comments.list — exposing it as a flag is a small change but a meaningful efficiency win for poll loops.

Verified against current source (v0.21.x): internal/cmd/drive_comments.go DriveCommentsListCmd and internal/cmd/docs_comments.go DocsCommentsListCmd expose --include-resolved, --max, --page, --all, --fail-empty — no time filter.

Repro

# Today, polling for comments touched in the last minute:
gog drive comments list <DOC_ID> --all -j | jq '.comments[] | select(.modifiedTime > "2026-06-04T10:00:00Z")'
# Fetches every page of every comment.

# Wanted:
gog drive comments list <DOC_ID> --since=2026-06-04T10:00:00Z

Proposed surface

gog drive comments list <fileId> --since=<RFC3339>
gog docs comments list <docId> --since=<RFC3339>

Wired to the startModifiedTime query parameter on comments.list.

Acceptance criteria

  • --since accepts RFC3339 with timezone, rejects naked datetimes with a clear error.
  • Server-side filtering verified via the same call returning fewer items than without --since.
  • Combines correctly with --include-resolved, --max, --all.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions