Skip to content

Feature/332 cron job#340

Merged
felix-schultz merged 21 commits intodevfrom
feature/332-cron-job
Oct 21, 2025
Merged

Feature/332 cron job#340
felix-schultz merged 21 commits intodevfrom
feature/332-cron-job

Conversation

@felix-schultz
Copy link
Copy Markdown
Member

This pull request introduces several improvements and enhancements to the desktop app, focusing on better network awareness, query management, and UI consistency. The most significant changes include adding network status detection and handling to the app layout and library page, updating query client configuration for improved data fetching behavior, and making various UI and code style refinements across multiple components.

Network Awareness & Query Handling

  • Introduced useNetworkStatus and NetworkStatusIndicator to the app layout, along with a NetworkAwareProvider that refetches queries when the network reconnects (apps/desktop/app/layout.tsx). [1] [2] [3] [4]
  • Updated the query client configuration to use "always" network mode, set sensible defaults for stale time, garbage collection, refetching, and retry logic with exponential backoff (apps/desktop/app/layout.tsx).
  • On the library page, added logic to force query invalidation and refetch when an app is clicked, but only if online, leveraging the new network awareness hooks (apps/desktop/app/library/page.tsx). [1] [2] [3] [4] [5]

Dependency Updates

  • Updated several dependencies in Cargo.toml to their latest versions, including sea-orm, sentry-tracing, sentry, moka, aws-config, webp, aws-sdk-sts, and regex, ensuring improved stability and compatibility.

UI and Code Style Refinements

  • Improved UI consistency and code readability by adjusting props formatting, class name computations, and multi-line conditional rendering in various components (ImportEncryptedDialog, library/config/page.tsx, library/page.tsx). [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]

Bug Fixes & Minor Improvements

  • Fixed indentation and minor logic issues in table card and file picker logic, and improved event handling for file imports. [1] [2] [3] [4] [5]

These changes collectively improve the app's reliability, user experience, and maintainability.

- Introduced ICapabilities interface to define backend capabilities.
- Implemented capabilities method in EmptyBackend to return default capability values.
- Updated backend-state.ts to include ICapabilities interface.
- Refactored invoke_with_tools.rs to improve tool handling and response parsing.
- Enhanced error handling and logging for tool execution.
- Improved formatting and readability in `storage-system.tsx`, `bit-card.tsx`, and `dynamic-image.tsx`.
- Removed unnecessary blank lines and adjusted spacing in `mobile-header.tsx` for better code structure.
- Fixed export statement in `index.ts` for consistency.
- Updated CSS styles in `global.css` for better organization and readability.
- Streamlined method signatures in `user-state.ts` and `db-state.ts` for clarity.
- Enhanced user experience in `debug-auth.ts` by refining the prompt handling.
- Simplified error handling in `perform_ios_export` by removing unnecessary variable assignments.
- Streamlined icon presigning logic in `get_profiles` and `get_current_profile` functions.
- Optimized profile app management in `profile_update_app` by using `if let` for better clarity.
- Enhanced the update process in `update` by directly using content length without unnecessary mapping.
- Updated error handling in `ensure_app_dirs` to use `Error::other` for clarity.
- Cleaned up imports and removed unused ones across various modules.
- Improved conditional checks in multiple functions for better readability and performance.
- Adjusted formatting and spacing for consistency across the codebase.
- Added NFCSink, NotionSink, RSSSink, ShortcutSink, SlackSink, StorageSink, TelegramSink, WebWatcherSink, and WebhookSink with their respective structures.
- Introduced event sink commands for adding, removing, and listing event sinks.
- Enhanced the event bus functionality with commands for pushing events and managing personal access tokens (PAT).
- Updated flow execution to handle optional event channels.
- Initialized EventBus and EventSinkManager in the application setup.
- Improved JWT middleware to handle PATs correctly.
- Updated dependencies for linfa to version 0.8.0.
- Adjusted global download semaphore to allow a maximum of 10 concurrent downloads.
…ith event handling

- Introduced `PatSelectorDialog` component for selecting or creating PATs.
- Updated `EventsPage` to utilize PAT for event creation and activation.
- Enhanced `EventConfiguration` to check for offline status and prompt for PAT if required.
- Implemented logic to check if events require a sink based on event mapping.
- Added functionality to activate event sinks with PAT support.
- Refactored event handling to accommodate PAT selection and storage.
- Updated backend state interfaces to include methods for checking offline status and sink activity.
- Cleaned up unused exports and improved code organization.
- Removed unused event_bus_commands module and related functions.
- Updated event creation logic to handle Personal Access Tokens (PAT) more effectively.
- Enhanced logging for shared credentials and event processing.
- Updated dependencies in Cargo.toml and Cargo.lock for improved functionality.
- Refactored event state management to use 'pat' instead of 'personalAccessToken'.
- Improved error handling and user feedback in event processing.
- Added PAT selection dialog for events requiring a sink.
…y and performance

- Replaced println! statements with tracing::info! and tracing::debug! for better logging practices in cron.rs and manager.rs.
- Removed unnecessary debug prints and consolidated logging to enhance readability.
- Introduced path_utils module for handling field access in structs, supporting dot notation and array indexing.
- Updated GetStructFieldNode, HasStructFieldNode, and SetStructFieldNode to utilize new path_utils functions.
- Cleaned up shared_credentials method in hub.rs by removing excessive logging and improving error handling.
- Minor adjustments in pat-selector-dialog.tsx for code cleanliness.
- Renamed `events_api` to `events_generic` in event configuration for clarity.
- Enhanced logging in `event_bus.rs` to improve readability and maintainability.
- Simplified object creation in `event_bus.rs` by removing unnecessary line breaks.
- Updated HTTP sink logging in `http.rs` for better readability.
- Refactored event sink manager to improve logging and code clarity.
- Enhanced RSS sink error handling and logging.
- Updated generic event handling in `generic_event.rs` to improve payload processing.
- Fixed module visibility in `fields.rs` by ensuring `set_field` is publicly accessible.
- Improved error handling in `path_utils.rs` for better clarity in error messages.
- Enhanced layer editing menu to support editing node properties and improved pin management.
- Updated events page to use a destructive button style for delete actions.
- Refactored `save_registration` method to minimize lock duration on database connection.
- Improved event sink starting logic to avoid holding locks during asynchronous operations.
- Added support for new event types including HTTP, Discord, Email, and RSS sinks.
- Introduced `BufferedInterComHandler` for better event handling.
- Updated API configuration component to support testing API requests with dynamic payloads.
- Added network status indicator to provide feedback on online/offline status.
- Implemented hooks for network status management.
- Enhanced error handling and logging throughout the event registration process.
…ions and event handling

- Added detailed logging for event registration and configuration parsing in EventSinkManager.
- Updated DiscordSink structure to include new fields: bot_name, bot_description, channel_whitelist, channel_blacklist, respond_to_mentions, respond_to_dms, and command_prefix.
- Introduced a new GenericEventNode for handling Discord events with appropriate output pins.
- Created a comprehensive Discord configuration interface in the UI, allowing users to set bot token, name, description, intents, and channel filters.
- Implemented functionality for managing channel whitelists and blacklists within the Discord configuration.
- Updated event upsert logic to remove unnecessary debug logs.
- Registered new Discord-related functions in the interface index.
- Added support for handling deep links in the application.
- Introduced `handle_trigger` function to process deep link triggers and parse query parameters.
- Updated `DeeplinkSink` to manage registration and unregistration of deep link routes in the database.
- Created a new UI component for configuring deep links, allowing users to set paths and copy generated URLs.
- Enhanced event sink manager to support deeplink events and ensure proper registration.
- Added example usage and instructions for deep links in the UI.
- Simplified imports and removed unused dependencies in event_bus.rs, event_sink/cron.rs, event_sink/deeplink.rs, event_sink/discord.rs, event_sink/http.rs, event_sink/manager.rs, event_sink/rss.rs, and event_sink_commands.rs.
- Improved code readability by formatting and restructuring code blocks for better clarity.
- Enhanced error handling and logging for better debugging.
- Updated method calls to use more concise syntax where applicable.
- Ensured consistent use of semicolons and formatting across various files.
@felix-schultz felix-schultz linked an issue Oct 21, 2025 that may be closed by this pull request
@felix-schultz felix-schultz merged commit 2552f20 into dev Oct 21, 2025
3 of 10 checks passed
@felix-schultz felix-schultz deleted the feature/332-cron-job branch October 21, 2025 16:16
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.

Cron Job

1 participant