100 Commits
Author SHA1 Message Date
winewill dba631dda6 docs(windows): preserve network settings when reinstalling runner 2026-10-23 17:38:55 +08:00
winewill a4aab8ec61 docs(desktop): consolidate cache lifecycle guidance 2026-10-23 17:18:48 +08:00
winewill 0c3d6a1368 Merge remote-tracking branch 'origin/master' into perf/desktop-packaging-integration
# Conflicts:
#	.github/workflows/ci-windows.yml
#	apps/desktop/windows-signing/README.i18n.yaml
2026-10-23 17:10:54 +08:00
winewill 46ce2b61e0 Merge remote-tracking branch 'origin/master' into perf/desktop-packaging-integration
# Conflicts:
#	docs/development.i18n.yaml
#	scripts/build.spec.ts
2026-10-23 16:53:18 +08:00
winewill cb60c52cea docs(desktop): clarify shared packaging cache maintenance 2026-10-23 16:48:11 +08:00
winewill 9c3e97676e fix(ci): report successful runner network fixture exit 2026-10-23 16:33:05 +08:00
winewill a43a4bb9ee fix(desktop): supervise optional Windows runner network process 2026-10-23 15:50:31 +08:00
winewill 5a407d497f fix(build): order bundlers before shared client output writes 2026-10-22 20:08:53 +08:00
winewill 5a45e0a448 fix(desktop): clarify signing prerequisites and portable fixtures 2026-10-22 19:37:19 +08:00
winewill 6c5d7c918a fix(desktop): address packaging review follow-ups 2026-10-22 19:08:45 +08:00
winewill 523ecd189b docs(desktop): record signing concurrency qualification 2026-10-22 16:18:07 +08:00
winewill f5caf31fb5 test(desktop): qualify signing concurrency with release files 2026-10-22 16:04:53 +08:00
winewill 4db4345865 test(windows): compare signing concurrency with supervised probes 2026-10-22 14:27:28 +08:00
winewill 0f21742b25 fix(macos): apply ZIP compression when skipping notarization 2026-10-22 13:51:49 +08:00
winewill 32bbe4fc8a fix(windows): check token public identity before signing 2026-10-22 13:38:57 +08:00
winewill 863a731f3f Merge master and retain packaging priority check in Windows CI 2026-10-22 13:13:05 +08:00
winewill 59b24da527 fix(ci): pin Windows packaging helpers to workflow revision 2026-10-22 13:08:12 +08:00
winewill 5110ca9153 perf(desktop): integrate Windows packaging and align compression defaults 2026-10-22 11:21:41 +08:00
winewill 73574aff59 perf(windows): prepare Electron and primary runtime concurrently 2026-10-21 20:05:20 +08:00
winewill eda31bfc29 perf(windows): store installer uploads without recompression 2026-10-21 19:35:40 +08:00
winewill b6e387e5b3 fix(windows): normalize packaging step scheduling priority 2026-10-21 18:38:30 +08:00
winewill 9c622fad96 fix(windows): run packaging tasks at normal scheduling priority 2026-10-20 23:54:17 +08:00
winewill 10c3dd5a3e chore(windows): record dependency install resources 2026-10-20 22:32:28 +08:00
winewill f511e17dbd perf(windows): expose per-run installer compression 2026-10-20 21:34:54 +08:00
winewill 122da6fcff perf(windows): isolate packaging temporary files 2026-10-20 21:10:29 +08:00
winewill 9ee94429b9 perf(windows): support isolated packaging workspaces 2026-10-20 20:47:05 +08:00
winewill a12c0dfe46 revert(windows): drop unproven packaging I/O pool default 2026-10-20 20:33:54 +08:00
winewill d0664c9a7c perf(windows): match runtime I/O pool to bounded readers 2026-10-20 19:58:51 +08:00
winewill 8c56ebbb3b perf(windows): overlap package and runtime preparation 2026-10-20 19:14:15 +08:00
winewill e7a9e2683d perf(windows): bound parallel PE header discovery 2026-10-20 18:39:40 +08:00
winewill d148052e83 perf(windows): batch restored runtime signature verification 2026-10-20 18:30:35 +08:00
winewill ec17e0127e perf(windows): seal runtime inventories with bounded reads 2026-10-20 17:55:55 +08:00
winewill b7f46b5739 perf(build): overlap client compilation with host bundling 2026-10-20 17:38:24 +08:00
winewill a247c4c04a fix(ci): resolve package caches after runner allocation 2026-10-20 15:04:24 +08:00
winewill fb20e72e96 perf(windows): isolate package cache measurements and configure compression 2026-10-20 15:01:09 +08:00
winewill 6895919d5e test(desktop): avoid unsafe manifest assignment in metadata checks 2026-10-19 16:37:46 +08:00
winewill 0d9a7f9abf fix(desktop): preserve copyright and verify installer metadata 2026-10-19 16:23:59 +08:00
winewill f351c96d71 fix(desktop): set Windows publisher and uninstall display name 2026-10-19 16:01:50 +08:00
winewill 1bacc3db05 test(desktop): cover Windows pack preflight and relocate tuning docs 2026-10-16 14:31:39 +08:00
winewill e7f030ee3e fix(desktop): preserve runner recovery after output drain timeout 2026-10-16 14:16:07 +08:00
winewill e826d5bf33 perf(desktop): batch Windows workspace tarball packing 2026-10-16 14:08:14 +08:00
winewill 012a25f8df fix(desktop): preflight local publication config before install 2026-10-16 12:42:29 +08:00
winewill cf0a621494 fix(desktop): contain runner launcher failure paths 2026-10-16 12:42:29 +08:00
winewill d0085c9642 docs(desktop): document runner and publication setup 2026-10-16 12:42:29 +08:00
winewill 9defbaf451 fix(desktop): launch Windows runner without a console 2026-10-16 12:42:29 +08:00
winewill b8f8abc5d6 fix(desktop): publish to administratively unversioned COS buckets 2026-10-15 18:19:27 +08:00
winewill af66022ace fix(desktop): default Windows packaging to signed 2026-10-15 17:52:13 +08:00
winewill 5e23825f15 fix(desktop): reject debug publications early and harden runner supervision 2026-10-15 17:40:38 +08:00
winewill cfa52b0bac feat(infra): supervise Windows packaging runner with Task Scheduler 2026-10-15 17:19:42 +08:00
winewill c7ab529c34 fix(desktop): preserve recovery paths in installer dialogs 2026-10-14 20:11:41 +08:00
winewill 06e5024577 fix(desktop): bound expanded directory failure details 2026-10-14 19:58:21 +08:00
winewill dcc8df8320 fix(desktop): preserve reported recovery state and label retry attempts 2026-10-14 19:38:42 +08:00
winewill fae05edca7 test(desktop): share retry trace reads with the installer 2026-10-14 19:13:46 +08:00
winewill 14819e2eb4 fix(desktop): retry Windows installer directory locks and report failures 2026-10-14 19:08:02 +08:00
winewill a0a3ce4f84 docs(desktop): fix migrated references and duplicate anchors 2026-10-12 12:06:58 +08:00
winewill a73843f33c Merge remote-tracking branch 'origin/master' into docs/desktop-packaging-guides 2026-10-12 11:45:49 +08:00
winewill 28de983ef5 docs(desktop): separate packaging signing and publishing guides 2026-10-12 11:07:18 +08:00
winewill 6846934b98 fix(desktop): address auth popup review and startup test isolation 2026-10-08 15:19:23 +08:00
winewill 38e3791463 docs(desktop): record Host-independent shell configuration ownership 2026-10-08 15:04:49 +08:00
winewill e8226b2a84 fix(desktop): require local opt-in for test authentication popups 2026-10-08 14:38:27 +08:00
winewill 5637311d5a fix(desktop): confirm the first close with the shared shell dialog 2026-09-24 14:25:02 +08:00
winewill eec2b5fa6e fix(desktop): enlarge whale artwork in Windows tray icon 2026-09-24 14:24:39 +08:00
winewill e6f135f15c fix(desktop): harden quit bypass and background-notice bookkeeping after review
- Only the definitive Windows session-end message bypasses the quit
  confirmation; the macOS power-off flag clears on the next focus or show
  because another application can cancel that shutdown.
- A bypassing quit disposes the pending confirmation so a late inspection
  result opens no box and an answered box cannot approve.
- Cancelling a quit that closing the welcome window started shows the
  welcome window again.
- The first-hide notice records its marker only after delivery and
  withdraws it on failure; the Windows quit dialog uses the multi-size ICO.
- windowShown settles when the awaited window is destroyed.
- Cross-link the partially superseded window-menus note; tidy docs.
2026-09-24 14:24:39 +08:00
winewill 4745934683 feat(desktop): hide the window on close and confirm interruptible quits
Closing the main window hides it on macOS and Windows; the page and the
Host keep running and the next show resumes the same document. Windows
gets a permanent tray icon (open / quit) and a one-time notification the
first time the window is hidden after installation.

Every ordinary quit entry asks the Host over a new quit-inspection IPC
request for active tasks (same rule as the update restart check) and
armed scheduled reminders (schedule family of workspace/session-activity
for loaded sessions). Nothing to interrupt quits silently; otherwise a
native message box explains what stops, with Quit as the default and
Cancel on Esc. Inspection failure or a missed two-second deadline counts
as running tasks. The installer restart, fatal recovery, the development
restart command, and OS session end skip the confirmation.

Also: defer the downloaded-update confirmation while the window is hidden,
render the tray ICO from the vector icon, and point the installer's
running-application message at the tray.

Closes #4013
2026-09-24 14:24:39 +08:00
winewill 30a7f8f787 Merge branch 'master' into fix/windows-installer-extract-diagnostics 2026-09-22 17:37:28 +08:00
winewill d8924486ad fix(desktop): declare the cordis peer the packaged application needs
apps/desktop imports @deepseek-ai/dsh-api-gateway/stream-protocol, whose
import chain reaches @deepseek-ai/dsh-typert-protocol and then
@deepseek-ai/cordis. Both intermediate packages declare cordis as a
peerDependency and nothing satisfied it for the application closure, so
electron-builder omitted cordis from app.asar and the packaged main process
died before opening a window with ERR_MODULE_NOT_FOUND. A workspace checkout
resolves the peer through pnpm's own links, so development runs and the unit
lanes stayed green while every packaged build since efbc8e26b6 (2026-09-20)
failed to launch.

The lockfile additionally drops a stale duplicate glob@7.2.0 in favour of the
7.2.3 it already carries; any real pnpm install removes it.

Verified with a signed win-x64 installer built from this tree: app.asar now
ships cordis and @standard-schema/spec, and the installed application opens
its main window.
2026-09-22 17:21:06 +08:00
winewill bed4a2b565 fix(desktop): address review of the extraction failure report
- Headline skips the archive path 7-Zip echoes before an open failure
  (also when the path contains spaces) and prefers the operation line.
- Raw process statuses such as 0xC0000005 are kept and printed in hex
  instead of being clamped to INT_MAX.
- The expanded panel excerpts the result and 7-Zip's own lines rather
  than the report header.
- The saved report keeps up to 16 MiB of output, records any cut, and
  trims a partial UTF-8 sequence before decoding.
- The details view no longer reads the UTF-8 log as ANSI; the test seam
  define and the zero-padded GetTime order are documented; the smoke
  asserts a year-first report name and normalizes -FrameLibrary.
- README names the real updater cache directory.
2026-09-22 14:30:56 +08:00
winewill 4544874d62 Merge branch 'master' into fix/windows-installer-extract-diagnostics 2026-09-22 13:46:04 +08:00
winewill ab62f09c22 fix(desktop): report Windows extraction failures with 7-Zip evidence
The installer showed "Failed to decompress files" and discarded 7-Zip's
error output, so a failure such as security software quarantining an
extracted file could not be told apart from a full disk or a broken
download.

- InstallerExtract returns negated Win32 errors for launch failures so
  they no longer collide with 7-Zip exit codes; 7-Zip writes UTF-8 errors.
- window-frame.dll composes a report (result, archive, destination,
  Windows version, full 7-Zip output), saves it under the updater cache
  directory, and presents a task dialog with the first error line, a
  collapsible bounded excerpt, and a Copy error details button. Silent
  installs keep only the report; a missing task dialog falls back to a
  message box.
- Unsigned Windows builds name their installer *-unsigned.exe so a
  shared file cannot pass for a release artifact; version discovery
  still counts them.
- The directory smoke asserts the saved report on a broken archive and
  smoke-windows.ps1 accepts the prepared DLL.

Refs #4893
2026-09-22 12:38:05 +08:00
winewill 5fdad8d838 Merge branch 'master' into build/windows-release-scripts 2026-09-21 17:21:48 +08:00
winewill d54b000bdb fix(desktop): keep the new specs off the built tree and off unknown casts
The afterPack spec mocked the built runtime tree through a path relative
to the spec, which only resolves once `lib/` exists; on a clean checkout
the hook imported the real module and every case failed. It now mocks
the path the hook actually resolves, as the asar-unpack spec does, and
passes with `lib/` absent.

The toolchain probe assertion reached its matcher through an assertion
to unknown, which `verify-no-unknown-casts` forbids. It compares the
reported tools and detail directly instead.
2026-09-21 17:05:33 +08:00
winewill b8050f0251 fix(desktop): finish the review items the first pass missed
Three comments in the same review round went unread and still applied.

A failed tag push left the local tag in place, so the printed recovery
`git tag … && git push …` short-circuited on "already exists" and never
pushed. The result now carries the commands still outstanding, and the
tests cover a failed push and a failed tag separately.

Automatic numbering caught every error from resolving the upload
destination, which turned a misconfigured destination into silent local
numbering that can reuse a published index. It now checks whether a
destination is configured at all and lets an invalid one fail, and the
remaining catch names the error it reports.

`pnpmCommand` fell back to a bare `pnpm`, which on Windows is the batch
shim spawnSync cannot start — the failure this branch exists to fix. It
says so instead, and keeps the fallback where a shim is executable.

The afterPack regression this branch introduced earlier reached review
because nothing exercised that hook: one spec calls it directly for an
ordinary build, a prepared qualification runtime, and a build version,
and it fails when the expected version collapses back to one value.
2026-09-21 16:37:50 +08:00
winewill 0181baae5b Merge branch 'master' into build/windows-release-scripts
Adopt the `unsignedArtifacts` build path master introduced, in place of
the directory this branch was joining by hand for automatic numbering.
2026-09-21 16:14:26 +08:00
winewill 1b6451a647 fix(desktop): follow the documented release version rules
Review found that `apps/desktop/README.md#release-versions` and the
2026-09-16 version-derivation note already specify this convention, and
that three of their requirements were reversed without saying so. The
rules themselves are right; what was wrong was leaving them undocumented
and rejecting one of the forms they prescribe.

A stable base takes `-test.YYYYMMDD.index`, which validation refused
because such a version ranks below its base. That ordering is the point:
the form belongs to a test feed that never serves the production
release. Both READMEs, the older note, and a new note now record which
requirements this change reverses and why.

Three defects the review found, each reproducible:

- `afterPack` compared the bundled runtime against the product version,
  which broke installed-update qualification: that flow passes a runtime
  whose version was deliberately rewritten. The expected version is now
  a parameter the preparer supplies, and `verifyDesktopRuntime` says
  "bundled X is not the expected Y" rather than naming Electron.
- Upload could only learn the published version from a shell variable,
  conflicting with "release fields come only from the target file". It
  reads the completion record packaging wrote, and a mismatch now prints
  the version that record holds.
- Automatic numbering read one listing page and one fixed directory. It
  now follows every page, discards a listing it could not finish rather
  than reusing an index that would overwrite a published installer,
  bounds the request through the client's own timeout, and reads the
  directory an unsigned build actually writes.

Also: `npm run` and `yarn run` set `npm_execpath` too, so the pnpm
resolution checks the path names pnpm; the argument separator can arrive
after a run script's preset arguments, not only first; and the toolchain
probe, parser, build commit, and tarball readers now have specs.
2026-09-21 16:04:08 +08:00
winewill 4ab8fbfacc fix(desktop): name the commit a build records instead of its provenance
The concrete-terms gate forbids "provenance": the repository asks for the
exact source, field, or identity a value holds. The module records one
commit and whether its tree was dirty, so it and its callers say that.

The toolchain step also has to stay out of the way of the packaging
entry's error-recording test, which fakes the host platform and would
otherwise report the absent Windows compilers rather than the failure it
exercises. The test mocks the probe, as it already does for the release
environment and the signing keychain, and expects the new stage.
2026-09-21 15:26:29 +08:00
winewill ee0fc82267 fix(desktop): check the bundled runtime against the product version
Injecting a build version renamed the Electron shell but not the dsh
runtime packed into it, and afterPack required the two to be equal, so
every build carrying a build version failed after packaging finished.
The bundled runtime is the dsh package at the product version, which is
what the check now compares against; the app already reports the shell
version and the bundled runtime version separately to the update policy.

Rename the flag to --build-version. The repository already has
DOWNLOAD_TEST_RELEASE_ID for the opaque test feed directory, so calling
a version a release id invited a reader to confuse the two. Accept a
forwarded `--` as well, because `pnpm run <script> -- --build-version x`
passes the separator through as an argument and every following option
would otherwise parse as a second target.
2026-09-21 14:45:35 +08:00
winewill 950ed3f6df feat(desktop): publish a build version without rewriting the manifests
Packaging a build for a test feed or a colleague required bumping the
version in 295 manifests plus the lockfile first, because the version a
build publishes was only ever read from the checkout. Those edits cannot
be committed, so every such build left the working tree dirty, and the
`<version>.<date>.<sequence>` convention behind them lived only in the
operator's memory.

The version a build publishes is now an input. `--release-id` names it,
`--release-id auto` numbers it after the builds already published to the
destination bucket (falling back to local artifacts, since a fresh CI
checkout has none), and it reaches electron-builder through
extraMetadata, the update feed, and the upload validation as one value.
The manifests keep the product version, aligned with the dsh npm
package, and a release still publishes exactly that.

Validation goes through `semver` itself, because `electron-updater`
compares feed versions with `semver.gt` against the installed
`app.getVersion()`: a build version must outrank the product version it
extends, which holds for `0.1.6-alpha.2.20260921.1` over
`0.1.6-alpha.2` and cannot hold on a stable version, where a fourth
release number is not a version at all.

Two things a build could not previously answer for itself:

- Artifacts now carry the commit they were packaged from and whether
  that checkout was dirty, so a build handed to a colleague is traceable
  without a tag.
- A production upload tags that commit as `desktop-v<version>` once the
  artifacts are public, and reports what to run by hand rather than
  failing an upload that already completed. Test and local builds are
  deliberately left untagged.

A toolchain step now probes tar and the Windows installer compiler
before the first build step, so a host that cannot finish the sequence
says so in seconds rather than minutes.
2026-09-21 14:23:48 +08:00
winewill 766eee63eb fix(release): run pnpm and tar portably on Windows
spawnSync cannot start the pnpm .cmd shim without a shell, so the bump
step's lockfile refresh failed with ENOENT on Windows after rewriting
every manifest. Resolve pnpm to a JavaScript entry executed by the
current Node: the run-script's npm_execpath when present, otherwise the
workspace's own pnpm dependency (located on disk because pnpm's manifest
does not export its bin entry).

GNU tar parses the colon in an absolute Windows path as a remote-host
separator and aborts, so the tarball readers now run tar in the
tarball's directory and pass only its file name.
2026-09-21 13:30:12 +08:00
winewill 4df3de2075 fix(desktop): sharpen installer brand art and progress-page scaling
Re-render the four installer brand banners from the vector sources:
the badge follows the Figma spec (three-stop gradients, layered drop
shadows) and the whale no longer inherits shape-rendering=crispEdges,
which disabled anti-aliasing and left jagged edges. The wordmark now
reaches its design color instead of a soft #353638.

Draw the progress-page brand with high-quality bicubic interpolation
and half-pixel offset so the always-2x bitmap stays crisp when scaled
down at 96 DPI.
2026-09-21 12:02:49 +08:00
winewill 032394fc48 Merge remote-tracking branch 'origin/master' into fix/windows-mandatory-update-overlay 2026-09-20 17:01:23 +08:00
winewill 1e20aecef5 Merge remote-tracking branch 'origin/master' into fix/windows-mandatory-update-overlay 2026-09-20 15:59:42 +08:00
winewill f3e8021eaa Merge remote-tracking branch 'origin/master' into fix/windows-mandatory-update-overlay 2026-09-20 15:48:35 +08:00
winewill d4c5a1723f test(desktop): isolate update UI in directory-picker preload integration 2026-09-20 15:36:49 +08:00
winewill 015e60ff40 test(desktop): satisfy strict lint in mandatory update regressions 2026-09-20 15:23:36 +08:00
winewill 69ac149090 fix(desktop): isolate mandatory update actions and handle main-window lifecycle 2026-09-20 15:20:04 +08:00
winewill 12f0608cad Merge master into fix/windows-mandatory-update-overlay 2026-09-20 15:07:10 +08:00
winewill 925f609092 Merge remote-tracking branch 'origin/master' into fix/windows-mandatory-update-overlay 2026-09-18 18:47:20 +08:00
winewill d7fd452e96 test(desktop): exercise embedded mandatory update recovery on Windows 2026-09-18 18:40:31 +08:00
winewill fdc4887c38 fix(desktop): embed Windows mandatory updates in the main window 2026-09-18 18:26:40 +08:00
winewill 750bf4988e fix(desktop): initialize Windows cache under stage ownership 2026-09-18 15:37:05 +08:00
winewill 1a7308fbaa test(shell): synchronize background process completion 2026-09-18 15:37:05 +08:00
winewill 7754a6fd49 test(desktop): isolate Windows cache path from host platform 2026-09-18 15:37:05 +08:00
winewill d4ed1d93d8 feat(desktop): share Windows runtime signature cache across worktrees 2026-09-18 15:37:05 +08:00
winewill aa181c66e5 fix(desktop): preserve unpacked PE files and target runtime descriptors 2026-09-17 21:31:34 +08:00
winewill 702f9e4ff1 Restore desktop shell dialogs and guard destroyed windows on exit 2026-09-17 21:31:33 +08:00
winewill 3d2876f046 Run packaged smoke with production profile resolution 2026-09-17 21:31:32 +08:00
winewill 4d46bff152 Normalize dependency metadata before sealing desktop runtime 2026-09-17 21:31:32 +08:00
winewill 5a409fc771 fix(desktop): sign all Windows native dependencies before packaging 2026-09-17 21:31:31 +08:00
winewill 3cbb9442fa Fix Desktop async window-state lint 2026-09-17 16:19:02 +08:00
winewill 064d8f8670 Merge origin/master into feat/desktop-update 2026-09-17 16:11:00 +08:00