* feat(web): add network-only PWA installability Serve the manifest, registration script, network-only service worker, and icons under the runtime web base path so panels remain installable at arbitrary configured URLs. This does not add offline caching or change panel, API, database, or Xray behavior. * chore(docs): remove development planning notes Keep the pull request focused on the PWA implementation, tests, and user-facing verification documentation. * feat(web): adopt the 3X logo PWA icon set from #1865 Replace the two placeholder SVG icons with the six-size PNG set (16/24/32/64/192/512) contributed by @Incognito-Coder in PR #1865. The PNGs have transparent rounded corners, so the manifest entries drop the maskable purpose claim and rely on the default any. --------- Co-authored-by: korsun009 <277924786+korsun009@users.noreply.github.com> Co-authored-by: Sanaei <ho3ein.sanaei@gmail.com>
1.8 KiB
PWA installability verification
This change adds a network-only PWA surface to the login and panel pages. It does not cache panel data, API responses, credentials, or WebSocket traffic.
Local checks
Run these commands from the repository root after installing the pinned Node and Go toolchains:
cd frontend
npm run typecheck
npm run lint
npx vitest run --project unit
npx vitest run --project components
npm run build
cd ..
go test ./...
go build ./...
The built binary must serve these paths beneath the configured webBasePath:
manifest.webmanifestpwa-register.jsservice-worker.jsicons/3x-ui-16.pngicons/3x-ui-24.pngicons/3x-ui-32.pngicons/3x-ui-64.pngicons/3x-ui-192.pngicons/3x-ui-512.png
The login and panel HTML must contain a manifest link and registration script
whose URLs begin with the same runtime base path. The manifest must contain
display: "standalone", relative start_url and scope, and all six icon
entries.
Live rollout checks
Before replacing a server binary, record the current x-ui binary checksum and
create a timestamped copy of the binary and /etc/x-ui/x-ui.db. Restart only
the x-ui service after the candidate is staged. Because x-ui manages Xray as
a child process, the restart can briefly interrupt VPN connections.
After the restart, verify:
x-uiis active and its child Xray process is running.- The existing panel URL serves HTML with the PWA manifest link.
- The manifest, registration script, worker, and all six icons return
200. - Login, authenticated API requests, panel navigation, logout, and the panel WebSocket all work.
- At least one VPN client can complete a fresh connection cycle.
If any check fails, restore the exact binary backup, restart x-ui once, and repeat the checks against the original build.