fix(windows): start a responsive tray immediately after installation
This commit is contained in:
1 parent
14cb3570c1
commit
d59b2d5463
13 files changed
+850
-106
No files matched your search
@@ -170,6 +170,49 @@ The Windows artifact is linked with the GUI subsystem (`-H=windowsgui`) so
|
||||
service, launcher, and tray startup do not flash a console. Human-facing modes
|
||||
still attach to a parent console explicitly when one exists.
|
||||
|
||||
### Focused native tray and installer regression checks
|
||||
|
||||
`internal/client/windowstray/native_windows_test.go` contains real Win32 tests,
|
||||
not Linux stubs: enabled/deny-only primary-token peer checks, one-shot status,
|
||||
rejection before reading a request, malformed responses, stalled-peer deadlines,
|
||||
eight idle peers plus a bounded ninth request, shutdown cancellation, native
|
||||
`NOTIFYICONDATAW` layout, and actual icon creation/message-loop/close under GC.
|
||||
Build its executable in Docker:
|
||||
|
||||
```sh
|
||||
docker compose -f deploy/compose.yaml run --rm toolchain \
|
||||
env CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go test -c \
|
||||
-o .test-runs/RUN/windowstray.test.exe ./internal/client/windowstray
|
||||
```
|
||||
|
||||
Use the checksum-verified fixture transfer route to place it at a **distinct
|
||||
test-only path**, never the installed SCM service executable. On a prepared
|
||||
interactive fixture, run it through the server control socket:
|
||||
|
||||
```sh
|
||||
rvc run --shell cmd CLIENT \
|
||||
'@C:\Users\Public\RVBoxTrayTests.exe -test.v -test.run TestNativeTray -test.timeout 45s'
|
||||
```
|
||||
|
||||
Require `PASS` and the durable command lifecycle
|
||||
`COMMAND_SUCCEEDED`; the presence of a process or a successful RPC alone is not
|
||||
test success. The UI case briefly creates/removes its own test icon. Session 0
|
||||
runs verify rejection/transport but skip the actual desktop-window case, so
|
||||
they do not substitute for the interactive run.
|
||||
|
||||
`cmd/rvbox/installer_flow_test.go` checks install-before-tray ordering, cancelled/
|
||||
failed elevation, and explicit partial success when tray startup fails. The
|
||||
native installer structure-layout test is in `installer_windows_test.go`.
|
||||
For the real double-click acceptance route, preserve UAC policy: the unelevated
|
||||
parent must wait for its elevated child to exit successfully, start the installed
|
||||
tray with the original user's token, and confirm a registered icon before its
|
||||
single success dialog. Verify both service and tray identities, current-session
|
||||
startup without a reboot, Run-key sign-in startup, duplicate prevention, and
|
||||
continued service operation when only the tray exits. The tray must remain
|
||||
visible/responsive when its service is absent or its IPC peer stalls. Windows
|
||||
may put a new application icon under its hidden-icons arrow; do not rewrite the
|
||||
user's global notification-area preferences to force pinning.
|
||||
|
||||
Suite output is capped by the checked-in harness policy (10 MiB by default) and
|
||||
stored as `artifacts/suite.log`. A failed run remains inspectable and can be
|
||||
moved back to `ready` with `recover`, then resumed with the same run ID and
|
||||
|
||||
Reference in new issue
Block a user