Skip to content

Add document sources from connected accounts - #1068

Open
zlareb1 wants to merge 8 commits into
mainfrom
feat/connected-account-source-ui
Open

zlareb1 wants to merge 8 commits into
mainfrom
feat/connected-account-source-ui

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Changelog category

  • New Feature

Changelog entry

Add and edit document sources from a connected Drive, Notion or Linear account in the Library and repository views. Preview pasted links, check access, manage the connection and recover from an interrupted save without losing the link draft.

Why

A signed-in writer with a connected account needs to select content without entering a shared credential. Source controls also need canonical ownership from the server so an alternate token subject cannot hide the owner's actions or expose another user's controls.

Scope and risk

Settings displays account and consent-configuration state. The source form previews each selected link, requires a current access check and invalidates that result when the account, caller, destination or selection changes. Source rows show sync state and document counts. Item edits use the existing incremental update operation; an unconfirmed save requires a fresh source read and another review before the next write. Pending saves cannot be dismissed. Closing an editor refreshes its items before mutation actions return and restores focus to the source list. Manual refresh retains the rows and keyboard focus, announces the read as busy and ignores repeated presses until it settles. The phone Add action keeps its full accessible name with a shorter visible label. Account-page navigation preserves the source return marker while stripping unrelated query parameters. Retirement confirmation uses stored access: mirrored copies always queue retirement, namespace copies keep the explicit opt-in, and unavailable access policy makes no retention or count promise.

The server projects connection availability and source ownership through existing account and authorization checks. The frontend discards cached ownership when the caller changes. Provider permissions and ingestion results remain server decisions. Account errors preserve input and offer an explicit recovery action.

Compatibility, rollout and rollback

  • connection.list entries add required boolean connect_available.
  • knowledge.source.list entries add owned_by_caller. The generated nested list-output type changes from KnowledgeSourceEntry to KnowledgeSourceListEntry; the new field is optional in generated clients. No compatibility alias is added.
  • The dashboard uses existing knowledge.source.parse_links, knowledge.source.add and knowledge.source.update operations. Their request contracts and access-mode rules do not change.
  • Operator steps: deploy the server and dashboard together. Existing provider registration and consent configuration are required for live connections. This change adds no setting, migration or backfill.
  • Rollback: revert the server, dashboard and generated outputs together. No new stored data format is introduced.

Tests

On parent bcff2d313b, selected component groups passed 102, 19 and 83 cases (204 total), and the two selected backend modules passed 33 cases. Production build and bundle budget passed; applicable generated outputs were regenerated and reviewed. Full hosted CI finished with 54 successful and two skipped checks. The current head merges current main without changing any of the 35 topic-file blobs. Fresh independent source review and full hosted CI on that combined tree are pending.

Reproduce the selected checks from the repository root:

(cd frontend && node_modules/.bin/vitest run src/lib/knowledgeSources.test.ts src/flows/KnowledgeSourceDialog.test.tsx src/flows/KnowledgeSourceDialog.connected.test.tsx src/views/ConnectedAccounts.test.tsx src/views/SourcesList.test.tsx --maxWorkers=1 --no-file-parallelism)
(cd frontend && node_modules/.bin/vitest run src/flows/EditSourceItemsDialog.test.tsx src/flows/SourceDetailsDialog.test.tsx --maxWorkers=1 --no-file-parallelism)
(cd frontend && node_modules/.bin/vitest run src/views/RepositoryCard.test.tsx src/views/Documents.sources.test.tsx --maxWorkers=1 --no-file-parallelism)
.venv/bin/python -m pytest tests/unit/test_connected_account_availability.py tests/unit/test_connected_account_contracts.py -q -n 0
npm --prefix frontend run build
npm --prefix frontend run budget

The selected local browser attempt stopped at its memory guard before a case completed. Hosted browser checks on parent bcff2d313b passed the connected-source flow at desktop and phone widths, plus repository reader and administrator scenarios. Browser checks on the new combined tree remain pending. A genuine signed-in provider flow and native-client privacy qualification remain unverified. Full hosted CI must pass before merge.

AI assistance in the code

  • AI-generated: Codex wrote most of the diff. The source review checked authorization and canonical ownership, stale account/check invalidation, ordered link previews, interrupted-save recovery and generated contracts. Selected regressions and the production build were verified separately.

  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • Full format, lint, typecheck, unit and applicable integration gates pass in hosted CI; only selected local checks have run.
  • Applicable SDK, reference and dashboard-reach outputs are regenerated and reviewed.
  • No migration or plugin-shipped file changes.
  • The frontend builds and all frontend tests pass; the build and selected tests pass, with the full suite pending CI.
  • The description names wire changes, deployment order and validation limits.
  • Public text contains no deployment identifiers or private evidence paths.
  • Commits are signed off.

@vercel

vercel Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
loom-docs Ready Ready Preview Nov 21, 2026 1:16am UTC

Request Review

Use the signed-in account to check and add selected document links. Keep shared credentials limited to administrators and show provider configuration requirements.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Refresh source items before another edit after an uncertain save and return focus to the source list. Keep the phone action label compact and cover connected-account permissions at both entrypoints.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Use stored access policy for retirement confirmation and count reporting. Keep the source return marker during account-page navigation and align browser fixtures with the connected-account default.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
@zlareb1
zlareb1 force-pushed the feat/connected-account-source-ui branch from fdfc80b to e8ceb7d Compare November 20, 2026 21:09
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>

This branch has not been deployed

No deployments
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