Skip to content

Commit a846942

Browse files
committed
feat: update to version 1.4.1 with enhanced logging and diagnostics features
1 parent ecd0cf0 commit a846942

23 files changed

Lines changed: 408 additions & 160 deletions

File tree

.github/workflows/release.yml

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,3 +229,120 @@ jobs:
229229
files: src-tauri/windows/out/TimeLens-${{ steps.release_tag.outputs.msix_version }}.msix
230230
env:
231231
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
232+
233+
build-windows-with-webview2:
234+
name: Build and upload Windows installers (WithWebView2)
235+
runs-on: windows-latest
236+
needs: build
237+
steps:
238+
- uses: actions/checkout@v4
239+
with:
240+
fetch-depth: 0
241+
242+
- name: Resolve release tag
243+
id: release_tag
244+
shell: pwsh
245+
run: |
246+
if ("${{ github.event_name }}" -eq "push") {
247+
$tag = "${{ github.ref_name }}"
248+
} else {
249+
$tag = "${{ inputs.tag }}"
250+
}
251+
252+
if ($tag -notmatch '^v[0-9]+\.[0-9]+\.[0-9]+([-.][0-9A-Za-z.]+)?$') {
253+
Write-Error "Invalid tag format: $tag"
254+
}
255+
256+
git fetch --tags --force
257+
git rev-parse -q --verify "refs/tags/$tag" | Out-Null
258+
if ($LASTEXITCODE -ne 0) {
259+
Write-Error "Tag not found: $tag"
260+
}
261+
262+
$versionNoV = $tag.TrimStart('v')
263+
"tag=$tag" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
264+
"version=$versionNoV" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
265+
266+
- name: Setup Node.js
267+
uses: actions/setup-node@v4
268+
with:
269+
node-version: 20
270+
cache: npm
271+
272+
- name: Install frontend dependencies
273+
run: npm ci
274+
275+
- name: Validate version consistency
276+
shell: pwsh
277+
run: |
278+
$tagVersion = "${{ steps.release_tag.outputs.version }}"
279+
$pkgVersion = (node -p "require('./package.json').version").Trim()
280+
$tauriVersion = (node -p "require('./src-tauri/tauri.conf.json').version").Trim()
281+
282+
Write-Host "Release tag version: $tagVersion"
283+
Write-Host "package.json version: $pkgVersion"
284+
Write-Host "tauri.conf.json version: $tauriVersion"
285+
286+
if ($tagVersion -ne $pkgVersion -or $tagVersion -ne $tauriVersion) {
287+
Write-Error "Version mismatch detected. Tag version must match package.json and src-tauri/tauri.conf.json."
288+
}
289+
290+
- name: Setup Rust toolchain
291+
uses: dtolnay/rust-toolchain@stable
292+
293+
- name: Cache Rust
294+
uses: Swatinem/rust-cache@v2
295+
with:
296+
workspaces: src-tauri
297+
298+
- name: Build NSIS/MSI with bundled WebView2 runtime
299+
shell: pwsh
300+
run: |
301+
$overridePath = "src-tauri/tauri.webview2.override.json"
302+
$override = @{
303+
bundle = @{
304+
windows = @{
305+
webviewInstallMode = @{
306+
type = "offlineInstaller"
307+
silent = $true
308+
}
309+
}
310+
}
311+
}
312+
$override | ConvertTo-Json -Depth 16 | Set-Content -Path $overridePath -Encoding UTF8
313+
314+
npx tauri build --bundles nsis,msi --config $overridePath
315+
316+
- name: Prepare renamed WithWebView2 artifacts
317+
id: artifacts
318+
shell: pwsh
319+
run: |
320+
$bundleRoot = "src-tauri/target/release/bundle"
321+
$nsis = Get-ChildItem -Path (Join-Path $bundleRoot "nsis") -Filter "*.exe" -File | Sort-Object LastWriteTime -Descending | Select-Object -First 1
322+
$msi = Get-ChildItem -Path (Join-Path $bundleRoot "msi") -Filter "*.msi" -File | Sort-Object LastWriteTime -Descending | Select-Object -First 1
323+
324+
if (-not $nsis) { throw "NSIS installer not found." }
325+
if (-not $msi) { throw "MSI installer not found." }
326+
327+
$version = "${{ steps.release_tag.outputs.version }}"
328+
$outDir = Join-Path $bundleRoot "with-webview2"
329+
New-Item -ItemType Directory -Path $outDir -Force | Out-Null
330+
331+
$nsisOut = Join-Path $outDir "TimeLens-$version-WithWebView2-Setup.exe"
332+
$msiOut = Join-Path $outDir "TimeLens-$version-WithWebView2.msi"
333+
334+
Copy-Item -Path $nsis.FullName -Destination $nsisOut -Force
335+
Copy-Item -Path $msi.FullName -Destination $msiOut -Force
336+
337+
"nsis_file=$nsisOut" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
338+
"msi_file=$msiOut" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
339+
340+
- name: Upload WithWebView2 installers to release
341+
uses: softprops/action-gh-release@v2
342+
with:
343+
tag_name: ${{ steps.release_tag.outputs.tag }}
344+
files: |
345+
${{ steps.artifacts.outputs.nsis_file }}
346+
${{ steps.artifacts.outputs.msi_file }}
347+
env:
348+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
55

66
---
77

8+
## [1.4.1] - 2026-05-16
9+
10+
### Changed
11+
12+
#### Reliability and Diagnostics
13+
14+
- **Startup fallback hardened** — app boot now falls back to the main window render path when Tauri window label metadata is unavailable during early initialization, reducing black-screen startup failures seen after 1.2.0 upgrades
15+
- **Persisted state safety guards** — settings and dashboard layout stores now tolerate malformed legacy localStorage payloads and fall back to defaults instead of breaking initial render
16+
- **Unified file logging pipeline** — backend runtime logs and frontend `console` / unhandled error events now flow into persistent on-disk logs for post-mortem troubleshooting
17+
- **Settings quick access to logs** — the About section now includes a one-click action to open the app log folder directly in the system file manager
18+
19+
### Fixed
20+
21+
- Fixed an issue where some upgraded environments could open to a black screen and appear unresponsive
22+
- Fixed missing persistent diagnostics for startup/runtime failures by writing both frontend and backend logs to file
23+
824
## [1.4.0] - 2026-05-16
925

1026
### Added

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "timelens",
33
"private": true,
4-
"version": "1.4.0",
4+
"version": "1.4.1",
55
"authors": ["Shan Wenxiao"],
66
"type": "module",
77
"scripts": {

src-tauri/Cargo.lock

Lines changed: 11 additions & 138 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)