Skip to content

Sync the recorded values and name the editors in the commit - #126

Merged
arvida merged 3 commits into
mainfrom
feature/sync-version-and-editors
Oct 9, 2026
Merged

arvida merged 3 commits into
mainfrom
feature/sync-version-and-editors

Conversation

@arvida

@arvida arvida commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

CLI side of auto sync (localheroai/localhero-ai#710, #882). Two small changes to sync mode.

Change

  • Fetch what the sync update recorded. getSyncTranslations sends the version the CLI already holds (LOCALHERO_SYNC_VERSION or syncUpdateVersion in localhero.json) on every page. The server then serves the values that update recorded when it was created, not whatever is live when CI fetches. Before, an edit saved while CI was starting went out early, and the web app still showed it as waiting. Now it waits for the next sync.
  • Name the editors in the commit. When the sync response carries edited_by (up to five names, ordered by how much each person changed) and edited_by_others, the commit gets a line such as Edited on Localhero.ai by Anna Svensson, Erik Berg and 3 others. Names only, never email addresses: many people who edit translations have no GitHub account, and an email in the commit would publish it in the customer's history.

Both are backwards compatible. Against a server without the change, the extra query parameter is ignored and the commit message is unchanged.

Server side

The matching server change is on feature/auto-sync-pr-page in localhero-ai, not pushed yet. It adds the version handling and edited_by / edited_by_others to GET /api/v1/translation_syncs/:id.

Verified

  • New tests: the fetch carries the update version; the editors reach the commit summary; the commit message lists names with "and N others".
  • npm test: 82 suites, 1499 tests pass after rebasing on main (Wait up to 10 minutes for a translation job, not 60 polls #125). tsc --noEmit and lint are clean.
  • Codex review of the diff: no findings.
  • End to end on localheroai/lev-art-test#18 is next, with a release candidate pinned. The server half already ran there against the published 0.0.80.

arvida added 3 commits October 9, 2026 13:34
- Send the sync update version when fetching a sync, so CI writes what that update recorded
- Add an 'Edited on Localhero.ai by ...' line to the sync commit when the server names editors
@arvida
arvida merged commit 6e974d4 into main Oct 9, 2026
1 check passed
@arvida arvida mentioned this pull request Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant