Skip to content

feat(grw): drive domain - #20

Merged
rianjs merged 1 commit into
feat/grw-write-surfacesfrom
feat/8-grw-drive
Sep 3, 2026
Merged

feat(grw): drive domain#20
rianjs merged 1 commit into
feat/grw-write-surfacesfrom
feat/8-grw-drive

Conversation

@rianjs

@rianjs rianjs commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • internal/rw/drive: UploadFile (MIME from extension, falling back to content sniffing), CreateFolder, RenameFile, MoveFile (swaps all current parents), TrashFiles/UntrashFiles (ForceSendFields for the false case), DeleteFilesPermanently. Every call passes SupportsAllDrives(true).
  • internal/rwcmd/drive: upload, mkdir, rename, move, trash, restore, delete. Bulk leaves take positional IDs, --stdin, or --query through internal/bulk; delete defaults to Trash and gates --permanent behind the same typed confirmation / --yes as mail delete. Every leaf has --dry-run/-n.
  • grw identity adds drive (full) alongside the existing readonly and metadata scopes so the per-service read coverage test holds. Architecture tests cover the new pair; README, WORKSPACE_ADMINS, and architecture docs updated.

Stacks on feat/grw-write-surfaces. Closes #8

Test plan

  • make check, make test-cover-check (75.3%), go test ./internal/architecture/
  • grw drive upload go.mod --dry-run prints path/size/MIME/parent and exits 0 without a client; gro drive --help unchanged
  • Live Drive mutations against a Google account (not run)

Adds grw drive upload/mkdir/rename/move/trash/restore/delete on top of the
shared read command tree, backed by internal/rw/drive. delete defaults to
Trash and gates --permanent behind the typed confirmation or --yes, like
mail delete; bulk IDs come from args, --stdin, or --query.

Closes #8
@rianjs
rianjs merged commit 935045f into feat/grw-write-surfaces Sep 3, 2026
11 checks passed
@rianjs
rianjs deleted the feat/8-grw-drive branch September 3, 2026 23:50
@rianjs rianjs mentioned this pull request Sep 3, 2026
3 tasks
rianjs added a commit that referenced this pull request Sep 3, 2026
* feat(grw): mail send <draft-id> (#19)

* feat(grw): mail send <draft-id>

Adds the product's only send path: grw mail send fetches a draft's headers,
previews them, and sends via drafts.send from internal/rw/gmail. Dry-run
stops after the preview; drafts with no recipients are refused. gro still
links no send code, enforced by the architecture tests.

Closes #9

* fix(mail): make the send preview trustworthy

Fetch drafts in full format so attachments are visible, skip inline parts
when counting them, refuse recipient-less drafts in dry-run too, and note
that Gmail sends the draft as it exists at send time.

* docs: state when write leaves need confirmation

* feat(grw): drive domain (#20)

Adds grw drive upload/mkdir/rename/move/trash/restore/delete on top of the
shared read command tree, backed by internal/rw/drive. delete defaults to
Trash and gates --permanent behind the typed confirmation or --yes, like
mail delete; bulk IDs come from args, --stdin, or --query.

Closes #8

* fix(drive): sanitize printed file names and explain the client and trash quirks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant