Commit graph

22 commits

Author SHA1 Message Date
Snider
7d6e6e9c42 feat: Add stats bar component to display miner performance metrics and update dashboard layout 2025-12-11 15:22:58 +00:00
Snider
a3ff0bbdaf feat: Optimize saveProfiles method by removing unnecessary read lock 2025-12-11 14:08:02 +00:00
Snider
0d412e6faa feat: Add setup wizard and profile management components with styling 2025-12-10 22:17:38 +00:00
Snider
8f888a3749 feat: Refactor dashboard layout and integrate admin panel functionality 2025-12-07 18:31:27 +00:00
Snider
816f860b73 feat: Enhance mining configuration management and API documentation 2025-12-07 16:26:18 +00:00
Snider
2576d4bc1b feat: Update server configuration and add XMRig miner management functionality 2025-12-07 15:14:30 +00:00
google-labs-jules[bot]
6412362ea6 feat: Add comprehensive docstrings to the mining package
This commit adds comprehensive Go docstrings to the `pkg/mining` package,
including `mining.go`, `manager.go`, `manager_interface.go`, and `xmrig.go`.

The docstrings cover all public types, interfaces, functions, and methods,
and include examples where appropriate to illustrate usage.

This change improves the developer experience by making the code easier to
understand and use.
2025-11-14 14:32:57 +00:00
google-labs-jules[bot]
e107920b16 feat: add _Good, _Bad, _Ugly tests
Refactors the existing test suite to use a `_Good`, `_Bad`, and `_Ugly` testing structure. This new format improves the clarity and organization of the tests by distinguishing between happy path scenarios (_Good), expected failures (_Bad), and edge cases (_Ugly).

In addition to reorganizing the existing tests, this change also introduces new `_Bad` test cases to `xmrig_test.go` to cover previously untested failure modes, such as a missing miner binary and an unreachable API. This improves the overall quality and robustness of the test suite.
2025-11-13 21:24:25 +00:00
google-labs-jules[bot]
0533a9fb9c fix(ui): Correct UI build and server configuration
Corrected the build script in `ui/package.json` to correctly bundle the Angular application. Also updated `pkg/mining/service.go` to serve the correct bundled JavaScript file.

Verified the backend server is running and accessible by testing the Swagger UI endpoint.
2025-11-13 19:49:58 +00:00
google-labs-jules[bot]
c74f360dd0 feat(mining): Increase test coverage for service and manager
Added tests for GetMiner and ListMiners in the manager, and for the GetInfo and Doctor endpoints in the service. This increases the overall test coverage of the pkg/mining package.
2025-11-13 19:23:33 +00:00
google-labs-jules[bot]
1e2fa7a85a feat(mining): Increase test coverage for manager
Added tests for StartMiner and StopMiner in the manager, increasing test coverage for the pkg/mining package.

Refactored the findMinerBinary function to fall back to the system PATH, making the application more robust and easier to test.
2025-11-13 19:17:07 +00:00
google-labs-jules[bot]
baf732b999 feat: Increase test coverage for pkg/mining
This commit introduces a number of new tests for the `pkg/mining` package,
increasing the overall test coverage from 8.2% to 41.4%.

The following changes were made:

- Added tests for the `XMRigMiner` struct, including its methods for
  installation, starting, stopping, and getting stats.
- Added tests for the `Service` layer, including the API endpoints for
  listing, starting, stopping, and getting stats for miners.
- Added tests for the `Manager`, including starting and stopping multiple
  miners, collecting stats, and getting hashrate history.
- Introduced a `ManagerInterface` to decouple the `Service` layer from the
  concrete `Manager` implementation, facilitating testing with mocks.
- Fixed a failing test on Windows by creating a Windows-compatible
  dummy executable.
- Improved encapsulation in tests by adding and using getter methods for
  private fields.
2025-11-10 00:55:35 +00:00
google-labs-jules[bot]
5fd7b4b40a feat: Increase test coverage for pkg/mining
This commit introduces a number of new tests for the `pkg/mining` package,
increasing the overall test coverage from 8.2% to 40.7%.

The following changes were made:

- Added tests for the `XMRigMiner` struct, including its methods for
  installation, starting, stopping, and getting stats.
- Added tests for the `Service` layer, including the API endpoints for
  listing, starting, stopping, and getting stats for miners.
- Added tests for the `Manager`, including starting and stopping multiple
  miners, collecting stats, and getting hashrate history.
- Introduced a `ManagerInterface` to decouple the `Service` layer from the
  concrete `Manager` implementation, facilitating testing with mocks.
- Fixed a failing test on Windows by creating a Windows-compatible
  dummy executable.
2025-11-10 00:45:35 +00:00
google-labs-jules[bot]
0f8f61071e feat: Increase test coverage for pkg/mining
This commit introduces a number of new tests for the `pkg/mining` package,
increasing the overall test coverage from 8.2% to 40.7%.

The following changes were made:

- Added tests for the `XMRigMiner` struct, including its methods for
  installation, starting, stopping, and getting stats.
- Added tests for the `Service` layer, including the API endpoints for
  listing, starting, stopping, and getting stats for miners.
- Added tests for the `Manager`, including starting and stopping multiple
  miners, collecting stats, and getting hashrate history.
- Introduced a `ManagerInterface` to decouple the `Service` layer from the
  concrete `Manager` implementation, facilitating testing with mocks.
2025-11-10 00:06:35 +00:00
Snider
fdac15ba43 windows build fix 2025-11-09 19:13:48 +00:00
Snider
6fd424f562 should add the custom element compile js file to the release. 2025-11-09 19:06:05 +00:00
Snider
9093ce16e9 adds a system log entry on miner start CryptoCurrency Miner started: %s (Binary: %s) because it's rude to not say hello to the OS's AV. 2025-11-09 05:35:40 +00:00
Snider
dc0eae0888 creates <mde-mining-dashboard> custom html element, for miner control and stats display. 2025-11-09 04:41:07 +00:00
Snider
a043a09d22 adds historial hashrate data that reduces from 10s res to 1m res after a rolling 5m window. 2025-11-09 04:08:10 +00:00
Snider
6ac80d211a Add logOutput field to control stdout/stderr logging and update miner management 2025-11-09 03:10:55 +00:00
Snider
bda2416816 adds miner-cli, a miner management and lifecycle tool 2025-11-09 01:02:31 +00:00
copilot-swe-agent[bot]
c8aecba99c Complete Go 1.24 package with CLI, tests, and configuration
- Initialize Go module with dependencies
- Create core mining package with Manager, Miner, and MinerConfig
- Implement comprehensive tests with 100% coverage
- Create CLI using Cobra with start, stop, list, status commands
- Add demo main.go for development and testing
- Configure CodeRabbit for automated reviews
- Configure GoReleaser for multi-platform releases
- Add EUPL-1.2 license
- Create Makefile with common targets
- Update README with badges and documentation
- Add .gitignore for Go projects

Co-authored-by: Snider <631881+Snider@users.noreply.github.com>
2025-11-08 16:52:16 +00:00