Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
3bf96f2
fix: styling for error messaging (#647)
laurenashpole Oct 2, 2025
9b1fe8e
test: removing mocking of useSanityInstance hook (#645)
judofyr Oct 7, 2025
5267e18
fix(auth): do not clear the entire hash during login, only a token va…
ryanbonial Oct 15, 2025
eec856f
fix(deps): update dependency @sanity/client to ^7.12.0 (#649)
renovate[bot] Oct 15, 2025
8ed0524
chore: release main (#628)
squiggler[bot] Oct 15, 2025
a5d0875
fix: auth race condition when using the SDK in the Studio structure (…
ryanbonial Oct 17, 2025
c4b6885
chore: release main (#650)
squiggler[bot] Oct 21, 2025
1668657
fix: handle projectUserNotFoundErrors and display the error message (…
ryanbonial Oct 27, 2025
8426402
fix docs typo (#657)
kristofferlund Oct 30, 2025
705732f
feat: add intent link hook and component
laurenashpole Oct 30, 2025
94dd6ea
fix: rename intent category to intent action
laurenashpole Oct 31, 2025
1b53817
chore: update intent disambiguation app
laurenashpole Nov 3, 2025
fcf9f9c
fix: rename send intent event
laurenashpole Nov 3, 2025
5a84e98
fix: send intent types
laurenashpole Nov 3, 2025
ce1dccb
chore(deps): update dependency vite to v6.3.6 [security] (#617)
renovate[bot] Nov 3, 2025
48b9e7d
chore(deps): update davelosert/vitest-coverage-report-action digest t…
renovate[bot] Nov 3, 2025
06ecd96
chore(deps): update amannn/action-semantic-pull-request digest to e32…
renovate[bot] Nov 5, 2025
f027f17
chore(deps): pin circleci-public/trigger-circleci-pipeline-action act…
renovate[bot] Nov 5, 2025
cb70f89
feat: add agent actions (#654)
ryanbonial Nov 5, 2025
92340b9
feat: Introduce "source" concept (#626)
judofyr Nov 6, 2025
2979b66
fix: demo app updates
laurenashpole Nov 7, 2025
815131b
fix: remove broken butto from intents demo
laurenashpole Nov 7, 2025
3d5f45c
feat(react): create useDispatchIntent hook (#595)
cngonzalez Nov 7, 2025
81047bc
fix: update message data
laurenashpole Nov 7, 2025
ff082fd
fix: update demo names
laurenashpole Nov 12, 2025
86eb061
Merge branch 'main' into 07-28-feat_apps_create_example_apps_for_demo
laurenashpole Nov 12, 2025
d67aefa
Merge branch '07-28-feat_apps_create_example_apps_for_demo' into la/i…
laurenashpole Nov 13, 2025
7a04024
fix: update studio intent id
laurenashpole Nov 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,6 @@ jobs:
done_state_id: "5a35b7bf-6d37-4cc2-854a-2f18d160e2e5"

- name: Trigger CircleCI Pipeline
uses: CircleCI-Public/trigger-circleci-pipeline-action@v1.0.5
uses: CircleCI-Public/trigger-circleci-pipeline-action@ef1944e67053c1923ad772d2377575f2fd962169 # v1.0.5
env:
CCI_TOKEN: ${{ secrets.CCI_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ jobs:
pnpm vitest run --merge-reports --coverage

- name: Report coverage
uses: davelosert/vitest-coverage-report-action@7bf7d3c1b17a0e27c7e0d14190fb39168584bed2 # v2
uses: davelosert/vitest-coverage-report-action@8ab049ff5a2c6e78f78af446329379b318544a1a # v2
2 changes: 1 addition & 1 deletion .github/workflows/validate-pr-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ jobs:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017 # v5
- uses: amannn/action-semantic-pull-request@e32d7e603df1aa1ba07e981f2a23455dee596825 # v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"packages/core": "2.2.0",
"packages/react": "2.2.0"
"packages/core": "2.3.1",
"packages/react": "2.3.1"
}
1 change: 1 addition & 0 deletions apps/intent-disambiguation-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"prettier": "@sanity/prettier-config",
"dependencies": {
"@sanity/sdk-react": "workspace:*",
"@sanity/ui": "^3.1.11",
"react": "^19",
"react-dom": "^19",
"react-router": "^7.5.2",
Expand Down
9 changes: 7 additions & 2 deletions apps/intent-disambiguation-app/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@ import './App.css'

import {type SanityConfig} from '@sanity/sdk'
import {SanityApp} from '@sanity/sdk-react'
import {ThemeProvider} from '@sanity/ui'
import {buildTheme} from '@sanity/ui/theme'
import React from 'react'
import {BrowserRouter} from 'react-router'

import {IntentDisambiguation} from './components/IntentDisambiguation'
import {LoadingFallback} from './components/LoadingFallback'

const theme = buildTheme()

function AppWithRouter(): React.JSX.Element {
const sanityConfigs: SanityConfig[] = [
{
Expand All @@ -18,10 +22,11 @@ function AppWithRouter(): React.JSX.Element {
},
},
]

return (
<SanityApp config={sanityConfigs} fallback={<LoadingFallback />}>
<IntentDisambiguation />
<ThemeProvider theme={theme}>
<IntentDisambiguation />
</ThemeProvider>
</SanityApp>
)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,42 +1,168 @@
import {useSendIntent} from '@sanity/sdk-react'
import {canvasSource, type DocumentHandleWithSource, useDispatchIntent} from '@sanity/sdk-react'
import {Button, Card, Container, Flex, Heading, Stack, Text} from '@sanity/ui'
import React, {Suspense} from 'react'

function SendIntentButton(): React.JSX.Element {
const {sendIntent} = useSendIntent({
documentHandle: {
documentId: 'maintenance-schedule-123',
documentType: 'maintenanceSchedule',
projectId: '9wmez61s',
dataset: 'production',
},
function SendIntentButton({
action,
intentId,
documentHandle,
parameters,
cta,
}: {
action?: 'edit'
intentId?: string
documentHandle: DocumentHandleWithSource
parameters?: Record<string, unknown>
cta: string
}): React.JSX.Element {
const {dispatchIntent} = useDispatchIntent({
...(action && {action}),
...(intentId && {intentId}),
...(parameters && {parameters}),
documentHandle,
})

const handleMaintenanceScheduleClick = () => {
console.log('Sending maintenanceSchedule intent - this should trigger disambiguation')
sendIntent()
const handleClick = () => {
console.log(`Sending ${action || intentId} intent`)

Check failure on line 26 in apps/intent-disambiguation-app/src/components/IntentDisambiguation.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected console statement
dispatchIntent()
}

return (
<button className="maintenance-schedule-button" onClick={handleMaintenanceScheduleClick}>
Send Maintenance Schedule Intent
</button>
<Button
tone="primary"
fontSize={2}
padding={4}
text={cta}
onClick={handleClick}
style={{
minWidth: 140,
}}
/>
)
}

export function IntentDisambiguation(): React.JSX.Element {
return (
<div className="app-container">
<div className="intent-disambiguation">
<h1>Intent Disambiguation App</h1>
<p>
This app sends a maintenanceSchedule intent. Since both the property-detail-app and
property-overview-app can handle this intent, the Dashboard should do something to let you
choose which app should handle it.
</p>
<Suspense fallback={<div>Loading intent sender...</div>}>
<SendIntentButton />
</Suspense>
</div>
</div>
<Container width={1} paddingY={6} style={{textAlign: 'center'}}>
<Stack space={5}>
<Heading as="h1">Intents Demos App</Heading>

<Text>
This app provides sample intents triggers that allow for easier navigation between the
property-detail-app, property-overview-app, or studio. These can be set up to either
navigate directly by intent name or display a picker for disambiguation.
</Text>

<Stack>
<Card borderBottom borderTop paddingY={4}>
<Flex justify="space-between" align="center" gap={5}>
<Text align="left">
Open all intents that can handle editing for the &ldquo;HVAC Service - 123 Oak
Street&rdquo; maintenance schedule.
</Text>

<Suspense fallback={<div></div>}>
<SendIntentButton
action="edit"
documentHandle={{
documentId: 'ISWDzt74pwbeI4ifLERAKF',
documentType: 'maintenanceSchedule',
projectId: '9wmez61s',
dataset: 'production',
}}
cta="Edit Schedule"
/>
</Suspense>
</Flex>
</Card>

<Card borderBottom paddingY={4}>
<Flex justify="space-between" align="center" gap={5}>
<Text align="left">
Navigate directly to the &ldquo;Plumbing Check - 456 Pine Avenue&rdquo; maintenance
schedule in the property-overview-app.
</Text>

<Suspense fallback={<div></div>}>
<SendIntentButton
intentId="editScheduleState"
documentHandle={{
documentId: 'ISWDzt74pwbeI4ifLERAy7',
documentType: 'maintenanceSchedule',
projectId: '9wmez61s',
dataset: 'production',
}}
cta="Edit Schedule"
/>
</Suspense>
</Flex>
</Card>

<Card borderBottom paddingY={4}>
<Flex justify="space-between" align="center" gap={5}>
<Text align="left">
Open all intents that can handle editing for the &ldquo;123 Oak Street&rdquo;
property.
</Text>

<Suspense fallback={<div></div>}>
<SendIntentButton
action="edit"
documentHandle={{
documentId: 'ISWDzt74pwbeI4ifLER8da',
documentType: 'property',
projectId: '9wmez61s',
dataset: 'production',
}}
cta="Edit Schedule"
/>
</Suspense>
</Flex>
</Card>

<Card borderBottom paddingY={4}>
<Flex justify="space-between" align="center" gap={5}>
<Text align="left">
Navigate directly to the &ldquo;Check oven temperature accuracy&rdquo; maintenance
task in the studio.
</Text>

<Suspense fallback={<div></div>}>
<SendIntentButton
intentId="j8q720b38239y746e1ho73tj-default.edit-workspace-default"
documentHandle={{
documentId: 'ISWDzt74pwbeI4ifLERD8g',
documentType: 'maintenanceTask',
projectId: '9wmez61s',
dataset: 'production',
}}
cta="Edit Task"
/>
</Suspense>
</Flex>
</Card>

<Card borderBottom paddingY={4}>
<Flex justify="space-between" align="center" gap={5}>
<Text align="left">
Navigate directly to &ldquo;Welcome to Sanity Canvas&rdquo; in Canvas.
</Text>

<Suspense fallback={<div></div>}>
<SendIntentButton
intentId="canvas.edit"
documentHandle={{
documentId: 'TUJo78GZr52XcbxuwWUlzQ',
documentType: 'sanity.canvas.document',
source: canvasSource('TUJo78GZr52XcbxuwWUlzQ'),
}}
cta="Edit Canvas"
/>
</Suspense>
</Flex>
</Card>
</Stack>
</Stack>
</Container>
)
}
20 changes: 20 additions & 0 deletions apps/kitchensink-react/src/AppRoutes.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {ResourceProvider} from '@sanity/sdk-react'
import {type JSX} from 'react'
import {Route, Routes} from 'react-router'

Expand All @@ -14,9 +15,12 @@ import {SearchRoute} from './DocumentCollection/SearchRoute'
import {PresenceRoute} from './Presence/PresenceRoute'
import {ProjectAuthHome} from './ProjectAuthentication/ProjectAuthHome'
import {ProtectedRoute} from './ProtectedRoute'
import {AgentActionsRoute} from './routes/AgentActionsRoute'
import {DashboardContextRoute} from './routes/DashboardContextRoute'
import {DashboardWorkspacesRoute} from './routes/DashboardWorkspacesRoute'
import ExperimentalResourceClientRoute from './routes/ExperimentalResourceClientRoute'
import {IntentsRoute} from './routes/IntentsRoute'
import {MediaLibraryRoute} from './routes/MediaLibraryRoute'
import {PerspectivesRoute} from './routes/PerspectivesRoute'
import {ProjectsRoute} from './routes/ProjectsRoute'
import {ReleasesRoute} from './routes/releases/ReleasesRoute'
Expand Down Expand Up @@ -72,6 +76,14 @@ const documentCollectionRoutes = [
path: 'presence',
element: <PresenceRoute />,
},
{
path: 'media-library',
element: <MediaLibraryRoute />,
},
{
path: 'intents',
element: <IntentsRoute />,
},
]

const dashboardInteractionRoutes = [
Expand Down Expand Up @@ -121,6 +133,14 @@ export function AppRoutes(): JSX.Element {
{documentCollectionRoutes.map((route) => (
<Route key={route.path} path={route.path} element={route.element} />
))}
<Route
path="agent-actions"
element={
<ResourceProvider projectId="vo1ysemo" dataset="production" fallback={null}>
<AgentActionsRoute />
</ResourceProvider>
}
/>
<Route path="users/:userId" element={<UserDetailRoute />} />
<Route path="comlink-demo" element={<ParentApp />} />
<Route path="releases" element={<ReleasesRoute />} />
Expand Down
Loading
Loading