Commit graph

3386 commits

Author SHA1 Message Date
Andrzej Martyna
cdb2d9e6dc Take Thread.Sleep out of OnFocusChanged 2025-12-30 09:12:07 +01:00
Jack Ye
75a03d0320
Fix typos
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-12-30 16:00:55 +08:00
Andrzej Martyna
736e3764e1 Resolved: several issues reported in PR 2025-12-29 23:53:15 +01:00
Andrzej Martyna
9d27bcf589 feat: added cleaning cache on tabs and windows closing 2025-12-29 23:53:15 +01:00
Jack Ye
d1e5b70759
Fix typos
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-29 18:50:14 +08:00
Jack Ye
a6acdd4c1a
Fix typos
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-29 18:45:34 +08:00
Jack Ye
791ff47c2f
Fix typos
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-29 18:05:54 +08:00
Andrzej Martyna
0f7ef77512 typo 2025-12-29 09:59:09 +01:00
Andrzej Martyna
1bac95dde4
Resolved: Use the wrapper property for consistent binding. by coderabbitai
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-12-29 09:54:04 +01:00
Andrzej Martyna
1f45c02bf1 Added TODO.md for ideas to improve 2025-12-29 09:38:18 +01:00
Andrzej Martyna
876cbfd006 Resolved: a few issues reported by coderabbitai 2025-12-29 09:13:35 +01:00
Andrzej Martyna
b390645718 Resolved: Revert changes in Non-English language. They will be updated automatically in Crowdin 2025-12-29 08:42:14 +01:00
Andrzej Martyna
7890102384 Resolved: Incorrect ClassName - copy-paste error. 2025-12-29 00:46:22 +01:00
Andrzej Martyna
f8c17807fa Resolved: Populate empty PackageUrl and Copyright fields for Flow.Launcher.Localization. 2025-12-29 00:39:58 +01:00
Andrzej Martyna
951ef814fa Resolved: Populate or clarify empty Type and Commit fields for BrowserTabs. 2025-12-29 00:34:11 +01:00
Andrzej Martyna
944e3d74a3 Resolved: Minor grammar and style corrections. 2025-12-28 23:50:58 +01:00
Andrzej Martyna
f2dd4d97f0 Resolved: Fix grammar: use 'its' instead of 'it's'. 2025-12-28 23:49:28 +01:00
Andrzej Martyna
ecfe8c302d Resolved: TabsTracker is not disposed - potential resource leak. 2025-12-28 23:46:38 +01:00
Andrzej Martyna
382dd791ff Update THIRD_PARTY_NOTICES 2025-12-28 23:41:16 +01:00
Andrzej Martyna
9a2e3408db remove self-marketing 2025-12-28 18:28:51 +01:00
Andrzej Martyna
c8bf643c28
Merge branch 'dev' into feat/reuse-tabs-in-bookmarks-plugin 2025-12-28 18:08:34 +01:00
Andrzej Martyna
df900f5919 small tweaks 2025-12-28 18:06:32 +01:00
Andrzej Martyna
20f898ce2e Additional attribution 2025-12-28 17:47:06 +01:00
Andrzej Martyna
02248eb971 Add ReuseTabs to Settings 2025-12-28 17:34:10 +01:00
Andrzej Martyna
c4549d663d Implement reusing of existing tabs 2025-12-28 17:32:20 +01:00
Jeremy Wu
ffb37d3e12
New Crowdin updates (#4127) 2025-12-25 17:06:56 +08:00
Jack Ye
bb1dfcde9b
Fix hide item option not working in Program plugin (#4141) 2025-12-25 07:01:47 +02:00
dependabot[bot]
b4ec480405
Bump Microsoft.Data.Sqlite from 10.0.0 to 10.0.1
---
updated-dependencies:
- dependency-name: Microsoft.Data.Sqlite
  dependency-version: 10.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-17 22:07:00 +00:00
Diego Henrique
9066913710
[FEATURE] Folder and File Action Keywords (#4093) 2025-12-14 12:18:21 +02:00
Jack Ye
a49eb464c8
Merge pull request #4129 from Flow-Launcher/dependabot/nuget/Plugins/Flow.Launcher.Plugin.Calculator/Mages-3.0.1
Bump Mages from 3.0.0 to 3.0.1
2025-11-26 18:33:53 +08:00
Jack Ye
48f67b1886
Improve and fix query result update logic issue & provide access to exact query typed by user (#3502) 2025-11-26 21:15:12 +11:00
dependabot[bot]
ce4a37b292
Bump Mages from 3.0.0 to 3.0.1
---
updated-dependencies:
- dependency-name: Mages
  dependency-version: 3.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-25 22:35:13 +00:00
Jeremy Wu
533a58d083
New Crowdin updates (#4051) 2025-11-20 18:26:31 +08:00
dependabot[bot]
3492aac2c0
Bump Microsoft.Data.Sqlite from 9.0.10 to 10.0.0
---
updated-dependencies:
- dependency-name: Microsoft.Data.Sqlite
  dependency-version: 10.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-11 22:07:56 +00:00
Jack251970
2adbc334a2 Improve semaphore lock handling and code robustness
Added `lockAcquired` flags in `PluginsManifest.cs` and `Main.cs`
to ensure semaphore locks are only released if successfully
acquired, preventing potential runtime errors. Updated `finally`
blocks to conditionally release locks based on these flags.

Removed redundant cancellation check in `EverythingAPI.cs` to
simplify code, assuming cancellation is handled elsewhere. These
changes enhance reliability and maintainability of the codebase.
2025-11-07 15:30:07 +08:00
Jack251970
05c8dd2fe1 Remove unnecessary debug information 2025-11-06 20:48:41 +08:00
Jack251970
88fd1e56d0 Handle OperationCanceledException gracefully
Added a `catch` block for `OperationCanceledException` in
`PluginsManifest.cs` to ignore canceled operations. Updated
`EverythingAPI.cs` to use cancellation tokens with `_semaphore.WaitAsync`
and handle cancellations by exiting the method cleanly with `yield break`.
2025-11-06 20:47:54 +08:00
Jack251970
49f89e33b5 Make locking operations cancelable with tokens
Updated `_semaphore.WaitAsync` in `EverythingAPI.cs` to accept a `CancellationToken` and handle `OperationCanceledException` gracefully, returning `false` instead of propagating the exception.

Refactored locking mechanisms in `Main.cs` to use `CancellationToken` for `_win32sLock` and `_uwpsLock`. Added `try-catch` blocks to handle `OperationCanceledException` and ensure proper lock release. Methods now return `emptyResults` when operations are canceled.
2025-11-06 20:46:29 +08:00
Jack251970
d0a47c84b9 Clarify CancellationToken handling in comments
Updated comments to explain the rationale for not directly passing
CancellationToken to methods and instead checking
IsCancellationRequested within locks. This prevents unexpected
OperationCanceledException. Changes made in EverythingAPI.cs
(IsEverythingRunningAsync) and Main.cs (Win32 and UWP program
preparation). No functional changes to the code.
2025-11-06 15:39:19 +08:00
Jack251970
bfaff5cca5 Improve semaphore usage and logging clarity
Added comments in `EverythingAPI.cs` and `Main.cs` to explain
why `CancellationToken` is not directly passed to semaphore
locks, preventing unexpected `OperationCanceledException`.

Updated debug log messages in `Main.cs` for better clarity,
including changing "Start handling programs" to "Start querying
programs". Removed redundant log messages to improve logging
consistency.
2025-11-06 15:32:08 +08:00
Jack251970
30d7f67d42 Refactor token cancellation check for readability
Simplified the `if` statement that checks for token cancellation
by condensing it into a single line. This improves code readability
and eliminates unnecessary line breaks.
2025-11-06 15:30:32 +08:00
Jack251970
7e332fa615 Refactor caching and indexing logic
Added `ResetCache` calls after clearing `_win32s` and `_uwps` lists to ensure proper cache reset during indexing. Updated logic to return `resultList` after setting cache size and expiration for improved clarity. Removed `await Task.WhenAll` to adjust asynchronous flow in the indexing process.
2025-11-06 15:29:38 +08:00
Jack251970
3d8fd1d352 Improve cancellation, locking, and logging mechanisms
Enhanced cancellation handling by adding `token.IsCancellationRequested` checks to improve responsiveness. Refactored locking mechanisms for `_win32sLock` and `_uwpsLock` using `try-finally` blocks to ensure proper acquisition and release, improving thread safety and preventing deadlocks.

Reorganized Win32 and UWP program querying logic for better modularity and readability. Replaced shared collection access with local variables to improve clarity and maintain thread safety. Simplified empty result handling by directly returning `emptyResults` when canceled.

Removed redundant debug log statements to reduce verbosity and updated remaining logs for clarity. Suppressed unused result warnings by replacing direct calls to `EverythingApiDllImport.Everything_GetMajorVersion()` with null-coalescing assignments.
2025-11-06 15:28:13 +08:00
Jack251970
db0c86d50c Remove CancellationToken from semaphore WaitAsync calls
Removed the `CancellationToken` parameter from `WaitAsync` calls
on semaphores in `EverythingAPI.cs` and `Main.cs`. This change
eliminates cancellation support for semaphore waits, likely due
to a design decision prioritizing simplicity or avoiding issues
with cancellation handling.

In `EverythingAPI.cs`, `WaitAsync(token)` was replaced with
`WaitAsync()` in two methods. Similarly, in `Main.cs`, the
`WaitAsync` calls for `_win32sLock` and `_uwpsLock` were updated
to remove the `token` parameter.

Note: This change may impact the ability to gracefully handle
cancellation during semaphore waits.
2025-11-04 14:25:55 +08:00
Jack251970
6e17d5d756 Improve logging for Win32 program lock acquisition
Added a debug log statement to indicate when the lock for
querying Win32 programs is being acquired. This enhances
granularity in logging, making it easier to distinguish
between the acquisition of locks for Win32 and UWP programs.
Improves traceability and debugging of the program's
execution flow.
2025-11-04 12:27:59 +08:00
Jack251970
4cf942ac3a Add detailed debug logging for query execution process
Enhanced logging to provide better traceability and insights:
- Added debug logs for query reception, cache misses, and lock acquisition.
- Logged query cancellation and completion with result counts.
- Added logs for caching results, including item counts and query details.
- Improved logging for filtering and program selection processes.
- Ensured no functional changes to existing query and filtering logic.
2025-10-26 21:01:07 +08:00
Jack251970
f632a4b773 Add caching to QueryAsync and integrate cache reset logic
Introduced a MemoryCache to improve QueryAsync performance by
caching query results, reducing redundant computations. Added
a ResetCache method to reinitialize the cache when settings
are updated. Integrated cache reset calls into settings
property setters to ensure consistency.

Refactored query logic to leverage MemoryCache.GetOrCreateAsync
for streamlined caching. Removed redundant code and debug
logging for improved readability and maintainability. Ensured
thread safety with proper locking mechanisms. Simplified and
consolidated caching logic for better maintainability.
2025-10-26 20:59:29 +08:00
Jack251970
e2fa122362 Improve program indexing with logging and thread safety
Added detailed debug logging to `IndexWin32ProgramsAsync` and
`IndexUwpProgramsAsync` to track the indexing process, including
preparation, start, retrieval, caching, and completion.

Replaced direct updates to `_settings.LastIndexTime` with a
thread-safe lock to prevent race conditions.

Enhanced `IndexProgramsAsync` with a debug log to indicate the
start of indexing for better traceability.

Updated program retrieval logic to process Win32 and UWP programs
in parallel with cancellation support and applied the
`HideUninstallersFilter` for cleaner results.
2025-10-26 20:56:08 +08:00
Jack251970
6a65f8090f Enhance thread safety and refactor reindexing logic
Introduced `_lastIndexTimeLock` to ensure thread-safe access
and updates to `_settings.LastIndexTime`, preventing race
conditions. Refactored reindexing logic to use a `lock` block
for evaluating and updating the reindexing condition.

Added `emptyResults` as a static readonly placeholder list.
Improved code clarity and maintainability without altering
existing functionality.
2025-10-26 20:51:08 +08:00
Jack251970
637d926f7a Remove caching logic and initialize emptyResults list
The caching-related code, including `cacheOptions` and `cache`, has been removed from `Main.cs`, indicating that the caching mechanism is no longer in use or has been refactored elsewhere. Additionally, the `emptyResults` list is now explicitly initialized as an empty list (`[]`). No changes were made to the `Context` property or the `commonUninstallerNames` array.
2025-10-26 20:41:06 +08:00