Skip to content

feat(notion): attach pages as composer context - #140

Merged
adampeterhiggins merged 2 commits into
mainfrom
ah/notion-document-attachments
Oct 2, 2026
Merged

adampeterhiggins merged 2 commits into
mainfrom
ah/notion-document-attachments

Conversation

@adampeterhiggins

@adampeterhiggins adampeterhiggins commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

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.so or notion.site link, 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.

Before After
Previous composer Notion in the paperclip picker

Model: GPT-6.1-Sol. Harness: Codex in T3 Code.

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