Skip to content

feat: shared-drive support, navigable picker, contrast fix for gdrive folders - #157

Merged
jodeleeuw merged 2 commits into
testfrom
provider-migration
Jul 25, 2026
Merged

feat: shared-drive support, navigable picker, contrast fix for gdrive folders#157
jodeleeuw merged 2 commits into
testfrom
provider-migration

Conversation

@jodeleeuw

Copy link
Copy Markdown
Member

Follow-up to #156, refining the Google Drive folder picker.

Changes

  • Navigable picker — folder selection now shows a drill-down tree with breadcrumb path (My Drive), replacing the flat all-folders list.
  • Shared Drives — a Shared Drives view is added to the picker (setEnableDrives + SUPPORT_DRIVES), and every gdrive.ts Drive API call now passes supportsAllDrives=true (+ includeItemsFromAllDrives=true on queries) so shared-drive folders are visible to queries and writable server-side. Harmless no-ops for My Drive.
  • Button contrast — the "Choose Drive folder" button gets colorPalette="brandTeal" (was near-invisible gray).

Folder path — decided against

Displaying the selected folder's full path in-app would require reading ancestor folders, which drive.file blocks (returns 404 on un-granted ancestors). Reconstructing it would mean a restricted scope (drive.readonly) + Google verification + annual CASA assessment — not worth it for a label. The navigable picker already shows the path while choosing; we display the folder name. Scope stays drive.file.

Tests

Build clean; 32 unit/front-end + 14 emulator tests green (picker mock + strict-URL unit assertions updated to the new params, none weakened).

⚠️ Needs live check on deployed test site

  1. Shared Drives view renders/selects correctly in the real Google Picker (widget behavior can't be tested locally).
  2. A session write into a shared-drive folder succeeds with the new supportsAllDrives params — same server-write linchpin as My Drive, one level further.

🤖 Generated with Claude Code

jodeleeuw and others added 2 commits July 25, 2026 14:30
ViewId.FOLDERS renders every folder in one flat list with no hierarchy.
Switch to a DOCS view rooted at My Drive (setParent "root") with folder-
only mimeTypes, which gives a navigable tree + breadcrumb path so the user
can see where a folder lives and drill down, while still only seeing and
selecting folders.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Picker: add a Shared Drives view (setEnableDrives) alongside the My Drive
  tree and enable the SUPPORT_DRIVES feature, so folders in shared/team
  drives are browsable and selectable.
- gdrive.ts: pass supportsAllDrives=true on every Drive API call, plus
  includeItemsFromAllDrives=true on the list/query calls -- without these,
  a shared-drive folder is invisible to queries and unwritable on the
  server. Harmless no-ops for My Drive.
- new.js: give the "Choose Drive folder" button colorPalette brandTeal so
  it reads clearly against the background instead of near-invisible gray.

Tests updated (picker mock, strict-URL unit assertions). Verified: build
clean, 32 unit/front-end + 14 emulator tests green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jodeleeuw
jodeleeuw merged commit e2612c4 into test Jul 25, 2026
1 check passed
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