398 Commits

Author SHA1 Message Date
SteveLauC
13a0a2ebc1 fix: default hide_before_open to true only for Command extensions (#1078)
* fix: default hide_before_open to true only for Command extensions

* style: format code
2026-06-23 10:52:00 +08:00
ayangweb
e6c48a2269 fix: fix deep research cancel state (#1076)
* fix deep research cancel state

* fix: append integration id to web urls
2026-06-18 18:58:43 +08:00
ayangweb
4df541f7ce fix: resolve fst-no-std version conflict causing pizza-engine CI check failure (#1074)
* feat: add deep research report workflow and viewer

* docs: update  changelog

* ci: update pizza repository reference from infinilabs to pizza-rs org

* fix deep research completion state

* fix: prevent deep research stream timeout

* fix: update deep research cancel copy

* fix: apply rustfmt formatting to attachment.rs

* fix: resolve fst-no-std version conflict in pizza-engine CI check

The 'check (macos-latest)' CI job fails because pizza-engine (added as a
CI dependency) uses infinilabs/fst-no-std while its transitive dependency
fst-regex uses pizza-rs/fst-no-std. Cargo treats these as two separate
crates, causing:

1. Automaton trait incompatibility between the two fst_no_std instances
2. MapBuilder, Error::Io, and Set::from_iter not found because the
   infinilabs fork gates them behind 'std' feature while pizza-engine
   only enabled 'alloc'

Fix:
- Add [patch."https://github.com/infinilabs/fst-no-std"] to
  src-tauri/Cargo.toml to redirect the infinilabs fork to
  pizza-rs/fst-no-std, unifying both into a single crate instance.
  This patch is a no-op for normal builds without pizza-engine.
- Update the CI workflow to also add fst-no-std with std feature so that
  Error::Io (gated by std) and MapBuilder are available after the redirect.

* Update Cargo.toml

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Medcl <m@medcl.net>
2026-06-18 17:11:51 +08:00
ayangweb
4cdf1f5eb1 feat: add macOS entitlements and configuration files for app distribution (#1070) 2026-05-22 14:26:19 +08:00
Copilot
71a51f6644 fix: hide coco window immediately on command click, don't wait for execution (#1060)
* fix: hide coco window immediately when command is clicked instead of waiting for execution

Agent-Logs-Url: https://github.com/infinilabs/coco-app/sessions/ae6ee959-b1c8-4572-97e6-7e296df4c2e4

Co-authored-by: medcl <64487+medcl@users.noreply.github.com>

* fix: improve error message with context about what failed to open

Agent-Logs-Url: https://github.com/infinilabs/coco-app/sessions/ae6ee959-b1c8-4572-97e6-7e296df4c2e4

Co-authored-by: medcl <64487+medcl@users.noreply.github.com>

* refactor: return invoke and OpenURLWithBrowser directly instead of separate return

Agent-Logs-Url: https://github.com/infinilabs/coco-app/sessions/da71fbd8-a50a-4d8e-a9a4-812b6f7ef7a6

Co-authored-by: ayangweb <75017711+ayangweb@users.noreply.github.com>

* refactor: use platformAdapter.error for logging in openSearchItem catch block

Agent-Logs-Url: https://github.com/infinilabs/coco-app/sessions/988a7dd9-ec9c-44c5-9029-248702d81d05

Co-authored-by: ayangweb <75017711+ayangweb@users.noreply.github.com>

* fix: default hide_before_open to true in Rust, revert TypeScript changes

Agent-Logs-Url: https://github.com/infinilabs/coco-app/sessions/6566765b-a0bf-4746-8265-a8cdd68c8478

Co-authored-by: SteveLauC <96880612+SteveLauC@users.noreply.github.com>

* chore: remove package-lock.json added by npm install

Agent-Logs-Url: https://github.com/infinilabs/coco-app/sessions/0a03f1be-945d-4cbd-b0a6-0417cbd65205

Co-authored-by: SteveLauC <96880612+SteveLauC@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: medcl <64487+medcl@users.noreply.github.com>
Co-authored-by: ayangweb <75017711+ayangweb@users.noreply.github.com>
Co-authored-by: SteveLauC <96880612+SteveLauC@users.noreply.github.com>
2026-05-13 09:16:57 +08:00
Copilot
65c0531492 feat: add Open Camera window for webcam preview, photo capture, and mirror toggle (#1064)
* feat: add Open Camera feature with live preview, photo capture, mirror toggle, and camera switching

Agent-Logs-Url: https://github.com/infinilabs/coco-app/sessions/e874b626-f179-4d54-bc6c-c239394459e3

Co-authored-by: medcl <64487+medcl@users.noreply.github.com>

* fix: address code review feedback - add error logging, remove invisible button, document eslint-disable

Agent-Logs-Url: https://github.com/infinilabs/coco-app/sessions/e874b626-f179-4d54-bc6c-c239394459e3

Co-authored-by: medcl <64487+medcl@users.noreply.github.com>

* refactor: convert camera from dedicated window to built-in extension with permission handling

- Create Open Camera built-in extension (search source in Rust)
- Add camera permission check/request via macOS permissions plugin
- Render camera inline in main Coco window (not a separate window)
- Add com.apple.security.device.camera entitlement
- Remove dedicated camera window, tray menu entry, and window commands
- Add cameraOpened state to search store for navigation support
- Handle Escape/Back navigation for camera view

Agent-Logs-Url: https://github.com/infinilabs/coco-app/sessions/bb996add-d287-464c-bc53-c69167630351

Co-authored-by: medcl <64487+medcl@users.noreply.github.com>

* fix: address code review feedback - fix permission check flow, remove duplicate cleanup, fix type

Agent-Logs-Url: https://github.com/infinilabs/coco-app/sessions/bb996add-d287-464c-bc53-c69167630351

Co-authored-by: medcl <64487+medcl@users.noreply.github.com>

* fix: camera not displaying video due to missing CSP media-src, secure context, and stream lifecycle issues

Three root causes fixed:
1. CSP missing media-src directive - Added media-src with blob: and mediastream:
   schemes to allow camera streams in the webview
2. Missing useHttpsScheme - Added to main window config to ensure secure context
   required by getUserMedia API on macOS WKWebView
3. Camera.tsx stream lifecycle - Rewrote initialization to use a single sequential
   flow (permission → getUserMedia → enumerate → assign) instead of three
   separate useEffects with circular dependency issues. Uses refs for stream
   tracking to prevent stale closure bugs in cleanup.

Agent-Logs-Url: https://github.com/infinilabs/coco-app/sessions/f3b86e6b-3ce2-423d-a5a1-c3a5f4e115f2

Co-authored-by: medcl <64487+medcl@users.noreply.github.com>

* fix: tighten CSP media-src directive and add permission polling timeout

- Remove overly permissive https:/http: from media-src (only need self/blob/mediastream)
- Remove unnecessary img-src override (falls back to default-src)
- Add 60-second timeout to camera permission polling to prevent infinite loops
- Check cancelled flag during polling to support component unmount

Agent-Logs-Url: https://github.com/infinilabs/coco-app/sessions/f3b86e6b-3ce2-423d-a5a1-c3a5f4e115f2

Co-authored-by: medcl <64487+medcl@users.noreply.github.com>

* feat: add Open Camera functionality with icon and translations

* fix: remove unused setCameraOpened from SearchResultsPanel

* feat: update platform adapters to include saveFileDialog method for Tauri and Web

* fix: streamline camera search source registration in built-in extension

* refactor: update extension icon

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: medcl <64487+medcl@users.noreply.github.com>
Co-authored-by: ayangweb <473033518@qq.com>
2026-05-13 09:16:32 +08:00
ayangweb
26a7da4633 feat: implement window position saving and restoring across monitors (#1063) 2026-05-07 11:05:32 +08:00
SteveLauC
aa1732413c fix(logging): include webview target in production log level config (#1059)
* fix(logging): include webview target in production log level config

In production mode, COCO_LOG was set to 'coco_lib=trace' which caused
the global log level to be set to Off first, then only coco_lib module
was enabled. This silently dropped all frontend logs whose target is
'webview', making them disappear in packaged builds while working fine
in dev mode (which uses the default Info level for all targets).

Fix by adding 'webview=trace' to the COCO_LOG value so frontend logs
are also captured in the log file when running the packaged app.

* docs: release notes
2026-04-21 11:24:41 +08:00
Copilot
963567564d feat: support comma thousand separators in calculator expressions (#1052)
* Initial plan

* feat(calculator): support comma thousand separators in number input

Add strip_thousand_separators() function to remove commas between digits
so that expressions like '5,032,104/171' are properly evaluated.
The original query string with commas is preserved for display.

Co-authored-by: medcl <64487+medcl@users.noreply.github.com>
Agent-Logs-Url: https://github.com/infinilabs/coco-app/sessions/929459f7-054d-4855-bcf5-b1fd68ce0cd3

* style(calculator): fix rustfmt formatting in test assertions

Co-authored-by: medcl <64487+medcl@users.noreply.github.com>
Agent-Logs-Url: https://github.com/infinilabs/coco-app/sessions/46a6663e-81ef-4c41-a047-d0e1232cc722

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: medcl <64487+medcl@users.noreply.github.com>
2026-03-23 16:18:59 +08:00
BiggerRain
b0cdaa3ec8 fix: force check window to center on every show (#1044) 2026-01-05 16:41:14 +08:00
BiggerRain
341682aed0 chore: remove deep-link to settings (#1038)
* chore: remove deep-link to settings

* chore: delete comment

* chore: delete comment
2025-12-31 14:14:46 +08:00
SteveLauC
90e787058c fix: apply local results weight to scores generated by rerank() (#1036)
* fix: apply local results weight to scores generated by rerank()

We have two kinds of scores:

1. Scores calculated by query sources
2. In the post-search phase, we re-score the documents in
   `boosted_levenshtein_rerank()`

When applying the setting "local search results weight", previous
implementation modified the first score. Its effect was not noticeable,
since we collect documents evenly from the hits returned by query sources.

This commit refactors the implementation so that the setting adjusts the
second score, making the effect obvious.

* refactor: keep O(1) lookup && update var names

* chore: one more var name to update
2025-12-30 14:26:01 +08:00
SteveLauC
e019206fcd feat: new config ui.hide_scrollbar (#1031)
* feat: new config ui.hide_scrollbar

* feat: front end supports hide_scrollbar

---------

Co-authored-by: rain9 <15911122312@163.com>
2025-12-26 15:55:04 +08:00
SteveLauC
20597b2e86 feat: read localized names from root InfoPlist.strings (#1029)
* feat(mac): read localized names from root InfoPlist.strings

* release notes
2025-12-25 15:35:16 +08:00
ayangweb
913572756c feat: add search filter (#1014)
* feat: add search filter

* refactor: update

* debugging: print query strings

* refactor: update

* refactor: update

* refactor: update

* refactor: update

* refactor: update

* update

* update

* update

* style: remove unless file

* update

* update

* pass v2=true to coco server

* print response body string

* pass request body

* chore: up

* refactor: update

* refactor: update

* refactor: update

* refactor: update

* refactor: update

* refactor: update

* refactor: update

* Bucket.label

* refactor: update

* refactor: update

* refactor: update

* refactor: update

* filter

* refactor: update

* fix: source ID filter

* refactor: update

* refactor: update

* fix: source ID filter

* refactor: update

* fix: when field buckets does not exist

* refactor: update

* refactor: update

* refactor: update

* refactor: update

* refactor: update

* refactor: update

* docs: document supported query strings

* refactor: update

* refactor: update

* refactor: update

* refactor: update

* remove debugging printlns

* move clean_aggregations() to common/search.rs

* fix import

* typo filer->filter

* refactor: update

* refactor: update

* refactor: update

* refactor: update

* refactor: update

* refactor: update

* refactor: update

* refactor: update

* update

* update filter=updated filter=created format

---------

Co-authored-by: Steve Lau <stevelauc@outlook.com>
Co-authored-by: rain9 <15911122312@163.com>
2025-12-25 14:03:59 +08:00
SteveLauC
e5ff39b806 refactor: add a timeout to open() (#1025)
Adds a 500ms timeout to open(), to prevent the open action that hangs
from hanging indefinitely.
2025-12-25 13:23:57 +08:00
SteveLauC
b5afed45e2 feat: support app search even if Spotlight is disabled (#1028)
* feat: support app search even if Spotlight is disabled

Previously, we relied on Spotlight (mdfind) to fetch the app list,
which means it won't work if users disable their Spotlight index.

This commit bumps the applications-rs library, which can now list
apps using `lsregister`, macOS's launch service tool. (See commit [1]
for details). With this, our app search works even tough Spotlight
is disabled.

[1]: ec174b7761

* release notes
2025-12-25 09:02:50 +08:00
BiggerRain
03af1d46c5 fix: skip window resize when UI size is missing (#1023)
* fix: skip window resize when UI size is missing

* chore: padding

* chore: update

* refactor: update

* chore: height

* chore: height

* chore: defalut value

---------

Co-authored-by: ayang <473033518@qq.com>
2025-12-23 22:02:19 +08:00
BiggerRain
7a4364665e chore: bump version to 0.10.0 (#1022) 2025-12-19 17:56:32 +08:00
SteveLauC
f483ce4887 feat: resizable extension UI (#1009)
* wip

* define config entries: width/height/resizable/detachable

* chore: window size

* fix: add default values for ViewExtensionUiSettings fields

* chore: open

* chore: add window size set

* wip

* chore: window size

* define config entries: width/height/resizable/detachable

* chore: open

* fix: add default values for ViewExtensionUiSettings fields

* chore: add window size set

* chore: up

* fix: consle error

* chore: up

* chore: up

* chore: up

* chore: up

* refactor: update

* fix: page error about install

* chore: up

* chore: ci error

* docs: update release notes

* style: adjust styles

---------

Co-authored-by: rain9 <15911122312@163.com>
Co-authored-by: ayang <473033518@qq.com>
2025-12-19 09:01:51 +08:00
BiggerRain
f7c0600480 feat: add open button to launch installed extension (#1013)
* chore: up

* support query string main_extension_id

* chore: up

* fix tests

* open non-group/extension extensions

* dbg

* chore: upadate

* extension SearchSource now accepts empty querystring

* update

* chore: open

* chore: input

* remove DBG statements

* chore: icon

* style: adjust styles

* docs: update release notes

---------

Co-authored-by: Steve Lau <stevelauc@outlook.com>
2025-12-18 15:50:26 +08:00
SteveLauC
abf20f81ff refactor: treat Applications and File Search as normal extensions (#1012)
I was digging into an issue that the "File Search" extension does
not appear in the extension list under some cases, then I realized
that, in list_extensions(), "File Search" is another extension that
needs to be processed separately, just like the "Applications"
extension.

Both extensions are of type group/extension, which semantically should
behave like a folder, i.e., they contain sub-extensions, but they
do not. In our implementation, they are more like command extensions.

So we treat them as normal extensions in list_extensioins().
2025-12-17 15:08:01 +08:00
SteveLauC
65a48efdde fix: implement custom serialization for Extension.minimum_coco_version (#1010)
Coco's version string does not adhere to semver's spec, so we had to
write a custom deserialization impl to do the conversion:

```
0.9.1-SNPASHOT-2560 => 0.9.1-SNAPSHOT.2560
```

But we forget to serialize versions to Coco's format when writing
extensions to disk. When Coco reads extension from disk, it sees
valid semantic versions, which are not expected:

```
[WAR] [third_party:167] invalid extension: [base64-converter]:
  field [minimum_coco_version] has invalid version:
    failed to parse build number 'SNAPSHOT.2560'', caused by: ['invalid digit found in string']
```

This commit provides a custom serialization impl to fix the issue.
2025-12-16 15:29:36 +08:00
BiggerRain
378d5aef69 chore: hide selection function (#1003) 2025-12-05 17:58:40 +08:00
SteveLauC
10ee3cd9d3 chore: bump version to 0.9.1 (#1001) 2025-12-05 15:43:59 +08:00
BiggerRain
97d2450fa7 feat: selection settings add & delete (#992)
* feat: add selection window page

* fix: chat input

* feat: add selection page

* chore: add

* chore: test

* feat: add

* feat: add store

* feat: add selection settings

* chore: remove unused code

* docs: add release note

* docs: add release note

* chore: format code

* chore: format code

* fix: copy error

* disable hashbrown default feature

* Enable unstable feature allocator_api

To make coco-app compile in CI:

```
--> /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/hashbrown-0.15.5/src/raw/mod.rs:3856:12
     |
3856 | impl<T, A: Allocator> RawIntoIter<T, A> {
     |            ^^^^^^^^^
     |
     = note: see issue #32838 <https://github.com/rust-lang/rust/issues/32838> for more information
     = help: add `#![feature(allocator_api)]` to the crate attributes to enable
     = note: this compiler was built on 2025-06-25; consider upgrading it if it is out of date
```

I don't know why it does not compile, feature `allocator-api2` is
enabled for `hashbrown 0.15.5`, so technically [1] it should not use the
allocator APIs from the std. According to [2], enabling the `nightly`
feature of `allocator-api2` may cause this issue as well, but it is not
enabled in our case either.

Anyway, enabling `#![feature(allocator_api)]` should make it work.

[1]: b751eef8e9/src/raw/alloc.rs (L26-L47)
[2]: https://github.com/rust-lang/hashbrown/issues/564

* put it in main.rs

* format main.rs

* Enable default-features for hashbrown 0.15.5

* format main.rs

* enable feature allocator-api2

* feat: add selection set config

* fix: selection setting

* fix: ci error

* fix: ci error

* fix: ci error

* fix: ci error

* merge: merge main

* fix: rust code warn

* fix: rust code error

* fix: rust code error

* fix: selection settings

* style: selection styles

* style: selection styles

* feat: selection settings add & delete

* feat: selection settings add & delete

* feat: selection settings add & delete

* style: selection styles

* chore: add @tauri-store/zustand plugin

* refactor: the selection store using @tauri-store/zustand

* fix: data error

* fix: data error

* chore: remove config

* chore: selection

* chore: selection

* chore: width

* chore: ignore selection in the app itself

* style: selection styles

* style: remove

* docs: add notes

* chore: add permission check

* chore: selection

* chore: style & store

---------

Co-authored-by: Steve Lau <stevelauc@outlook.com>
2025-12-05 15:32:57 +08:00
BiggerRain
3b80eb77b4 chore: adjust the position of the compact mode window (#997)
* chore: adjust the position of the compact mode window

* docs: update release note

* chore: adjust code

* chore: adjust code
2025-12-05 10:46:37 +08:00
BiggerRain
82074ab46a chore: change the default port of the tauri project (#999) 2025-12-05 09:38:54 +08:00
SteveLauC
3052878869 refactor: error handling in install_extension interfaces (#995)
* refactor: error handling in install_extension interfaces

* fmt

* fix build

* release notes
2025-12-02 15:39:44 +08:00
BiggerRain
73ca224ad8 refactor: the selection store using @tauri-store/zustand (#994)
* chore: add @tauri-store/zustand plugin

* refactor: the selection store using @tauri-store/zustand

* fix: data error

* fix: data error

* chore: remove config
2025-11-28 17:29:36 +08:00
BiggerRain
ff7721d17f feat: add selection toolbar window for mac (#980)
* feat: add selection window page

* fix: chat input

* feat: add selection page

* chore: add

* chore: test

* feat: add

* feat: add store

* feat: add selection settings

* chore: remove unused code

* docs: add release note

* docs: add release note

* chore: format code

* chore: format code

* fix: copy error

* disable hashbrown default feature

* Enable unstable feature allocator_api

To make coco-app compile in CI:

```
--> /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/hashbrown-0.15.5/src/raw/mod.rs:3856:12
     |
3856 | impl<T, A: Allocator> RawIntoIter<T, A> {
     |            ^^^^^^^^^
     |
     = note: see issue #32838 <https://github.com/rust-lang/rust/issues/32838> for more information
     = help: add `#![feature(allocator_api)]` to the crate attributes to enable
     = note: this compiler was built on 2025-06-25; consider upgrading it if it is out of date
```

I don't know why it does not compile, feature `allocator-api2` is
enabled for `hashbrown 0.15.5`, so technically [1] it should not use the
allocator APIs from the std. According to [2], enabling the `nightly`
feature of `allocator-api2` may cause this issue as well, but it is not
enabled in our case either.

Anyway, enabling `#![feature(allocator_api)]` should make it work.

[1]: b751eef8e9/src/raw/alloc.rs (L26-L47)
[2]: https://github.com/rust-lang/hashbrown/issues/564

* put it in main.rs

* format main.rs

* Enable default-features for hashbrown 0.15.5

* format main.rs

* enable feature allocator-api2

* feat: add selection set config

* fix: selection setting

* fix: ci error

* fix: ci error

* fix: ci error

* fix: ci error

* merge: merge main

* fix: rust code warn

* fix: rust code error

* fix: rust code error

* fix: selection settings

* style: selection styles

* style: selection styles

---------

Co-authored-by: Steve Lau <stevelauc@outlook.com>
2025-11-27 10:12:49 +08:00
SteveLauC
d5d616ade9 chore: update outdated code comments (#991)
* chore: update outdated code comments

To initialize the app language stored in the backend, the frontend no
longer uses update_app_lang(). Instead, it now uses backend_setup().

* format code
2025-11-25 17:40:30 +08:00
SteveLauC
d8a1b9b9c6 feat: add a heartbeat worker to check Coco server availability (#988)
* feat: add a heartbeat worker to check Coco server availability

* relase notes
2025-11-25 10:20:33 +08:00
SteveLauC
f83b1ba2a7 chore: write panic message to stdout in panic hook (#989)
This commit updates the panic hook implementation to log the panic
message to stdout as well, which would make debugging easier. It is
hightly possible that a panic may get ignored by us when we run Coco
app in the dev mode (since the hook only writes msg to the panic log file).
2025-11-25 08:56:29 +08:00
medcl
8ac0065234 v0.9.0 2025-11-24 11:24:37 +08:00
SteveLauC
533bfaf45b fix: search_extension should not panic when ext is not found (#983)
This commit fixes a bug that the search_extension() function panics
when the "GET /store/_search" interface returns a 404 response.

```
GET /store/_search?query=<query string>
{"_id":"_search","result":"not_found"}
```

It also improves the panic message by including varaible "response" in it,
so that we can inspect the actual response.

```
let hits_json = response.remove("hits").unwrap_or_else(|| {
    panic!(
        "the JSON response should contain field [hits], response [{:?}]",
        response
    )
});
```
2025-11-19 10:10:59 +08:00
ayangweb
459705af70 refactor: simplify fetching the screen under the mouse cursor (#985) 2025-11-19 09:39:36 +08:00
SteveLauC
aef934e9a2 feat: advanced settings search debounce & local query source weight (#950)
* wip

* wip

* wip

* feat: add search delay

* refactor: update

* refactor: update

* refactor: update

* refactor: update

* docs: update changelog

---------

Co-authored-by: ayang <473033518@qq.com>
Co-authored-by: ayangweb <75017711+ayangweb@users.noreply.github.com>
2025-11-17 18:35:30 +08:00
SteveLauC
594d0ffe3f fix: allow any http/https requests (#976) 2025-11-14 11:53:29 +08:00
SteveLauC
ab5ca24270 fix: correct csp setting (#974) 2025-11-14 10:34:29 +08:00
SteveLauC
c088dde749 refactor(view extension): load HTML/resources via local HTTP server (#973)
Previously, View extensions loaded their HTML files directly from disk.
Now, Coco starts a lightweight local HTTP server to serve the static files,
and the extension loads them via HTTP instead.

This refactoring is needed because Tauri is not allowed to load local
files directly, we have to call convertFileSrc() to do the URL
conversion to make it work. In previous implementations, we did such
conversions to all the paths specified in the HTML file, but we realized
that there are paths in JS/CSS files as well, and it is impossible to
convert them all. So we have to change the way how view extensions load
their files.
2025-11-13 19:50:32 +08:00
BiggerRain
6067fa7029 chore: remove check window decorations (#966)
* chore: remove check window decorations

* chore: add skip button

* chore: key add index
2025-11-05 15:13:26 +08:00
BiggerRain
9ea7c9b1ff chore: center the main window vertically (#959)
* chore: center the main window vertically

* docs: add release note
2025-11-03 10:52:29 +08:00
SteveLauC
3e0839f3da feat(extension compatibility): minimum_coco_version (#946)
This commit introduces a new field, `minimum_coco_version`, to the
`plugin.json` JSON. It specifies the lowest Coco version required
for an extension to run.

This ensures better compatibility by preventing new extensions from
being loaded on older Coco apps that may lack necessary APIs or features.

Co-authored-by: ayang <473033518@qq.com>
2025-11-02 10:59:29 +08:00
SteveLauC
fa9656bfd7 fix: panic when opening view extension via hotkey (#949)
Another change that should be made to fix the View extension hotkey. I
should include it in this commit[1] but I forgot to.

[1]: e029ddf2ba
2025-10-27 10:08:53 +08:00
SteveLauC
03954748b6 refactor(post-search): collect at least 2 documents from each query source (#948)
This commit refactors the code that evenly collects documents from query
sources to let it collect at least 2 documents in every source, which
could correct the case when `max_hits_per_source` is 0. This was possible
with the previous impl, no longer allowed after this commit
2025-10-27 10:07:57 +08:00
SteveLauC
3029303e95 refactor: custom_version_comparator() now compares semantic versions (#941)
* refactor: custom_version_comparator() now compares semantic versions

Previously, when comparing 2 versions, custom_version_comparator() only
compared their build numbers, which was incorrect. See this case:

```text
0.8.0-2500 -> 0.9.0-SNAPSHOT-2501 -> 0.8.1-2502
```

Coco adopts SemVer[1], and according to the specification, "0.8.1-2502"
is older than "0.9.0-SNAPSHOT-2501" even though it has a larger build
number.

This commit refactors it to compare the semantic versions.

[1]: Even though Coco uses SemVer, our version string does not follow the
spec. In this implementation, we use `to_semver()` to do the conversion, see
the code comments for more details.

* correct comments
2025-10-27 10:04:15 +08:00
SteveLauC
f267df3f71 docs: update some comments (#944) 2025-10-23 15:23:18 +08:00
SteveLauC
e029ddf2ba fix(view extension): broken search bar UI when opening extensions via hotkey (#938)
* fix: open view extension via hotkey

* refactor: update

* refactor: update

* chore: check error

* chore: ci update

* release notes

---------

Co-authored-by: ayang <473033518@qq.com>
Co-authored-by: rain9 <15911122312@163.com>
2025-10-22 10:08:00 +08:00
SteveLauC
5c92b5acab refactor: procedure that convert_pages() into a func (#934)
Extract a procedure that calls convert_pages() to process HTML files
into a function. It is used in both install/store.rs and
install/local_extension.rs, doing this avoids code duplication.
2025-10-20 18:23:53 +08:00