Repository navigation
feat(sources): take a Drive folder's link for the root folder - #410
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VrczAC5nKz1zkCUvRKXG5C
20 of 22 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Before: to make a Google Drive connection import from one folder, you had to dig the folder's id out of its URL and type it into "Root folder ID". The same went for the shared drive.
After: Root folder and Shared drive take the link straight from Drive's address bar (
…/drive/folders/<id>?usp=sharing,…/drive/u/1/folders/<id>,open?id=<id>) or the bare id, and Lens stores the id. A file's link is refused with a note to paste its folder's link instead. Anything else that isn't a folder link gets a 400 asking for the folder's link or id.How:
sources.tidy()turns those links into ids on create and update, so the API, the assistant and the web app all accept links. The field labels and placeholders now say "link or ID".Motivation and Context
Adeel asked for Drive "with optional root folder" as a sensor. Pasting the link is the fewest-keystrokes way to pick that folder. This is the first of the small PRs that replace #404, which was closed because Drive will join #407's shared Connect with Google flow.
Types of changes
!in the title)Checklist:
make hookschecks it on commit).docs/accordingly.## UnreleasedinCHANGELOG.md.Done questions (AGENTS.md)
POST/PATCH /api/v1/sourcesaccept the link, because the change lives in the domain layer.test_a_drive_folder_link_is_kept_as_its_id,docs/processing.md, CHANGELOG. The API schema is unchanged.🤖 Generated with Claude Code
https://claude.ai/code/session_01VrczAC5nKz1zkCUvRKXG5C
Generated by Claude Code