docs(comments): no WebSocket and no CI in the present tense

The chat cut removed the only WebSocket and CI went before it, but comments still leaned on both:
`?account=` was justified by the socket, job polling by an in-process WS registry, the e2e flows as
"proxy-safe (none use the WebSocket)", and pyrightconfig named a CI container the engine contract
test never checked. Each now says what holds today (the wallet gate, no push channel, the two
contract test halves, the image build's `npm ci`, the gate).
This commit is contained in:
2026-10-05 00:50:36 +02:00
parent 5ca2a0e6ee
commit c4298b0a73
11 changed files with 20 additions and 18 deletions
@@ -29,7 +29,7 @@ describe("ItemCount", () => {
it("pluralises and thousands-separates a normal count", () => {
render(<ItemCount count={192045} />);
// Separators come from the shared formatNumber — compare against it, not a fixed en-US string,
// so the test asserts ItemCount's formatting path rather than the CI locale.
// so the test asserts ItemCount's formatting path rather than the runner's locale.
expect(text()).toBe(`${formatNumber(192045, "en")} items`);
});
+4 -3
View File
@@ -200,7 +200,7 @@ export const downloadsApi = {
// The body IS the file, and the two names ride as headers. Not a style choice: a multipart part is
// a DECLARED body, which FastAPI reads and spools BEFORE the route's `current_user` dependency
// runs — so with the old shape an unauthenticated caller could make the server write the whole
// per-file allowance to temp (P1). Headers are latin-1 on the wire, hence `encodeURIComponent`;
// per-file allowance to temp. Headers are latin-1 on the wire, hence `encodeURIComponent`;
// the server percent-decodes both. Content-Type is left to the browser (the File's own type).
uploadDownload: (
file: File,
@@ -274,8 +274,9 @@ export const downloadsApi = {
revokeDownloadLink: (linkId: number): Promise<{ deleted: number }> =>
req(`/api/downloads/links/${linkId}`, { method: "DELETE" }),
// A plain <a> navigation can't send the X-Siftlode-Account header, so pass the active
// account via ?account= (same wallet-gated selection the WebSocket uses) — otherwise the
// download resolves to the session-default account and 404s for a per-tab account's file.
// account via ?account= (the server honours it only for an account in this browser's wallet) —
// otherwise the download resolves to the session-default account and 404s for a per-tab
// account's file.
downloadFileUrl: (id: number): string => {
const a = getActiveAccount();
return a != null ? `/api/downloads/${id}/file?account=${a}` : `/api/downloads/${id}/file`;
+2 -1
View File
@@ -3,7 +3,8 @@ import { describe, it, expect, beforeAll } from "vitest";
// The façade guard: lib/api.ts is a spread-only façade over per-domain slice modules. These tests
// mechanise the two invariants that make that structure safe — so a future edit that reintroduces
// the interleave (a method dropped into two slices → a silent last-wins spread override) or bloats
// the barrel (a method defined inline instead of in a domain module) fails CI instead of shipping.
// the barrel (a method defined inline instead of in a domain module) fails the gate instead of
// shipping.
//
// Scope, on purpose: this covers RUNTIME method-key collisions — the only *silent* failure mode,
// since tsc does not flag overlapping spread keys. It deliberately does NOT cover exported-TYPE-name
+1 -1
View File
@@ -133,7 +133,7 @@ describe("relativeFromMs", () => {
// printed "1 234 567" (and a Hungarian UI in an English browser "1,234,567"). The case below asserts
// BOTH languages and that the two differ, rather than comparing against the runtime's own default:
// the default is whatever locale the machine running the suite has (Hungarian on the dev box, English
// on a CI image), so a one-language assertion passes under the old bug on half the machines.
// in the test image), so a one-language assertion passes under the old bug on half the machines.
describe("formatNumber", () => {
afterEach(() => {
i18nStub.language = "en";
+2 -2
View File
@@ -1,8 +1,8 @@
import { useSyncExternalStore } from "react";
// A minimal observable value shared across React components AND non-React code (the api
// layer, websocket handlers, etc.). Replaces the hand-rolled `listeners`/`subscribe`/`emit`
// triad that several modules each re-implemented slightly differently.
// layer, the debug recorder, the error dialog, etc.). Replaces the hand-rolled
// `listeners`/`subscribe`/`emit` triad that several modules each re-implemented slightly differently.
export interface Store<T> {
get(): T;
set(next: T | ((prev: T) => T)): void;