Commit Graph
14 Commits
Author SHA1 Message Date
Tarasov AleksandrandGitHub 0c3d7cbd35 feat(gui): better search with automatic tree expansion, directories scanning and caching 2026-07-24 23:49:10 +03:00
Tarasov AleksandrandGitHub 65ae8589db feat(lib, daemon, cli, gui): add volume multiplier (#175)
* initial implementation

* rename DaemonConfig.volume_multiplier to default_volume_multiplier

* add volume_multiplier to the FullState

* add pwsp-gui integration
2026-07-24 05:33:51 +03:00
Tarasov AleksandrandGitHub a33d023950 feat(daemon, cli): global DaemonConfig and an ability to get/save it using cli (#174)
* use one global Arc<DaemonConfig>

* implement commands

* replace Arc<DaemonConfig> with Arc<Mutex<DaemonConfig>> and fix pwsp-gui

* add pwsp-cli support

* replace serde_json::to_string_pretty with to_string

* refactor

* implement UpdateDaemonConfigCommand and use it in pwsp-gui so it now uses real in-memory config, not the saved one

* implement utils::gui get_daemon_config and update_daemon_config to simplify code
2026-07-24 04:49:51 +03:00
6130a99c4b fix(lib): don't create '~' in $HOME (#166)
* fix(lib): don't create '~' in $HOME

* throw an error wen fail to get home directory

---------

Co-authored-by: arabian <a.tevg@ya.ru>
2026-07-20 19:02:10 +03:00
arabianq 5fef42a2e2 cargo fmt 2026-07-07 19:29:48 +03:00
Tarasov AleksandrGitHubgoogle-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
4f8f663f12 fix(pwsp-gui): fix arbitrary file overwrite via path traversal (#159)
* Fix path traversal vulnerability in audio download logic

Co-authored-by: arabianq <55220741+arabianq@users.noreply.github.com>

* std::path::Path -> Path

* add random id to the filename if it's unknown

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-07-07 19:29:12 +03:00
Tarasov AleksandrGitHubgoogle-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
6ccc55a1d0 perf(pwsp-gui): optimize gui file filtering performance (#160)
Avoid unnecessary string cloning and allocation in `pwsp-gui/src/gui/mod.rs` when checking if a file matches the search query.

Specifically, we replaced `.to_string_lossy().to_string()` with `.to_string_lossy()` because `.to_lowercase()` directly works on `Cow<str>`, avoiding an intermediate String allocation.

Measured improvement was verified using an isolated benchmark demonstrating roughly 10-15% reduction in execution time.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-07-07 19:00:16 +03:00
arabianq ba920473c7 refactor: deprecated CentralPanel::show_inside -> show 2026-07-01 18:03:34 +03:00
arabianq dfb5985e4a fix: egui 0.35.0 changes 2026-07-01 18:03:00 +03:00
Tarasov AleksandrGitHubgoogle-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
9a0bc92222 refactor(gui): pre-filter directory contents by supported extension (#136)
*  [performance] pre-filter directory contents by supported extension

💡 **What:** Moved the check for supported audio file extensions from the GUI rendering loop into the directory read/caching layer.
🎯 **Why:** The file extension string parsing and check was executing on every frame of the render loop for every file listed, causing unnecessary CPU overhead. By caching the pre-filtered items, we only execute the check once per directory load.
📊 **Measured Improvement:** In a micro-benchmark simulating 10k files (with 50% matching extensions), the unoptimized loop took ~14.2ms to execute, while the optimized loop takes ~5.8ms. This yields a ~59% speed improvement in the iteration logic over the baseline.

Co-authored-by: arabianq <55220741+arabianq@users.noreply.github.com>

*  [performance] pre-filter directory contents by supported extension

💡 **What:** Moved the check for supported audio file extensions from the GUI rendering loop into the directory read/caching layer.
🎯 **Why:** The file extension string parsing and check was executing on every frame of the render loop for every file listed, causing unnecessary CPU overhead. By caching the pre-filtered items, we only execute the check once per directory load.
📊 **Measured Improvement:** In a micro-benchmark simulating 10k files (with 50% matching extensions), the unoptimized loop took ~14.2ms to execute, while the optimized loop takes ~5.8ms. This yields a ~59% speed improvement in the iteration logic over the baseline.

Flatpak cargo-sources.json regenerated to include criterion dependency to fix CI.

Co-authored-by: arabianq <55220741+arabianq@users.noreply.github.com>

* chore: remove criterion bench dependency from gui app

This removes the `bench.rs` and `criterion` dependencies, which failed to compile in offline flatpak builds.

CI build is now fixed.

Co-authored-by: arabianq <55220741+arabianq@users.noreply.github.com>

* cargo fmt

* deps: update cargo-sources.json

* chore: update cargo lock and flatpak sources

After removing criterion, the cargo lockfile and flatpak sources have been refreshed to properly remove the offline build dependencies issue.

Co-authored-by: arabianq <55220741+arabianq@users.noreply.github.com>

* Revert "chore: update cargo lock and flatpak sources"

This reverts commit 27379d8e78.

[no ci]

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-06-25 23:23:14 +03:00
Tarasov AleksandrandGitHub 410a2c7959 feat(gui): sorting options (#134)
* feat(gui): added an ability to copy ```pwsp-cli action play``` command for every sound

* feat(gui): added files sorting options
2026-06-04 20:14:28 +03:00
Tarasov AleksandrandGitHub c173e602ad feat(gui): added an ability to copy ``pwsp-cli action play`` command for every sound (#133) 2026-06-04 20:06:35 +03:00
Tarasov AleksandrandGitHub e91465365d feat: better testing (#131)
* add tests

* update github actions to include testing step

* optimization
2026-06-02 21:37:22 +03:00
Tarasov AleksandrGitHubgoogle-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
0476329798 Refactor to Cargo Workspace (#129)
* Refactor project into a Cargo workspace with distinct packages

- Created a root `Cargo.toml` defining a workspace.
- Moved `src/types` and `src/utils` into a new `pwsp-lib` crate for shared logic.
- Split binaries into their own crates: `pwsp-daemon`, `pwsp-cli`, and `pwsp-gui`.
- Shifted all dependencies into `[workspace.dependencies]` for centralized version management.
- Updated import paths across all crates (e.g. from `pwsp::` to `pwsp_lib::`).
- Updated build scripts, GitHub actions, Flatpak manifest, and AUR PKGBUILD to support the new workspace structure.
- Ensured no core application logic was altered.

Co-authored-by: arabianq <55220741+arabianq@users.noreply.github.com>

* Fix cargo-deb build process in GitHub actions for workspace architecture

Co-authored-by: arabianq <55220741+arabianq@users.noreply.github.com>

* Fix cargo-deb asset discovery by using exact target/release paths

Co-authored-by: arabianq <55220741+arabianq@users.noreply.github.com>

* refactor deps in Cargo.toml files

* fix incorrect assets path

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-06-02 21:12:44 +03:00