-
-
Notifications
You must be signed in to change notification settings - Fork 14
Preview merge conflicts summary before attempting merge #451
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
Conversation
b26fb28
to
3ac0c7c
Compare
3ac0c7c
to
6d0dff5
Compare
6d0dff5
to
ff7aeff
Compare
ff7aeff
to
e254efc
Compare
4a96e08
to
58ccc31
Compare
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.
Pull Request Overview
This PR adds support for previewing merge conflict summaries and detailed row conflicts before performing a merge operation.
- Introduces a new
ConflictsTable
React component and associated styles for displaying base/ours/theirs rows per column. - Adds breadcrumb support and routing for a “Pull Conflicts” page.
- Extends the GraphQL schema, resolvers, and query factories to fetch conflict summaries and row‐level conflict data.
Reviewed Changes
Copilot reviewed 20 out of 47 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
web/renderer/components/pageComponents/DatabasePage/ForPullConflicts/ConflictsTable/index.tsx | New React component rendering conflict tables |
web/renderer/components/pageComponents/DatabasePage/ForPullConflicts/ConflictsTable/index.module.css | Styles for the ConflictsTable |
web/renderer/components/breadcrumbs/types.ts | Added DBPullConflicts enum value |
web/renderer/components/breadcrumbs/breadcrumbDetails.tsx | Registered new breadcrumb trail entries |
web/renderer/components/breadcrumbs/PullConflictBreadcrumbs.tsx | New breadcrumb wrapper component |
web/package.json | Bumped sharp dependency |
graphql-server/src/utils/commonTypes.ts | Added shared PullArgs for pull operations |
graphql-server/src/rows/row.model.ts | Renamed key parameter to colName in getCellValue |
graphql-server/src/rowDiffs/rowDiff.model.ts | Updated import reference for Column |
graphql-server/src/resolvers.ts | Included PullConflictsResolver |
graphql-server/src/queryFactory/mysql/index.ts | Stubbed getPullConflicts* methods |
graphql-server/src/queryFactory/index.ts | Declared new getPullConflicts* interfaces |
graphql-server/src/queryFactory/doltgres/queries.ts | Added SQL queries for merge conflicts summary and rows |
graphql-server/src/queryFactory/doltgres/index.ts | Implemented getPullConflicts* methods |
graphql-server/src/queryFactory/dolt/queries.ts | Added SQL queries for merge conflicts summary and rows |
graphql-server/src/queryFactory/dolt/index.ts | Implemented getPullConflicts* methods |
graphql-server/src/pulls/pull.resolver.ts | Switched to shared PullArgs |
graphql-server/src/pullConflicts/pullConflict.resolver.ts | New resolver for conflict summaries and row conflicts |
graphql-server/src/pullConflicts/pullConflict.model.ts | Object types and mappers for conflict data |
graphql-server/schema.gql | Extended schema with conflict types and queries |
Comments suppressed due to low confidence (3)
graphql-server/src/queryFactory/mysql/index.ts:322
- [nitpick] The error message in
getPullRowConflicts
still readsget pull conflicts summary
, which may be confusing. Update it to something likeget pull row conflicts
to match the method's purpose.
throw notDoltError("get pull conflicts summary");
web/renderer/components/pageComponents/DatabasePage/ForPullConflicts/ConflictsTable/index.tsx:11
- [nitpick] Consider adding unit tests for the
ConflictsTable
component to verify that it correctly highlights conflicted cells and gracefully handles cases whereours
ortheirs
data is undefined.
export default function ConflictsTable(props: Props) {
graphql-server/src/queryFactory/doltgres/queries.ts:99
- There's a typo in the SQL query: a period instead of a comma between
$2::text
and$3::text
. Replace.
with,
to correct the parameter list.
export const mergeConflictsQuery = `SELECT * FROM DOLT_PREVIEW_MERGE_CONFLICTS($1::text, $2::text. $3::text)`;
Pull requests will now show if there are conflicts before attempting a merge:

And you can view the conflicted rows for a table:

Requires dolt >=1.55.0