-
Notifications
You must be signed in to change notification settings - Fork 129
Add DataGrip instructions to contributing README #2352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| --- | ||
| title: Connect to the manage database in DataGrip | ||
| sidebarTitle: DataGrip | ||
| description: This guide explains how to connect DataGrip to the local Inkeep manage database and run branch-scoped queries on a project branch. | ||
| keywords: DataGrip, PostgreSQL, Doltgres, manage database, contributors, local development | ||
| icon: LuDatabase | ||
| --- | ||
|
|
||
| <Steps> | ||
| <Step> | ||
| ## Download DataGrip | ||
|
|
||
| Install the latest version of DataGrip from JetBrains: | ||
| [DataGrip download](https://jetbrains.com/datagrip/download). | ||
| </Step> | ||
| <Step> | ||
| ## Create a PostgreSQL data source | ||
|
|
||
| In DataGrip, go to: | ||
| `File -> New -> Data Source -> PostgreSQL -> PostgreSQL`. | ||
|
|
||
| <></> | ||
| </Step> | ||
| <Step> | ||
| ## Fill data source details | ||
|
|
||
| Use this URL: | ||
|
|
||
| ```text | ||
| jdbc:postgresql://localhost:5432/inkeep_agents?user=appuser&password=password | ||
| ``` | ||
|
|
||
| Or fill the fields with these values: | ||
|
|
||
| - Name: `Inkeep Manage API` | ||
| - User: `appuser` | ||
| - Password: `password` | ||
| - Database: `inkeep_agents` | ||
|
|
||
| <></> | ||
| </Step> | ||
| <Step> | ||
| ## Test the connection | ||
|
|
||
| Click **Test Connection** and confirm it succeeds. | ||
|
|
||
| <></> | ||
| </Step> | ||
| <Step> | ||
| ## Select databases | ||
|
|
||
| In **Database Explorer**, click the 3 dots next to **No databases selected** and select all databases. | ||
|
|
||
| <></> | ||
| </Step> | ||
| <Step> | ||
| ## Go to DDL | ||
|
|
||
| Select the `inkeep_agents` database and click **Go to DDL**. | ||
|
|
||
| <></> | ||
| </Step> | ||
| <Step> | ||
| ## Check out a Dolt branch and run a query | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Minor: Missing link to conceptual documentation Issue: This step introduces Why: Contributors unfamiliar with Doltgres may not understand why this step is necessary. The conceptual page explains that each project has an isolated branch and connections default to Fix: Add a brief explanation with a link: ## Check out a Dolt branch and run a query
The manage database uses [Doltgres branch isolation](/community/contributing/manage-database#branch-naming-convention). Each project has its own branch, so you must check out the correct branch before querying project data.
In the query console, check out the project branch first, then run your SQL.Refs: |
||
|
|
||
| In the query console, check out the project branch first, then run your SQL. | ||
|
|
||
| Example for the default sample project: | ||
|
|
||
| ```sql | ||
| SELECT DOLT_CHECKOUT('default_activities-planner_main'); | ||
| SELECT * FROM skills; | ||
| ``` | ||
|
|
||
| General branch pattern: | ||
|
|
||
| ```sql | ||
| SELECT DOLT_CHECKOUT('{tenant_id}_{project_id}_{branch}'); | ||
| ``` | ||
|
|
||
| Run queries with `Cmd/Ctrl + Enter`, then choose the statement to execute. | ||
|
|
||
| <></> | ||
| </Step> | ||
| <Step> | ||
| ## View results | ||
|
|
||
| Query results appear in the bottom panel of the IDE. | ||
|
|
||
| <></> | ||
| </Step> | ||
| </Steps> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| { "pages": ["index"] } |
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -27,6 +27,7 @@ import { createGenerator } from 'fumadocs-typescript'; | |||||||
| import { ImageZoom } from 'fumadocs-ui/components/image-zoom'; | ||||||||
| import defaultMdxComponents from 'fumadocs-ui/mdx'; | ||||||||
| import type { MDXComponents } from 'mdx/types'; | ||||||||
| import NextImage from 'next/image'; | ||||||||
| import { ComparisonTable } from '@/components/comparisons-table'; | ||||||||
| import { AutoTypeTable, type TypeLinksInput } from '@/components/mdx/auto-type-table'; | ||||||||
| import { BigVideo } from '@/components/mdx/big-video'; | ||||||||
|
|
@@ -82,16 +83,21 @@ export function getMDXComponents(components?: MDXComponents): MDXComponents { | |||||||
| /> | ||||||||
| ), | ||||||||
| ...components, | ||||||||
| img: (props) => ( | ||||||||
| <img | ||||||||
| alt={props.alt ?? 'Image'} | ||||||||
| {...props} | ||||||||
| height={props.height ?? 1200} | ||||||||
| width={props.width ?? 1200} | ||||||||
| sizes="100vw" | ||||||||
| style={{ ...props.style, borderRadius: '10px', width: '100%' }} | ||||||||
| /> | ||||||||
| ), | ||||||||
| img(props) { | ||||||||
| const ComponentToUse = typeof props.src === 'object' ? NextImage : 'img'; | ||||||||
| const img = ( | ||||||||
| <ComponentToUse {...props} className="rounded-lg border border-border w-auto mx-auto" /> | ||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟠 MAJOR: Missing width/height causes CLS Issue: The new Why: Without explicit dimensions, images cause Cumulative Layout Shift (CLS) as they load. The new DataGrip guide has 8 images — users will see content jumping as each loads. Fix:
Suggested change
Refs: |
||||||||
| ); | ||||||||
| if (!props.alt) { | ||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Minor: Missing fallback alt text Issue: When Why: Images without Fix:
Suggested change
Refs: |
||||||||
| return img; | ||||||||
| } | ||||||||
| return ( | ||||||||
| <figure> | ||||||||
| {img} | ||||||||
| <figcaption className="mt-2 text-center text-sm">{props.alt}</figcaption> | ||||||||
| </figure> | ||||||||
| ); | ||||||||
| }, | ||||||||
| Accordions, | ||||||||
| Accordion, | ||||||||
| BigVideo, | ||||||||
|
|
||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟠 MAJOR: Missing prerequisite —
pnpm setup-devIssue: The guide jumps straight into DataGrip setup without mentioning that the local manage database must be running first.
Why: Contributors following this guide without running
pnpm setup-devwill hit connection failures at Step 4 ("Test Connection") with no explanation. The Doltgres database on port 5432 only exists after setup-dev runs.Fix: Add a prerequisites callout before Step 1:
Refs: