Improve startup responsiveness and admin prompt motion
CI / Windows baseline (push) Has been cancelled

This commit is contained in:
2026-07-22 17:50:12 +03:00
parent 90ec4ca086
commit 9c987df6e9
11 changed files with 597 additions and 183 deletions
@@ -47,6 +47,21 @@ src/app/components/SingBoxWorkspace.tsx
- Use `aria-*` for tabs, toggle buttons, popovers, service controls.
- Honor reduced motion where relevant.
## Animated disclosures
- Keep disclosure content mounted through opening and closing so both directions can animate. Do not conditionally render content directly into its final open state.
- Keep the trigger at one screen position and separate layout placement from hover/active transforms.
- Gate hidden content with `aria-hidden` plus `inert` or `tabIndex`; opacity and `pointer-events` alone do not remove controls from keyboard navigation.
- Keep `aria-expanded` and `aria-controls` on the trigger synchronized with the rendered state.
- Use one motion origin and timeline for background, copy, and actions. Implement and verify the reverse transition at the same time as the entrance.
## Startup responsiveness
- Render the shell and saved/default configuration immediately. Do not gate first paint on network access, subscription refresh, or every component probe.
- Show slow component detection in reserved `checking` geometry and apply partial results as they arrive without replaying page entrance motion.
- Do not serialize independent probes to create a staged UI. When the backend exposes only an aggregate snapshot, animate reserved placeholders and replace their values in place when that snapshot arrives.
- Keep navigation and already-known configuration usable while background detection continues.
## Proxy/routing UI
When editing route UI:
@@ -71,6 +86,7 @@ Recommended for extracted pure logic:
- Unit tests for readiness states.
- Unit tests for snapshot diff/change dock model.
- UI smoke checks for desktop and narrow layout.
- For hover, disclosure, or motion changes, exercise first open, close, repeated toggle, hover during transition, keyboard focus, loading copy, and `prefers-reduced-motion`. Build and unit tests do not validate these behaviors.
## Do not
@@ -32,6 +32,14 @@ pub async fn some_command(input: SomeInput) -> Result<SomeOutput, CommandError>
Implementation function должна быть тестируемой без Tauri runtime, если возможно.
## Startup responsiveness
- Keep first paint independent from network access, subscription refresh, and slow component detection.
- Run independent startup probes concurrently and outside the async runtime thread. Do not serialize ProxiFyre, sing-box, service, and admin checks without a dependency between them.
- Give external or process-heavy probes a bounded timeout and return partial status when one probe is slow or unavailable.
- Load saved configuration and other cheap state first. Let the UI render it while detection results update separately or through a partial startup snapshot.
- Do not fail the entire startup snapshot because one optional component cannot be detected. Preserve structured per-component errors or unknown/checking state.
## DTO boundary
При добавлении или изменении command:
@@ -89,6 +97,7 @@ services/singbox_service.rs
- `cargo clippy --all-targets --all-features -- -D warnings`
- `cargo test --all-targets`
- Relevant Windows/manual check if touching service/install/elevation.
- When changing startup aggregation, verify that one delayed or failed probe does not postpone unrelated saved state or component results.
Если `cargo` недоступен в среде, честно написать, что backend проверен только статически. Не изображать компилятор, у него и так тяжелая жизнь.
+14
View File
@@ -37,6 +37,20 @@ PowerShell plan-only:
& .\scripts\install-singbox.ps1 -PlanOnly
```
## Interaction smoke for UI motion
Build, lint, and unit tests do not validate motion or pointer behavior. For any hover, disclosure, stagger, or hit-target change, verify:
- first open and first close;
- repeated and rapid toggle;
- hover and click before, during, and after transition;
- keyboard focus and hidden-control tab order;
- loading and longest localized labels;
- `prefers-reduced-motion`;
- desktop and narrow window geometry.
Use a controlled mock or preview state when backend status is difficult to reproduce. If no visual interaction smoke is possible, report that evidence as missing and do not claim the motion task is complete.
## CI recommendation
Add GitHub Actions with at least: