Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
# Install pnpm at the exact version pinned in package.json's
# `packageManager` field so local and CI environments match.
- name: Install pnpm
uses: pnpm/action-setup@v4
uses: pnpm/action-setup@f40ffcd9367d9f12939873eb1018b921a783ffaa # v4
with:
version: 11.8.0
run_install: false
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # stable

# Tauri v2 on Linux links against WebKit2GTK, GTK, libsoup and related
# system libraries. The build-script crates (glib-sys, gtk-sys,
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
run: sudo apt-get install -y sccache mold clang

- name: Cache cargo
uses: Swatinem/rust-cache@v2
uses: Swatinem/rust-cache@e9d7b9f1e587218970671bac74e5511ed9506e6a # v2
with:
workspaces: apps/desktop/src-tauri

Expand All @@ -124,10 +124,10 @@ jobs:
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # stable

- name: Cache cargo
uses: Swatinem/rust-cache@v2
uses: Swatinem/rust-cache@e9d7b9f1e587218970671bac74e5511ed9506e6a # v2
with:
workspaces: apps/desktop/src-tauri
key: windows
Expand Down Expand Up @@ -165,7 +165,7 @@ jobs:
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # stable
with:
targets: ${{ matrix.target }}

Expand All @@ -180,7 +180,7 @@ jobs:
echo "CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=$TOOLCHAIN/aarch64-linux-android21-clang" >> "$GITHUB_ENV"

- name: Cache cargo
uses: Swatinem/rust-cache@v2
uses: Swatinem/rust-cache@e9d7b9f1e587218970671bac74e5511ed9506e6a # v2
with:
workspaces: apps/desktop/src-tauri
key: ${{ matrix.target }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
uses: pnpm/action-setup@f40ffcd9367d9f12939873eb1018b921a783ffaa # v4
with:
version: 11.8.0
run_install: false
Expand All @@ -58,7 +58,7 @@ jobs:
cache: pnpm

- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # stable

- name: Install Tauri Linux system dependencies
run: |
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:

- name: Build (Rust only)
if: matrix.language == 'rust'
run: cargo build --manifest-path apps/desktop/src-tauri/Cargo.toml --lib
run: cargo build --locked --manifest-path apps/desktop/src-tauri/Cargo.toml --lib

- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@v4
Expand Down
24 changes: 16 additions & 8 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ on:
- cron: "0 2 * * *"
workflow_dispatch:

# Least privilege: `check` only reads; the write grants live on the two jobs
# that publish the rolling prerelease.
permissions:
contents: write
contents: read

jobs:
# ───────────────────────────── Check for changes ────────────────────────
Expand Down Expand Up @@ -59,6 +61,9 @@ jobs:
# ───────────────────────────── Desktop (Linux / macOS / Windows) ────────
desktop:
name: ${{ matrix.label }}
# tauri-action creates/overwrites the nightly prerelease.
permissions:
contents: write
needs: check
if: needs.check.outputs.should-build == 'true'
strategy:
Expand Down Expand Up @@ -86,7 +91,7 @@ jobs:
ref: main

- name: Install pnpm
uses: pnpm/action-setup@v4
uses: pnpm/action-setup@f40ffcd9367d9f12939873eb1018b921a783ffaa # v4
with:
version: 11.8.0
run_install: false
Expand All @@ -98,7 +103,7 @@ jobs:
cache: pnpm

- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # stable
with:
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}

Expand All @@ -123,15 +128,15 @@ jobs:
patchelf

- name: Cache cargo
uses: swatinem/rust-cache@v2
uses: swatinem/rust-cache@e9d7b9f1e587218970671bac74e5511ed9506e6a # v2
with:
workspaces: apps/desktop/src-tauri

- name: Install frontend dependencies
run: pnpm install --frozen-lockfile

- name: Build and publish
uses: tauri-apps/tauri-action@v0.6.2
uses: tauri-apps/tauri-action@1ddc7b49b13c3038297360482fcb3e058764d7c9 # v0.6.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
Expand Down Expand Up @@ -178,6 +183,9 @@ jobs:
name: Android
needs: check
if: needs.check.outputs.should-build == 'true' && vars.ANDROID_RELEASE_ENABLED == 'true'
# Uploads the APK to the nightly prerelease via `gh release upload`.
permissions:
contents: write
runs-on: ubuntu-latest

steps:
Expand All @@ -187,7 +195,7 @@ jobs:
ref: main

- name: Install pnpm
uses: pnpm/action-setup@v4
uses: pnpm/action-setup@f40ffcd9367d9f12939873eb1018b921a783ffaa # v4
with:
version: 11.8.0
run_install: false
Expand All @@ -199,7 +207,7 @@ jobs:
cache: pnpm

- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # stable
with:
targets: aarch64-linux-android,armv7-linux-androideabi,i686-linux-android,x86_64-linux-android

Expand Down Expand Up @@ -239,7 +247,7 @@ jobs:
done

- name: Cache cargo
uses: swatinem/rust-cache@v2
uses: swatinem/rust-cache@e9d7b9f1e587218970671bac74e5511ed9506e6a # v2
with:
workspaces: apps/desktop/src-tauri
key: android
Expand Down
27 changes: 17 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ on:
workflow_dispatch:

# `contents: write` is needed by tauri-action to create the GitHub Release and
# by the Android job to `gh release upload` assets to it.
# by the Android job to `gh release upload` assets to it — so it is granted on
# those two jobs, not workflow-wide.
permissions:
contents: write
contents: read

jobs:
# ───────────────────────────── Desktop (Linux / macOS / Windows) ────────
Expand All @@ -41,6 +42,9 @@ jobs:
# only uploads workflow artifacts (`tagName` is empty so no release is made).
desktop:
name: ${{ matrix.label }}
# tauri-action drafts the release and uploads bundles on tag pushes.
permissions:
contents: write
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -71,7 +75,7 @@ jobs:
run: node scripts/version.mjs --check --tag "${{ github.ref_name }}"

- name: Install pnpm
uses: pnpm/action-setup@v4
uses: pnpm/action-setup@f40ffcd9367d9f12939873eb1018b921a783ffaa # v4
with:
version: 11.8.0
run_install: false
Expand All @@ -83,7 +87,7 @@ jobs:
cache: pnpm

- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # stable
with:
# macOS builds target both architectures; other platforms build natively.
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
Expand All @@ -109,7 +113,7 @@ jobs:
patchelf

- name: Cache cargo
uses: swatinem/rust-cache@v2
uses: swatinem/rust-cache@e9d7b9f1e587218970671bac74e5511ed9506e6a # v2
with:
workspaces: apps/desktop/src-tauri

Expand All @@ -120,7 +124,7 @@ jobs:
# Pinned to v0.6.2 (released 2026-03-14). The @v1 major alias does not
# resolve in GitHub Actions (tauri-apps/tauri-action#1311), so we pin to
# an explicit, vetted tag instead of a floating major version.
uses: tauri-apps/tauri-action@v0.6.2
uses: tauri-apps/tauri-action@1ddc7b49b13c3038297360482fcb3e058764d7c9 # v0.6.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Signs the updater artifacts. The app only accepts an update signed
Expand Down Expand Up @@ -200,6 +204,9 @@ jobs:
# point building an unsigned release bundle for distribution, and failing
# loudly here is better than shipping an unsigned artifact by accident.
if: ${{ vars.ANDROID_RELEASE_ENABLED == 'true' }}
# Uploads the APK to the release via `gh release upload`.
permissions:
contents: write
runs-on: ubuntu-latest

steps:
Expand All @@ -213,7 +220,7 @@ jobs:
run: node scripts/version.mjs --check --tag "${{ github.ref_name }}"

- name: Install pnpm
uses: pnpm/action-setup@v4
uses: pnpm/action-setup@f40ffcd9367d9f12939873eb1018b921a783ffaa # v4
with:
version: 11.8.0
run_install: false
Expand All @@ -225,7 +232,7 @@ jobs:
cache: pnpm

- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # stable
with:
# All four Android ABIs Tauri builds by default.
targets: aarch64-linux-android,armv7-linux-androideabi,i686-linux-android,x86_64-linux-android
Expand Down Expand Up @@ -275,7 +282,7 @@ jobs:
done

- name: Cache cargo
uses: swatinem/rust-cache@v2
uses: swatinem/rust-cache@e9d7b9f1e587218970671bac74e5511ed9506e6a # v2
with:
workspaces: apps/desktop/src-tauri
key: android
Expand Down Expand Up @@ -357,7 +364,7 @@ jobs:
sudo udevadm trigger --name-match=kvm

- name: Smoke-test minified Android release
uses: reactivecircus/android-emulator-runner@v2
uses: reactivecircus/android-emulator-runner@4c44018e59b437e86cdfc41da381398f93ed8808 # v2
with:
api-level: 35
target: google_apis
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,4 @@ ehthumbs.db
temp/
tmp/
tools/keyring-migration-probe/target/
tools/keyring-migration-probe/Cargo.lock
.zvec-grep
8 changes: 7 additions & 1 deletion apps/desktop/src/extensions/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,13 @@ export function bootstrapExtensions(options: BootstrapOptions = {}): ExtensionBo
const failedManifests: BootstrapEntry[] = [];

const disposeAll = (disposables: Disposable[]): Disposable[] => {
for (const disposable of disposables) disposable.dispose();
for (const disposable of disposables) {
// Dispose may settle async, but this rollback helper is synchronous —
// report failures and keep unwinding rather than dropping the promise.
void Promise.resolve(disposable.dispose()).catch((error: unknown) => {
console.error("[extensions] Failed to dispose a bootstrap resource.", error);
});
}
return [];
};

Expand Down
21 changes: 10 additions & 11 deletions apps/desktop/src/journal/AddFieldRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,15 @@ export function AddFieldRow({ available, existingKeys, onAdd, readOnly = false }

// Validity is the model's to decide; this only turns the code into words.
const check = typed === "" ? null : validateFieldDefinition({ id: key, label: "x", type: "text" });
const problem =
typed === "" || matched
? null
: existingKeys.includes(key)
? `"${key}" is already on this entry.`
: check?.definition
? null
: check?.diagnostics[0]?.code === "journal_field_reserved"
? `"${key}" is already used by the app itself. Try another name.`
: "Give this a name using letters or numbers.";
const problem = (() => {
if (typed === "" || matched) return null;
if (existingKeys.includes(key)) return `"${key}" is already on this entry.`;
if (check?.definition) return null;
if (check?.diagnostics[0]?.code === "journal_field_reserved") {
return `"${key}" is already used by the app itself. Try another name.`;
}
return "Give this a name using letters or numbers.";
})();

const add = (field: JournalFieldDefinition): void => {
onAdd(field);
Expand Down Expand Up @@ -88,7 +87,7 @@ export function AddFieldRow({ available, existingKeys, onAdd, readOnly = false }
return (
<div className="relative flex flex-col">
<input
autoFocus
ref={(el) => el?.focus()}
aria-label="New field name"
value={draft}
onChange={(event) => setDraft(event.target.value)}
Expand Down
1 change: 1 addition & 0 deletions apps/desktop/src/journal/JournalPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ export function JournalPanel({
<div
ref={listRef}
role="tree"
tabIndex={0}
aria-label="Journal entries"
data-phone-scroll-clearance
className="min-h-0 flex-1 overflow-auto"
Expand Down
Loading
Loading