Skip to content

feat(sources): take a Drive folder's link for the root folder - #410

Merged
adeelahmad merged 1 commit into
mainfrom
claude/project-thread-kkr74u
Oct 15, 2026
Merged

adeelahmad merged 1 commit into
mainfrom
claude/project-thread-kkr74u

Conversation

@adeelahmad

Copy link
Copy Markdown
Owner

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change; ! in the title)

Checklist:

  • The title is a Conventional Commit.
  • My code follows the code style of this project (make hooks checks it on commit).
  • I added or updated tests.
  • My change requires documentation updates, and I have updated docs/ accordingly.
  • Users need more than the title to understand it, so I wrote it under ## Unreleased in CHANGELOG.md.

Done questions (AGENTS.md)

  • Goal: the root folder takes a pasted link. Signing in through rclone and Drive on Connect with Google follow in their own PRs. Merges on green CI.
  • Agents: POST/PATCH /api/v1/sources accept the link, because the change lives in the domain layer.
  • Zero setup: nothing new.
  • Fewest clicks and keystrokes: one paste instead of picking the id out of a URL.
  • Configurable: n/a, there's no new setting.
  • Light: string parsing only.
  • Private and secure: n/a, no new surface. The link is parsed locally and only the id is stored.
  • Cost: n/a, no model or external calls.
  • User decides: existing ids are kept as they are, and defaults are unchanged.
  • Upgrades: n/a, stored data keeps the same shape.
  • Honest: the docs describe only what's merged.
  • Tests, docs and generated files updated: test_a_drive_folder_link_is_kept_as_its_id, docs/processing.md, CHANGELOG. The API schema is unchanged.
  • Open standards; dependencies keep Lens MIT: no new dependencies.
  • Result reported with evidence. Refine later: a Drive folder picker in the dialog.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VrczAC5nKz1zkCUvRKXG5C


Generated by Claude Code

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VrczAC5nKz1zkCUvRKXG5C
@adeelahmad
adeelahmad merged commit 90035bb into main Oct 15, 2026
10 checks passed
@adeelahmad
adeelahmad deleted the claude/project-thread-kkr74u branch October 15, 2026 12:43
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.

2 participants