Commit Graph
132 Commits
Author SHA1 Message Date
Tunglies ca22495869 chore(runtime): sync the profile refactor 2026-12-03 19:42:46 +08:00
Tunglies a272280f1a refactor(backup): move archive validation to the restore change 2026-12-03 19:38:51 +08:00
Tunglies 80fca96848 style(profile): keep profile fields together 2026-12-03 19:38:36 +08:00
Tunglies 966e0e03ff refactor(profile): remove companions from the deleted profile 2026-12-03 19:38:32 +08:00
Tunglies c742a9a17c refactor(profile): look up the refresh target once 2026-12-03 19:38:18 +08:00
Tunglies c53e005f25 fix(subscription): separate deep link parameters from nested URLs 2026-12-03 17:59:25 +08:00
Tunglies 390231a043 fix(subscription): preserve filenames from response headers and URL paths 2026-12-03 17:59:25 +08:00
Tunglies c4ee0e0c8a fix(profile): preserve delays for future update timestamps 2026-12-03 17:59:24 +08:00
Tunglies 18f733fca9 refactor(backup): extract backup ZIP writing 2026-12-03 17:20:42 +08:00
Tunglies 911a3c58fa refactor(task): move retry primitives into the task crate 2026-12-03 17:20:32 +08:00
Tunglies 0bc38ba664 docs(agents): define dependencies between capability crates 2026-12-03 17:20:32 +08:00
Tunglies 00cb43f5de refactor(profile): extract selected node recovery rules 2026-12-03 17:20:32 +08:00
Tunglies 85c0a60ddb refactor(subscription): decode deep links in the subscription crate 2026-12-03 17:20:32 +08:00
Tunglies c6e59ad538 refactor(profile): separate subscription refresh and scheduling policy
Separate download and scheduling policy from the subscription use case while retaining the existing write path.
2026-12-03 17:20:32 +08:00
Tunglies 64490c44ab refactor(profile): extract profile models and index rules
Move profile models and index rules into the crate, preserving serialization and returning a typed missing-profile error.
2026-12-03 17:20:32 +08:00
Tunglies 9614dee991 refactor(subscription): extract response decoding
Keep HTTP and persistence in the app. Decode response metadata and framing in the crate, and fall back when the server filename is invalid.
2026-12-03 17:20:32 +08:00
Tunglies ad285eac95 refactor(logging): use typed logger errors
Expose crate-owned logger errors and preserve the underlying error sources.
2026-12-03 17:20:32 +08:00
Tunglies 72e7201abc refactor(draft): type async publication conflicts
Return typed conflicts for async Draft edits. Release the lock and edit permit before converting the error, and exercise overlapping updates.
2026-12-03 17:20:32 +08:00
Tunglies 03ff4f846c docs(agents): define Rust backend architecture boundaries
Document which layer owns Rust capabilities, fallible inputs, background work, and crate validation.
2026-12-03 17:20:21 +08:00
Tunglies 032eb9767e chore(clippy): scope crate lint policy
Keep panic-on-error lints at application target roots and scope signal dependencies to Linux.
2026-12-03 17:20:21 +08:00
Tunglies 16ef6fbc34 fix(i18n): resolve startup locales consistently
Prefer a supported saved language over the cache and browser locale.
Align frontend alias resolution with Rust and ignore unsupported saved
values when the layout mounts so they cannot overwrite the fallback.

In Rust, walk borrowed prefixes instead of rebuilding strings. This
preserves locale resolution and removes quadratic work on long tags.
Across all 14 shipped locale IDs (equally weighted),
median lookup time fell from 40.0 to 22.4 ns and heap allocations fell
from 4 to 2 per lookup. A synthetic 64 KiB tag fell from 771 ms to 240 µs.
2026-12-03 12:59:02 +08:00
renovate[bot]Tungliesrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
39fd5e968b chore(deps): update cargo dependencies (#8811)
* test(draft): cover conflict wakeup and busy layer

* chore(deps): update cargo dependencies

---------

Co-authored-by: Tunglies <77394545+Tunglies@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-12-02 13:41:44 +00:00
Tunglies c9223b204b fix(limiter): handle stale clock samples and timestamp overflow
A caller could sample the clock at 1000 ms and pause while another
caller was admitted at 2000 ms. On resuming, the first caller could
load the newer last_run_ms, mistake its stale sample for a clock
rollback, and replace 2000 with 1000. This reopened the 100 ms period
and let another check at 2000 ms pass. Load last_run_ms before sampling
the clock so the stale caller's compare-exchange fails if a newer
admission has changed that value. Preserve sequential clock rollback
behavior and the existing atomic orderings.

The period check also added the period to last_run_ms. A last admission
at u64::MAX - 55 with a 56 ms period overflowed on the next check:
debug builds panicked and release builds wrapped the deadline to zero,
admitting a duplicate timestamp. Compare elapsed time against the
period only after confirming the clock has not moved backward, which
makes the subtraction safe and preserves the exact period boundary.

Enable the stale-sample and overflow regressions, keep the saved
Proptest seed, and add Loom coverage for advancing time and multiple
stale callers plus a deterministic test at u64::MAX.
2026-12-02 21:18:45 +08:00
Tunglies 4168a87983 perf(runtime-bundle): read remote providers from borrowed configuration 2026-12-02 02:10:11 +08:00
Tunglies 573eac8ec9 refactor(config): centralize Mihomo YAML output 2026-12-02 02:10:11 +08:00
Tunglies e0cced59eb refactor(config): inject the profile script executor 2026-12-02 02:10:11 +08:00
Tunglies ecf1dd2486 refactor(proxy): extract proxy view and its use case
Project the Mihomo snapshot into the existing IPC DTO and move use-case orchestration out of the command.
2026-12-02 02:10:11 +08:00
Tunglies 7d665bd5bb refactor(config): extract configuration renderer
Render from inputs supplied by the app, reuse the script crate, and preserve the default template fast path.
2026-12-02 02:10:11 +08:00
Tunglies 5605cc26c5 refactor(profile): extract script validation and execution
Share the Boa validation and execution API while preserving the save-side timeout and diagnostics.
2026-12-02 02:10:11 +08:00
Tunglies aa62db78a9 perf(runtime-bundle): share destination strings with tristr
Share destination storage within bundle planning and preserve the Service wire strings and provider readback.
2026-12-02 02:10:11 +08:00
Tunglies 6c78c16a96 refactor(runtime-bundle): extract runtime bundle planning
Plan provider destinations and assets in the crate. Adapt the plan to the Service wire format at the call site.
2026-12-02 02:10:11 +08:00
Tunglies e290a7946d refactor(backup): extract backup ZIP writing 2026-12-02 02:10:09 +08:00
Tunglies 59e315abeb refactor(task): move retry primitives into the task crate 2026-12-02 02:10:09 +08:00
Tunglies 87b3cf6561 docs(agents): define dependencies between capability crates 2026-12-02 02:10:09 +08:00
Tunglies 0010659329 refactor(profile): extract selected node recovery rules 2026-12-02 02:10:09 +08:00
Tunglies e30f1b0e47 refactor(subscription): decode deep links in the subscription crate 2026-12-02 02:10:09 +08:00
Tunglies c3c65bb418 refactor(profile): separate subscription refresh and scheduling policy
Separate download and scheduling policy from the subscription use case while retaining the existing write path.
2026-12-02 02:10:09 +08:00
Tunglies 9de413db1e refactor(profile): extract profile models and index rules
Move profile models and index rules into the crate, preserving serialization and returning a typed missing-profile error.
2026-12-02 02:10:09 +08:00
Tunglies 0605236489 refactor(subscription): extract response decoding
Keep HTTP and persistence in the app. Decode response metadata and framing in the crate, and fall back when the server filename is invalid.
2026-12-02 02:10:09 +08:00
Tunglies b5b939ce03 refactor(logging): use typed logger errors
Expose crate-owned logger errors and preserve the underlying error sources.
2026-12-02 02:10:09 +08:00
Tunglies 6fdbea3748 refactor(draft): type async publication conflicts
Return typed conflicts for async Draft edits. Release the lock and edit permit before converting the error, and exercise overlapping updates.
2026-12-02 02:10:09 +08:00
Tunglies 12b2e340ca docs(agents): define Rust backend architecture boundaries
Document which layer owns Rust capabilities, fallible inputs, background work, and crate validation.
2026-12-02 02:10:09 +08:00
Tunglies 4cc3a2fd0c chore(clippy): scope crate lint policy
Keep panic-on-error lints at application target roots and scope signal dependencies to Linux.
2026-12-02 02:10:09 +08:00
Tunglies 929bb6a0a1 refactor(backend): share single-owner drivers for background tasks (#8759)
* docs(backend): define background task ownership

* refactor(backend): give background operations single task owners

* test(backend): remove actor migration regression cases

* docs(changelog): drop backend actor migration entry

* refactor(backend): extract workspace task drivers

* fix(timer): omit profile identifier from panic log

* docs(backend): define workspace crate boundaries

* refactor(lightweight): use the task countdown driver

* refactor(lightweight): name countdown callbacks

* refactor(task): simplify driver startup and coalescing requests

* refactor(core): bind service handoff to the sidecar generation

* refactor(tun): coalesce background run state reconciliation

* refactor(core): own sidecar exit resources in one session

* refactor(core): remove automatic Windows service handoff

* refactor(task): simplify coalescing job signals

* refactor(runstate): keep operation status with service state

* refactor(dns): coalesce background override synchronization

* refactor(sysproxy): own the local guard under its operation lock

* fix(tray): read menu settings at publication

* fix(dns): retain script lock across caller cancellation

* refactor(profiles): own selected node restoration in one task

* refactor(timer): own subscription schedules in the scheduler

* test(timer): remove the added application test

* fix(service): renew provider sync retry budget on refresh
2026-11-29 00:42:52 +00:00
Tunglies 876d287152 refactor(updater): retire the startup install UI (#8747)
* refactor(updater): retire the startup install UI

* fix(updater): keep daily checks running and harden the cache path
2026-11-27 07:17:15 +00:00
renovate[bot]renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>Tunglies
4015f37eb3 chore(deps): update cargo dependencies (#8705)
* chore(deps): update cargo dependencies

* fix(deps): align flexi_logger with tracing-estuary

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Tunglies <77394545+Tunglies@users.noreply.github.com>
2026-11-25 06:31:42 +00:00
星海and❤是纱雾酱哟~ 3f7af9ab02 fix(media-unlock): avoid misleading region for Muse AI in Rule mode (#8685)
* fix(media-unlock): avoid misleading region from cloudflare trace for Muse AI

Signed-off-by: ❤是纱雾酱哟~ <49941141+Dragon1573@users.noreply.github.com>

* chore(changelog): append missing statements

- Simply express what has changed in `Changelog.md`

Assisted-by: MAI Code 2 (high)
Signed-off-by: ❤是纱雾酱哟~ <49941141+Dragon1573@users.noreply.github.com>

---------

Signed-off-by: ❤是纱雾酱哟~ <49941141+Dragon1573@users.noreply.github.com>
Co-authored-by: ❤是纱雾酱哟~ <49941141+Dragon1573@users.noreply.github.com>
2026-11-19 01:24:54 +00:00
Tunglies 7d8fec7314 chore(lint): inherit workspace lints in draft and logging crates
clash-verge-draft and clash-verge-logging did not inherit
[workspace.lints], so cargo's missing_lints_inheritance warned and the
strict clippy set never applied to them. Inheriting the lints surfaced
six errors, now fixed:

- draft: drop the data lock before cloning the snapshot and before
  returning in with_data_modify (significant_drop_tightening)
- draft: require T: Send + Sync on acquire_data_modify_permit so its
  future is Send (future_not_send)
- draft bench: scope an allow for the runtime-init panic
- logging: make Logger::new const (missing_const_for_fn)
- logging: return the builder directly from generate_file_log_writer,
  which never failed (unnecessary_wraps)

The three unused-dependency warnings that remain under
--all-features are cfg artifacts, not dead deps: tauri-build is only
called when the clippy feature is off, tauri-plugin-devtools is
compiled out when tokio-trace is enabled alongside tauri-dev, and
clash-verge-logging in clash-verge-signal is only referenced by the
Linux-only body of that crate.
2026-11-18 09:45:36 +08:00
Tunglies 8ca401a742 chore(rust): upgrade to 1.100 and consolidate Clippy rules (#8636) 2026-11-13 05:29:47 +00:00
renovate[bot]andrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com> b89d09e24e chore(deps): update cargo dependencies (#8630)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-11-12 10:46:45 +08:00