Commit Graph
19 Commits
Author SHA1 Message Date
Lucas Fernandes Nogueira 3b19ca096c fix(fs): do not parse relative paths with a colon as URLs (#3632)
In plugins/fs/src/file_path.rs SafeFilePath::from_str, any string that
parsed as a URL with a scheme of 2+ characters was a URL, so a relative
path such as `notes:2024.txt` became a cannot-be-a-base URL and failed
with InvalidPathUrl.

Cannot-be-a-base URLs are now parsed as paths. The scheme-agnostic
url.to_file_path() stays: its result is scope checked (not a bypass).
Unit test for the parser; e2e spec writes and reads such a file (not on
Windows, where `:` is not allowed in file names).
2026-10-10 16:06:02 -03:00
Lucas Nogueira 677258138b test(e2e): fix __name usage on FS test 2026-10-09 15:17:53 -03:00
Lucas Fernandes Nogueira 77d00a4f54 fix(fs): reject negative offsets when seeking from the start (#3633)
In plugins/fs/src/commands.rs seek, `SeekFrom::Start(offset as u64)`
turned -1 into u64::MAX. The offset is now converted with u64::try_from
and a negative one is an error. E2E spec added.
2026-10-09 13:04:44 -03:00
Lucas Fernandes Nogueira dcc8cb032b fix(fs): truncate the file when writeFile writes a stream (#3629)
In plugins/fs/guest-js/index.ts writeFile, the stream path opened the
file with {write, create} but no truncate, unlike the buffer path which
truncates unless `append` is set (commands.rs write_file_inner), so
shorter content left stale trailing bytes.

The stream path now passes `truncate: !options?.append`. api-iife.js
regenerated. E2E spec covers overwrite and append with a stream.
2026-10-09 13:01:30 -03:00
renovate[bot]andLucas Nogueira 974af951a5 chore(deps): update webdriverio monorepo to v10 (#3678)
* chore(deps): update webdriverio monorepo to v10

* fix e2e test

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2026-10-09 12:56:10 -03:00
Lucas Fernandes Nogueira 65ce65bdbb fix(ci): Android e2e flakes, shell Terminated sent before output (#3672)
* fix(ci): Android e2e flakes, shell `Terminated` sent before output

- close "isn't responding" system dialogs before each spec and hide error dialogs on the CI emulator:
  a launcher ANR dialog takes input focus from the app, and Android then denies clipboard reads
- retry switching to the webview context until it succeeds instead of running the spec in the
  native context when the first switch fails with "No such context found"
- save the focused window, a screenshot and logcat when an Android test fails
- shell: wait for the pipe readers to finish before emitting `Terminated`; the readers took their
  read lock on their own thread, so a child exiting quickly could have `close` emitted before
  its output

* Apply suggestion from @lucasfernog
2026-10-07 13:51:35 -03:00
renovate[bot] ec14142fc6 chore(deps): update dependency @types/node to v24 (#3649)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-09-28 16:12:37 +08:00
Lucas Nogueira b6a38a5e32 fix(ci): e2e test error reporting 2026-09-26 15:29:52 -03:00
Lucas Nogueira 9b29b601f3 feat: update to tauri 2.12
- (MSRV bump
- Android compiler options update
- notification plugin windows7 feature deprecation
2026-09-26 14:46:48 -03:00
Lucas Fernandes Nogueira 3a01943572 tests(e2e): fix e2e failures on Linux and Windows (#3642) 2026-09-25 13:43:07 -03:00
Tony 1e166e93c8 ci: remove stronghold plugin from e2e tests (#3638)
* ci: remove stronghold plugin from e2e tests

* revert unrelated change
2026-09-24 21:55:25 +08:00
Lucas Fernandes Nogueira 1cae06a55b fix(fs): report read errors of readTextFileLines (#3625)
* fix(fs): report read errors of readTextFileLines

In plugins/fs/src/commands.rs read_text_file_lines_next, a read error was
mapped to "not done, empty line", so a persistent error such as EISDIR
(File::open of a directory succeeds on Unix) made the iterator yield ""
forever and the error was swallowed.

The command now closes the resource and returns the error; the JS iterator
resets its rid so a new iteration starts over. api-iife.js regenerated. E2E
spec iterates a directory and expects a rejection.

* fix(fs): close the file when a readTextFileLines loop exits early

In plugins/fs/guest-js/index.ts readTextFileLines, the async iterator did
not implement return(), so breaking out of a for await loop left the
StdLinesResource (an open file) in the webview resource table.

return() now closes the resource and resets the iterator. api-iife.js
regenerated. E2E spec breaks out of a loop, checks the resource id is no
longer valid and that iterating again starts over.
2026-09-23 13:05:04 -03:00
Lucas Fernandes Nogueira 97e865bc13 feat(fs): accept baseDir in size (#3623)
In plugins/fs/guest-js/index.ts, the size function only sent `path`
although the Rust command accepts `options.baseDir` and the JSDoc example
passed `{ baseDir: BaseDirectory.AppData }` (a TS error, silently dropped
at runtime, so the relative path was rejected).

Adds an optional `options?: SizeOptions` parameter (new exported type).
api-iife.js regenerated. The e2e spec now measures a file and a directory
relative to AppData instead of working around the missing option.
2026-09-23 12:58:03 -03:00
Lucas Fernandes Nogueira b46a88ff55 fix(fs): reject malformed write_file options instead of ignoring them (#3622)
In plugins/fs/src/commands.rs write_file_inner, a malformed or non-ASCII
`options` header was dropped with .ok(), so baseDir/append/createNew were
silently ignored and the call became a truncating write to the raw path;
the JSON array body fallback truncated values above 255 and dropped
non-numbers.

The header is parsed with parse_write_file_options: empty, `undefined`
(what fetch sends for JSON.stringify(undefined)) and `null` mean no
options, anything else must parse. Array bodies must only contain bytes.
Unit test for the header parser; e2e spec for writes without options,
which is the case the `undefined` handling keeps working.
2026-09-23 12:57:49 -03:00
Lucas Nogueira 55f9645aa2 chore: update websocket test 2026-09-23 06:08:43 -03:00
Lucas Nogueira 4a94356386 fix(deep-link): unregister must refresh the database 2026-09-22 22:03:02 -03:00
Lucas Nogueira 5c78814220 fix(autostart): handle disabling when the autostart is already disabled 2026-09-22 21:56:01 -03:00
Lucas Nogueira c8c373b48b tests(e2e): improve coverage 2026-09-22 21:54:21 -03:00
Lucas Fernandes Nogueira 684feb2510 feat(tests): add api e2e tests (#3617)
* feat(tests): add api e2e tests

* lockfile

* mobile

* try linux fix [skip ci]

* ios fix

* fix test on windows

* improve cache

* fix pnpm audit [skip ci]
2026-09-22 18:58:14 -03:00