-
Notifications
You must be signed in to change notification settings - Fork 601
feat(drive/docs): add poll subcommand with state-file for changes + comments #690
Copy link
Copy link
Open
Labels
P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.Low-risk cleanup, docs, polish, ergonomics, or speculative feature.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.Issue quality rating does not apply to this item.
Metadata
Metadata
Assignees
Labels
P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.Low-risk cleanup, docs, polish, ergonomics, or speculative feature.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.Issue quality rating does not apply to this item.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Motivation
Not every consumer can host an HTTPS endpoint (corporate firewalls, ephemeral laptops). A polling alternative — interval-based
changes.list+ comments diff — is the no-infra path. It is straightforward to script today but bookkeeping the page token between runs is tedious; baking apollsubcommand with a state file makes it one command.Pairs with (but does not replace) a future
gog drive changes servepush-notification receiver —pollis for the no-infra case,serveis for real-time.Depends on
--since=<RFC3339>filter oncomments list. Thegog docs comments pollsurface proposed below reduces to: persistlast-seen modifiedTimein the state file, callcomments list --since=<last-seen>each tick, fire--on-newper result, advance the watermark. Without--sincethe polling loop has to either list-all-and-filter-client-side (wasteful, and pagination-heavy on large docs) or maintain a per-comment-ID seen-set (state explosion). With--sinceit is a trivial wrapper. Thedrive changes pollhalf is self-contained (it useschanges.listpageToken semantics, which are already complete in v0.21).Repro
Proposed surface
Acceptance criteria
changes.startPageTokenautomatically.--on-change/--on-newinvocations are sequential (no overlap).docs comments pollreuses the--sinceimplementation from feat(comments): add --since=<RFC3339> filter on docs/drive comments list #688; no separate listing path.References
changes.list: https://developers.google.com/workspace/drive/api/reference/rest/v3/changes/listcomments.listwith startModifiedTime: https://developers.google.com/workspace/drive/api/reference/rest/v3/comments/list