Stufe 4c (#764): Kommentare in C#, WebUI-Skripten, CSS und HTML auf Englisch

Rund 2.600 Kommentarblöcke in 310 C#-Dateien übersetzt, Begründungen vollständig
erhalten: blockweise gleiche Anzahl wie vorher, kein Block unter 60 % seiner
Länge, der Code außerhalb der Kommentare per Tokenizer byte-identisch geprüft.
Zitate deutscher Oberflächentexte und Testdaten bleiben deutsch.

WebUI: Kommentare in JS/CSS/HTML übersetzt, JSDoc-@param an die in 4b
umbenannten Parameter angeglichen.

Dabei behoben:
- 4b hatte "tag" (HTML-Tag) als deutsches "Tag" gelesen und zu "dayValue"
  gemacht (makeElement, svg, Tagesübersicht) - zurück auf tag/day.
- Aufgaben "InProgress" bekamen die Plakettenart "laufend", für die es nie eine
  CSS-Klasse gab - jetzt "success" wie laufende Instanzen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Richard
2026-10-04 12:45:03 +02:00
co-authored by Claude Opus 5.5
parent da4ceac7d5
commit 837a634a22
311 changed files with 7238 additions and 7252 deletions
+26 -26
View File
@@ -4,16 +4,16 @@ using Microsoft.Data.Sqlite;
namespace ClawdDotNet.Core.Storage;
/// <summary>
/// Zentrale Stelle für den Zugang zur Instanz-Datenbank.
/// Central place for access to the instance database.
///
/// Die frühere Fassung öffnete pro Aufruf eine Verbindung ohne weitere Einstellungen —
/// ohne WAL und ohne Wartezeit bei Sperren. Sobald mehrere Agenten gleichzeitig
/// schreiben, quittiert SQLite das mit "database is locked". Das sah nach einer Grenze
/// von SQLite aus, war aber nur fehlende Konfiguration.
/// The former version opened a connection per call without further settings —
/// without WAL and without waiting on locks. As soon as several agents write
/// at the same time, SQLite answers that with "database is locked". That looked like a limit
/// of SQLite, but was only missing configuration.
///
/// - WAL erlaubt beliebig viele Leser parallel zu einem Schreiber.
/// - busy_timeout lässt einen Schreiber kurz warten, statt sofort zu scheitern.
/// - Connection-Pooling vermeidet den Aufbau je Aufruf.
/// - WAL allows any number of readers in parallel with one writer.
/// - busy_timeout lets a writer wait briefly instead of failing immediately.
/// - Connection pooling avoids building a connection per call.
/// </summary>
public sealed class SqliteStorage
{
@@ -45,10 +45,10 @@ public sealed class SqliteStorage
Initialize();
// #575: SQLite legt die Datenbank mit der Standardmaske an (auf der Test-VM 0644),
// und WAL- und Shared-Memory-Datei erben deren Rechte. Darin stehen Chatverläufe,
// Gedächtnis und die Argumente jedes Werkzeugaufrufs. Auch für bestehende Dateien,
// die noch aus der Zeit vor dieser Zeile stammen.
// #575: SQLite creates the database with the default mask (0644 on the test VM),
// and the WAL and shared-memory files inherit its rights. They contain chat histories,
// memory and the arguments of every tool call. Also for existing files
// that date from before this line.
foreach (var datei in new[] { databasePath, databasePath + "-wal", databasePath + "-shm" })
{
if (File.Exists(datei))
@@ -100,9 +100,9 @@ public sealed class SqliteStorage
}
/// <summary>
/// Serialisiert Schreibvorgänge im Prozess. SQLite lässt ohnehin nur einen Schreiber
/// zu — die Warteschlange hier ist verlässlicher als das Zurückweisen durch die
/// Datenbank und macht Fehlerbilder reproduzierbar.
/// Serializes writes within the process. SQLite only allows one writer anyway
/// — the queue here is more reliable than rejection by the
/// database and makes failure patterns reproducible.
/// </summary>
public async Task<T> WriteAsync<T>(Func<SqliteConnection, Task<T>> action, CancellationToken ct)
{
@@ -624,16 +624,16 @@ public sealed class SqliteStorage
}
/// <summary>
/// Spalten, die nach der ersten Fassung einer Tabelle dazugekommen sind.
/// Columns added after the first version of a table.
///
/// <para><c>CREATE TABLE IF NOT EXISTS</c> allein genügt dafür nicht: Bei einer
/// bestehenden Datenbank tut die Anweisung gar nichts, die neue Spalte fehlt, und
/// erst das nächste <c>INSERT</c>, das sie benennt, scheitert — im Betrieb, beim
/// Anwender, nicht beim Entwickler mit der frischen Datei.</para>
/// <para><c>CREATE TABLE IF NOT EXISTS</c> alone is not enough for that: with an
/// existing database the statement does nothing at all, the new column is missing, and
/// only the next <c>INSERT</c> that names it fails — in operation, at the
/// user's, not at the developer's with the fresh file.</para>
/// </summary>
private static void Nachruesten(SqliteConnection connection)
{
// #554: Paart den "angefangen"-Eintrag mit seinem Abschluss.
// #554: Pairs the "started" entry with its completion.
SpalteErgaenzen(connection, "AuditLog", "CallId", "TEXT NOT NULL DEFAULT ''");
// #716: What happened when the budget refused a run.
@@ -684,7 +684,7 @@ public sealed class SqliteStorage
SpalteErgaenzen(connection, "StagedCalls", "ApproverUntil", "TEXT NULL");
SpalteErgaenzen(connection, "StagedCalls", "ApproverTaskId", "TEXT NULL");
// Findet offene Aufrufe beim Start, ohne die ganze Tabelle zu lesen.
// Finds open calls at startup without reading the whole table.
using var index = connection.CreateCommand();
index.CommandText = """
CREATE INDEX IF NOT EXISTS IX_AuditLog_Call
@@ -697,11 +697,11 @@ public sealed class SqliteStorage
}
/// <summary>
/// Ergänzt eine Spalte, falls sie fehlt. Ist sie da, geschieht nichts.
/// Adds a column if it is missing. If it is there, nothing happens.
///
/// <para>SQLite kennt kein <c>ADD COLUMN IF NOT EXISTS</c>, deshalb wird erst
/// nachgesehen. Die Vorgabe ist Pflicht: Eine <c>NOT NULL</c>-Spalte ohne
/// Vorgabewert lässt sich einer gefüllten Tabelle nicht hinzufügen.</para>
/// <para>SQLite knows no <c>ADD COLUMN IF NOT EXISTS</c>, that's why we look
/// first. The default is mandatory: a <c>NOT NULL</c> column without a
/// default value cannot be added to a filled table.</para>
/// </summary>
private static void SpalteErgaenzen(SqliteConnection connection, string tabelle, string spalte, string definition)
{