Commit graph

15 commits

Author SHA1 Message Date
mplorentz
d552b6f245 Merge branch 'flotilla-sph-adaptive-grid' of ssh://forgejo.lorentz.is:4201/matt/flotilla into flotilla-sph-adaptive-grid 2026-08-12 09:21:14 -04:00
Agent
521e611d6b fix: three bugs in computeUniformGrid sizing and scoring
1. Array-comparison bug (CRITICAL): 'key < bestKey' coerces arrays to
   comma-joined strings, so [1668,...] < [23,...] is TRUE ('1'<'2').
   Replaced with explicit numeric lexicographic compare (compareKeys).
   Root cause of @matt's report: n=2 @1920x500 picked 1x2 stacked with
   1668px overflow instead of 2x1 side-by-side fitting nearly exactly.

2. <MIN branch bug (CRITICAL): fillAspect < 3/4 computed tileW = rowH *
   TILE_ASPECT_MIN which ALWAYS exceeds widthLimit (the column width),
   producing tiles wider than the container. Fix: tileW = widthLimit;
   tileH = widthLimit / TILE_ASPECT_MIN (letterbox vertically, fits).

3. Missing horizontal overflow scoring: added hOverflow to the key
   (after vOverflow) as belt-and-braces guard.
2026-08-11 16:51:30 -04:00
mplorentz
957ab58956 Merge branch 'flotilla-sph-adaptive-grid' of ssh://forgejo.lorentz.is:4201/matt/flotilla into flotilla-sph-adaptive-grid 2026-08-11 16:40:31 -04:00
Agent
4b1e209262 feat: uniform-size tile grid with flex-fill aspect (PR-C1 plan v2)
Replaces the Jitsi-style mixed-row layout (~190 lines: partitions,
mixed-size rows, per-row aspect, penalty scoring) with a simple uniform
grid (~25 lines): all tiles identical px size, aspect flexes within
[3:4 .. 16:9], column count chosen to maximize area via key ordering
(overflow < waste < aspect closeness < -area).

Key changes:
- computeUniformGrid / UniformTileGrid replaces computeTileLayout/TileLayout
- TILE_ASPECT_MIN widened from 9/16 to 3/4 per @matt
- CSS grid with explicit px column/row tracks replaces flex rows
- mx-auto centers the grid block; orphan rows have same-size tiles
  (never full-width giants)
- Outer measuring container always mounted (bind:clientWidth/Height);
  inner grid gated on tileGrid
- Each tile wrapper: overflow-hidden rounded-2xl (grid cell sizes it)
- 'default' tile variant keeps min-h-0 h-full w-full (fills grid cell)

Per @matt's approved plan v2: flex-fill single rule everywhere, no
portrait special-casing, no mixed-size rows, uniform tiles, centered
block.
2026-08-11 16:25:55 -04:00
mplorentz
b9a1f9c7ba Merge branch 'flotilla-sph-adaptive-grid' of ssh://forgejo.lorentz.is:4201/matt/flotilla into flotilla-sph-adaptive-grid 2026-08-11 15:44:03 -04:00
Agent
d8dea9c4dd feat: Jitsi-style mixed-size tile grid sizing (PR-C1 rework)
Replaces the uniform grid-sizing helper (computeGridSize -> rows/cols)
with a Jitsi-inspired mixed-size layout algorithm (computeTileLayout).

Key changes:
- Tiles flex between 9:16 and 16:9 aspect ratio per row, matched to
  container dimensions
- Rows can have different tile counts (e.g. [2,1] for 3 participants,
  [3,2] for 5, [4,3] for 7)
- Last row with fewer tiles gets a wider (more landscape) aspect ratio
  while earlier rows stay more square-ish
- CSS grid replaced with flex rows; each tile's aspect-ratio set via
  inline style (no more hardcoded aspect-video)
- Container dimensions bound via bind:clientWidth/clientHeight
- Dead {:else} branch (always-true useMultiGrid) removed
- Overflow penalty, whitespace penalty, and balance penalty ensure
  reasonable layouts at all tile counts

Per @matt's PR review feedback: read jitsi-meet source
(react/features/video-layout/functions.web.ts,
react/features/filmstrip/functions.web.ts) for the tile sizing
approach.
2026-08-11 10:13:05 -04:00
mplorentz
1e2e4923c3 Merge remote-tracking branch 'origin/dev' into flotilla-sph-adaptive-grid 2026-08-11 09:44:19 -04:00
Aditya Chaudhary
72ee0c9ed6 Reacquire mic after screen lock kills capture mid-call (#339)
Co-authored-by: Aditya Chaudhary <30+useradityaa@noreply.coracle.social>
2026-08-10 18:32:11 +00:00
Aditya Chaudhary
7dcc713ec2 Refine calls: accessible controls, mic level check before joining (#331)
Co-authored-by: Aditya Chaudhary <30+useradityaa@noreply.coracle.social>
2026-08-10 18:14:46 +00:00
Agent
664a57d4eb feat: adaptive video grid sizing (PR-C1)
Add computeGridSize helper in call.ts that computes optimal row/column
counts for a video tile grid given tile count and container dimensions,
maximizing tile size while maintaining ~16:9 cells.

Apply via computed grid-template-columns/rows on the multi-grid path
(no-spotlight) in VideoCallContent.svelte, replacing the fixed
grid-cols-1 / grid-cols-1 sm:grid-cols-2 heuristic. The multi-grid now
handles all tile counts from 1 to 12+ smoothly.

- computeGridSize(tileCount, containerWidth, containerHeight) -> GridSize
- Container dimensions bound via clientWidth/clientHeight
- useMultiGrid: dropped the > 2 check, now !useSpotlightLayout
- gridStyle: computed grid-template-columns/rows string from gridSize
- Scope: multi-grid only, no spotlight/strip/breakpoint changes
2026-08-05 14:39:01 -04:00
Jon Staab
9a80d059bb Migrate to new welshman 2026-07-29 15:52:13 -07:00
Jon Staab
a2c5a8e2ff Clean up convention violations, dead code, and daisyUI leftovers 2026-07-27 15:38:23 -07:00
Jon Staab
fe90a9f0ba Fix call mute failures, stale session writes, and leaked audio elements 2026-07-27 15:01:48 -07:00
Aditya Chaudhary
16a446095a fix(video): show avatar tiles for audio-only and camera-off callers (#325)
Co-authored-by: Aditya Chaudhary <30+useradityaa@noreply.coracle.social>
Co-committed-by: Aditya Chaudhary <30+useradityaa@noreply.coracle.social>
2026-07-20 23:34:06 +00:00
Matt Lorentz
90561d46ad Refactor voice and video module (#310)
Co-authored-by: Matt Lorentz <5+mplorentz@noreply.coracle.social>
Co-committed-by: Matt Lorentz <5+mplorentz@noreply.coracle.social>
2026-06-26 22:56:49 +00:00
Renamed from src/app/call/voice.ts (Browse further)