-
Notifications
You must be signed in to change notification settings - Fork 1
Centralized structured logging, enhanced error handling, and direct Wallpaper Engine downloads via steamcmd #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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
- Add Pino logger with pretty printing and environment-based log levels - Replace all console.log/error/warn calls with structured logging - Add comprehensive logging to all TRPC routes and main process functions: - API routes: pexels, pixabay, unsplash, wallhaven, wallpaper-engine - Core functionality: file operations, monitor detection, settings management - Wallpaper operations: search, set, thumbnail generation, theme generation - Include contextual metadata (input parameters, error details, execution status) - Add operation start/success/failure logging patterns for better observability - Fix error message in unsplash router (was incorrectly showing "Pexels API") - Improve error handling in wallpaper search and thumbnail generation
…es and videos tabs
… tabs - Added scaling options (stretch, fit, fill, center, tile) to Pexels, Pixabay, Unsplash, Wallhaven, and Wallpaper Engine tabs.
…s and utilities - Renamed generic T to more descriptive TWallpaper across wallpaper-related components, hooks, and types. - Updated OnWallpaperApply and OnWallpaperDownload to use TWallpaper for better readability and clarity. - Applied changes consistently in paginateData, dialog components, grid components, and TRPC route types.
…configuration hooks * Ensured `useQuery` in `useConfiguration` and `useSettings` explicitly specifies the return type. * Cast `client.settings.get.query` results to the appropriate `DotNotationValueOf<SettingsSchema, TConfigKey>` or generic `T`. * Updated `configValue` in `useWallpaperData` params to be optional for better type safety.
- Added `env-paths` dependency.
- Updated logger, wallpaper set, and thumbnail modules to use
platform-appropriate directories from `env-paths("walltone")`.
- Replaced hardcoded `os.homedir()` + `.cache` paths with `paths.cache`,
`paths.log`, and `paths.temp`.
- Removed unnecessary `os` imports.
…elopment - Added level to each stream in pino.multistream for both production and development. - Changed default log level from info to debug in development for more verbose output
This commit introduces direct downloading for Wallpaper Engine
wallpapers using `steamcmd` and overhauls the app's logging and error
handling.
### Wallpaper Engine Direct Downloads
- Replaces the previous "subscribe" method with a direct download flow.
- When applying a Wallpaper Engine wallpaper, a new dialog prompts the
user for their Steam credentials (username, password, and guard code).
- The backend now uses `steamcmd` to download the workshop item
directly, providing a more reliable way to acquire wallpapers.
- The `steamcmd` dependency has been added to the packaging
configurations.
### Centralized Logging and Error Handling
- Implemented a global **tRPC logging middleware** that automatically
logs all API calls, including duration and sanitized inputs (redacting
keys like `password` and `apiKey`). This removes redundant logging
statements throughout the codebase.
- A new **event-based error system** has been added. If a wallpaper
fails to apply on the backend, an event is emitted to the frontend,
which displays a toast notification to the user with the error details.
### Refactoring and Other Improvements
- **Remote Wallpaper Caching**: Wallpapers from all remote sources
(Pexels, Unsplash, etc.) are now downloaded to a local cache before
being applied, improving reliability.
- **Code Organization**:
- Centralized all application paths into a new `lib/paths.ts`
module.
- Extracted the `DynamicControls` component and
`useMonitorSelection` hook into their own files for better code
structure.
- **New Setting**: Added a "Kill Wallpaper on Exit" option in the
settings to terminate wallpaper processes when the application is
closed.
- **Improved `execute` Utility**: The command execution utility has been
refactored for cleaner logging and adds support for stdout/stderr
callbacks.
- Remove unused logger import from monitor route - Refactor wallpaper error subscription to emit error string directly - Update error emission in setWallpaper to send error message string instead of wrapped object - Adjust renderer subscription to handle error as string and show toast accordingly - Clean up unused imports in wallpaper-dialog hooks
Set NIXPKGS_ALLOW_UNFREE=1 in the GitHub Actions nix-build job to enable building packages with unfree licenses (e.g.,
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.
feat: implement structured logging with Pino across application
functions:
management
generation
execution status)
observability
API")
docs: update screenshot
fix: rename Pixabay filter key and title from color to colors in images and videos tabs
refactor: add scalingOptions support to all discover wallpaper source tabs
Pexels, Pixabay, Unsplash, Wallhaven, and Wallpaper Engine tabs.
chore: remove react-intersection-observer dependency and related imports
fix: ensure API key is typed as string when retrieving from settings
refactor: improve generic type naming for wallpaper-related components and utilities
wallpaper-related components, hooks, and types.
better readability and clarity.
components, and TRPC route types.
fix(types): add explicit generics to useQuery calls for settings and configuration hooks
useQueryinuseConfigurationanduseSettingsexplicitly specifies the return type.client.settings.get.queryresults to the appropriateDotNotationValueOf<SettingsSchema, TConfigKey>or genericT.configValueinuseWallpaperDataparams to be optional for better type safety.refactor: use
env-pathsfor cache, log, and temp directoriesenv-pathsdependency.platform-appropriate directories from
env-paths("walltone").os.homedir()+.cachepaths withpaths.cache,paths.log, andpaths.temp.osimports.refactor: set explicit log levels for streams and enable debug in development
development.
verbose output
refactor: Implement direct download via steamcmd
This commit introduces direct downloading for Wallpaper Engine
wallpapers using
steamcmdand overhauls the app's logging and errorhandling.
Wallpaper Engine Direct Downloads
user for their Steam credentials (username, password, and guard code).
steamcmdto download the workshop itemdirectly, providing a more reliable way to acquire wallpapers.
steamcmddependency has been added to the packagingconfigurations.
Centralized Logging and Error Handling
logs all API calls, including duration and sanitized inputs (redacting
keys like
passwordandapiKey). This removes redundant loggingstatements throughout the codebase.
fails to apply on the backend, an event is emitted to the frontend,
which displays a toast notification to the user with the error details.
Refactoring and Other Improvements
(Pexels, Unsplash, etc.) are now downloaded to a local cache before
being applied, improving reliability.
lib/paths.tsmodule.
DynamicControlscomponent anduseMonitorSelectionhook into their own files for better codestructure.
settings to terminate wallpaper processes when the application is
closed.
executeUtility: The command execution utility has beenrefactored for cleaner logging and adds support for stdout/stderr
callbacks.