revert(orbit): drop maxPending cap feature, keep suggestion mute

The pending counter desynced from the actual approval list (state.queue
holds approved items as history, so the count never decreased after a
host approve). The host-pushed pendingApprovalCount workaround didn't
hold up under live testing either, so we're rolling the whole cap
feature back rather than ship something flaky.

What's gone:
- OrbitSettings.maxPending + state.pendingApprovalCount
- cap branch in applyOutboxSnapshotsToState (now back to mute-only)
- maxPending number input in settings popover
- pending counter chip in OrbitQueueHead
- 'cap-reached' branch in evaluateOrbitSuggestGate / OrbitSuggestGateReason
- cap-related toasts in ContextMenu / useOrbitSongRowBehavior
- cap-related i18n keys (suggestBlockedCap, settingMaxPending*, pendingCounter*)
- cap CSS (.orbit-queue-head__pending, .orbit-settings-pop__number)

What stays: per-guest suggestion mute (works correctly) and everything
that fed into both features (OrbitState.suggestionBlocked,
setOrbitSuggestionBlocked, evaluateOrbitSuggestGate, the participants
popover Mic/MicOff toggle, the suggestBlockedMuted toast).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Psychotoxical
2026-04-25 01:40:22 +02:00
parent 7c379c2111
commit e4cc54a1b5
16 changed files with 14 additions and 224 deletions
+8 -26
View File
@@ -1452,27 +1452,18 @@ export default function ContextMenu() {
<ListPlus size={14} /> {t('contextMenu.addToQueue')}
</div>
{orbitRole === 'guest' && (() => {
const gate = evaluateOrbitSuggestGate();
const muted = gate.reason === 'muted';
const capReached = gate.reason === 'cap-reached';
const disabled = muted || capReached;
const tooltip = muted
? t('orbit.suggestBlockedMuted')
: capReached ? t('orbit.suggestBlockedCap') : '';
const muted = evaluateOrbitSuggestGate().reason === 'muted';
return (
<div
className={`context-menu-item${disabled ? ' is-disabled' : ''}`}
{...(disabled ? { 'data-tooltip': tooltip } : {})}
className={`context-menu-item${muted ? ' is-disabled' : ''}`}
{...(muted ? { 'data-tooltip': t('orbit.suggestBlockedMuted') } : {})}
onClick={() => handleAction(() => {
if (muted) { showToast(t('orbit.suggestBlockedMuted'), 3500, 'error'); return; }
if (capReached) { showToast(t('orbit.suggestBlockedCap'), 3500, 'info'); return; }
if (muted) { showToast(t('orbit.suggestBlockedMuted'), 3500, 'error'); return; }
suggestOrbitTrack(song.id)
.then(() => showToast(t('orbit.ctxSuggestedToast'), 2200, 'info'))
.catch(err => {
if (err instanceof OrbitSuggestBlockedError && err.reason === 'muted') {
showToast(t('orbit.suggestBlockedMuted'), 3500, 'error');
} else if (err instanceof OrbitSuggestBlockedError && err.reason === 'cap-reached') {
showToast(t('orbit.suggestBlockedCap'), 3500, 'info');
} else {
showToast(t('orbit.ctxSuggestFailed'), 3000, 'error');
}
@@ -1625,27 +1616,18 @@ export default function ContextMenu() {
<ListPlus size={14} /> {t('contextMenu.addToQueue')}
</div>
{orbitRole === 'guest' && (() => {
const gate = evaluateOrbitSuggestGate();
const muted = gate.reason === 'muted';
const capReached = gate.reason === 'cap-reached';
const disabled = muted || capReached;
const tooltip = muted
? t('orbit.suggestBlockedMuted')
: capReached ? t('orbit.suggestBlockedCap') : '';
const muted = evaluateOrbitSuggestGate().reason === 'muted';
return (
<div
className={`context-menu-item${disabled ? ' is-disabled' : ''}`}
{...(disabled ? { 'data-tooltip': tooltip } : {})}
className={`context-menu-item${muted ? ' is-disabled' : ''}`}
{...(muted ? { 'data-tooltip': t('orbit.suggestBlockedMuted') } : {})}
onClick={() => handleAction(() => {
if (muted) { showToast(t('orbit.suggestBlockedMuted'), 3500, 'error'); return; }
if (capReached) { showToast(t('orbit.suggestBlockedCap'), 3500, 'info'); return; }
if (muted) { showToast(t('orbit.suggestBlockedMuted'), 3500, 'error'); return; }
suggestOrbitTrack(song.id)
.then(() => showToast(t('orbit.ctxSuggestedToast'), 2200, 'info'))
.catch(err => {
if (err instanceof OrbitSuggestBlockedError && err.reason === 'muted') {
showToast(t('orbit.suggestBlockedMuted'), 3500, 'error');
} else if (err instanceof OrbitSuggestBlockedError && err.reason === 'cap-reached') {
showToast(t('orbit.suggestBlockedCap'), 3500, 'info');
} else {
showToast(t('orbit.ctxSuggestFailed'), 3000, 'error');
}