| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
feat: kubo 0.42, electron 42 (#3167) * feat: kubo 0.42, electron 42 * fix: update app-builder-lib patch for electron-builder 26.15 * chore(deps): electron-updater 6.8.9 * fix: fetch electron binary before tests (electron 42) Electron 42 no longer downloads its binary during postinstall, so unit/e2e tests that require('electron') in a Node context fail with a missing path.txt. Run electron's install-electron only in pretest hooks, keeping npm install lean for downstream packagers that use a system electron. * fix: ensure electron binary installed before parallel tests Electron 42 fetches its binary lazily on first bin run, so parallel Playwright workers each race install.js and leave path.txt absent. Pre-install once, serialized, in a pretest step that falls back to a forced fresh download (recovers a corrupt cache) and fails loudly if path.txt still does not appear. * ci: add job timeouts to fail fast on hangs Jobs had no timeout-minutes and defaulted toward GitHub's 6h limit, so a stuck step could hang for hours. Cap each job above its worst-case successful-run duration: webui 10m (~15s typical), test 15m (~2m typical), build 40m (ubuntu packaging+signing peaked at ~22m). * test(e2e): de-race upgrade-dialog window wait The upgrade/error template only renders after kubo's startup attempt resolves, which is slow on CI (first run of a freshly downloaded binary, notably macOS), and it may appear in a reloaded or newly created prompt window. Poll every prompt window for the upgrade text with a budget-aligned timeout instead of binding to the first window and racing a fixed 45s wait. * feat: electron-builder 26.15 + png linux icon electron-builder 26.14 swapped its native (app-builder-bin) icon converter for a wasm-vips one that cannot read our legacy JPEG2000 icon.icns when generating the Linux icon set, which fails the Linux build. Provide an explicit 512px linux.icon PNG (the idiomatic Linux setup) so electron-builder resizes the PNG directly and never converts the .icns; mac/win keep their icns/ico. Drop the now-unused install-electron script. | 2 个月前 | |
fix tray: use scale-aware lookup for status menu icons (#3126) * tray: use available status menu icons for current scale * fix(tray): let electron resolve HiDPI status icons Ship an unsuffixed base PNG (`green.png`, etc.) alongside the existing `@Nx` variants so Electron's `nativeImage` HiDPI resolver picks the right asset automatically. This replaces the manual scale-lookup helper introduced earlier on this branch. Why this is better than resolving by hand: - electron's `nativeImage.createFromPath` already walks `@1x`/`@1.25x`/ `@1.33x`/`@1.4x`/`@1.5x`/`@1.8x`/`@2x`/`@2.5x`/`@3x`/`@4x`/`@5x` siblings of a base filename. passing a plain path to `MenuItem.icon` goes through the same resolver, so the feature is free once the base file exists. ref: https://www.electronjs.org/docs/latest/api/native-image - the manual helper only knew about `[1, 1.5, 2, 2.5, 3, 4, 5]`, so fractional DPI common on windows/linux (1.25x, 1.33x, 1.4x, 1.8x) fell back to a worse match than the native resolver would pick. - `screen.getPrimaryDisplay().scaleFactor` is the wrong signal on multi-monitor setups: the menu may render on a non-primary display with a different scale. the native resolver uses the per-paint scale. - the real bug was not the lookup code but the missing unsuffixed base file; fixing the generator removes the need for the lookup entirely. Changes: - `assets/icons/status/gen_status.sh`: after generating `@Nx` variants for a color, copy `@1x.png` to the unsuffixed base name. - `assets/icons/status/{gray,green,red,yellow}.png`: regenerated base PNGs (copies of the existing `@1x` files). - `src/tray.js`: revert to the plain `${color}.png` path and drop the manual resolver plus the `screen` import. * fix(tray): generate all electron-supported dpi variants Extend the status-icon generator to cover every scale suffix Electron's `nativeImage` resolves, and regenerate all PNGs in one pass so output is consistent across the set. Previously we shipped `@1x, @1.5x, @2x, @2.5x, @3x, @4x, @5x`. Electron also resolves `@1.25x, @1.33x, @1.4x, @1.8x` (per https://www.electronjs.org/docs/latest/api/native-image). The biggest practical gap was `@1.25x`: that is the default Windows DPI on most 13 to 14 inch 1080p laptops, so without it Electron fell back to upscaling `@1x` on a large slice of real installs. Pixel sizes follow `round(10 * scale)`: - `@1.25x` and `@1.33x` both land on 13x13 (distinct filenames, same pixel content is fine since the resolver keys on the suffix). - `@1.4x` is 14x14, `@1.8x` is 18x18; existing sizes are unchanged. Windows scale factors without a matching Electron suffix (1.75x, 2.25x, 3.5x, 4.5x) still fall back to the nearest supported neighbor - no generator change can fix that. Byte differences on pre-existing `@Nx` files are incidental re-encoding from a newer imagemagick; circles render the same. * chore(tray): optipng -o7 on status icons Lossless recompression of the status icon set with `optipng -o7`. Trims 642 bytes across 18 files; the gray variants reencode to a smaller palette and the larger colored variants gain from better IDAT filter selection. No visual change (optipng is lossless). * ci: skip azure signing on fork pr builds Electron-builder unconditionally reads `win.azureSignOptions` from `electron-builder.yml`, and the build step passes `AZURE_TENANT_ID` / `AZURE_CLIENT_ID` / `AZURE_CLIENT_SECRET` through from secrets. GitHub withholds secrets from fork PRs, so those env vars are empty and electron-builder fails with "Unable to find valid azure env field AZURE_TENANT_ID for signing" before producing any artifact. Strip `win.azureSignOptions` right before the build step, but only when `github.event.pull_request.head.repo.fork == true`. That scope is narrow on purpose: - push to main and pull_request events from branches within `ipfs/ipfs-desktop` keep `head.repo.fork == false` (or null), so the step is skipped and signing remains required. a misconfigured secret on an in-repo build still fails loudly, which is the intent. - fork PRs get an unsigned `.exe` artifact. good enough for review and local smoke testing; release builds never run from fork PRs anyway. The edit uses node with js-yaml (a transitive dep of electron-builder, already in node_modules from the preceding npm ci step) rather than yq, because yq is not preinstalled on the windows-latest runner. The modification is scoped to the runner's workspace and never committed. * test: settle playwright close after sigkill in afterEach Worker teardown timed out at 30s on windows even when all 13 tests passed. The teardown inherited a half-closed CDP connection from the last test: its `ipfsd` was left broken (kubo killed by the forced repo-version mismatch in the upgrade-dialog regression test), so `before-quit -> stopIpfs -> ipfsd.stop()` hung, the 15s race in afterEach fired, we sigkilled the subprocess, and the in-flight `app.close()` promise was abandoned. Playwright then spent its 30s worker-teardown budget waiting for that connection to unwind. After sigkill, call `app.close()` a second time with a 10s bounded deadline. Playwright dedupes concurrent closes internally, so this re-awaits the in-flight promise and gives its CDP client a window to notice the subprocess exit and release resources. Also detach `app` to null at the top of afterEach so a re-entrant teardown cannot double-handle. --------- Co-authored-by: Marcin Rataj <lidel@lidel.org> | 4 个月前 | |
chore: pull new translations (#3166) chore: pull transifex translations Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> | 3 个月前 | |
feat: add splash screen on top of ctx refactor (#2548) * chore: update ctx refactor * fix: tests * feat: add context.spec.js tests * fix: startup issues * feat: app context supports lazy functions * chore: self-PR-review cleanup * test: fix e2e tests * feat: add splash screen * tmp: trying to fix e2e tests * chore(deps): upgrade playwright * fix: revert daemonReady function * Update src/splash/splash.html * Update src/splash/splash.html * Update src/splash/splash.html * Update src/webui/index.js * Update test/e2e/launch.e2e.test.js * Update test/e2e/launch.e2e.test.js * Update test/e2e/launch.e2e.test.js * Update test/e2e/launch.e2e.test.js * Update test/e2e/launch.e2e.test.js * fix: do not prompt for new port when using CI * fix: handle errors that were breaking e2e tests * feat: splashscreen page background is transparent * make keyframe animation dir normal * remove visual artifacts of drop-shadow on size reduction * make drop-shadow animation better * feat: splash screen animation polish * chore: removed webkit keyframes definition * chore: remove debugging code * chore: remove extra line Co-authored-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * chore(splash-screen): repositioning awaits Co-authored-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * chore: fix after pr comment change * chore: move splash screen css to separate file --------- Co-authored-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> | 3 年前 | |
feat: monochrome tray icon on Windows & Linux (#2159) | 3 年前 |