F1: cosmetics: regex error reason, one date format, Close Tab
Some checks are pending
ci / ci (macos-15) (push) Waiting to run
ci / ci (ubuntu-24.04) (push) Waiting to run
ci / ci (windows-2025) (push) Waiting to run

- Find shows a bad regex as "invalid pattern: unclosed group": the search
  crate keeps only the parser's reason, the UI drops the invalid-params
  prefix (userMessage).
- Dates read YYYY-MM-DD / YYYY-MM-DD HH:mm in local time everywhere
  (i18n formatDate/formatDateTime): Log, stash list, blame, recovery.
- buffer.close is "Close Tab" in the palette as in the menu; an engine test
  keeps palette labels starting with their menu item's wording.
- Docs: architecture, install (Jump List), localization parity, checklist.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
danny 2026-11-02 19:31:43 +01:00
parent 1b6bd1f870
commit 33a7185d75
18 changed files with 147 additions and 52 deletions

View file

@ -1,13 +1,13 @@
/**
* Tests of the message catalog: the `t` helper (lookup, interpolation,
* missing keys) and a scan of the frontend source that every literal key
* missing keys), the one date format, and a scan of the frontend source that every literal key
* passed to `t` exists in `en.json`.
*/
import { readdirSync, readFileSync } from "node:fs";
import { join } from "node:path";
import { afterEach, describe, expect, it, vi } from "vitest";
import en from "../../src/i18n/en.json";
import { hasMessage, t } from "../../src/i18n";
import { formatDate, formatDateTime, hasMessage, t } from "../../src/i18n";
/** Root of the frontend source tree. */
const SRC = join(import.meta.dirname, "..", "..", "src");
@ -205,3 +205,15 @@ describe("en.json", () => {
expect(Object.keys(en).filter((key) => !used.has(key))).toEqual([]);
});
});
describe("dates", () => {
it("shows every date as YYYY-MM-DD and times as HH:mm in local time, whatever the system locale", () => {
const local = new Date(2026, 10, 1, 9, 5, 30);
expect(formatDate(local.getTime())).toBe("2026-11-01");
expect(formatDateTime(local.getTime())).toBe("2026-11-01 09:05");
expect(formatDateTime("2026-12-24T18:30:00")).toBe("2026-12-24 18:30");
expect(formatDate("2026-03-07T23:59:00")).toBe("2026-03-07");
expect(formatDateTime("not a date")).toBe("not a date");
expect(formatDate("")).toBe("");
});
});