feat(desktop): port v0.11.4-v0.15.2 from Tauri to Electron + Discord-parity audio (v0.16.0)

Chronological port of every Tauri release commit (v0.11.4 -> v0.15.2)
into the Electron rebuild, plus Discord-style audio handling that goes
beyond the Tauri original.

Highlights:
  - All 17 Tauri release commits ported (audio fixes, custom notification
    sound, Discord-style chat UX, profile banner, changelog page,
    Discord-parity call UX, screen-share echo + re-watch UX, audio-loop
    fix).
  - Native napi-rs audio-loopback addon with WASAPI process-loopback:
      * EXCLUDE_TARGET_PROCESS_TREE for full-screen shares -> peers
        never hear themselves echoed back through the capture.
      * INCLUDE_TARGET_PROCESS_TREE for window shares -> only the
        picked window's audio is captured, not the whole OS mixer
        (Discord parity).
      * HWND -> PID resolution via Win32 GetWindowThreadProcessId.
  - Discord-style screen-source picker (thumbnail grid, screens vs
    apps tabs, live-refreshing thumbnails).
  - Hash routing fix for packaged builds (file:// can't resolve
    BrowserRouter paths).
  - Tauri sources removed (apps/desktop/src-tauri).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
byGalax
2026-05-06 23:35:01 +02:00
parent 72d02e385f
commit 825160ee46
504 changed files with 14217 additions and 14366 deletions
@@ -8,7 +8,7 @@ import {
setScreenShareVolume,
subscribeScreenShareVolumes,
} from '../lib/screenShareVolumes';
import { HeadphonesIcon, HeadphonesOffIcon, MonitorShareIcon, PhoneOffIcon } from './icons';
import { EyeOffIcon, HeadphonesIcon, HeadphonesOffIcon, MonitorShareIcon, PhoneOffIcon } from './icons';
interface Props {
/** Participant whose screen share the user right-clicked. */
@@ -23,8 +23,9 @@ interface Props {
}
const MENU_W = 260;
const MENU_H_WITH_AUDIO = 200;
const MENU_H_NO_AUDIO = 96;
// Heights bumped to fit the new "Tile ausblenden" row (38px each).
const MENU_H_WITH_AUDIO = 240;
const MENU_H_NO_AUDIO = 134;
// Context menu surfaced on right-click of a remote screen share. Mirrors
// Discord's stream menu: volume slider, audio mute toggle (independent of
@@ -41,9 +42,12 @@ export function ScreenShareContextMenu({
const { t } = useTranslation(['app']);
const {
dismissShare,
stopWatchingShare,
watchingShareUserIds,
screenShareAudioMutedIds,
setScreenShareAudioMuted,
} = useCall();
const watching = watchingShareUserIds.has(userId);
const [volume, setVolume] = useState<number>(() => getScreenShareVolume(userId));
useEffect(
@@ -151,6 +155,25 @@ export function ScreenShareContextMenu({
</>
)}
{/* Discord-parity: "Stop watching" only ends the local subscription;
the tile stays so the user can re-click to watch again. The full
dismiss path (kill the tile until the sharer restarts) is the
second row below. */}
{watching && (
<button
type="button"
onClick={() => {
stopWatchingShare(userId);
onClose();
}}
className="flex w-full cursor-pointer items-center gap-2 border-t border-line px-3 py-2 text-left text-xs text-fg transition hover:bg-surface-3"
>
<PhoneOffIcon className="h-4 w-4 text-fg-muted" />
<span>
{t('app:call.stop_watching', { defaultValue: 'Zuschauen beenden' })}
</span>
</button>
)}
<button
type="button"
onClick={() => {
@@ -159,9 +182,9 @@ export function ScreenShareContextMenu({
}}
className="flex w-full cursor-pointer items-center gap-2 border-t border-line px-3 py-2 text-left text-xs font-semibold text-rose-600 transition hover:bg-rose-500/10 dark:text-rose-300"
>
<PhoneOffIcon className="h-4 w-4" />
<EyeOffIcon className="h-4 w-4" />
<span>
{t('app:call.stop_watching', { defaultValue: 'Zuschauen beenden' })}
{t('app:call.dismiss_tile', { defaultValue: 'Stream-Tile ausblenden' })}
</span>
</button>
</div>,