Skip to content

Conversation

@Kokoro2336
Copy link

add recent documents api support for issue tauri-apps/tauri#14460
now only available for macos and windows

@Kokoro2336 Kokoro2336 requested a review from a team as a code owner November 29, 2025 09:42
@github-actions
Copy link
Contributor

github-actions bot commented Nov 29, 2025

Package Changes Through 6af4a72

There are 17 changes which include dialog-js with minor, dialog with minor, log with minor, log-js with minor, localhost with patch, barcode-scanner with patch, barcode-scanner-js with patch, http with patch, http-js with patch, nfc with patch, nfc-js with patch, updater with minor, updater-js with minor, upload with minor, upload-js with minor, websocket with patch, websocket-js with patch

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
api-example 2.0.38 2.0.39
api-example-js 2.0.34 2.0.35
barcode-scanner 2.4.2 2.4.3
barcode-scanner-js 2.4.2 2.4.3
dialog 2.4.2 2.5.0
dialog-js 2.4.2 2.5.0
http 2.5.4 2.5.5
http-js 2.5.4 2.5.5
localhost 2.3.1 2.3.2
log 2.7.1 2.8.0
log-js 2.7.1 2.8.0
nfc 2.3.3 2.3.4
nfc-js 2.3.3 2.3.4
updater 2.9.0 2.10.0
updater-js 2.9.0 2.10.0
upload 2.3.2 2.4.0
upload-js 2.3.2 2.4.0
websocket 2.4.1 2.4.2
websocket-js 2.4.1 2.4.2

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

Copy link
Contributor

@Legend-Master Legend-Master left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this! Didn't quite try it yet, just some early feedbacks from first glance

We'll also want to add this to the CI

https://github.com/tauri-apps/plugins-workspace/blob/v2/.github/workflows/test-rust.yml

// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT

const COMMANDS: &[&str] = &["execute"];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const COMMANDS: &[&str] = &["execute"];
const COMMANDS: &[&str] = &["add_recent_document", "get_recent_documents", "clear_recent_documents"];

@@ -0,0 +1,13 @@
# Automatically generated - DO NOT EDIT!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this after changing the commands in build.rs

@@ -0,0 +1,29 @@
{
"name": "@tauri-apps/plugin-PLUGIN_NAME",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"name": "@tauri-apps/plugin-PLUGIN_NAME",
"name": "@tauri-apps/plugin-recent-doc",

objc2 = "0.6.0"

[target."cfg(target_os = \"windows\")".dependencies]
windows = { version = "0.62.2", features = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
windows = { version = "0.62.2", features = [
windows = { version = "0.61", features = [

We need to use 0.61 here for the lower rust version requirement to support Windows 7 in tauri v2

use std::os::windows::ffi::{OsStrExt, OsStringExt};
use windows::{core::*, Win32::Foundation::*, Win32::System::Com::*, Win32::UI::Shell::*};
unsafe {
let path_wide: Vec<u16> = OsStr::new(path)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use HSTRING here instead of doing it manually

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.

2 participants