web: Discord-style stream grid, focus and pop-out window

Watched streams and our own broadcast are tiles in one grid (two columns
in the corner), any tile can be enlarged across the grid, and the whole
grid can move into its own browser window via a React portal; closing
that window brings it back.

main.tsx now reloads once when the App chunk (or a lazy chunk) fails to
load, which is what left a black screen right after the last deploy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
This commit is contained in:
MoepchiandClaude Opus 5.5 committed 2026-11-30 21:38:18 +00:00
1 parent 73ae268dfb
commit 8fbd591efa
5 files changed
+167 -16

No files matched your search

+54 -6
View File
@@ -1480,7 +1480,7 @@
.ts-stream-panel {
display: flex;
flex-direction: column;
width: min(480px, calc(100vw - 2rem));
min-width: 0;
background: var(--bg-toolbar-1);
border: 1px solid var(--border);
border-radius: 6px;
@@ -1661,21 +1661,69 @@
border-color: var(--accent);
}
/* Watching and broadcasting can run at the same time, so the two panels stack
instead of each anchoring itself to the same corner. */
/* Every watched stream (and our own broadcast) is a tile in one grid, like
Discord: up to two columns in the corner, as many as fit when popped out. */
.ts-stream-panels {
position: fixed;
right: 1rem;
bottom: 1rem;
z-index: 29;
display: flex;
flex-direction: column;
display: grid;
grid-template-columns: repeat(var(--stream-cols, 1), minmax(0, 1fr));
align-content: end;
gap: 0.5rem;
align-items: flex-end;
width: min(calc(var(--stream-cols, 1) * 480px), calc(100vw - 2rem));
max-height: calc(100vh - 2rem);
overflow-y: auto;
}
.ts-stream-toolbar {
grid-column: 1 / -1;
order: -2;
display: flex;
justify-content: flex-end;
}
.ts-stream-toolbar button {
padding: 0.15rem 0.5rem;
background: var(--bg-toolbar-1);
border: 1px solid var(--border);
border-radius: 4px;
color: inherit;
font-size: 0.85em;
cursor: pointer;
}
.ts-stream-panel-focused {
grid-column: 1 / -1;
}
/* Inside the separate window the grid owns the whole viewport. */
.ts-stream-panels-popout {
position: static;
width: auto;
max-height: none;
padding: 0.5rem;
grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
align-content: start;
}
/* Discord-style focus: the enlarged stream on top, the rest below it. */
.ts-stream-panels-popout .ts-stream-panel-focused {
order: -1;
}
.ts-stream-panels-popout .ts-stream-panel-focused video {
max-height: calc(100vh - 6rem);
}
/* Wraps the grid in the popped-out window; carries the theme variables. */
.ts-stream-popout-root {
min-height: 100vh;
background: var(--bg);
color: var(--text);
}
.ts-context-menu {
position: fixed;
z-index: 30;