diag: error_log sync-event POSTs to trace missing toasts

Temporary diagnostic scaffolding — B-side logs every POST to the relay
(status + body snippet), A-side already console.debugs the GET result
via sync_debug. Lets us narrow down where the sender-side toast gets
lost.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
thandClaude Opus 4.6 committed 2026-04-14 23:24:35 +02:00
1 parent 4a668b7fc4
commit 6cd00f9660
4 files changed
+12 -4

No files matched your search

+5 -1
View File
@@ -707,10 +707,14 @@ function collabSyncCards(PDO $db): array {
// authored by someone else.
if ($foreignAuthor && !empty($c['author_username'])) {
$cardTitle = trim((string)($fields['title'] ?? '')) ?: '(untitled)';
collabRelayCall('/api/sync-events', 'POST', [
$evRes = collabRelayCall('/api/sync-events', 'POST', [
'recipient' => $c['author_username'],
'body' => $selfUser . ' synced: ' . $cardTitle,
]);
@error_log('[hyprcrd] sync-event POST → ' . $c['author_username']
. ' ok=' . ($evRes['ok'] ?? 'n/a')
. ' status=' . ($evRes['status'] ?? '-')
. ' err=' . substr((string)($evRes['error'] ?? ''), 0, 120));
}
}