Commit Graph

963 Commits

Author SHA1 Message Date
BiggerRain
b12baf63f8 fix: console error (#1033) 2025-12-26 16:12:16 +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
BiggerRain
585545c43c style: adjust placeholder styles (#1032) 2025-12-26 10:55:20 +08:00
BiggerRain
e3e5cd2ecc fix: avoid recentering when resizing to compact after leaving extension (#1030)
* fix: avoid recentering when resizing to compact after leaving ViewExtension

* docs: update release note

* chore: update
2025-12-26 10:53:44 +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
SteveLauC
062b4ce410 refactor: display doc.{updated,created} in local time (#1027)
* refactor: display doc.{updated,created} in local time

Previously, document created/updated times were displayed as raw
strings, and can be in UTC, which was not user-friendly.

This commit adds a helper function `formatDateToLocal()` that formats
date to a local time string, then uses it to unify the date formatting
in application and document details.

* chore: address review comments
2025-12-24 16:23:12 +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
SteveLauC
8638724e68 chore: remove file foo (#1026)
It was a placeholder that I added in PR #1009, I forgot to remove it
before merging that PR. Let's remove it now.
2025-12-22 16:12:14 +08:00
ayangweb
6ae2ed0832 fix: esc key fails to close the popover (#1024)
* fix: esc key fails to close the popover

* refactor: update
2025-12-22 11:51:04 +08:00
Hardy
81dab997a9 chore: update release notes for publish 0.10.0-2619 (#1021)
* chore: update release notes for publish 0.10.0-2619

* Add section headers to release notes

Added section headers for breaking changes, features, bug fixes, and improvements.

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: BiggerRain <15911122312@163.COM>
2025-12-22 09:51:59 +08:00
BiggerRain
7a4364665e chore: bump version to 0.10.0 (#1022) v0.10.0 2025-12-19 17:56:32 +08:00
BiggerRain
444ba968c4 chore: hide selection settings (#1020) 2025-12-19 16:15:03 +08:00
ayangweb
206d8db4f4 refactor: disable input auto-correction (#1019) 2025-12-19 15:46:53 +08:00
BiggerRain
7e40632c29 style: adjust delete button color (#1018) 2025-12-19 12:59:58 +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
3a9c9ec9eb style: img styles (#1015) 2025-12-18 15:51:00 +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
BiggerRain
ed8a1cb477 refactor: replace legacy components with shadcn/ui components (#1002)
* chore: shadcn config

* feat: add shadcn ui config

* style: adjust styles

* style: adjust styles

* refactor: update style

* style: adjust styles

* style: adjust styles

* style: adjust styles

* style: adjust styles

* refactor: update

* refactor: update

* refactor: update

* refactor: update

* style: adjust styles

* style: adjust styles

* refactor: update

* refactor: update

* refactor: update

* refactor: update

* refactor: update

* refactor: update

* style: web styles

* refactor: update

* style: web styles

* style: web styles

* refactor: update

* refactor: update

* refactor: update

* chhore: add

* chore: add

* refactor: update

* refactor: update

* refactor: update

* refactor: update

* chore: update

* refactor: update

* refactor: update

* refactor: update

* refactor: update

* refactor: update

* refactor: update

* chore: rename

* refactor: update

* refactor: update

* chore: add

* refactor: update

* chore: update

* chroe: up

* refactor: update

* refactor: update

* chore: up

* refactor: update

* chore: up

* feat: support for extracting css variables

* chore: update

* fix: fixed dark mode

* refactor: update

* refactor: update

* refactor: update

* refactor: update

* docs: update release notes

* style: adjust styles

* style: adjust styles

* refactor: update

* refactor: update

* refactor: update

* refactor: update

* refactor: update

* refactor: update

---------

Co-authored-by: ayang <473033518@qq.com>
2025-12-18 10:26:13 +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
ayangweb
0613238876 refactor: hide the filter bar in quick ai access (#1008) 2025-12-15 09:25:13 +08:00
SteveLauC
501f6df473 chore: show error msg (not err code) when installing exts via deeplink/store fails (#1007)
* chore: show error msg (not err code) when installing exts via deeplink fails

When installing extensions via deeplink fails, previous implementation
showed the raw error code returned from the backend interfaces, which
is not user-friendly. We now call installExtensionError() to interrupt
the error code to get a human-readable error message, then show it to
the users.

* fix: correct install extension error when installing via store
2025-12-14 09:24:13 +08:00
ayangweb
67c8c4bdfa fix: fix the abnormal input height issue (#1006)
* fix: fix the abnormal input height issue

* docs: update changelog
2025-12-09 15:07:41 +08:00
Hardy
b5f5d3bd28 chore: update release notes for publish 0.9.1-2602 (#1004)
Co-authored-by: github-actions <github-actions@github.com>
v0.9.1
2025-12-05 19:58:09 +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
18828ab043 chore: modify the display of errors (#1000) 2025-12-05 15:15:42 +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
9paiii
6e2514adbd docs: update coco app documentation (#996)
* Update Coco App documentation

Add detailed descriptions for all major Coco App features

* Title Corrected

* Fix image path
2025-12-05 10:35:19 +08:00
BiggerRain
82074ab46a chore: change the default port of the tauri project (#999) 2025-12-05 09:38:54 +08:00
BiggerRain
8158d49050 fix: no request to the assistant interface (#998)
* fix: no request to the assistant interface

* Refactor comment for clarity in AssistantFetcher
2025-12-04 16:43:22 +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
BiggerRain
fc642ac0e3 fix: remove eventListener (#993) 2025-11-27 09:33:22 +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
ayangweb
96977be623 refactor: auto-focus input field when switching to compact mode (#990) 2025-11-25 11:07:26 +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 v0.9.0 2025-11-24 11:24:37 +08:00
ayangweb
31806b6057 fix: persist configuration settings properly (#987)
* fix: persist configuration settings properly

* docs: update changelog
2025-11-19 16:09:27 +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
Hardy
84e556ddad chore: update release notes for publish 0.9.0 (#986)
Co-authored-by: github-actions <github-actions@github.com>
2025-11-19 09:38:37 +08:00
Medcl
b50a20c7d4 fix release notes for version 0.9.0 (#982) 2025-11-18 13:50:57 +08:00
ayangweb
d4ccd780b2 feat: add auto collapse delay for compact mode (#981)
* feat: add auto collapse delay for compact mode

* refactor: change i18n

* docs: update changelog
2025-11-17 20:56:44 +08:00