Commit Graph

626 Commits

Author SHA1 Message Date
salmonumbrella
59fb51276f fix(auth): resolve main rebase fallout 2026-03-03 03:58:53 +00:00
salmonumbrella
6eab7fd95a fix(lint): add blank lines for wsl_v5 linter
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-03 03:58:53 +00:00
salmonumbrella
25040fe7fe fix(auth): add readonly gmail and drive scope handling 2026-03-03 03:58:53 +00:00
Peter Steinberger
0aaafbe663 docs(readme): document drafts quote behavior 2026-03-03 03:39:26 +00:00
Peter Steinberger
ce9a89adfe fix(gmail): harden draft quote thread fallback (#394) (thanks @salmonumbrella) 2026-03-03 03:37:05 +00:00
salmonumbrella
5234214de3 feat(gmail): add --quote support to draft replies 2026-03-03 03:37:05 +00:00
Peter Steinberger
c2e7754a35 fix(cmd): repair rebase fallout in docs, time, and drive tests 2026-03-03 03:27:32 +00:00
Peter Steinberger
8b9f8316ab build(deps): update go, worker, and toolchain pins 2026-03-03 03:27:30 +00:00
Peter Steinberger
9ae2860754 ci(github): move CI jobs to blacksmith runners 2026-03-03 03:27:22 +00:00
salmonumbrella
b341ac1f78 docs(drive): add comment explaining shared drives query params
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-03 03:04:43 +00:00
salmonumbrella
427801d95c test(calendar): add test for --to monday end-of-day expansion
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-03 03:04:43 +00:00
salmonumbrella
65c33c8ef4 test(calendar): add tests for --to tomorrow and --to now
Add integration tests verifying isDayExpr() integration:
- TestResolveTimeRangeWithDefaultsToTomorrowEndOfDay: verifies
  --to tomorrow expands to end-of-day (23:59:59.999999999)
- TestResolveTimeRangeWithDefaultsToNowNoExpansion: verifies
  --to now does NOT expand to end-of-day (remains current time)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-03 03:04:43 +00:00
salmonumbrella
1b44490a24 test(calendar): add unit tests for isDayExpr function
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-03 03:04:43 +00:00
salmonumbrella
8955d73482 fix(drive): include all drives in ls 2026-03-03 03:04:43 +00:00
salmonumbrella
c8f16ebd4c fix(calendar): expand date-only --to 2026-03-03 03:04:43 +00:00
salmonumbrella
88fba24f05 fix(drive): include shared drives in search 2026-03-03 03:04:43 +00:00
salmonumbrella
2459923d28 fix: address linter issues in docs/drive commands
- Fix variable shadowing in DocsUpdateCmd (govet: shadow)
- Extract formatAuto constant to satisfy goconst linter

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-03 03:04:43 +00:00
salmonumbrella
f05a11c662 fix(drive): validate download formats 2026-03-03 03:04:43 +00:00
salmonumbrella
a5de5491ea fix(lint): resolve goconst and shadow lint errors
- Add boolTrue/boolFalse constants for string "true"/"false" values
- Rename shadowed err variable to writeErr in test file

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-03 03:04:43 +00:00
salmonumbrella
725d176143 docs(drive): add comment explaining shared drives query params
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-03 03:04:43 +00:00
salmonumbrella
4da63c9037 test(calendar): add test for --to monday end-of-day expansion
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-03 03:04:43 +00:00
salmonumbrella
9fea0341a1 test(calendar): add tests for --to tomorrow and --to now
Add integration tests verifying isDayExpr() integration:
- TestResolveTimeRangeWithDefaultsToTomorrowEndOfDay: verifies
  --to tomorrow expands to end-of-day (23:59:59.999999999)
- TestResolveTimeRangeWithDefaultsToNowNoExpansion: verifies
  --to now does NOT expand to end-of-day (remains current time)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-03 03:04:43 +00:00
salmonumbrella
e4d303f143 test(calendar): add unit tests for isDayExpr function
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-03 03:04:43 +00:00
salmonumbrella
2888f991e1 fix(drive): include all drives in ls 2026-03-03 03:04:43 +00:00
salmonumbrella
7e6ee3f1ba fix(calendar): expand date-only --to 2026-03-03 03:04:43 +00:00
salmonumbrella
b4d0bf9780 fix(docs): clarify update command help text
Distinguish the update command from write by specifying it inserts
text at a specific index position in the document.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-03 03:04:43 +00:00
salmonumbrella
10cafc986b test(docs): add invalid index validation tests for DocsUpdateCmd
Test that --index flag properly rejects zero and negative values
with the expected error message.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-03 03:04:32 +00:00
salmonumbrella
feae67ba9d test(docs): add --file input tests for write and update commands
Cover the readTextInput function and file path expansion logic
by testing DocsWriteCmd and DocsUpdateCmd with temp files.
Also test error cases: non-existent file, empty file, and
mutual exclusion of --text and --file flags.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-03 03:04:32 +00:00
salmonumbrella
dc45fe6db9 test(drive): cover invalid download format 2026-03-03 03:04:32 +00:00
salmonumbrella
c595f934bb fix(drive): include shared drives in search 2026-03-03 03:04:31 +00:00
salmonumbrella
ffa8631b52 fix: address linter issues in docs/drive commands
- Fix variable shadowing in DocsUpdateCmd (govet: shadow)
- Extract formatAuto constant to satisfy goconst linter

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-03 03:04:31 +00:00
salmonumbrella
44673ff169 feat(docs): add write and update commands 2026-03-03 03:04:31 +00:00
salmonumbrella
510fbc444a fix(drive): validate download formats 2026-03-03 03:03:50 +00:00
Viz
e4bf53be2d
Merge pull request #382 from Danielkweber/daniel/feat/sedmat-paragraph-addressing
feat(sedmat): paragraph addressing and structure introspection
2026-03-02 10:27:29 -05:00
daniel
ef0e8aaea6 fix: suppress nilerr lint for non-address passthrough in parseAddress
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-01 14:23:38 -05:00
daniel
85cfbe1e9c style: fix gofumpt struct field alignment in test file
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-01 14:19:46 -05:00
daniel
3e85dcf8ba feat(sedmat): add paragraph addressing and structure introspection
Add paragraph-number addressing (5d, 3s/.*/text/, $a/text/) and
`docs structure` / `docs cat -N` commands for paragraph-level
document manipulation.

New commands:
- `docs structure` — numbered paragraph list with types (text + JSON)
- `docs cat -N` — cat with [N] paragraph prefixes

Address syntax for `docs sed`:
- Nd (delete paragraph N), N,Md (range delete), $d (last)
- Ns/pat/repl/ (substitute within paragraph N)
- Na/text/ (append after N), Ni/text/ (insert before N)
- --tab flag for multi-tab document support

Testing:
- 24 new unit tests covering parseAddress (13 cases),
  parseFullExpr_Addressed (10 cases), resolveAddress (6 cases),
  and buildParagraphMap (8 cases). All pass.
- Manual testing against live Google Docs verified: structure,
  cat -N, addressed substitute, delete, append, insert, dollar
  addressing, and range delete.
- Bug found and fixed during manual testing: addressed a/text/
  and i/text/ were parsed by parseAICommand (expects a/pat/text/)
  which put text in the pattern field instead of replacement,
  producing empty paragraphs. Added parseAddressedAICommand for
  the single-field addressed form.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-01 14:15:08 -05:00
Viz
cb16e4f42f
Merge pull request #359 from visionik/pr/docs-sed
feat(docs): add sedmat — sed-like document formatting DSL and gog docs <id> sed command
2026-02-26 13:56:16 -05:00
Vinston
507fb6f2a2 chore: add pre-commit hook for fmt-check and lint 2026-02-26 13:53:01 -05:00
Vinston
269f167e96 fix: resolve govet/shadow, nilnil, and unparam lint errors
- Rename inner err to err2 in docs_sed.go and docs_sed_manual.go to fix shadow warnings
- Return non-nil empty response from batchUpdate when no requests (nilnil)
- Hardcode test constants for buildDocWithInlineImage helper (unparam)
2026-02-26 13:50:46 -05:00
Vinston
54465897b7 style: apply goimports + gofumpt formatting 2026-02-26 13:43:49 -05:00
Vinston
69cf3b8db3 style: fix gofmt formatting in docs_sed_brace_match.go 2026-02-26 13:41:03 -05:00
Vinston
b867e5beb7 docs(sed): sedmat v3.5 reference documentation 2026-02-23 09:34:41 -05:00
Vinston
2853ff564e test(sed): comprehensive test suite (~75% overall package coverage, near-100% on core sed functions) 2026-02-23 09:34:37 -05:00
Vinston
e2d41ad87c feat(docs): add sedmat — sed-like document formatting DSL 2026-02-23 09:34:32 -05:00
Peter Steinberger
4ac03838c9 refactor(calendar): unify calendar resolution and event rendering 2026-02-16 07:23:31 +01:00
salmonumbrella
9977c0bedb
fix(gmail/calendar): ISO-2022-JP decoding, cc/bcc headers, calendar selection (#131)
* fix(gmail): decode ISO-2022-JP bodies

* fix(gmail): include cc/bcc in get output

* feat(calendar): allow selecting calendars in events

* test(gmail): add edge case tests for ISO-2022-JP decoding

Add tests for edge cases in ISO-2022-JP body decoding:
- Mixed ASCII and Japanese text (e.g., "Hello こんにちは World")
- Empty content with ISO-2022-JP charset header
- Malformed ISO-2022-JP sequences (graceful degradation)
- Truncated escape sequences

These tests verify the graceful fallback behavior in decodeBodyCharset
which returns original data if decoding fails.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(calendar): validate unknown calendar names in resolveCalendarIDs

When a calendar name doesn't match any known calendar (not in bySummary
or byID maps), return an error listing the unrecognized names instead
of treating them as raw calendar IDs which causes cryptic Google API
errors.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(calendar): validate unknown and ambiguous calendar name resolutions

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-02-16 06:56:42 +01:00
Rob Newberry
04f6ff216c Fix invalid Go version in go.mod 2026-02-16 05:48:48 +01:00
Peter Steinberger
957603e84c refactor(contacts): simplify field updates and custom parser contract 2026-02-16 05:34:22 +01:00
Peter Steinberger
2300560505 docs(changelog): include PR #199 landing note 2026-02-16 05:28:08 +01:00