Skip to content

feat: Introduce Git Native in the Relwave#44

Merged
Yashh56 merged 5 commits intoRelwave:developfrom
Yashh56:feat/git-native
Feb 16, 2026
Merged

feat: Introduce Git Native in the Relwave#44
Yashh56 merged 5 commits intoRelwave:developfrom
Yashh56:feat/git-native

Conversation

@Yashh56
Copy link
Member

@Yashh56 Yashh56 commented Feb 15, 2026

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:

  • Added a new GitHandlers class in gitHandlers.ts that 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.
  • Registered all new Git-related RPC methods in jsonRpcHandler.ts, making them accessible via the RPC system. [1] [2] [3]

Project Configuration Management:

  • Added new RPC handlers in ProjectHandlers for getting the project directory, reading and saving local (developer-specific, git-ignored) configuration, and ensuring the presence of a .gitignore file.
  • Defined a LocalConfig type in projectStore.ts to formalize the structure of per-developer, non-committed configuration data.
  • Ensured that a relwave.local.json file (for local config) is created and git-ignored during project creation. [1] [2]

Optimizations:

  • Updated schema writing logic to avoid rewriting the schema file if the schema data has not changed, preventing unnecessary Git churn from unchanged files.

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.

- 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.
Copy link
Contributor

Copilot AI left a 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 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 GitService that 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.

@Yashh56 Yashh56 merged commit c3396f4 into Relwave:develop Feb 16, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant