From c35f3a73eb68cdd7c4179cded3d1ead63ec5a033 Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Wed, 16 Sep 2026 17:47:00 +0200 Subject: playlists: refuse a body no frame can carry, and say which one A DataChannel send() throws above the max-message-size the node advertises (aiortc: 65536), so the 1 MB body cap was unreachable and each body push swallowed the difference in a bare catch. Cap at 62 KB after sealing, name the playlist in the sync result, keep syncing the rest. Measured: 1000 tracks seal to 53 276 bytes, so the ceiling is ~1200. Co-Authored-By: Claude Opus 5 --- .../meshbay-hub/src/meshbay_hub/static/playlist-menu.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'packages/meshbay-hub/src/meshbay_hub/static/playlist-menu.js') diff --git a/packages/meshbay-hub/src/meshbay_hub/static/playlist-menu.js b/packages/meshbay-hub/src/meshbay_hub/static/playlist-menu.js index e2fb3f9..70c105d 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/playlist-menu.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/playlist-menu.js @@ -197,11 +197,18 @@ function PlaylistMenuButton({ userId, lists, reload, onPlayQueue, onSync, cached // playlist subkey existed — and an AES handle is non-extractable, so // there is nothing to derive it from. One sign-in with the passphrase // fixes it for good; a code on screen does not say that. - say(r && r.ok - ? `${t('playlists.synced')} (${r.pushed || 0}↑ ${r.pulled || 0}↓)` - : (why === 'no_key' - ? t('playlists.err_no_key') - : `${t('playlists.sync_failed')}: ${why}`)); + // A playlist too large to send is reported ahead of the totals. The + // sync itself worked — everything else moved — so `ok` is true, and + // saying "synced" while one playlist silently stayed behind would be + // the lie this whole report exists to stop. + const big = (r && r.tooLarge) || []; + say(big.length + ? t('playlists.err_too_large', { name: big[0], n: 1000 }) + : (r && r.ok + ? `${t('playlists.synced')} (${r.pushed || 0}↑ ${r.pulled || 0}↓)` + : (why === 'no_key' + ? t('playlists.err_no_key') + : `${t('playlists.sync_failed')}: ${why}`))); }, }, ]); -- cgit v1.2.3