Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
aec3157
feat(desktop): add Web Shell Tauri proof of concept
yiliang114 Jul 30, 2026
07d46f9
feat(desktop): prepare Web Shell shell for release
yiliang114 Jul 30, 2026
39ee0c0
fix(desktop): make release dry runs portable
yiliang114 Jul 30, 2026
353f389
fix(desktop): harden cross-platform release smoke
yiliang114 Jul 30, 2026
7262951
fix(desktop): stabilize Windows and Linux CI
yiliang114 Jul 30, 2026
1c06a73
fix(desktop): scope bootstrap env to daemon
yiliang114 Jul 30, 2026
49f4609
fix(desktop): stabilize packaged app smoke
yiliang114 Jul 30, 2026
cc5d52e
fix(desktop): diagnose Linux packaged startup
yiliang114 Jul 30, 2026
a7e2943
fix(desktop): address release readiness review
yiliang114 Jul 30, 2026
cd1a337
fix(desktop): address follow-up review findings
yiliang114 Jul 31, 2026
1f85910
fix(desktop): address runtime review blockers
yiliang114 Jul 31, 2026
0423266
Merge remote-tracking branch 'origin/main' into HEAD
yiliang114 Jul 31, 2026
f3f1ee5
fix(desktop): gate cookie auth acceptance behind desktop bootstrap flag
yiliang114 Jul 31, 2026
68e5883
fix(desktop): replace cookie handshake with URL fragment auth
yiliang114 Jul 31, 2026
2b54509
fix(desktop): fix Linux smoke log path, add runtime .gitkeep, correct…
Jul 31, 2026
4ade2f0
fix(desktop): close release readiness gaps
yiliang114 Jul 31, 2026
8030695
Merge branch 'main' into feat/desktop-web-shell-poc
qwen-code-dev-bot Jul 31, 2026
47f3405
fix(cli): keep deferred serve auth gate closed when web shell unmount…
qwen-code-ci-bot Jul 31, 2026
57681e5
fix(desktop): address review feedback on auth gates and runtime bundl…
qwen-code-ci-bot Jul 31, 2026
f5bf97c
fix(desktop): address review feedback on runtime extraction and relea…
Jul 31, 2026
364d36f
fix(desktop): normalize artifact filenames to prevent updater 404s (#…
Aug 1, 2026
4fbdac7
Merge branch 'main' into feat/desktop-web-shell-poc
qwen-code-dev-bot Aug 1, 2026
518c8d7
fix(desktop): address review feedback on security, lint, and code qua…
qwen-code-ci-bot Aug 1, 2026
0a6edf5
fix(desktop): address review feedback on smoke test, error UX, and wi…
qwen-code-ci-bot Aug 1, 2026
ec4ce0c
fix(desktop): address review feedback on crate build, recovery UX, au…
qwen-code-ci-bot Aug 1, 2026
f6ae8cf
fix(desktop): address review feedback on settings race, version scrip…
Aug 1, 2026
3436609
fix(desktop): address review feedback on retry, auth gate, and releas…
Aug 1, 2026
0c3aeb3
fix(desktop): gate commands to bootstrap origin and show native updat…
Aug 1, 2026
596aeae
fix(desktop): use matches! instead of PartialEq on JoinError result (…
Aug 1, 2026
d8bd400
Merge branch 'main' into feat/desktop-web-shell-poc
qwen-code-dev-bot Aug 1, 2026
ec1d001
Merge branch 'main' into feat/desktop-web-shell-poc
qwen-code-dev-bot Aug 2, 2026
cb54666
fix(desktop): wait for deferred runtime in smoke tests and sync relea…
qwen-code-dev-bot Aug 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/scripts/create-desktop-update-manifest.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#!/usr/bin/env node

import fs from 'node:fs';
import path from 'node:path';

const options = parseArguments(process.argv.slice(2));
const assets = fs.readdirSync(options.assets).sort();
const platforms = {};
const platformArtifacts = [
[
'darwin-aarch64',
selectArtifact(assets, /-aarch64-apple-darwin\.app\.tar\.gz$/i, 'darwin-aarch64'),
],
[
'darwin-x86_64',
selectArtifact(assets, /-x86_64-apple-darwin\.app\.tar\.gz$/i, 'darwin-x86_64'),
],
['windows-x86_64', selectArtifact(assets, /-setup\.exe$/i, 'windows-x86_64')],
['linux-x86_64', selectArtifact(assets, /\.AppImage$/i, 'linux-x86_64')],
];

for (const [platform, artifact] of platformArtifacts) {
const signatureFile = `${artifact}.sig`;
if (!assets.includes(signatureFile)) {
throw new Error(`Missing updater signature for ${artifact}`);
}
platforms[platform] = {
signature: fs.readFileSync(path.join(options.assets, signatureFile), 'utf8').trim(),
url: `https://github.com/${options.repository}/releases/download/${options.tag}/${encodeURIComponent(artifact)}`,
};
}

const manifest = {
version: options.version,
pub_date: new Date().toISOString(),
platforms,
};
fs.writeFileSync(options.output, `${JSON.stringify(manifest, null, 2)}\n`);

function selectArtifact(assets, pattern, platform) {
const matches = assets.filter((asset) => pattern.test(asset));
if (matches.length !== 1) {
Comment on lines +40 to +42

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Suggestion] The "exactly one updater artifact per platform" guard and the argument validation are untested; testUpdateManifest covers only the 4-artifact happy path and the missing-signature path. — Concrete cost: if a platform build stops producing its artifact (found 0) or produces two (a stale extra *.AppImage), selectArtifact is the only thing that aborts the publish. A regression loosening the check (to === 0, or taking matches[0]) would let publish write a desktop-latest.json with a missing or arbitrary platform URL — clients on that platform 404 or download the wrong bundle — and no test fails. Add found-0 and found-2 cases plus a missing-required-arg invocation to testUpdateManifest.

中文说明

[Suggestion] "每个平台恰好一个更新产物" 的守卫与参数校验未被测试;testUpdateManifest 只覆盖 4 产物的正常路径和缺签名路径。— 具体代价:若某平台构建不再产出产物(找到 0 个)或产出两个(残留的多余 *.AppImage),selectArtifact 是唯一中止发布的东西。若回归把检查放宽(改成 === 0 或取 matches[0]),发布会写出缺失或任意平台 URL 的 desktop-latest.json——该平台客户端 404 或下载错误包——而没有测试会失败。建议在 testUpdateManifest 中补充 found-0、found-2 以及缺必填参数的用例。

— qwen3.8-max-preview via Qwen Code /review

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deferred: critical-only mode after 10 change-producing rounds. The found-0 / found-2 / missing-arg cases are valuable coverage but not a correctness defect — selectArtifact is correct today. Tracked for a follow-up.

中文说明

延后:10 个产生改动的轮次后进入仅处理 Critical 模式。found-0 / found-2 / 缺参数用例是有价值的覆盖,但非正确性缺陷——selectArtifact 目前正确。已记录至后续 PR。

throw new Error(
`Expected one updater artifact for ${platform}, found ${matches.length}: ${matches.join(', ')}`,
);
}
return matches[0];
}

function parseArguments(args) {
const values = {};
for (let index = 0; index < args.length; index += 2) {
const name = args[index]?.replace(/^--/, '');
const value = args[index + 1];
if (!name || value === undefined) throw new Error('Invalid arguments.');
values[name] = value;
}
for (const required of ['assets', 'repository', 'tag', 'version', 'output']) {
if (!values[required]) throw new Error(`Missing --${required}`);
}
return values;
}
76 changes: 76 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -828,3 +828,79 @@ jobs:
- name: 'Run CLI Integration Tests'
run: |-
npm run test:integration:cli:sandbox:none

#
# Desktop Shell: compile + test the Tauri crate in PR CI.
#
# The desktop-release workflow (workflow_dispatch only) is otherwise the sole
# place this crate is built, so a compile error can land on a PR and stay
# invisible until release time. This job compiles the crate and runs its
# release-config tests on every PR that touches the shell. It does not need
# the bundled runtime, so it is cheap. `cargo test` builds the crate and thus
# catches compile failures (e.g. a moved-value error); fmt/clippy are not run
# here because the release pipeline does not gate on them either.
desktop_shell:
name: 'Desktop Shell (ubuntu-22.04)'
needs: 'classify_pr'
if: "${{ !cancelled() && github.event_name != 'push' && needs.classify_pr.outputs.skip_ci != 'true' }}"
runs-on: 'ubuntu-22.04'
timeout-minutes: 45
permissions:
contents: 'read'
steps:
- name: 'Checkout'
uses: 'actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10' # v6.0.3
with:
ref: "${{ github.event.inputs.branch_ref || (github.event_name == 'pull_request' && format('refs/pull/{0}/head', github.event.pull_request.number)) || (github.event_name == 'merge_group' && github.event.merge_group.head_sha) || github.ref }}"
fetch-depth: 1

# Fail open: any uncertainty (non-PR event, fetch failure) runs the job.
- name: 'Detect desktop-shell changes'
id: 'filter'
env:
EVENT_NAME: '${{ github.event_name }}'
BASE_REF: '${{ github.base_ref }}'
run: |-
changed=true
if [[ "${EVENT_NAME}" == "pull_request" && -n "${BASE_REF}" ]]; then
if git fetch --depth=1 origin "${BASE_REF}" >/dev/null 2>&1; then
if git diff --name-only FETCH_HEAD HEAD | grep -Eq '^(packages/desktop-shell/|\.github/scripts/create-desktop-update-manifest\.mjs|\.github/workflows/ci\.yml)'; then
changed=true
else
changed=false
fi
fi
fi
echo "changed=${changed}" >> "${GITHUB_OUTPUT}"
echo "desktop-shell changed: ${changed}"

# cargo test links the Tauri/wry webview, so the WebKit/GTK dev headers
# must be present (mirrors the Linux build job in desktop-release.yml).
- name: 'Install Linux dependencies'
if: "${{ steps.filter.outputs.changed == 'true' }}"
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev libatk-bridge2.0-0 at-spi2-core dbus-x11 patchelf libfuse2 xdg-utils

- uses: 'actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e' # v6.4.0
if: "${{ steps.filter.outputs.changed == 'true' }}"
with:
node-version: '22.x'

- uses: 'dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4' # stable
if: "${{ steps.filter.outputs.changed == 'true' }}"

- uses: 'Swatinem/rust-cache@42dc69e1aa15d09112580998cf2ef0119e2e91ae' # v2
if: "${{ steps.filter.outputs.changed == 'true' }}"
with:
workspaces: 'packages/desktop-shell/src-tauri -> target'

- name: 'Compile and test the desktop crate'
if: "${{ steps.filter.outputs.changed == 'true' }}"
working-directory: 'packages/desktop-shell'
run: 'cargo test --manifest-path src-tauri/Cargo.toml'

- name: 'Run desktop release tests'
if: "${{ steps.filter.outputs.changed == 'true' }}"
working-directory: 'packages/desktop-shell'
run: 'node scripts/test-release.js'
Loading
Loading