mirror of
https://github.com/db9979/sshtermy.git
synced 2026-12-05 12:24:08 +01:00
* Absturzschutz: Fehler in Hintergrundarbeit beenden sshTermy nicht mehr; Zeitgrenzen für Update-Download und Team-Abo; Gast-Tasten über Warteschlange Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj * CI: Zeitgrenzen je Job, alte Läufe abbrechen, Tests in zufälliger Reihenfolge; make check; Bibliotheken aktualisiert Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj * update: Stillstand auch ohne Lesefehler erkennen Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj * Zufallstests für Teilen, Vermittler, MCP, Syslog, KI-Antworten, Sync und Fenster-Rahmen; Syslog-Empfang übersteht kaputte Pakete; MCP antwortet auch nach Fehler Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj * Tests: Tresor (Passwortwechsel, Sperre, Blobs, KDF-Grenzen), SFTP-Rundreise, serielle Konsole mit Ersatzkabel Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj * Dauerlauf-Test (make soak) und nächtlicher Lauf mit langen Zufallstests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj * Fuzz: Zeitlimit je Eingabe auch für die neuen Tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj * Selbstprüfung: sshtermy doctor und Palette › Hilfe › Fehlersuche; versehentlich eingecheckte Programmdatei entfernt Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj * Oberfläche aufteilen, erster Schritt: Mausbereiche (ui/clickzone) und abgelegte Dateien (ui/dropped) als eigene Pakete Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj * Doku: Absturzschutz und Selbstprüfung in README, Webseite und Handbuch; Plan zur Aufteilung von internal/ui; Zusehen-WASM neu gebaut Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj --------- Co-authored-by: Claude <noreply@anthropic.com>
57 lines
1.2 KiB
Go
57 lines
1.2 KiB
Go
//go:build windows || darwin || linux
|
|
|
|
package gui
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/db9979/sshtermy/internal/detach"
|
|
"github.com/db9979/sshtermy/internal/safe"
|
|
)
|
|
|
|
// RunAttach: abgetrennter Tab (⇧F10) im zweiten eigenen Fenster. Das
|
|
// Fenster ist ein schlichtes Terminal am Tab; schließen holt den Tab zurück.
|
|
// Rückgabe wie ein Exit-Code.
|
|
func RunAttach(dir string, opts Options) int {
|
|
c, err := detach.Dial(dir, startCols, startRows)
|
|
if err != nil {
|
|
return 1
|
|
}
|
|
defer c.Close()
|
|
opts.attach = true
|
|
w, err := newWindow(opts, c)
|
|
if err != nil {
|
|
return 1
|
|
}
|
|
w.onResize = func(cols, rows int) { _ = c.Resize(cols, rows) }
|
|
w.onClose = c.Close
|
|
w.onQuit = c.Close
|
|
out := w.output()
|
|
go func() {
|
|
defer safe.Recover("gui/attach.go")
|
|
defer close(w.done)
|
|
for {
|
|
m, err := c.Next()
|
|
if err != nil {
|
|
return
|
|
}
|
|
switch {
|
|
case m.Bye:
|
|
if m.Text != "" {
|
|
_, _ = out.Write([]byte("\x1b[0m\x1b[?1049l\r\n" + m.Text + "\r\n"))
|
|
time.Sleep(1200 * time.Millisecond)
|
|
}
|
|
return
|
|
case m.Title != "":
|
|
_, _ = out.Write([]byte("\x1b]0;" + m.Title + "\a"))
|
|
default:
|
|
_, _ = out.Write(m.Output)
|
|
}
|
|
}
|
|
}()
|
|
if err := w.run(); err != nil {
|
|
return 1
|
|
}
|
|
return 0
|
|
}
|