Skip to content

Dato Agent: open records in the full editor from chat - #166

Open
rodrigobarona wants to merge 1 commit into
datocms:masterfrom
rodrigobarona:feat/dato-agent-open-full-editor
Open

rodrigobarona wants to merge 1 commit into
datocms:masterfrom
rodrigobarona:feat/dato-agent-open-full-editor

Conversation

@rodrigobarona

Copy link
Copy Markdown
Contributor

Closes #163

The inspector record pane cannot show the standard record sidebar. itemEditor mode has no sidebar option.

Record chips now have an external-link action, and the agent has open_record_in_full_editor. Both open the normal DatoCMS record page in a new browser tab, which includes the standard sidebar and Web Previews. The chat stays in place. If the browser blocks the tab, the tool result includes the URL so the agent can share it.

Test plan

  • npm test in dato-agent
  • Click the external-link icon on a record chip and confirm the full record page opens
  • Ask the agent for the standard sidebar and confirm it offers the full editor URL

Made with Cursor

The inspector record pane cannot show the standard record sidebar. Add an action on record links, and a chat tool, that opens the normal record page in a new browser tab.

Co-authored-by: Cursor <cursoragent@cursor.com>
@roger-datocms

Copy link
Copy Markdown
Member

(Claude here [Opus 5.5])

Triage

Status: still relevant. Master has no way to reach the standard record sidebar from the Agent tab. setInspectorMode({ type: 'itemEditor' }) has no sidebar option, so a new tab is the right workaround.

Mergeability (head 641bd51):

Review

The approach matches the existing pattern in master: mentionHost.ts already opens about:blank during the click, nulls opener, then calls location.replace. The new projectUrl.ts helper also deduplicates mentionHost.ts's URL builder.

Findings, none blocking:

  1. Agent-tool path is almost always a blocked popup. open_record_in_full_editor calls window.open after a model round-trip, with no user gesture. Most browsers block it. The fallback works: the tool returns the URL, and AgentFrame.tsx:3601 adds a record chip with the new external-link button. Consider making the chip the primary path and not attempting window.open from the tool.
  2. Misleading activity label. activityLabels.ts:818 shows "Full editor ready" even when opened: false.
  3. Silent failure on the chip button. AgentFrame.tsx:6130 ignores opened: false and swallows errors (for example a failed model lookup). The user gets no feedback.
  4. Tool is also offered in the record sidebar. Both createInspectorNavigator and createSidebarNavigator implement it (navigation.ts:158, navigation.ts:221). In the sidebar the user is already on the full editor, so the tool only duplicates the tab. Consider exposing it only in the inspector.

Next step

  1. Run the two unchecked manual test-plan items in a real project, in Chrome and Safari.
  2. Optionally address findings 1-4.
  3. Merge. It closes Dato Agent: no way to open the standard record sidebar from the Agent tab #163.

roger-datocms pushed a commit that referenced this pull request Oct 20, 2026
roger-datocms pushed a commit that referenced this pull request Oct 20, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

Dato Agent: no way to open the standard record sidebar from the Agent tab

2 participants