feat: Introduce Git Native in the Relwave#44
Merged
Yashh56 merged 5 commits intoRelwave:developfrom Feb 16, 2026
Merged
Conversation
- Added SchemaDiffHandlers to handle RPC calls for schema diffing and file history. - Introduced SchemaDiffService to compute structured schema diffs between two schema snapshots. - Created SchemaDiffPanel component to display schema differences in the UI. - Implemented useSchemaDiff and useSchemaFileHistory hooks for fetching schema diff and history data. - Updated bridgeApi to include methods for schema diff and file history retrieval. - Enhanced VerticalIconBar to include a new panel for schema diff. - Added types for schema diff results and history in schemaDiff.ts. - Implemented gitService methods for retrieving file content at specific refs and listing file commit history.
- Implemented EnvironmentSwitcher component for managing environment mappings. - Added MigrationTimelinePanel component to display schema migration history. - Updated VerticalIconBar to include Migration Timeline option. - Enhanced Git workflow hooks to support environment configuration and conflict detection. - Integrated new components into DatabaseDetails page for improved user experience. - Added necessary API endpoints in bridgeApi for timeline and environment management. - Created types for Git workflow, including timeline entries and environment mappings.
…dvanced for Git operations - Deleted SchemaDiffPanel component and its associated hooks (useSchemaDiff, useSchemaFileHistory). - Added useGitAdvanced hook for managing Git remotes, push/pull/fetch operations, and revert functionality. - Updated bridgeApi service to include new Git-related methods for remote management and push/pull operations. - Removed unused gitWorkflow types and schemaDiff types. - Updated DatabaseDetails page to integrate GitStatusPanel instead of SchemaDiffPanel and MigrationTimelinePanel.
de9c638 to
c9e5c3f
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request introduces comprehensive Git integration into the Relwave platform, enabling version control for database projects. The changes add both frontend and backend capabilities for Git operations, project configuration management, and UI components for interacting with Git repositories.
Changes:
- Added complete Git operations support through a new
GitServicethat shells out to native git CLI - Introduced RPC handlers for git operations (status, commit, branch management, remote operations, push/pull/fetch, revert)
- Added project-level local configuration support for developer-specific settings (git-ignored)
- Created UI components for Git status display, commit management, branch switching, and remote configuration
- Implemented schema file optimization to avoid unnecessary writes and reduce git churn
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/types/git.ts | TypeScript type definitions for Git data structures (status, file changes, log entries, branches, remotes) |
| src/services/bridgeApi.ts | Frontend API client methods for all Git RPC operations and project directory retrieval |
| src/hooks/useGitQueries.ts | React Query hooks for Git queries (status, changes, log, branches) and mutations (init, stage, commit, checkout, stash) |
| src/hooks/useGitAdvanced.ts | React Query hooks for advanced Git operations (remotes, push/pull/fetch, revert) |
| src/hooks/useProjectQueries.ts | Added useProjectDir hook to fetch project filesystem path |
| src/components/git/GitStatusPanel.tsx | Full Git status panel UI with tabs for changes, history, branches, and diff viewer |
| src/components/common/GitStatusBar.tsx | Bottom status bar showing Git state with quick actions for commit, branch switching, push/pull |
| src/components/common/RemoteConfigDialog.tsx | Dialog for managing Git remotes (add, remove, edit URLs) |
| src/components/common/VerticalIconBar.tsx | Added 'git-status' panel type to sidebar navigation |
| src/pages/DatabaseDetails.tsx | Integrated Git status panel and status bar into database detail page |
| bridge/src/types/index.ts | Extended Rpc type to support optional details field in error responses |
| bridge/src/services/projectStore.ts | Added LocalConfig type, local config management methods, .gitignore handling, and schema deduplication logic |
| bridge/src/services/gitService.ts | Comprehensive GitService class with 1000+ lines implementing all Git operations via CLI |
| bridge/src/jsonRpcHandler.ts | Registered all new Git and project RPC handlers |
| bridge/src/handlers/projectHandlers.ts | Added handlers for getProjectDir, local config CRUD, and gitignore management |
| bridge/src/handlers/gitHandlers.ts | RPC handlers for core Git operations (status, init, stage, commit, branches, stash, diff) |
| bridge/src/handlers/gitAdvancedHandlers.ts | RPC handlers for advanced Git operations (remotes, push/pull/fetch, revert) |
| bridge/tests/projectStore.test.ts | Comprehensive test suite for ProjectStore including new local config and gitignore features |
| bridge/tests/gitService.test.ts | Extensive GitService test suite with 600+ lines covering all Git operations |
| bridge/tests/gitHandlers.test.ts | Unit tests for GitHandlers RPC handlers with mocked GitService |
| bridge/tests/gitAdvancedHandlers.test.ts | Unit tests for GitAdvancedHandlers with comprehensive coverage |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
This pull request introduces comprehensive improvements to the project's RPC (Remote Procedure Call) handling, particularly by adding a robust set of Git operation handlers and enhancing project configuration management. The changes provide a unified interface for performing Git actions (such as status checks, commits, branching, and more) and managing local, developer-specific project configurations. Additionally, there are optimizations to avoid unnecessary writes to the schema file, which helps prevent unwanted Git changes.
The most important changes are:
Git RPC Handlers Integration:
GitHandlersclass ingitHandlers.tsthat implements a full suite of Git operations as RPC handlers, including status, init, commit, branch management, staging, stashing, diff, and .gitignore management. This enables clients to perform most common Git actions through the RPC interface.jsonRpcHandler.ts, making them accessible via the RPC system. [1] [2] [3]Project Configuration Management:
ProjectHandlersfor getting the project directory, reading and saving local (developer-specific, git-ignored) configuration, and ensuring the presence of a.gitignorefile.LocalConfigtype inprojectStore.tsto formalize the structure of per-developer, non-committed configuration data.relwave.local.jsonfile (for local config) is created and git-ignored during project creation. [1] [2]Optimizations:
These changes significantly extend the backend's ability to manage both Git operations and developer-specific project settings, while also improving efficiency in schema file handling.