From 9de84901763ae3eecb5b104bd23d5944d394e787 Mon Sep 17 00:00:00 2001 From: Maurice Date: Sat, 19 Sep 2026 13:36:51 +0200 Subject: [PATCH] style(docsync): drop dash punctuation from the added comments and test titles The lines this branch adds used em and en dashes as sentence punctuation across comments, JSDoc, CSS comments and test titles. Each one is rewritten with a comma, a colon, parentheses or a second sentence, keeping what the sentence said. Only lines this branch adds are touched; everything that already exists on dev stays as it is. No logic, error code or logged message changes. The only string literals affected are describe and it titles, which now read "X: topic" like the rest of the provider tests. --- client/src/api/client.ts | 2 +- client/src/api/wsEventPolicy.ts | 2 +- .../docsync/DocSyncConnectModal.test.tsx | 2 +- .../Files/docsync/DocSyncConnectModal.tsx | 2 +- .../components/Files/docsync/DocSyncFlow.tsx | 10 +++---- .../Files/docsync/DocSyncScopeModal.test.tsx | 4 +-- .../components/Files/docsync/useConflicts.ts | 2 +- .../Files/docsync/useConnectForm.ts | 4 +-- .../shared/DocumentProviderIcons.tsx | 2 +- client/src/index.css | 6 ++-- client/src/sync/useServerPing.ts | 6 ++-- server/src/db/document-provider-seed.ts | 6 ++-- server/src/db/migrations.ts | 8 +++--- .../src/nest/common/validate-route-guards.ts | 2 +- .../doc-sync/doc-sync-webhook.controller.ts | 12 ++++---- .../src/nest/doc-sync/doc-sync.constants.ts | 4 +-- server/src/nest/doc-sync/doc-sync.job.ts | 10 +++---- .../doc-sync/document-provider.registry.ts | 2 +- .../doc-sync/providers/paperless.client.ts | 28 +++++++++---------- .../doc-sync/providers/paperless.provider.ts | 16 +++++------ .../nest/doc-sync/providers/papra.client.ts | 24 ++++++++-------- .../nest/doc-sync/providers/papra.provider.ts | 14 +++++----- .../nest/doc-sync/providers/webdav.client.ts | 14 +++++----- .../doc-sync/providers/webdav.provider.ts | 22 +++++++-------- server/tests/e2e/doc-sync.e2e.test.ts | 8 +++--- .../doc-sync-webhook.controller.test.ts | 10 +++---- .../unit/nest/doc-sync/doc-sync.job.test.ts | 4 +-- .../unit/nest/doc-sync/doc-sync.mcp.test.ts | 2 +- shared/src/docsync/docsync.schema.ts | 14 +++++----- 29 files changed, 121 insertions(+), 121 deletions(-) diff --git a/client/src/api/client.ts b/client/src/api/client.ts index 4e1f6bf64..6d9ca3589 100644 --- a/client/src/api/client.ts +++ b/client/src/api/client.ts @@ -1361,7 +1361,7 @@ export const filesApi = { /** * Document sync: one provider connection per trip, shared by every member. * - * Trip-scoped rather than user-scoped on purpose — a per-user connection would + * Trip-scoped rather than user-scoped on purpose: a per-user connection would * make a document's visibility depend on whose credentials fetched it, which is * the opposite of what a shared trip needs. */ diff --git a/client/src/api/wsEventPolicy.ts b/client/src/api/wsEventPolicy.ts index 64e628fec..b3245b6de 100644 --- a/client/src/api/wsEventPolicy.ts +++ b/client/src/api/wsEventPolicy.ts @@ -81,7 +81,7 @@ export const HANDLED_OUTSIDE_TRIP_STORE = [ // who has the book open, and where their pointers are) 'journey:book:peers', 'journey:book:cursor', - // Document sync — components/Files/docsync/useDocSync re-reads the bindings + // Document sync: components/Files/docsync/useDocSync re-reads the bindings // and their counts. Content-free like the bag ping: what a run changed is // per-binding server state, and the files it moved arrive as file:* events. 'docsync:changed', diff --git a/client/src/components/Files/docsync/DocSyncConnectModal.test.tsx b/client/src/components/Files/docsync/DocSyncConnectModal.test.tsx index bad8645e8..f2414c048 100644 --- a/client/src/components/Files/docsync/DocSyncConnectModal.test.tsx +++ b/client/src/components/Files/docsync/DocSyncConnectModal.test.tsx @@ -480,7 +480,7 @@ describe('DocSyncConnectModal with a connection already stored', () => { await screen.findByPlaceholderText('••••••••') // The address is a column of its own rather than a settings entry. Reading // it out of settings left the box empty over its placeholder while the form - // went on submitting the stored value — the field and the request quietly + // went on submitting the stored value, the field and the request quietly // disagreeing about what the connection is. await waitFor(() => expect(screen.getByPlaceholderText('https://cloud.example.com')).toHaveValue('https://cloud.example.com'), diff --git a/client/src/components/Files/docsync/DocSyncConnectModal.tsx b/client/src/components/Files/docsync/DocSyncConnectModal.tsx index 5db4f28c1..f9a04fd65 100644 --- a/client/src/components/Files/docsync/DocSyncConnectModal.tsx +++ b/client/src/components/Files/docsync/DocSyncConnectModal.tsx @@ -144,7 +144,7 @@ function Verdict({ }: { verdict: { connected: boolean; account?: string; error?: string } | null busy: boolean - /** A call that failed outside the connection test — saving, most of all. */ + /** A call that failed outside the connection test (saving, most of all). */ failure: string | null }) { const { t } = useTranslation() diff --git a/client/src/components/Files/docsync/DocSyncFlow.tsx b/client/src/components/Files/docsync/DocSyncFlow.tsx index f09969b6d..2ddb5ed75 100644 --- a/client/src/components/Files/docsync/DocSyncFlow.tsx +++ b/client/src/components/Files/docsync/DocSyncFlow.tsx @@ -18,8 +18,8 @@ export interface FlowHoldings { /** * The direction control, drawn as what it actually is. * - * A document sync has one characteristic picture — two places and things moving - * between them — and a dropdown reading "Both ways" hides it behind a word. + * A document sync has one characteristic picture (two places and things moving + * between them), and a dropdown reading "Both ways" hides it behind a word. * Here the two ends carry what each side is holding, the lanes between them * carry the direction, and switching direction means switching a lane off. It * is the one loud element in the dialog; everything around it stays quiet. @@ -113,7 +113,7 @@ export default function DocSyncFlow({ /** * One end of the flow: the mark, the count, the name. * - * The count is the largest thing in the box on purpose — "is my stuff over + * The count is the largest thing in the box on purpose: "is my stuff over * there" is the question that makes somebody open this dialog, and it should be * answered before they read a word. */ @@ -197,8 +197,8 @@ function Lane({ {caption} - {/* Only while a run is in flight. An idle lane needs no track — that it is - on or off is already in its fill — and a permanent line just asks the + {/* Only while a run is in flight. An idle lane needs no track (that it is + on or off is already in its fill), and a permanent line just asks the reader what it means. */} {moving && ( { it('FE-DOCSYNC-SCOPE-021: a refused create says why instead of doing nothing', async () => { // The create had no failure path at all: the rejection escaped the click - // handler unhandled, nothing was bound, and the dialog said nothing — the + // handler unhandled, nothing was bound, and the dialog said nothing: the // button blinked and the person was left guessing. Every other write in the // hook reports, and so does this one now. createScope.mockRejectedValue({ response: { data: { error: 'quota_exceeded' } } }) diff --git a/client/src/components/Files/docsync/useConflicts.ts b/client/src/components/Files/docsync/useConflicts.ts index 7e0071f15..cc1a0c4a5 100644 --- a/client/src/components/Files/docsync/useConflicts.ts +++ b/client/src/components/Files/docsync/useConflicts.ts @@ -54,7 +54,7 @@ export function useConflicts(tripId: number | string, sync: ReturnType>({}) // Null until touched, so a connection that arrives after the form opened is - // still reflected — seeding from `existing` at mount showed a stored "allow + // still reflected. Seeding from `existing` at mount showed a stored "allow // self-signed" as off and wrote that back on the next save. const [insecure, setInsecure] = useState(null) @@ -75,7 +75,7 @@ export function useConnectForm( // The address stays in here as well as in its own argument: the server walks // the provider's fields over `credentials` and would otherwise store no // `base_url` setting. It special-cases the key when checking completeness, so - // dropping it changes nothing it needs — but it is an established request + // dropping it changes nothing it needs, but it is an established request // shape and this is not the change to alter it in. const credentials = Object.fromEntries( Object.entries(values).filter(([k]) => k !== INSECURE_TLS_FIELD), diff --git a/client/src/components/shared/DocumentProviderIcons.tsx b/client/src/components/shared/DocumentProviderIcons.tsx index 1f48c0783..7349174db 100644 --- a/client/src/components/shared/DocumentProviderIcons.tsx +++ b/client/src/components/shared/DocumentProviderIcons.tsx @@ -7,7 +7,7 @@ import React from 'react' * they sit in a row of lucide icons and in a list of addon toggles, where a * full-colour badge among line icons reads as the one thing that is switched * on. Following the text colour also means they invert with the theme without a - * second asset — black on light, white on dark. + * second asset: black on light, white on dark. * * Not in `public/brands/` beside AirTrail and Dawarich, because those are the * files each project ships, served unmodified. These are deliberately modified: diff --git a/client/src/index.css b/client/src/index.css index 1d098e9a3..56b6f5440 100644 --- a/client/src/index.css +++ b/client/src/index.css @@ -507,7 +507,7 @@ input[type="number"], input[type="time"], input[type="date"], input[type="dateti } /* Dokumentenabgleich: die aktive Bahn laeuft, WAEHREND ein Lauf laeuft. - Bewegung als Antwort auf eine Handlung, nicht als Dekoration — sie hoert auf, + Bewegung als Antwort auf eine Handlung, nicht als Dekoration: sie hoert auf, sobald der Lauf durch ist, und sagt in der Zwischenzeit, in welche Richtung gerade etwas unterwegs ist. */ @keyframes trek-docsync-lane { @@ -526,7 +526,7 @@ input[type="number"], input[type="time"], input[type="date"], input[type="dateti animation-direction: reverse; } -/* Die abgeschaltete Richtung bekommt eine Schraffur — dasselbe Zeichen, das eine +/* Die abgeschaltete Richtung bekommt eine Schraffur, dasselbe Zeichen, das eine gesperrte Flaeche ueberall traegt. Es liest sich als "hier geht nichts durch", ohne dass die Bahn verschwindet und die Zeile zusammenklappt. */ .trek-docsync-lane-off { @@ -636,7 +636,7 @@ input[type="number"], input[type="time"], input[type="date"], input[type="dateti .trek-lowfuel { animation: none; } - /* Die Bahn bleibt sichtbar, sie laeuft nur nicht mehr — die Aussage + /* Die Bahn bleibt sichtbar, sie laeuft nur nicht mehr. Die Aussage "hier ist gerade etwas unterwegs" traegt auch im Stillstand. */ .trek-docsync-lane-run { animation: none; diff --git a/client/src/sync/useServerPing.ts b/client/src/sync/useServerPing.ts index 9299291d7..741a385f2 100644 --- a/client/src/sync/useServerPing.ts +++ b/client/src/sync/useServerPing.ts @@ -5,8 +5,8 @@ import { isEffectivelyOnline, onNetworkModeChange } from './networkMode' /** * How long pings are collected before one refetch goes out. * - * Long enough to fold a burst into a single request — clearing twelve checked - * items issues twelve deletes, and an import writes a whole list — short enough + * Long enough to fold a burst into a single request (clearing twelve checked + * items issues twelve deletes, and an import writes a whole list), short enough * that a single edit still reads as instant. */ const COALESCE_MS = 250 @@ -19,7 +19,7 @@ const COALESCE_MS = 250 * whose items this client may not see, and a document-sync run reports counts * that are only meaningful read back from the server. Every such ping is a * refetch, which is why this coalesces bursts and never lets two requests - * overlap — the server pings the whole room including the originating socket, so + * overlap: the server pings the whole room including the originating socket, so * a busy trip would otherwise have every client refetching once per written row. * * A ping sent while this client is disconnected is gone for good, so the two diff --git a/server/src/db/document-provider-seed.ts b/server/src/db/document-provider-seed.ts index d168b1a75..16e2467a8 100644 --- a/server/src/db/document-provider-seed.ts +++ b/server/src/db/document-provider-seed.ts @@ -8,7 +8,7 @@ import type Database from 'better-sqlite3'; * use INSERT OR IGNORE, which is what lets an operator rename or re-sort a row * without a later boot undoing it. * - * `label` and `hint` are i18n key suffixes, never display text — the client + * `label` and `hint` are i18n key suffixes, never display text: the client * resolves them as `docsync.