Commit Graph
12 Commits
Author SHA1 Message Date
Christoph 58df73d330 This diff introduces significant improvements in both frontend error handling (telemetry) and backend observability (metrics/logs export).
Here is a detailed summary of the changes:

### 🚀 Frontend Telemetry Improvement (`src/lib/telemetry.ts` & `src/main.ts`)

A dedicated module for robust, rate-limited error reporting has been added to the frontend application.

*   **Error Handling:** The new `installErrorReporting` function registers global listeners for `error` and `unhandledrejection` events on the window object.
*   **Stability Focus:** To prevent telemetry from interfering with the main user experience, the system implements a **rate limit** (`MAX_REPORTS_PER_SESSION = 25`) and checks to ensure duplicate messages are not sent repeatedly during a single session.
*   **Integration:** `src/main.ts` now calls `installErrorReporting()` upon application startup, ensuring that error monitoring is active from the moment the app loads.

### ⚙️ Backend Metrics & Logs Export Enhancement (Rust Code Block)

The Rust code block significantly refactors and enhances the logic for exporting system metrics and application logs to an OpenTelemetry Collector endpoint. The structure now adheres much more closely to standard OTLP/JSON schemas, and unit tests are added for validation.

#### 1. Metrics Export (`gauge` function & main loop)
*   **Comprehensive Data Collection:** The export loop is updated to refresh process information and calculate key metrics:
    *   Process Memory Usage (`process.memory.usage`)
    *   CPU Utilization (System-wide, normalized) (`process.cpu.utilization`)
    *   System Memory Utilization (`system.memory.utilization`)
*   **Standardized Payload:** The `gauge` helper function correctly structures these metrics into the required OpenTelemetry JSON format, including resource attributes and time points.

#### 2. Logs Export (`logs_payload`, `resource`, etc.)
*   **Structured Logging:** The `logs_payload` function provides a robust way to serialize application logs (`LogEvent`). It accurately maps log severity, body content, and custom attributes into the OTLP/JSON format.
*   **Resource Attributes:** Helper functions like `resource()` ensure that all telemetry payloads are correctly tagged with essential metadata (service name, version, OS type, architecture).

#### 3. Testing
*   **Validation Added:** Comprehensive unit tests (`#[cfg(test)] mod tests`) have been added to validate the complex serialization logic for both metrics and logs, ensuring they match the expected OpenTelemetry schema structure.

***

### Summary of Impact

These changes result in a much more observable and stable application:

1.  **Improved Observability:** The system can now reliably capture detailed performance data (CPU/Memory) and structured event logs from the backend, while simultaneously capturing critical runtime errors from the frontend.
2.  **Increased Stability:** Rate limiting on error reporting prevents telemetry failures from cascading into user-facing bugs.
3.  **Code Quality:** The addition of unit tests for the complex serialization logic significantly increases confidence in the reliability of the data export pipeline.
2026-07-21 20:58:50 +02:00
Christoph Brandau 95c8b01ed1 feat(remote): Enhance remote branch management and stability
Improved handling for deleting remote branches across the application, enhancing both user experience and backend reliability. This includes adding structured logging to all Git remote operations in Rust, refining UI components to handle remote-specific deletion flows, and providing clear status/error feedback in sync settings.

- Standardized styling for action toggles (Stash, Branch, Explorer) using consistent dimensions.
- Implemented detailed console logging for all Git remote operations on the backend.
- Refined dialogs and sync settings to provide explicit status and error messages during remote management.
2026-07-14 00:29:37 +02:00
Christoph Brandau 0ba7169efd feat(tauri): add single instance plugin and improve code formatting
publish / publish-tauri (appimage, 1, ubuntu-22.04, linux-x86_64) (release) Successful in 19m14s
publish / publish-tauri (nsis, , windows-latest, windows-x86_64) (release) Successful in 26m5s
This update introduces the tauri-plugin-single-instance to ensure that
only one instance of the application can run at a time. Additionally,
the code has been reformatted for better readability, with consistent
line breaks and spacing.

- Added single instance plugin to prevent multiple app instances
- Improved code formatting for better readability and maintenance
- Updated dependencies in Cargo.toml for new plugin integration
2026-07-09 09:49:27 +02:00
Christoph Brandau a7faaceb83 refactor(app): rename GitLite to Gitty throughout the application
The application has been rebranded from GitLite to Gitty, which involved
updating various references across the codebase, including titles,
descriptions, and identifiers. This change reflects the new branding
strategy and ensures consistency in the user interface and backend.

- Updated project name and identifiers in configuration files
- Changed all instances of "GitLite" to "Gitty" in HTML and Svelte files
- Adjusted descriptions and help texts to match the new branding
2026-07-08 19:51:28 +02:00
Christoph Brandau e503786211 feat(analytics): add optional Aptabase event tracking UI
Integrate Aptabase analytics via a Tauri plugin and add a privacy
notice flow plus a settings dialog to control whether anonymous
usage events are sent. The app now tracks key user actions while
ensuring analytics never blocks core Git operations.

- Add analytics tracking helper and Aptabase plugin wiring
- Persist analytics consent in localStorage and gate tracking
- Introduce notice and settings dialogs, plus new event calls
2026-07-07 17:35:20 +02:00
Christoph Brandau 6b7186d040 feat(ai): add cloud providers and local model selection
Add OpenAI-compatible, Anthropic, and custom endpoint support while
keeping the local model path intact. The UI now lets users choose the
provider and local model, and staged diffs are prepared more carefully
so generated commit messages stay focused and usable.

- src-tauri/crates/commit_ai/*
  - Add HTTP-based generators for OpenAI, Anthropic, and custom APIs.
  - Introduce shared request/response handling and message sanitizing.
  - Expand prompt building to require a body and trim long diffs safely.
  - Expose selectable local model metadata and loading by model ID.
- src-tauri/src/git.rs
  - Add commands for listing local models and loading them in background.
  - Route generation by provider and include staged file lists in prompts.
  - Exclude noisy lockfiles from detailed staged diffs.
- src-tauri/src/main.rs
  - Wire the new AI commands into the Tauri app setup.
- src/lib/components/*
  - Add an AI settings dialog and update the commit panel for provider
    and model selection.
- src/lib/git.ts, src/lib/types.ts, src/App.svelte, src/app.css
  - Extend frontend state, types, and styling for AI provider settings.
- src-tauri/Cargo.lock, src-tauri/crates/commit_ai/Cargo.toml
  - Add reqwest and serde_json for cloud API requests.
2026-07-02 21:19:16 +02:00
Christoph Brandau f2aa48d2ec try to use local ai to generate commit message 2026-07-02 19:59:16 +02:00
Christoph Brandau e3df75cc38 add new Context Menu for file Explorer
fix blocking UI
when select the file in Status also select in the file History
2026-07-02 16:24:38 +02:00
Christoph Brandau 58bd246221 add auto-updater and git workflow enhancements
publish / publish-tauri (, windows-latest) (release) Failing after 2m52s
This change introduces a comprehensive auto-update mechanism for the application and significant improvements to the integrated Git client experience.

Key features include:
- **Automated Release Workflow:** A new Gitea Actions workflow (`app_builder.yaml`) and a Python `cicd_tool` are added to automatically build, sign, and upload release artifacts to S3-compatible storage (MinIO) upon a new release. This also generates the `latest.json` file required by the updater.
- **Tauri Updater Integration:** The `tauri-plugin-updater` is integrated into the application, enabling it to check for and apply updates seamlessly.
- **Robust Git Push Handling:** The application now intelligently handles non-fast-forward push failures by prompting the user to perform a pull/merge operation before re-attempting the push.
- **Enhanced File Comparison:** A new `compare_file_to_parent` command is introduced, allowing detailed file diffs against a commit's direct parent, including the "empty tree" for initial commits.
- **Explorer Panel Improvements:** "Expand All" and "Collapse All" functionality is added to the file explorer for better navigation.
2026-06-30 13:23:30 +02:00
Christoph Brandau 4aa9a537f0 add login with oskeychain 2026-06-29 19:13:41 +02:00
Christoph Brandau b0491d1479 add new style and global search 2026-06-29 17:24:08 +02:00
Christoph Brandau 3b9d636fdb init 2026-06-27 13:03:07 +02:00