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
+17 -17
View File
@@ -1,38 +1,38 @@
namespace ClawdDotNet.Desktop;
/// <summary>
/// Die Argumente, die vor allem anderen gelesen werden müssen.
/// The arguments that have to be read before anything else.
///
/// <para>Eigene Klasse, weil sie zwei Aufrufer hat, die sich nicht kennen dürfen:
/// <see cref="Program"/> entscheidet damit, ob überhaupt ein Fenster entsteht, und
/// <see cref="App"/> übernimmt die vorgewählte Instanz in den Startvorgang. Lägen sie in
/// <c>App</c>, müsste <c>Program</c> die Oberfläche anfassen, um zu erfahren, dass keine
/// gebraucht wird.</para>
/// <para>A class of its own because it has two callers that must not know each other:
/// <see cref="Program"/> uses it to decide whether a window is created at all, and
/// <see cref="App"/> takes the preselected instance into the startup. If they lived in
/// <c>App</c>, <c>Program</c> would have to touch the user interface to find out that none
/// is needed.</para>
/// </summary>
internal static class CommandLine
{
public const string InstanceArgument = "--instance";
/// <summary>Läuft ohne Fenster: nur Aufbau, Socket und Warten (#528, Stufe 2).</summary>
/// <summary>Runs without a window: only setup, socket and waiting (#528, stage 2).</summary>
public const string HeadlessArgument = "--headless";
/// <summary>
/// Gestartet und beaufsichtigt vom Instanzmanager (#528, Stufe 5).
/// Started and supervised by the instance manager (#528, stage 5).
///
/// <para>Dann gehört der Instanzwechsel dorthin und nicht in dieses Fenster: Der
/// Manager hält die Fenster aller Instanzen im Hintergrund und holt das gewünschte
/// nach vorn. Ein Fenster, das sich selbst mit einer anderen Instanz neu startet,
/// nähme dabei genau die Instanz mit, aus der heraus jemand wechselt — und das ist
/// der Vorfall, mit dem dieses Vorhaben angefangen hat (#529).</para>
/// <para>Then switching instances belongs there and not in this window: the
/// manager keeps the windows of all instances in the background and brings the desired one
/// to the front. A window that restarts itself with another instance would
/// take along exactly the instance someone is switching away from — and that is
/// the incident this project started with (#529).</para>
/// </summary>
public const string ManagedArgument = "--managed";
/// <summary>
/// Der Instanzpfad hinter <c>--instance</c>, oder <c>null</c>.
/// The instance path after <c>--instance</c>, or <c>null</c>.
///
/// <para>Bewusst ohne Prüfung, ob es das Verzeichnis gibt — das entscheidet der
/// Aufrufer, und er entscheidet es unterschiedlich: Mit Fenster erscheint dann der
/// Auswahldialog, ohne Fenster ist es ein Abbruch mit Meldung.</para>
/// <para>Deliberately without checking whether the directory exists — that is decided by the
/// caller, and it decides differently: with a window the selection dialog
/// then appears, without a window it is an abort with a message.</para>
/// </summary>
public static string? ReadInstancePath(IReadOnlyList<string>? args)
=> ReadValue(args, InstanceArgument);
+34 -34
View File
@@ -9,25 +9,25 @@ using Microsoft.Extensions.Logging;
namespace ClawdDotNet.Desktop;
/// <summary>
/// Eine Instanz ohne Fenster (#528, Stufe 2).
/// An instance without a window (#528, stage 2).
///
/// <para><b>Wozu, wenn doch jede Instanz ihr Fenster behält (E-M2).</b> Weil der
/// Instanzprozess damit beweist, dass er keines <em>braucht</em>. Ein Server ohne
/// Bildschirmsitzung, ein systemd-Dienst, ein Prüflauf im Bau — alle drei brauchen genau
/// das, und jede versehentliche Abhängigkeit von der Oberfläche fällt hier sofort auf,
/// statt erst auf der Zielmaschine.</para>
/// <para><b>What for, if every instance keeps its window anyway (E-M2).</b> Because the
/// instance process thereby proves that it does not <em>need</em> one. A server without a
/// screen session, a systemd service, a test run in the build — all three need exactly
/// that, and every accidental dependency on the user interface shows up here immediately,
/// instead of only on the target machine.</para>
///
/// <para><b>Was hier nicht gefragt wird, wird gar nicht gefragt.</b> Ein Dienst ohne
/// Sitzung, der beim Start ein Eingabefenster öffnet, hängt für immer, ohne dass jemand
/// die Frage je zu sehen bekommt. Die Instanz kommt deshalb vom Argument, die Lizenz
/// über <see cref="NonInteractiveLicensePrompt"/>, und die Telegram-Anmeldung bleibt
/// aus — <c>Callbacks.TelegramLogin</c> ist null, und das ist hier die Antwort und kein
/// Versäumnis.</para>
/// <para><b>What is not asked here is not asked at all.</b> A service without a
/// session that opens an input window at startup hangs forever without anyone
/// ever getting to see the question. The instance therefore comes from the argument, the license
/// via <see cref="NonInteractiveLicensePrompt"/>, and the Telegram login stays
/// off — <c>Callbacks.TelegramLogin</c> is null, and that is the answer here, not an
/// omission.</para>
///
/// <para><b>Unter Windows sieht man davon wenig.</b> Die Programmdatei ist eine
/// <c>WinExe</c> und hat keine Konsole; die Meldungen unten landen dann im Nichts. Was
/// zählt, steht ohnehin im Instanzprotokoll. Der Zielbetrieb ist Linux, und dort ist es
/// eine gewöhnliche Konsolenanwendung.</para>
/// <para><b>Under Windows you see little of it.</b> The executable is a
/// <c>WinExe</c> and has no console; the messages below then go nowhere. What
/// matters is in the instance log anyway. The target platform is Linux, and there it is
/// an ordinary console application.</para>
/// </summary>
internal static class HeadlessRun
{
@@ -54,16 +54,16 @@ internal static class HeadlessRun
{
SelectInstance = _ => Task.FromResult<string?>(instancePath),
// Fragt nicht, sondern meldet, was zu tun ist. Im geführten Modus (E-M3)
// entfällt die lokale Prüfung; der Manager prüft zentral.
// Does not ask, but reports what to do. In managed mode (E-M3)
// the local check is dropped; the manager checks centrally.
License = new NonInteractiveLicensePrompt(Console.Error.WriteLine),
IsManaged = CommandLine.IsManaged(args)
});
if (host is null)
{
// Kein Fehlertext heisst Abbruch mit Ansage - die Lizenzabfrage hat ihre
// Meldung schon selbst geschrieben.
// No error text means abort with an announcement - the license prompt has already written its
// message itself.
if (error is not null) await Console.Error.WriteLineAsync(error);
return ExitStartFailed;
}
@@ -76,9 +76,9 @@ internal static class HeadlessRun
if (web is null)
{
// Ohne Socket ist eine kopflose Instanz nicht ansprechbar - also nichts,
// was man laufen lassen sollte. Mit Fenster waere das anders: Dort bleibt
// die Oberflaeche als Zugang.
// Without a socket a headless instance cannot be addressed - so nothing
// you should let run. With a window that would be different: there the
// user interface remains as access.
logger.LogError("Kein Zugang: Die HTTP-Fläche ist nicht hochgekommen.");
return ExitNoEndpoint;
}
@@ -100,16 +100,16 @@ internal static class HeadlessRun
}
/// <summary>
/// Wartet, bis jemand Schluss sagt.
/// Waits until someone says stop.
///
/// <para>Vier Wege, weil vier Absender in Frage kommen: die Bitte des Instanzmanagers
/// über den Socket (der Regelfall), <c>SIGTERM</c> von systemd, <c>SIGINT</c> vom
/// Terminal, und <see cref="AppDomain.ProcessExit"/> als letzte Gelegenheit.</para>
/// <para>Four ways, because four senders come into question: the request of the instance manager
/// via the socket (the normal case), <c>SIGTERM</c> from systemd, <c>SIGINT</c> from the
/// terminal, and <see cref="AppDomain.ProcessExit"/> as the last opportunity.</para>
///
/// <para><b>Das Signal wird abgefangen, nicht durchgelassen</b>
/// (<c>context.Cancel = true</c>). Sonst räumte die Laufzeit den Prozess ab, während
/// das geordnete Herunterfahren noch läuft — und genau dabei wird der Schreibpuffer
/// des Protokolls geleert. Ein Ende ohne diese Zeilen ist der Zustand aus #529.</para>
/// <para><b>The signal is caught, not let through</b>
/// (<c>context.Cancel = true</c>). Otherwise the runtime would tear down the process while
/// the orderly shutdown is still running — and exactly then the write buffer
/// of the log is flushed. An end without these lines is the state from #529.</para>
/// </summary>
private static async Task WaitForShutdownAsync(ILogger logger, InstanceControl steuerung)
{
@@ -121,9 +121,9 @@ internal static class HeadlessRun
logger.LogInformation("Beendigung angefordert ({Grund}).", grund);
}
// Der Instanzmanager, ueber den Socket. Der uebliche Weg, sobald es ihn gibt:
// Er bittet, statt zu schiessen - ein Instanzprozess haelt eine offene Datenbank
// und laufende Agenten, und beides will zu Ende gebracht werden.
// The instance manager, via the socket. The usual way, as soon as it exists:
// it asks instead of shooting - an instance process holds an open database
// and running agents, and both want to be brought to an end.
steuerung.ShutdownRequested += () => Beenden("Instanzmanager");
using var sigterm = PosixSignalRegistration.Create(PosixSignal.SIGTERM, context =>
+10 -10
View File
@@ -3,18 +3,18 @@ namespace ClawdDotNet.Desktop;
internal static class Program
{
/// <summary>
/// Einstiegspunkt.
/// Entry point.
///
/// <para>#764: Bis hierher fuhr ohne Schalter die Avalonia-Oberfläche hoch. Die Fenster
/// sind entfernt — die Weboberfläche ist die einzige Oberfläche. Die Programmdatei bleibt,
/// was sie für den Betrieb immer war: der Instanzprozess (<c>--headless --managed
/// --instance …</c>, so startet der Manager jede Instanz), die MCP-Brücke und der Starter
/// in der Sandbox. Ohne Schalter startet sie den Instanzmanager, falls er nicht läuft, und
/// öffnet die Weboberfläche (<see cref="LauncherRun"/>).</para>
/// <para>#764: Up to here, without a switch, the Avalonia user interface started. The windows
/// are removed — the web UI is the only user interface. The executable stays
/// what it always was for operation: the instance process (<c>--headless --managed
/// --instance …</c>, that's how the manager starts every instance), the MCP bridge and the launcher
/// in the sandbox. Without a switch it starts the instance manager if it is not running, and
/// opens the web UI (<see cref="LauncherRun"/>).</para>
///
/// <para>Kein Fenstersystem wird angefasst — auf einem Server ohne Bildschirmsitzung gäbe
/// es keines (#528, Stufe 2). Das galt bisher für <c>--headless</c> und gilt jetzt für
/// alles.</para>
/// <para>No windowing system is touched — on a server without a screen session there
/// would be none (#528, stage 2). That used to apply to <c>--headless</c> and now applies to
/// everything.</para>
/// </summary>
public static int Main(string[] args)
=> CommandLine.IsSandboxLaunch(args)