Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
ee024f9
fix: clarify Pro2 firmware update workflow guard
wabicai Aug 7, 2026
8727b08
Merge branch 'hotfix/v6.5.2' into fix/firmware-upgrade-pro2
wabicai Aug 8, 2026
aaf1141
refactor: migrate desktop and webembed to rspack v2 (#12427)
huhuanming Jul 15, 2026
61702a7
fix: align rspack production config with x
wabicai Aug 8, 2026
777b993
fix: correct Pro2 portfolio currency conversion
wabicai Aug 8, 2026
d6432bd
docs: translate firmware workflow comments
wabicai Aug 8, 2026
9b83ab0
fix: address Pro2 firmware workflow review feedback
wabicai Aug 8, 2026
1c1cc48
fix: keep switched firmware wallets manageable
wabicai Aug 8, 2026
868350b
fix: support manifest-driven Pro2 resources
wabicai Aug 8, 2026
ac49ba2
fix: align Pro2 and Neo firmware update titles
wabicai Aug 8, 2026
b99f8d4
fix: sync locale translations
wabicai Aug 8, 2026
73ccaa1
chore: merge hotfix/v6.5.2
wabicai Aug 8, 2026
cfe579e
fix: load protocol v2 resource archives
wabicai Aug 8, 2026
987590d
fix: enable remote resource archive updates
wabicai Aug 8, 2026
8072f02
fix: address firmware update review feedback
wabicai Aug 8, 2026
4c7dd2c
chore: align hardware sdk alpha versions
wabicai Aug 8, 2026
620f7a9
fix: show protocol v2 update versions
wabicai Aug 8, 2026
f4b326c
fix: mark resource archive download state
wabicai Aug 8, 2026
b20afe5
fix: show protocol v2 component versions
wabicai Aug 8, 2026
3788f84
fix: harden protocol v2 firmware updates
wabicai Aug 8, 2026
043e751
chore: remove unrelated locale changes
wabicai Aug 8, 2026
d88f785
chore: align locale with hotfix base
wabicai Aug 8, 2026
a644f11
fix: honor protocol v2 forced update targets
wabicai Aug 8, 2026
70c825e
fix: handle protocol v2 resource update overrides
wabicai Aug 8, 2026
5393997
chore: update hardware sdk to 1.2.0-alpha.84
wabicai Aug 8, 2026
c432fa7
refactor: route firmware artifacts through unified downloader
wabicai Aug 8, 2026
e4fe0b8
fix: validate protocol v2 plan targets exactly
wabicai Aug 8, 2026
ea0e866
fix: bind firmware host to prepared plan
wabicai Aug 9, 2026
dee6fe8
fix: allow current firmware artifact host
wabicai Aug 9, 2026
8c52b59
fix: compare Protocol V2 resources by default
wabicai Aug 9, 2026
40ca854
chore: update hardware sdk to 1.2.0-alpha.86
wabicai Aug 9, 2026
e0b9f58
chore: update hardware sdk to 1.2.0-alpha.87
wabicai Aug 9, 2026
cd8b4d0
fix: allow pre-release firmware artifact hosts in developer mode (#12…
originalix Aug 9, 2026
6b655d7
fix: validate Protocol V2 firmware plans early
wabicai Aug 9, 2026
8fd41bb
chore: fix firmware artifact lint wording
wabicai Aug 9, 2026
583d3d6
fix: consume prepared plans without duplicate inputs
wabicai Aug 9, 2026
69eaf7c
style: format prepared plan assertion
wabicai Aug 9, 2026
af5b419
fix: address protocol v2 firmware review
wabicai Aug 9, 2026
4ea6512
chore: fix firmware UI test import order
wabicai Aug 9, 2026
56c831a
fix: support serial-less protocol v2 updates
wabicai Aug 9, 2026
567687f
chore: update hardware sdk to 1.2.0-alpha.92
wabicai Aug 9, 2026
7432a03
chore: update hardware sdk to alpha.98
wabicai Aug 9, 2026
d245846
chore: update hardware sdk to alpha.99
wabicai Aug 10, 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
56 changes: 5 additions & 51 deletions .github/workflows/build-desktop-renderer.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: build-desktop-renderer

# Reusable workflow: builds the desktop renderer (webpack) once on ubuntu,
# Reusable workflow: builds the desktop renderer (Rspack) once on Ubuntu,
# then uploads the artifact for downstream platform-specific packaging jobs.

on:
Expand Down Expand Up @@ -138,9 +138,9 @@ jobs:
run: |
cd apps/desktop
npx cross-env NODE_ENV=production yarn clean:build
npx cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=8192 webpack build
yarn run -T cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=8192 yarn run -T rspack build --config-loader jiti

# Desktop webpack builds with SRI enabled, so upload sourcemaps after the
# Desktop Rspack builds with SRI enabled, so upload sourcemaps after the
# build without mutating emitted JS files. Sentry failures should not block
# renderer artifact creation; failed uploads are archived separately before
# sourcemaps are stripped from the packaged renderer artifact.
Expand Down Expand Up @@ -182,61 +182,15 @@ jobs:
if-no-files-found: ignore
retention-days: 30

- name: Cleanup Desktop Sourcemaps and License Files
- name: Finalize Desktop Production Assets
if: always()
continue-on-error: true
run: |
if [ ! -d ./apps/desktop/web-build ]; then
echo "Desktop web-build directory does not exist - skipping sourcemap cleanup."
exit 0
fi

find ./apps/desktop/web-build -name '*.LICENSE.txt' -type f -exec rm -f {} +
find ./apps/desktop/web-build \
-type f \( -name '*.js.map' -o -name '*.css.map' \) \
-exec rm -f {} +
run: node ./apps/desktop/scripts/finalize-production-assets.js --strip-only

- name: Finalize Renderer Assets
run: |
cd apps/desktop
node scripts/finalize-renderer-assets.js

- name: Cleanup Desktop Sourcemaps from Artifact
if: always()
continue-on-error: true
run: |
if [ ! -d ./apps/desktop/app/build ]; then
echo "Desktop app/build directory does not exist - skipping sourcemap cleanup."
exit 0
fi

artifact_maps="$(find ./apps/desktop/app/build \
-type f \( -name '*.js.map' -o -name '*.css.map' \) \
-print)"
if [ -n "$artifact_maps" ]; then
echo "::warning::Desktop renderer artifact still contains sourcemaps after finalize; removing before upload:"
echo "$artifact_maps"
find ./apps/desktop/app/build \
-type f \( -name '*.js.map' -o -name '*.css.map' \) \
-exec rm -f {} +
fi

- name: Assert Desktop Sourcemaps Are Stripped
run: |
if [ ! -d ./apps/desktop/app/build ]; then
echo "::error::Desktop renderer build directory does not exist."
exit 1
fi

remaining_maps="$(find ./apps/desktop/app/build \
-type f \( -name '*.js.map' -o -name '*.css.map' \) \
-print)"
if [ -n "$remaining_maps" ]; then
echo "::error::Desktop renderer artifact still contains sourcemaps:"
echo "$remaining_maps"
exit 1
fi

- name: Export build metadata
id: export-metadata
run: |
Expand Down
59 changes: 55 additions & 4 deletions .github/workflows/release-app-bundles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ jobs:
echo " BRANCH=$BRANCH"
echo " COMMIT=$COMMIT"

# Pre-build the web-embed webpack bundle ONCE here, then both
# Pre-build the web-embed Rspack bundle ONCE here, then both
# native-bundle-ios and native-bundle-android download the same artifact.
# Avoids the duplicate web-embed-build that would otherwise show up under
# each native-bundle-* slot when each workflow_call ran its own internal
Expand Down Expand Up @@ -227,9 +227,60 @@ jobs:
env:
NODE_OPTIONS: '--max_old_space_size=8192'
NODE_ENV: production
# Skip postbuild.sh; it only syncs to native asset dirs the OTA bundle
# does not need.
run: cd apps/web-embed && npx webpack build
SENTRY_UPLOAD_BY_CLI: 'true'
WEB_EMBED_SKIP_POSTBUILD: 'true'
run: yarn workspace @onekeyhq/web-embed build

- name: Upload Web-embed Sourcemaps to Sentry
id: upload_web_embed_sourcemaps
continue-on-error: true
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_TOKEN }}
SENTRY_ORG: onekey-bb
SENTRY_PROJECT: react-native
BUILD_APP_VERSION: ${{ env.BUILD_APP_VERSION }}
BUILD_NUMBER: ${{ env.BUILD_NUMBER }}
run: |
if [ -z "$SENTRY_AUTH_TOKEN" ]; then
echo "No SENTRY_AUTH_TOKEN - skipping web-embed sourcemap upload."
echo "uploaded=false" >> "$GITHUB_OUTPUT"
exit 0
fi

RELEASE="$BUILD_APP_VERSION ($BUILD_NUMBER)"
# Sentry expects a literal tilde URL prefix.
# shellcheck disable=SC2088
URL_PREFIX='~/web-embed'
npx sentry-cli releases new "$RELEASE" || true
if ! npx sentry-cli sourcemaps inject ./apps/web-embed/web-build; then
echo "::warning::Web-embed Sentry debug-id injection failed; continuing with release-based upload."
fi
if npx sentry-cli sourcemaps upload --release "$RELEASE" --url-prefix "$URL_PREFIX" ./apps/web-embed/web-build; then
npx sentry-cli releases finalize "$RELEASE" || true
echo "uploaded=true" >> "$GITHUB_OUTPUT"
else
echo "::warning::Web-embed Sentry sourcemap upload failed; archiving sourcemaps before stripping them."
echo "uploaded=false" >> "$GITHUB_OUTPUT"
fi

- name: Verify injected Web-embed Chromium 67 compatibility
run: node ./apps/web-embed/scripts/check-browser-compat.js

- name: Upload Web-embed Sourcemap Diagnostic Artifact
if: always() && steps.upload_web_embed_sourcemaps.outputs.uploaded != 'true'
continue-on-error: true
uses: actions/upload-artifact@v4
with:
name: web-embed-sourcemaps-${{ github.sha }}
path: |
./apps/web-embed/web-build/**/*.js.map
./apps/web-embed/web-build/**/*.css.map
if-no-files-found: ignore
retention-days: 30

- name: Finalize Web-embed Production Assets
if: always()
run: node ./apps/web-embed/scripts/finalize-production-assets.js --strip-only

- name: Upload web-embed artifact
uses: actions/upload-artifact@v4
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/release-desktop-bundle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,58 @@ jobs:
- name: Build Bundle
env:
NODE_OPTIONS: '--max_old_space_size=8192'
SENTRY_UPLOAD_BY_CLI: 'true'
APPLEID: ${{ secrets.APPLEID }}
APPLEIDPASS: ${{ secrets.APPLEIDPASS }}
ASC_PROVIDER: ${{ secrets.ASC_PROVIDER }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: 'cd apps/desktop && yarn build:JsBundle'

- name: Upload Desktop Bundle Sourcemaps to Sentry
id: upload_desktop_bundle_sourcemaps
continue-on-error: true
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_TOKEN }}
SENTRY_ORG: onekey-bb
SENTRY_PROJECT: desktop
BUILD_APP_VERSION: ${{ env.BUILD_APP_VERSION }}
BUILD_NUMBER: ${{ env.BUILD_NUMBER }}
run: |
if [ -z "$SENTRY_AUTH_TOKEN" ]; then
echo "No SENTRY_AUTH_TOKEN - skipping desktop bundle sourcemap upload."
echo "uploaded=false" >> "$GITHUB_OUTPUT"
exit 0
fi

RELEASE="$BUILD_APP_VERSION ($BUILD_NUMBER)"
# Sentry expects a literal tilde URL prefix.
# shellcheck disable=SC2088
URL_PREFIX='~/'
npx sentry-cli releases new "$RELEASE" || true
if npx sentry-cli sourcemaps upload --release "$RELEASE" --url-prefix "$URL_PREFIX" ./apps/desktop/web-build; then
npx sentry-cli releases finalize "$RELEASE" || true
echo "uploaded=true" >> "$GITHUB_OUTPUT"
else
echo "::warning::Desktop bundle Sentry sourcemap upload failed; archiving sourcemaps before stripping them."
echo "uploaded=false" >> "$GITHUB_OUTPUT"
fi

- name: Upload Desktop Bundle Sourcemap Diagnostic Artifact
if: always() && steps.upload_desktop_bundle_sourcemaps.outputs.uploaded != 'true'
continue-on-error: true
uses: actions/upload-artifact@v4
with:
name: desktop-bundle-sourcemaps-${{ github.sha }}
path: |
./apps/desktop/web-build/**/*.js.map
./apps/desktop/web-build/**/*.css.map
if-no-files-found: ignore
retention-days: 30

- name: Finalize Desktop Bundle Production Assets
if: always()
run: node ./apps/desktop/scripts/finalize-production-assets.js --strip-only

- name: bundle folder
run: |
echo "current dir: $(pwd)"
Expand Down
34 changes: 3 additions & 31 deletions .github/workflows/release-desktop-snap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ jobs:
run: |
cd apps/desktop
npx cross-env NODE_ENV=production yarn clean:build
npx cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=8192 webpack build
yarn run -T cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=8192 yarn run -T rspack build --config-loader jiti

- name: Upload Desktop Snap Sourcemaps to Sentry
id: upload_desktop_snap_sourcemaps
Expand Down Expand Up @@ -152,19 +152,9 @@ jobs:
if-no-files-found: ignore
retention-days: 30

- name: Cleanup Desktop Snap Sourcemaps and License Files
- name: Finalize Desktop Snap Production Assets
if: always()
continue-on-error: true
run: |
if [ ! -d ./apps/desktop/web-build ]; then
echo "Desktop web-build directory does not exist - skipping sourcemap cleanup."
exit 0
fi

find ./apps/desktop/web-build -name '*.LICENSE.txt' -type f -exec rm -f {} +
find ./apps/desktop/web-build \
-type f \( -name '*.js.map' -o -name '*.css.map' \) \
-exec rm -f {} +
run: node ./apps/desktop/scripts/finalize-production-assets.js --strip-only

- name: Build and Sign Snap Linux
env:
Expand All @@ -179,24 +169,6 @@ jobs:
run: |
cd apps/desktop
node scripts/finalize-renderer-assets.js
artifact_maps="$(find ./app/build \
-type f \( -name '*.js.map' -o -name '*.css.map' \) \
-print)"
if [ -n "$artifact_maps" ]; then
echo "::warning::Desktop snap package still contains sourcemaps after finalize; removing before packaging:"
echo "$artifact_maps"
find ./app/build \
-type f \( -name '*.js.map' -o -name '*.css.map' \) \
-exec rm -f {} +
fi
remaining_maps="$(find ./app/build \
-type f \( -name '*.js.map' -o -name '*.css.map' \) \
-print)"
if [ -n "$remaining_maps" ]; then
echo "::error::Desktop snap package still contains sourcemaps:"
echo "$remaining_maps"
exit 1
fi
yarn build:main
yarn install-app-deps
npx electron-builder build -l --config electron-builder-snap.config.js ${{ matrix.build-flag }} --publish never
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release-native-bundle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ on:
web_embed_artifact:
# Name of an upstream actions/upload-artifact entry containing a
# pre-built apps/web-embed/web-build/. When set, the platform job
# downloads it and skips its local webpack run. Used by
# downloads it and skips its local Rspack run. Used by
# release-app-bundles.yml to share ONE web-embed build across the
# iOS and Android slots. Empty for direct workflow_dispatch — each
# platform falls back to running webpack locally.
# platform falls back to running the Rspack build locally.
type: string
required: false
default: ''
Expand Down Expand Up @@ -205,11 +205,11 @@ jobs:
# web-embed prebuild lives in the orchestrator (release-app-bundles.yml) so
# iOS and Android — which here are sibling workflow_call invocations of this
# workflow — can share ONE web-embed artifact. Without that lift, each
# workflow_call would internally re-run webpack (the symptom: two
# workflow_call would internally re-run Rspack (the symptom: two
# web-embed-build nodes in the orchestrator UI).
#
# Direct workflow_dispatch on this workflow has no upstream artifact:
# buildWebEmbed() in build-bundle-base.js falls back to running webpack
# buildWebEmbed() in build-bundle-base.js falls back to running Rspack
# locally per-platform. Acceptable for ad-hoc testing.
release-native-bundle:
# `needs:` alone gives us the right gating: if prepare-bundle-version
Expand Down Expand Up @@ -360,7 +360,7 @@ jobs:
# job in the orchestrator (release-app-bundles.yml). When running via
# direct workflow_dispatch with no upstream artifact, this step is
# skipped and buildWebEmbed() in build-bundle-base.js falls back to
# running webpack locally.
# running Rspack locally.
if: ${{ inputs.web_embed_artifact != '' }}
uses: actions/download-artifact@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .skillshare/skills/1k-dev-commands/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ allowed-tools: Bash, Read
## Application Development Commands

**PLATFORM-SPECIFIC DEVELOPMENT**:
- `yarn app:desktop:rspack` - Start desktop Electron app development
- `yarn app:desktop` - Start desktop Electron app development with Rspack
- **Runtime**: 30-60 seconds to start
- **Common issues**: Node version conflicts, missing native dependencies
- **Troubleshooting**: Run `yarn clean && yarn reinstall` if startup fails
Expand Down
4 changes: 2 additions & 2 deletions apps/desktop/app/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2229,8 +2229,8 @@ try {
/[.*+?^${}()|[\]\\]/g,
'\\$&',
);
// process.env.VERSION is substituted at build time by webpack DefinePlugin
// (apps/desktop/scripts/build.js) — the same path every other call site
// process.env.VERSION is substituted by the main-process esbuild config in
// apps/desktop/scripts/build.js — the same path every other call site
// uses. Falls back to '1' to match buildCustomUA()'s fallback in
// packages/shared/src/request/customUA.ts.
const appVersion = process.env.VERSION || '1';
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/app/tray/TrayManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export function initTrayManager(
cachedGetMainWindow = getMainWindow;

// __dirname resolves to <app>/dist in both dev and inside asar. In prod,
// build/ holds the packed webpack renderer output; in dev, build/ doesn't
// build/ holds the packed Rspack renderer output; in dev, build/ doesn't
// exist (renderer runs via dev-server), so we read from public/static/.
// Don't use app.getAppPath(): dev returns <app>/dist, prod returns the
// asar root — different levels.
Expand Down
11 changes: 5 additions & 6 deletions apps/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
"dev": "npx concurrently \"yarn build:main:dev\" \"yarn dev:renderer\" \"cross-env LAUNCH_ELECTRON=true node scripts/dev.js\"",
"dev:rspack": "npx concurrently \"yarn build:main:dev\" \"yarn dev:renderer:rspack\" \"cross-env LAUNCH_ELECTRON=true node scripts/dev.js\"",
"dev:main": "electron --inspect=5858 --remote-debugging-port=9222 --remote-debugging-address=127.0.0.1 app/dist/app.js",
"dev:renderer": "TRANSFORM_REGENERATOR_DISABLED=true BROWSER=none WEB_PORT=3001 webpack serve",
"dev:renderer:rspack": "TRANSFORM_REGENERATOR_DISABLED=true BROWSER=none WEB_PORT=3001 rspack serve",
"dev:renderer": "TRANSFORM_REGENERATOR_DISABLED=true BROWSER=none WEB_PORT=3001 yarn run -T rspack serve --config-loader jiti",
"dev:renderer:rspack": "TRANSFORM_REGENERATOR_DISABLED=true BROWSER=none WEB_PORT=3001 yarn run -T rspack serve --config-loader jiti",
"build:main:dev": "rimraf ./app/dist && cross-env node scripts/build.js",
"build:main": "rimraf ./app/dist && cross-env NODE_ENV=production node scripts/build.js",
"build:renderer": "cross-env NODE_ENV=production yarn clean:build && cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=8192 webpack build && node scripts/finalize-renderer-assets.js",
"build:renderer": "cross-env NODE_ENV=production yarn clean:build && cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=8192 yarn run -T rspack build --config-loader jiti && node scripts/finalize-production-assets.js && node scripts/finalize-renderer-assets.js",
"build:electron": "electron-builder build -ml --config electron-builder.config.js",
"build:electron:win": "electron-builder build -w --config electron-builder-win.config.js",
"build:electron:winms": "electron-builder build -w --config electron-builder-ms.config.js",
Expand All @@ -36,7 +36,7 @@
"build:winms": "cross-env NODE_ENV=production yarn clean:build && yarn build:renderer && yarn build:main && yarn install-app-deps && yarn build:electron:winms --publish never",
"publish:all": "cross-env NODE_ENV=production yarn clean:build && yarn build:renderer && yarn build:main && yarn install-app-deps && yarn build:electron --publish always",
"publish:winms": "cross-env NODE_ENV=production yarn clean:build && yarn build:renderer && yarn build:main && yarn install-app-deps && yarn build:electron:winms --publish always",
"build:JsBundle": "cross-env NODE_ENV=production BUILD_BUNDLE_UPDATE=true NODE_OPTIONS=--max-old-space-size=8192 webpack build",
"build:JsBundle": "cross-env NODE_ENV=production BUILD_BUNDLE_UPDATE=true NODE_OPTIONS=--max-old-space-size=8192 yarn run -T rspack build --config-loader jiti",
"test:e2e:browser": "node e2e/open-url.e2e.js"
},
"dependencies": {
Expand Down Expand Up @@ -67,7 +67,6 @@
"electron-builder": "26.4.0",
"esbuild": "0.27.2",
"glob": "^7.2.0",
"rimraf": "3.0.2",
"webpack": "5.90.3"
"rimraf": "3.0.2"
}
}
Loading
Loading