Skip to content
Merged
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
55 changes: 55 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: CI

on:
pull_request:
push:
branches:
- main

permissions:
contents: read

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
checks:
name: Typecheck, lint, unit tests
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v6

- name: Setup pnpm
uses: pnpm/action-setup@v6
with:
version: 11.0.8
run_install: false

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 24
cache: pnpm

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt

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

- name: Typecheck
run: pnpm typecheck

- name: Lint
run: pnpm lint

- name: Unit tests
run: pnpm test:unit

- name: Rust format check
run: cargo fmt --manifest-path src-tauri/Cargo.toml --check
4 changes: 3 additions & 1 deletion src-tauri/src/core/github/sync/push.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ pub fn push_all(client: &GithubClient, settings: &GithubRepoSettings) -> AppResu
continue;
}
let path = remote_path(path);
if let Some((_content, sha)) = client.read_file(&settings.repo_owner, &settings.repo_name, &path)? {
if let Some((_content, sha)) =
client.read_file(&settings.repo_owner, &settings.repo_name, &path)?
{
deleted_files.push((path, sha));
}
}
Expand Down
11 changes: 8 additions & 3 deletions src/base/i18n/locales.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,14 @@ describe("locales", () => {

test("does not keep stale locale keys", () => {
const usedKeys = usedTranslationKeys();
const staleKeys = Object.keys(enKeys).filter(
(key) => !usedKeys.has(key) && !key.startsWith("errors."),
);
const staleKeys = Object.keys(enKeys).filter((key) => {
if (usedKeys.has(key) || key.startsWith("errors.")) {
return false;
}

const singularKey = key.replace(/_plural$/, "");
return singularKey === key || !usedKeys.has(singularKey);
});

expect(staleKeys).toEqual([]);
});
Expand Down
2 changes: 0 additions & 2 deletions src/base/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,8 @@
"skillsNeedAttention_plural": "{{count}} skills need attention",
"configsNeedAttention": "{{count}} configuration needs attention",
"configsNeedAttention_plural": "{{count}} configurations need attention",
"instructions": "Instructions",
"missing": "Missing link",
"targetBlocked": "Blocked target",
"details": "Details",
"review": "Review",
"fix": "Repair",
"replace": "Replace",
Expand Down
2 changes: 0 additions & 2 deletions src/base/i18n/locales/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,8 @@
"skillsNeedAttention_plural": "{{count}} färdigheter behöver åtgärdas",
"configsNeedAttention": "{{count}} konfiguration behöver åtgärdas",
"configsNeedAttention_plural": "{{count}} konfigurationer behöver åtgärdas",
"instructions": "Instruktioner",
"missing": "Länk saknas",
"targetBlocked": "Mål blockerat",
"details": "Detaljer",
"review": "Granska",
"fix": "Återskapa",
"replace": "Ersätt",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,9 @@ function LinkStatusRow({ onFix, status }: LinkStatusRowProps) {
</Text>
<div className="flex min-w-0 items-center gap-1">
<Badge variant="red">
{t(
status.state === "blocked"
? "sync.targetBlocked"
: "sync.missing",
)}
{status.state === "blocked"
? t("sync.targetBlocked")
: t("sync.missing")}
</Badge>
<Badge>{status.configName}</Badge>
</div>
Expand Down