pending.nvim/spec
Barrett Ruth 6e381c0d5f
feat(sync): diff metadata preservation, auth unification, and sync quality improvements (#74)
* feat(sync): unify Google auth under :Pending auth

Problem: users had to run `:Pending gtasks auth` and `:Pending gcal
auth` separately, producing two token files and two browser consents
for the same Google account.

Solution: introduce `oauth.google_client` with combined tasks +
calendar scopes and a single `google_tokens.json`. Remove per-backend
`auth`/`setup` from `gcal` and `gtasks`; add top-level `:Pending auth`
that prompts with `vim.ui.select` and delegates to the shared client's
`setup()` or `auth()` based on credential availability.

* docs: update vimdoc for unified Google auth

Problem: `doc/pending.txt` still documented per-backend `:Pending gtasks
auth` / `:Pending gcal auth` commands and separate token files, which no
longer exist after the auth unification.

Solution: add `:Pending auth` entry to COMMANDS and a new
`*pending-google-auth*` section covering the shared PKCE flow, combined
scopes, and `google_tokens.json`. Remove `auth` from gcal/gtasks action
tables and update all cross-references to use `:Pending auth`.

* ci: format

* feat(sync): selective push, remote deletion detection, and gcal fix

Problem: `push_pass` updated all remote-linked tasks unconditionally,
causing unnecessary API calls and potential clobbering of remote edits
made between syncs. `pull`/`sync` never noticed when a task disappeared
from remote. `update_event` omitted `transparency` that `create_event`
set. Failure counts were absent from sync log summaries.

Solution: Introduce `_gtasks_synced_at` in `_extra` — stamped after
every successful push/pull create or update — so `push_pass` skips
tasks unchanged since last sync. Add `detect_remote_deletions` to
unlink local tasks whose remote entry disappeared from a successfully
fetched list. Surface failures as `!N` in all sync logs and
`unlinked: N` for pull/sync. Add `transparency = 'transparent'` to
`update_event`. Cover new behaviour with 7 tests in `gtasks_spec.lua`.

* ci: formt
2026-03-05 22:40:19 -05:00
..
archive_spec.lua refactor: organize tests and dry (#49) 2026-02-26 20:03:42 -05:00
complete_spec.lua refactor(config): remove legacy gcal top-level config key (#51) 2026-02-26 22:53:51 -05:00
diff_spec.lua fix(diff): preserve due/rec when absent from buffer line (#68) 2026-03-05 12:46:54 -05:00
edit_spec.lua refactor: organize tests and dry (#49) 2026-02-26 20:03:42 -05:00
filter_spec.lua refactor: organize tests and dry (#49) 2026-02-26 20:03:42 -05:00
gtasks_spec.lua feat(sync): diff metadata preservation, auth unification, and sync quality improvements (#74) 2026-03-05 22:40:19 -05:00
helpers.lua test: add store, parse, and diff specs 2026-02-24 15:10:09 -05:00
icons_spec.lua refactor(icons): ascii defaults, checkbox overlays, and cleanup (#57) 2026-03-04 18:44:41 -05:00
oauth_spec.lua Google Tasks sync + shared OAuth module (#60) 2026-03-05 01:21:18 -05:00
parse_spec.lua fix(diff): preserve due/rec when absent from buffer line (#68) 2026-03-05 12:46:54 -05:00
recur_spec.lua feat: omnifunc completion, recurring tasks, expanded date syntax (#27) 2026-02-25 13:27:52 -05:00
status_spec.lua refactor: organize tests and dry (#49) 2026-02-26 20:03:42 -05:00
store_spec.lua refactor: organize tests and dry (#49) 2026-02-26 20:03:42 -05:00
sync_spec.lua feat(sync): unify Google auth under :Pending auth (#72) 2026-03-05 21:08:22 -05:00
textobj_spec.lua feat: text objects and motions for the pending buffer (#39) 2026-02-26 16:28:58 -05:00
views_spec.lua refactor(icons): ascii defaults, checkbox overlays, and cleanup (#57) 2026-03-04 18:44:41 -05:00