Conversation
Add support for Google Shared Drives (formerly Team Drives) with ergonomic defaults: - New `gro drive drives` command to list accessible shared drives - Search now includes all drives by default (My Drive + shared drives) - New `--my-drive` flag to limit operations to personal drive - New `--drive <name-or-id>` flag to target specific shared drive - Case-insensitive drive name resolution with local caching - Updated `list`, `search`, and `tree` commands with shared drive flags API integration: - Add ListFilesWithScope() with corpora/driveId support - Add ListSharedDrives() to fetch shared drives - Update GetFile() and DownloadFile() with SupportsAllDrives - Add DriveScope type for flexible scope configuration Closes #85
Test Coverage Assessment for PR #87I reviewed the changes in this PR and assessed test coverage. Here's my analysis: What's Well-TestedCache Package (
Drives Command (
Mock Infrastructure - Updated appropriately
Coverage Gaps to Consider1.
This is a critical path that resolves user input to API parameters. 2. 3. 4. 5. Mutually exclusive flag validation - No direct tests 6.
7. AssessmentThe PR adds solid infrastructure (cache, mocks, fixtures) and tests the new Recommendation: Consider adding tests for:
The API client methods ( Note: This assessment focused on critical business logic paths. The infrastructure changes and command wiring look solid. |
Add comprehensive tests for: - resolveDriveScope() function covering all code paths - Mutual exclusivity validation for --my-drive and --drive flags - Case-insensitive drive name matching - Drive name-to-ID resolution via API Addresses TDD assessment feedback for PR #87. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Summary
Add support for Google Shared Drives (formerly Team Drives) with ergonomic defaults.
gro drive drivescommand to list accessible shared drives--my-driveflag limits operations to personal drive--drive <name-or-id>targets specific shared driveChanges
New Command
gro drive drives- List shared drives (with--refresh,--jsonflags)Updated Commands
gro drive search- Add--my-drive,--driveflagsgro drive list- Add--my-drive,--driveflagsgro drive tree- Add--my-drive,--driveflagsAPI Changes
ListFilesWithScope()- New method with corpora/driveId supportListSharedDrives()- New method to fetch shared drivesGetFile(),DownloadFile()- Updated with SupportsAllDrivesSharedDrive,DriveScope- New typesTest Updates
drives_test.gowith command and helper testsTest plan
make buildpassesmake testpassesmake lintpassesCloses #85