Repository navigation
feat(notion): attach pages as composer context - #140
Merged
Merged
Conversation
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.
Notion page links currently stay as plain text, and pages cannot be selected as agent context. This adds Notion OAuth sign-in and page snapshots: paste a
notion.soornotion.sitelink, select a page from the paperclip picker, or use the Notion tab under#on web and desktop. The paperclip menu,#results, command palette, and attachment chips share a monochrome Notion SVG mark. The command palette can attach pages too; mobile has a page picker and snapshot details using the environment's connection.The server searches pages shared during OAuth and retrieves their Markdown through Notion's page content API. A bounded snapshot is carried by the shared composer context contract and projected for every provider. Unreadable pasted links stay in the composer. Remote sign-in can finish by pasting the redirect URL; cancellation, token refresh, revocation, and disconnect are supported. Setup requires a public Notion integration's client ID and secret on the server, as explained in the new Notion guide.
Validation: 79 focused tests pass, covering page link parsing, context round-trips and provider projection, page API failures and truncation, remote OAuth completion, cancellation, token rotation, and revocation. Scoped typechecks pass for server, web, mobile, contracts, client-runtime, and shared. Targeted lint passes with existing warnings in modified legacy files; new integration files are clean.
Browser verification used isolated copied state through T3's Browser panel. Confirmed the paperclip entry, the disconnected picker, navigation to Integrations, and disabled sign-in with missing OAuth configuration. Verified the monochrome Notion SVG in the attachment menu and refreshed the after image. Captured images below show the previous composer and the new attachment menu. The connected picker and
#flow were not exercised in a live client. Live Notion consent requires configured OAuth credentials; native mobile was typechecked but not run.Model: GPT-6.1-Sol. Harness: Codex in T3 Code.