Repository navigation
Dato Agent: setup checklist, "⋮" menu, and a remembered Agent tab width - #174
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With no provider key, "New chat" changed state the setup panel never showed, so the click did nothing (#173). Now, while the provider is missing: - New chat and the chat list are disabled, and the tooltip says why. New chat uses aria-disabled so its tooltip still shows on hover. - The "setup required" notice says chats need an API key and a model, with an "Open plugin settings" button for users who can edit the settings and "ask a project admin" for everyone else. Picking a chat before connecting DatoCMS still works as before. Fixes #173 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ty rule Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Editors don't need to know which provider an admin picked. The notice now says "Setup required", the tooltip says chats need an AI provider, and editors who can't edit the settings are told to ask a developer or project admin for help. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… done The connection screen mixed a provider notice, the DatoCMS connection and a working-looking chat list. Now it shows two numbered steps, "AI provider" and "DatoCMS account", each marked "Done" or "To do" with an icon and a word. The provider step says what to do: an "Open plugin settings" button for users who can edit them, or ask a developer or project admin for help. Until both steps are done, the Chats section shows only "Finish setup first to start chatting.": no New chat button and no chat list. This replaces the disabled New chat button from the first version of this fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Rename the panel "Agent setup", with the steps "Choose AI provider & model" and "Connect AI to DatoCMS MCP". - Step 2 matches step 1: a short intro and a regular Connect button, without the logo row. It lists what each access choice on the DatoCMS consent screen lets the agent do. - Until setup is done, Chats shows the kit's disabled text box with a FieldError explaining why, instead of placeholder-like text. - Step 2 is a plain container instead of the kit's Form, which wrapped the text and the button in one item and dropped the gap between them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Auto-approve off shows a slashed bolt and "Auto-approve is off". On keeps the bolt and reads "Auto: On" with a "Danger" badge. - The "DatoCMS access is not verified" notice flashed above the composer on every load: the access level reads "unknown" until the first check returns. The notice now waits for that check, so it only shows when access really couldn't be verified. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each Connect registers its own OAuth client, and the consent screen stores the projects and the access level for that client only (OauthApplicationAccountSetting, keyed by account and application). A public client always sees the consent screen again. So disconnecting and connecting again is how an editor changes the access level, and it touches no other client's grant. - Connected state: "Current access level", then one "Disconnect to change access" button. Drop "Check access again" (the plugin checks on every sign-in) and the account-settings link. - Fix MCP_ACCESS_CHANGE_GUIDANCE, which the system prompt also uses: it told editors to revoke access in their account settings, which affects every MCP client of the account. - Sign-in errors: drop "Start sign-in again with a new registration". Connect already re-registers when DatoCMS rejects the stored client (invalid_client), and no other failure needs a new client. Errors now say what happened and end with "Click Connect to try again." Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… screen The connected DatoCMS step now offers "Reconnect to change access" instead of a disconnect button. It runs a forced fresh sign-in, so DatoCMS shows the consent screen with its access choices, and then revokes the previous token. Connect opens the popup before any network call, so browsers don't block it. Pending approvals block it, as they block Disconnect. If the editor cancels, they end up disconnected with the old token revoked, and the error says to click Connect. The agent's own guidance now points to the same button. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…just chats
Setup is for editors who aren't set up yet. Once they are, the chats
panel shows only the chat history, so nobody changes the connection by
accident.
- A "⋮" menu in the chat toolbar holds:
- "Plugin settings", disabled with a reason for users who can't edit
the schema
- the current DatoCMS access level, with one line on what it allows
- "Reconnect to change access…", which asks first
- The confirmation is a small dialog inside the plugin frame, not a host
dialog: the sign-in popup opens only from a click in this frame, and a
click on a host dialog happens in the parent page.
- The setup screen no longer offers its own reconnect button.
- Tests render the surface inside the kit's plugin ctx, and the test
setup stubs IntersectionObserver, which the kit's menu uses.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The CMS owns the Agent tab's divider: the plugin SDK only sets a starting width. Below 200px the chat can't be used, so the tab shows "Sidebar too narrow. Drag its edge wider to see the Dato Agent." The chat stays mounted underneath (inert), so a reply in progress survives and continues once the tab is wider again. The record sidebar is unaffected: the CMS already keeps it at least 300px wide. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One constant, AGENT_PANE_WIDTH = 300, now sets both the starting width of the Agent tab's chat (it was 420) and the narrowest it stays usable: at 299px and below, the tab shows the "too narrow" notice. On a 1440px window the chat frame measures exactly 300px. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"AI settings" instead of "Plugin settings", "Current DatoCMS access level", and summaries that start with "The agent can". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The record sidebar already remembers its width in localStorage. The Agent tab now does too: the chat saves its width on every resize (per project, so projects don't share it), and the tab's starting split leaves that width to the chat. A width under 300px isn't saved, so the default comes back. The plugin SDK has no per-user server-side storage, and plugin parameters are shared by the whole project, so this stays per browser. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An editor wants their chat width in every project. A collaborator's user ID differs per project, so keying by it would stay per-project; a single key in the plugin's localStorage gives each browser profile, which belongs to one person, one width everywhere. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From #165 (Rodrigo's "usable starting width" PR), without its starting-width logic, which the draggable, remembered width replaces: - The empty record pane adds "Ask the agent to open a record and it appears in this pane. Drag the divider to resize it." - The transcript and composer stop growing at 760px and stay centred, so a wide chat doesn't make very long lines. Co-authored-by: Rodrigo Barona <rodrigo.barona@wundermanthompson.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The record editor's back arrow in the Agent tab switches the right pane to the inspector's record list. The CMS shows an empty list as a loading spinner that never ends, and the plugin only filled that list for "show records", not when it opened a single record. The inspector navigator now keeps the list filled: the last shown list, plus every record the chat opened (newest first, up to 50), sent before the editor opens. Back now lands on "Records opened from the chat". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 of 3 tasks
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.
(Claude here [Opus 5.5])
Closes #173. Closes #162.
Setup: a checklist that blocks chatting until it's done
With DatoCMS connected but no AI provider key, New chat looked enabled but did nothing (#173). The setup panel is now an Agent setup checklist:
FieldError, "Finish setup first to start chatting.", and no New chat button or chat list.invalid_client), and no other failure needs one.Once set up: chats panel, toolbar, and the "⋮" menu
MCP_ACCESS_CHANGE_GUIDANCE, used in the system prompt) used to tell editors to revoke access in their account settings, which affects every MCP client of the account. It now points to Reconnect.Agent tab width (#162)
The chat starts at 300px, then at whatever width the editor last dragged it to. That width is saved in the plugin's
localStorage, once per browser, so it applies in every project.outerWidthfailed in Firefox, which reports the iframe's own size there.Below 300px, a notice covers the chat: "Sidebar too narrow. Drag its edge wider to see the Dato Agent." The chat stays mounted underneath, so a reply in progress survives.
From Dato Agent: give the inspector chat a usable starting width #165, with Rodrigo as co-author:
Dato Agent: give the inspector chat a usable starting width #165's starting-width calculation is replaced by the remembered width.
Back from an opened record no longer spins forever. The record editor's back arrow switches to the inspector's record list, and the CMS shows an empty list as an endless spinner. The plugin now fills that list before every record it opens. A CMS-side fix (back to the previous view, a real empty state) is in progress separately.
Fixes for master
package-lock.jsonis resynced (@emnapi/wasi-threads), sonpm ciworks again.extractAnthropicModel, sonpm run lintpasses again.Known limits
Testing
npm test: 983 pass.npm run lintandnpm run buildexit 0.🤖 Generated with Claude Code