Repository navigation
Conversation
Add an "Agent setup" button to the docs article title action row that
copies an agent-setup prompt to the clipboard, replacing the sidebar
"Set up Neon with AI" action and its modal.
- New AgentSetupButton (title row, left of the Copy page split button):
copies the base prompt and appends the page's agentPrompt frontmatter
when present; shows a 1.4s "Prompt copied" state via use-copy-to-clipboard.
- Thread agentPrompt frontmatter through Post (flows via gray-matter data)
and add it to PropTypes.
- Move the "Updated {date}" stamp into the title action row.
- Remove the sidebar SetUpNeonButton and the now-unused neon-init-modal.
- Bundle public/get-started.md so the prompt URL is not a 404, and register
it in the static-md manifest.
Co-authored-by: Isaac <no-reply@databricks.com>
bgrenon
requested review from
andrelandgraf,
danieltprice,
philip and
ruf-io
as code owners
October 27, 2026 19:50
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
bgrenon
marked this pull request as draft
October 27, 2026 19:59
- Update the base prompt to "Set me up for Neon. Fetch https://neon.com/prompts/agent-setup.md and follow it." (agentPrompt frontmatter still appends with one leading space). - Copy the prompt as plain text via navigator.clipboard.writeText (no text/html, no styled DOM-node copy), so it pastes as normal body text. - Point the button at /prompts/agent-setup.md: drop public/get-started.md and bundle public/prompts/agent-setup.md (verbatim copy of the file in PR #6241) so the URL resolves before that PR merges; manifest regenerated. - Widen the docs title block to full content width so the H1 and subtitle no longer wrap early (the title no longer reserves room for a side button). Co-authored-by: Isaac <no-reply@databricks.com>
Swap the default Agent setup button icon from a sparkle to the existing docs AI-agent (robot head) icon. Everything else is unchanged: 15px size, green icon in the default state, green check swap in the copied state, placement, and title attribute. Co-authored-by: Isaac <no-reply@databricks.com>
Docs pages without an `updatedOn` frontmatter field showed no date, leaving the title action row unbalanced. Add a committed fallback map of each such page's last git commit date and use it when the frontmatter field is absent. - Add src/scripts/generate-docs-last-modified.js and the generated src/constants/docs-last-modified.js (slug -> last git commit date for the 72 docs pages that lack updatedOn). Committed rather than computed at build because Vercel's shallow clone makes per-file git history unavailable there. - Docs route prefers data.updatedOn, falling back to the map, so every servable docs article now shows its real last-updated date. - Right-align the title-row actions with ml-auto instead of a lone spacer, so a date-less row no longer looks unbalanced. Co-authored-by: Isaac <no-reply@databricks.com>
Replace the standalone Agent setup button and the Updated-date element with a single left-aligned, text-only actions row below the title: Copy page, View as Markdown, Set up agent. - Add an inline variant to DropdownMenu: a plain "Copy page" text trigger with a chevron that opens the existing menu (Copy page as Markdown, Open in ChatGPT, Open in Claude) unchanged. - Add a plain "View as Markdown" link to the page's raw markdown. - Restyle "Set up agent" as a text action: robot icon in green, label turns green on hover, and swaps to a check with "Prompt copied" for 1.4s on click. Still copies the prompt as plain text. - Restructure the title block as a grid with a bottom rule; keep the full-width H1 and subtitle. - Remove the Updated-date element and its last-modified fallback machinery (script, generated map, package.json script, route plumbing). Co-authored-by: Isaac <no-reply@databricks.com>
danieltprice
approved these changes
Oct 28, 2026
danieltprice
left a comment
Collaborator
There was a problem hiding this comment.
LGTM! Let's merge!
Resolve conflicts after PR #6241 (docs IA redesign) merged to main: - public/prompts/agent-setup.md: took main's canonical copy, dropped the bundled stopgap duplicate (identical content). - src/components/pages/doc/post/post.jsx: kept the inline page actions row (Copy page menu, View as Markdown, Set up agent), the full-width title block, and the grid header rework; adopted main's removal of the isDocsIndex prop (the docs home is now its own route/component), so the actions row and header rule render unconditionally on article pages. Co-authored-by: Isaac <no-reply@databricks.com>
bgrenon
marked this pull request as ready for review
October 28, 2026 21:11
This branch was successfully deployed
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.
What this does
Adds a per-page Agent setup button to the docs article title row. One click copies a short prompt a reader can paste into their coding agent (Claude Code, Cursor, Codex) to set up Neon. It replaces the sidebar "Set up Neon with AI" action and its modal with a more visible title-row action.
The button
Sits in the title action row, to the left of the existing Copy page split button.
#D7D8DBborder, 6px radius, white background, 14px label.#39A57D; border turns#39A57Don hover (120ms).#157A55text,#39A57Dborder.It copies plain text (
navigator.clipboard.writeText), so the prompt pastes as normal body text rather than styled/monospace.Prompt text
Base text, identical on every page:
If a page's frontmatter sets
agentPrompt, it is appended with a single leading space, e.g.agentPrompt: 'Then connect this Node.js app.'produces... and follow it. Then connect this Node.js app.Prompt file
The prompt points at
https://neon.com/prompts/agent-setup.md. That file is also introduced by #6241 (the docs home redesign). To keep this button working before #6241 merges, this PR bundlespublic/prompts/agent-setup.mdwith the same content as #6241's file. This overlap is intentional: when both land it is a trivial identical-content duplicate, and only one copy should be kept.Other changes
updatedOnfrontmatter, which is auto-stamped per file at commit time, so each page shows its own real last-updated date.Verification
Lint, formatting, the full unit suite, and the production build all pass; the build generates all pages.