-
Notifications
You must be signed in to change notification settings - Fork 3k
feat(desktop): package Web Shell as a release-ready desktop app #8132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
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 07d46f9
feat(desktop): prepare Web Shell shell for release
yiliang114 39ee0c0
fix(desktop): make release dry runs portable
yiliang114 353f389
fix(desktop): harden cross-platform release smoke
yiliang114 7262951
fix(desktop): stabilize Windows and Linux CI
yiliang114 1c06a73
fix(desktop): scope bootstrap env to daemon
yiliang114 49f4609
fix(desktop): stabilize packaged app smoke
yiliang114 cc5d52e
fix(desktop): diagnose Linux packaged startup
yiliang114 a7e2943
fix(desktop): address release readiness review
yiliang114 cd1a337
fix(desktop): address follow-up review findings
yiliang114 1f85910
fix(desktop): address runtime review blockers
yiliang114 0423266
Merge remote-tracking branch 'origin/main' into HEAD
yiliang114 f3f1ee5
fix(desktop): gate cookie auth acceptance behind desktop bootstrap flag
yiliang114 68e5883
fix(desktop): replace cookie handshake with URL fragment auth
yiliang114 2b54509
fix(desktop): fix Linux smoke log path, add runtime .gitkeep, correct…
4ade2f0
fix(desktop): close release readiness gaps
yiliang114 8030695
Merge branch 'main' into feat/desktop-web-shell-poc
qwen-code-dev-bot 47f3405
fix(cli): keep deferred serve auth gate closed when web shell unmount…
qwen-code-ci-bot 57681e5
fix(desktop): address review feedback on auth gates and runtime bundl…
qwen-code-ci-bot f5bf97c
fix(desktop): address review feedback on runtime extraction and relea…
364d36f
fix(desktop): normalize artifact filenames to prevent updater 404s (#…
4fbdac7
Merge branch 'main' into feat/desktop-web-shell-poc
qwen-code-dev-bot 518c8d7
fix(desktop): address review feedback on security, lint, and code qua…
qwen-code-ci-bot 0a6edf5
fix(desktop): address review feedback on smoke test, error UX, and wi…
qwen-code-ci-bot ec4ce0c
fix(desktop): address review feedback on crate build, recovery UX, au…
qwen-code-ci-bot f6ae8cf
fix(desktop): address review feedback on settings race, version scrip…
3436609
fix(desktop): address review feedback on retry, auth gate, and releas…
0c3aeb3
fix(desktop): gate commands to bootstrap origin and show native updat…
596aeae
fix(desktop): use matches! instead of PartialEq on JoinError result (…
d8bd400
Merge branch 'main' into feat/desktop-web-shell-poc
qwen-code-dev-bot ec1d001
Merge branch 'main' into feat/desktop-web-shell-poc
qwen-code-dev-bot cb54666
fix(desktop): wait for deferred runtime in smoke tests and sync relea…
qwen-code-dev-bot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) { | ||
| 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; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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;
testUpdateManifestcovers 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),selectArtifactis the only thing that aborts the publish. A regression loosening the check (to=== 0, or takingmatches[0]) would let publish write adesktop-latest.jsonwith 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 totestUpdateManifest.中文说明
[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
There was a problem hiding this comment.
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 —
selectArtifactis correct today. Tracked for a follow-up.中文说明
延后:10 个产生改动的轮次后进入仅处理 Critical 模式。found-0 / found-2 / 缺参数用例是有价值的覆盖,但非正确性缺陷——
selectArtifact目前正确。已记录至后续 PR。