Commit Graph
100 Commits
Author SHA1 Message Date
fkwp 0633b24880 Merge remote-tracking branch 'origin/main' into fkwp/explore/quick-audio-menu 2026-09-17 22:50:39 +02:00
fkwpandClaude Opus 5 099950a100 Update the device menu to the latest design
- Each section is headed by its own rule, edge to edge, instead of one inset
  divider between the sections. Compound draws that rule under a menu heading
  already, so this removes our Separator, its spacing rule and its import.
- Our heading padding override goes too: Compound's menu heading is the design
  already — 13px/600 on a 19.5px line, #656D77, 16px either side, 7px from the
  text to the rule. Ours had been moving that 7px above the text.
- Two spacings do differ from Compound, both measured off the mock rather than
  guessed: 20px below the rule before a section's first device (27px rule to
  control, against Compound's 16px), and 28px above a heading that follows
  another section (41px from the last control to the next heading's text,
  against 22px). The first heading keeps Compound's spacing — the menu's own
  padding sits above it.
- Guarded by relationships, not numbers: the first control sits further below
  the rule than from the menu's edge, and a section stands further from the one
  above it than a heading does from its own first device. Both fail if either
  spacing goes back to Compound's 8px.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 22:43:48 +02:00
fkwp 194bfea287 Cover the speaker section sitting above the microphone section
- Covers AC28, which `ux_design_shevron.png` settles.
- Not written in this session: it was uncommitted in the tree beforehand, and
  is committed here so it is not lost.
2026-09-17 11:56:31 +02:00
fkwp 4f8f71e861 Cover the device menu with stories and end-to-end specs
- The stories supply what the app supplies rather than what a harness has
  lying about: a microphone, and a call-sized root element.
- Invented device ids meant the menu asked for hardware that does not exist,
  so the meter reported no microphone. A tone played into a real MediaStream
  fixes it, and the meter runs its own analyser over it.
- Without a root element the list was bounded by Storybook's whole frame and
  the menu ran off the canvas; without a call-sized one, four devices scrolled.
- Standalone specs: the switch that does not drop the call, the meter alive
  while muted, the pinned meter, the focus ring.
- Component specs: the list sized to the call and not the window, resized
  while open, every device reachable, and the modality belonging to one call.
- A headless browser has one microphone and one speaker, so fake-devices.ts
  adds synthetic ones. It is explicit that it does not route audio.
2026-09-17 11:56:31 +02:00
fkwp d7e0444117 Write the mute button once instead of twice per kind
- Both arms of the switch were the same eleven lines of click, disabled, busy
  and enabled wiring; only the component and the test id differed.
- Two copies that had to be kept in sync by hand, for nothing.
- `toggles` becomes an expression rather than a `let` mutated in a switch,
  which makes the optional chaining downstream dead.
- The labels switch stays: i18n extraction needs literal `t("…")` keys, and it
  gives exhaustiveness checking on the union.
2026-09-17 11:56:31 +02:00
fkwp a6e00895a0 Track the focus modality on the menu itself
- Was watched at the document, so a key pressed in another Element Call on the
  same page — or in the host's own page — lit this menu's ring. Element Call
  can be mounted more than once, and the menu is portalled out of the root.
- Watched on the menu instead, which is the element that holds focus.
- A callback ref, not an effect on `menuOpen`: that state is ours and the open
  menu is Radix's, and they do not commit together, so the effect could run
  before there was anything to attach to.
- Recorded on the menu rather than in state, so every item it can focus answers
  to it — the camera menu's blur toggle kept the browser's own ring otherwise,
  which follows the pointer.
- Nothing re-renders when the modality changes now, so the reset folds in with
  the listeners and the second effect on that state goes.
- Comments moved to the code they describe; three unrelated ones had stacked up
  on one declaration.
2026-09-17 11:56:31 +02:00
fkwp 8f3506782a Keep each section's heading in view while the list scrolls
- The heading of the section you are reading stays at the top of the list and
  leaves with its own section, so a long list never leaves you guessing which
  kind of device a row is.
- Opaque and held a border width clear of the sides, like the meter: a
  positioned element paints over the outline the menu draws its frame with.
- Sticky alone hides rows: scrolling a row flush to either edge puts it under
  the heading or under the meter, which is how a row reached by keyboard ends
  up half-readable. scroll-padding-block keeps both heights clear.
- Measured from the real elements, not from tokens — the meter's failure states
  are two lines where a level is one.
2026-09-17 11:56:31 +02:00
fkwp 8508d88714 Size the device list to the call as it changes
- The bound was taken once when the menu opened, so a host resizing the space
  Element Call is drawn in while the menu is open left it describing a call
  area that no longer exists.
- Follow it with observeElementSize$, which was already here and already used
  by useRootSizeMatches, and only while the menu is open.
- Quantised before it reaches React, so a drag-resize re-renders only when the
  bound itself moves.
- 160 and 0.6 are named now, with the reason each exists.
2026-09-17 11:56:31 +02:00
fkwp ace7e947b4 Show a default speaker where the platform lists none
- Safari enumerates no output devices at all, so the list arrived empty — and
  an empty array is truthy, so the Speaker heading rendered with nothing under
  it, which reads as a broken feature.
- Show one entry instead, named as the default, disabled, and marked as the
  selection: audio is going somewhere, and an unchecked lone row reads as
  nothing being chosen.
- D2 already says a row that cannot be chosen is shown disabled, never hidden.
- Covered by its condition rather than by the browser, so Linux CI checks it:
  one test that the view model hands over an empty list rather than none, one
  that the menu then draws the default.
2026-09-17 11:56:31 +02:00
fkwp 6c3012a40b Line the level meter up with the device rows
- Measured: the icon's centre sat 3px right of the radio controls above it.
- Two causes, both off the padding: the row is inset a border width to keep
  the menu's frame visible, and the icon is wider than a radio control.
- Vertically the icon was right and the text was not — a paragraph's bottom
  margin means the margin box gets centred, lifting the words.
- Guarded in a story, not a unit test: jsdom lays nothing out.
2026-09-17 11:56:31 +02:00
fkwp 6c9550da0a Give the level meter one bar size at every width
- A bar and the gap beside it are fixed; how many bars there are follows the
  space. Spread gaps made the meter a different shape everywhere, and closed
  the bars into one block when space ran short.
- Bars that touch cannot be counted, and the count is what carries the level
  without colour.
- `contain: inline-size` and `min-inline-size: 0` so the width decides the
  count and not the reverse — without them the bars set the menu's width.
- Gap is half again the bar width, measured off the design mock: 10px bars
  14px apart, a ratio of 1.4, nearest token pair 4px and 6px.
- Sizes stay in the stylesheet; the component reads them back off a rendered
  bar rather than repeating them.
2026-09-17 11:56:31 +02:00
fkwp d8211c0c61 Own the microphone level in the state layer
- The capture, the analyser loop and the loudness maths were in a component
  hook. Call logic belongs in the state layer; components render.
- observeMicrophoneState$ opens the device when something subscribes and
  releases it when nothing does. The hook is left as a bridge, no domain logic.
- Fixes a leak. A permission prompt outlives the menu that opened it, so the
  browser could hand over a microphone after cleanup had already run — with the
  variable that cleanup would have released still unset. The device stayed
  held, indicator lit, no meter on screen.
- Expressed now as the subscriber being closed, which the observable can always
  answer.
- The hook had no tests at all, which is why this survived. Four now, and the
  capture stub they need is in the shared factories rather than hand-rolled.
- One counts emissions across twenty animation frames and expects one: the
  redraw cost AGENTS.md asks continuous drawing to account for.
2026-09-17 11:56:25 +02:00
fkwp 0802649375 Show the focus ring for the keyboard alone, and fix the radio styling
- Show the focus ring only when the keyboard moved the focus. Radix focuses
  whatever the pointer is over, so the browser cannot answer that question
  here: Chromium treats every focus after a key press as keyboard-driven,
  Firefox treats no programmatic focus as keyboard-driven. The menu records
  which modality arrived, watched at the document while it is open, since the
  first arrow key lands on the menu itself rather than on anything we render.
- Suppress the browser's own ring on menu items, so there is one answer to
  that question rather than two.
- Drop readOnly from the device radios. Compound paints a read-only control
  muted, and that rule comes after the checked rule, so it overrode the accent
  fill marking the selection and the menu stopped matching settings.
- Make the decorative radio inert rather than aria-hidden. A negative tabindex
  inside an interactive control stays reachable to assistive technology even
  when hidden, which axe rejects.
- Give each section a labelled group and mark its heading decorative. A menu
  may contain only items, separators and groups, and the headings were direct
  children of it. The list wrappers are role="none" for the same reason.
- Run axe over the open menu, which is what found both of the above.

Spec: FEATURES_SPEC/2026-09_Quick_Audio_Menu.md — AC23, AC24, AC25
2026-09-16 17:44:55 +02:00
fkwp a76ef6215b more spacing between player and mic section 2026-09-16 16:27:17 +02:00
fkwp 7f3b98ed6a Size the device menu against the call, and cover its criteria
- Bound the scrolling device list by the measured height of the call area.
  It was capped with a viewport unit and a Radix variable, both of which
  measure the window: as a component in a corner of a host's page, the menu
  would have been sized against the whole page. The menu is portalled outside
  the root, so no container query reaches it and it has to be measured.
- Leave a single divider between the two lists, as the design has. Compound
  underlines every menu heading, so the headings drop theirs, and the line
  closing the microphone section goes: the section wrapper already bounds the
  meter's stickiness without one.
- Cover device persistence, hot-plug, fallback when the device in use is
  removed, fallback to a default when a remembered device is gone, numbered
  labels before permission, "Default" listed as its own entry, one device kind
  not disturbing another, and camera parity. Their acceptance criteria named
  check commands for tests that did not exist, which makes the criteria
  unenforceable and blocks the next drift check.

Spec: FEATURES_SPEC/2026-09_Quick_Audio_Menu.md — AC3, AC4, AC5, AC8, AC9,
AC10, AC11, AC19, AC20
2026-09-16 16:23:02 +02:00
fkwp 3f97ec8619 Show a live microphone level in the audio menu
- Draw the level beneath the microphone list as 24 segments, announced
  through role="meter", so it reads by count and not by hue alone.
- Give denied permission and no input device their own message and next
  action, rather than a flat meter that reads as silence.
- Read the selected device, and only while the menu is open, so nothing holds
  a second capture for the length of a call.
- Follow a rise quickly and a fall slowly, in elapsed time rather than frames,
  so the meter does not chase the gaps between syllables.
- Ignore a noise floor, below which a quiet room's hiss would light the first
  segments permanently. Smoothing changes how the meter moves, not where it
  settles, so it does not replace this.
- Scroll only the device lists, and keep the meter pinned to the foot of the
  microphone section while its rows are in view.
- Withhold the output select callback where the platform cannot route audio
  to a chosen device, which is what renders the speaker section disabled.
- Track the in-flight device by kind as well as id: Chrome names both an
  input and an output "default", so the spinner lit the wrong row.
- Disable every device while a selection is settling, so a second request
  cannot overtake the first.

Two CSS choices are load-bearing and look arbitrary: the meter's wrapper is
unpositioned, because a positioned one paints above the menu's outline and
swallows the frame along that section, and the meter is held clear of that
outline, because it is the only opaque thing in the menu.

The meter opens its own short-lived capture rather than tapping the call's
audio track. That lets it follow the picker instantly and avoids the pre-join
track, which is frozen to the device selected when the screen mounted. The
cost is a second capture while the menu is open. See the notes sidecar.

Spec: FEATURES_SPEC/2026-09_Quick_Audio_Menu.md — AC1, AC6, AC7, AC11, AC13,
AC14, AC15, AC17, AC18, AC21, AC22
2026-09-16 15:37:05 +02:00
fkwp 9a68de193f Show a live microphone level in the audio menu
- Draw the input level beneath the microphone list as 32 discrete segments,
  so the level reads by count and not by hue alone.
- Expose it through role="meter" with aria-valuenow and aria-valuetext, so a
  screen reader announces it.
- Give denied permission and no input device their own message and next
  action, rather than a flat meter that reads as silence.
- Read the level only while the menu is open, so nothing holds a second
  capture of the microphone for the length of a call.
- Read the device the picker has selected, so the meter re-points as soon as
  the selection changes.
- Ignore anything below a noise floor: a quiet room is never digitally
  silent, and its hiss otherwise lights the first segments permanently, which
  reads as "it can hear me" when nobody is speaking.
- Quantise loudness with a square root above that floor: amplitude puts
  ordinary speech near the bottom of the range, where a linear meter barely
  moves.
- Withhold the output select callback where the platform cannot route audio
  to a chosen device, which is what renders the speaker section disabled.
  Safari and most Firefox builds land here.
- Track the in-flight device by kind as well as id: Chrome names both an
  input and an output "default", so the spinner appeared on the wrong row.
- Disable every device in the menu while a selection is settling, so a second
  request cannot overtake the first.

The meter opens its own short-lived capture rather than tapping the call's
audio track. That is what lets it follow the picker instantly, and it avoids
the pre-join track, which is deliberately frozen to the device selected when
the screen mounted. The cost is a second capture of the same device while the
menu is open. See the spec's notes sidecar.

Spec: FEATURES_SPEC/2026-09_Quick_Audio_Menu.md — AC1, AC6, AC7, AC13, AC14,
AC15, AC17, AC18, AC21, AC22
2026-09-16 14:52:59 +02:00
fkwp 664fac104f Use radio controls to mark the selected device in the quick menu
- Mark the selection with a radio control instead of a trailing check icon
  beside a device glyph, matching the design and the settings modal, so both
  device pickers read the same way.
- Take the visual from Compound's RadioInput rather than restyling a span of
  our own. RadioControl is wrapped in a Radix form control and needs a Form
  ancestor, which a dropdown menu has no business providing; RadioInput does
  not.
- Keep rows as menuitemradio with aria-checked, rendered through
  MenuItem as="div" so an input is never nested inside a button.
- Render the radio aria-hidden and not focusable: Radix owns focus inside the
  menu, and aria-checked carries the state.
- Leave the activating spinner unchanged.
- Keep every scope.behavior call inside the function that owns the scope,
  which no-observablescope-leak requires.
- Cover the speaker section, an output that cannot be chosen, and a lone
  device shown disabled, with unit tests and stories for each.

Spec: FEATURES_SPEC/2026-09_Quick_Audio_Menu.md — AC1, AC7
2026-09-16 14:02:01 +02:00
fkwp ef2cbbbaea Translate the device menu titles and drop the duplicated heading
Spec: FEATURES_SPEC/2026-09_Quick_Audio_Menu.md — AC1
2026-09-16 13:14:23 +02:00
fkwp 27789131ee Add speaker selection to the microphone quick menu
The microphone chevron listed input devices only, so changing the output
device meant leaving the call controls for the settings modal.

Render the audio menu as two sections, Speaker above Microphone, and wire
the output device list, selection and select callback through the footer
view model. Entries are shown but disabled where the platform cannot switch
that kind of device, or where only one exists, so the menu keeps the same
shape everywhere.

Spec: FEATURES_SPEC/2026-09_Quick_Audio_Menu.md — AC1, AC6, AC7, AC8
2026-09-16 12:58:32 +02:00
fkwp 04b0165961 Fix tap-to-show call controls on iOS (ReactMouseEvent -> ReactPointerEvent) 2026-05-15 12:29:26 +02:00
fkwp 0dc8fab256 linting 2026-05-04 13:36:26 +02:00
fkwp 69757b06ce prettier 2026-05-04 13:27:57 +02:00
fkwp a081b40fb2 add marble test 2026-05-04 13:24:19 +02:00
fkwp 88b5db6675 fix rtsSession initial state 2026-05-04 10:41:48 +02:00
fkwp 22f16174ef addressing review comments 2026-05-04 09:16:55 +02:00
fkwp 6c25048b92 Merge branch 'livekit' into fkwp/feature_relax_homeserver_offline 2026-04-30 21:02:24 +02:00
fkwp 2e4ca9b761 use 10 Seconds of grace period in config.sample.json 2026-04-30 20:54:46 +02:00
fkwp 42aae307f9 use latest stable version of jwt service 2026-04-30 20:53:18 +02:00
fkwp 24c2845958 move starWith to corresponding branch in switchMap 2026-04-30 20:50:45 +02:00
fkwp 39ef815d8b Merge branch 'livekit' into fkwp/feature_relax_homeserver_offline 2026-04-23 17:29:14 +02:00
fkwp 0abc32b80e prettier 2026-04-23 15:47:40 +02:00
fkwp c1f821ca0f Update default sync disconnect grace period to 10000ms in configuration and related functions 2026-04-23 15:33:00 +02:00
fkwp 283c606b9d Add tests for grace period handling in createHomeserverConnected$ 2026-04-22 21:46:25 +02:00
fkwp ee343935a4 Merge branch 'fkwp/delegation_of_delayed_events' into fkwp/feature_relax_homeserver_offline 2026-04-22 21:11:23 +02:00
fkwp 032ec662e9 bump lk-jwt-service 2026-04-22 21:08:49 +02:00
fkwp 9fccd49d7d Improve the handling of the grace period for the home server connection to support both immediate and delayed emissions. 2026-04-22 21:08:31 +02:00
fkwp 9f2db7cfc3 Merge branch 'livekit' into fkwp/delegation_of_delayed_events 2026-04-22 20:42:00 +02:00
fkwp 9e2eef09d4 Add support for a grace period for /sync (aka homeserver disconnected) interruptions 2026-04-22 15:18:50 +02:00
fkwp 4d86580542 pin lk-jwt-service to delegation PR 2026-04-17 23:03:17 +02:00
fkwp 2adb498620 prettier 2026-04-17 18:28:02 +02:00
fkwp d75f2563c6 getting ride of shamefully-hoist=true 2026-04-17 18:23:32 +02:00
fkwp 938a03d0c1 address review comments 2026-04-17 18:21:48 +02:00
fkwp b58ad639c1 Prevents Prettier from formatting the lockfile to avoid conflicts with
pnpm's internal formatting
2026-04-17 11:14:21 +02:00
fkwp 2b42b2bdc1 fix tests after moving to pnpm 2026-04-17 11:13:41 +02:00
fkwp 9c1719a22f Switching to pnpm caused module resolution errors because some dependencies rely on being hoisted to the root. This flag restores the flat node_modules structure temporarily. 2026-04-17 11:08:25 +02:00
fkwp 17ad20cd09 switching from yarn to pnpm 2026-04-17 11:07:31 +02:00
fkwp 5657036f2f Bump matrix js-sdk to support latest MSC4195 update 2026-04-16 17:02:07 +02:00
fkwp 79de8dffff fix test as with the recent version of livekit-client the URL format changed 2026-04-13 09:22:24 +02:00
fkwp cbb9e7a289 Merge branch 'livekit' into fkwp/delegation_of_delayed_events 2026-04-01 11:46:29 +02:00
fkwp 4006a8d9f9 Merge branch 'livekit' into fkwp/delegation_of_delayed_events 2026-03-27 15:29:16 +01:00
fkwp 7b1eb03e2a add ca certs to SFU containers such that webhooks are accepted 2026-02-06 11:54:39 +01:00
fkwp d3a4234f4a setup webhooks for SFUs 2026-02-06 11:54:22 +01:00
fkwp ff3d6bd088 enable sticky events 2025-12-16 11:22:25 +01:00
fkwp 6fe6daba31 switch synapse docker image to one with sticky event support 2025-12-16 11:20:38 +01:00
fkwp 1aa76925f7 removing nextgen_new_foci_type item from foci array since it introduces confusion 2025-08-01 15:39:58 +02:00
fkwp d59e794bdf add alias to nginx 2025-07-31 17:05:57 +02:00
fkwp 0bf5c4a835 simplify package.json scripts and remove NODE_ENV variables since we dont use them 2025-06-11 16:54:10 +02:00
fkwp 3d47609cff Since we are now using templating anyhow we can also combine full and embedded build into one step 2025-06-10 18:17:16 +02:00
fkwp 378d59e948 prettier 2025-06-10 14:27:15 +02:00
fkwp a07dbe645e tools section to self-hosting guide and adding Matrixtester to it 2025-06-10 14:24:59 +02:00
fkwp 6f9adfe3e8 fix: add misssing yarn 2025-06-06 00:21:23 +02:00
fkwp d47e579994 add build_mode also to build_embedded_element_call 2025-06-06 00:20:11 +02:00
fkwp 61d8f9a412 Merge branch 'livekit' into fkwp/dev_build 2025-06-06 00:14:45 +02:00
fkwp 31185ae365 make build_mode optional 2025-06-06 00:13:49 +02:00
fkwp e07c7c864b prettier 2025-06-06 00:02:19 +02:00
fkwp b88bce5220 add production and developt build scripts to package.json 2025-06-05 23:58:51 +02:00
fkwp 775e110ca3 Add build_mode to inputs of build_full_element_call. derive build_mode from PR label 'development build' 2025-06-05 23:58:24 +02:00
fkwp 97d548ee3a add build_mode input and use it in run commands 2025-06-05 23:51:02 +02:00
fkwp b8eccc6d7a use vite minify depending on vite mode 2025-06-05 12:16:22 +02:00
fkwp a548c5d592 test.skip() does only skip the test call back but not the fiturex. Hence, disabling the whole test 2025-05-30 15:03:43 +02:00
fkwp 08ab38280a prettier 2025-05-30 14:49:29 +02:00
fkwp a732fcc604 linting 2025-05-30 14:46:35 +02:00
fkwp 7e19b58976 define the widget test as a slow test 2025-05-30 14:29:17 +02:00
fkwp e56fb7cfc8 use .toBeVisible instead of continueButton.isVisible 2025-05-30 14:10:57 +02:00
fkwp aabfe16021 prettier 2025-05-30 13:51:55 +02:00
fkwp d572977922 refactor: splitout registerUser into its own function. Make the'Confirm your identity by entering your account password below.' flow optional 2025-05-30 13:38:45 +02:00
fkwp ebc714b73f force to pull the latest docker images 2025-05-27 20:06:28 +02:00
fkwp e4fd630f37 fix element web fixture 2025-05-27 19:03:53 +02:00
fkwp 99fc7162e2 fix widget fixture 2025-05-27 18:04:34 +02:00
fkwp 8953936d3d fix docker compose playwright override 2025-05-27 17:53:06 +02:00
fkwp 16aa4ae3a9 Merge branch 'fkwp/docker_compose/resolve_conflicting_ports' into fkwp/docker_compose_allow_local_lk_service 2025-05-27 16:40:28 +02:00
fkwp d585f6232e change JWT port ot 6080 to not conflict with the playwright tests. 2025-05-27 16:30:06 +02:00
fkwp b969857583 Allow the jwt service to be running locallay rather than part of the docker-compose. This helps with developing the lk-jwt-service 2025-05-22 12:49:37 +02:00
fkwp 44ed04475d bump livekit protocol version 2025-05-13 09:38:43 +02:00
fkwp b7e5b81dbf update yarn.lock to remove plugin-basic-ssl 2025-05-05 16:25:18 +02:00
fkwp e12dfa9a9f prettier 2025-05-05 16:17:16 +02:00
fkwp 48b4fd63fe prettier 2025-05-05 16:09:34 +02:00
fkwp f2b68e6dee add localhost domain to certificate 2025-05-05 16:02:19 +02:00
fkwp 128851263b use ssl cert from mini localhost CA 2025-05-05 16:01:58 +02:00
fkwp 679ff8c2af adapt to TLS setup 2025-05-05 15:47:03 +02:00
fkwp 9dcaa60982 added app.m.localhost for element web 2025-05-05 15:26:47 +02:00
fkwp 34a223f04b add yarn dev --host hint 2025-05-05 14:54:14 +02:00
fkwp 005402d8d1 prettier 2025-05-05 14:48:45 +02:00
fkwp 76fb16dbfd update README.md to reflect TLS settings 2025-05-05 14:44:21 +02:00
fkwp 1a3ac826b2 Merge branch 'livekit' into fkwp/refactor_dev_backend 2025-05-05 14:22:10 +02:00
fkwp 25afbf4303 base playwright backend on dev-backend 2025-05-05 14:20:51 +02:00
fkwp 9c65b40225 adapt new hostname schema and move to https URLs 2025-05-05 13:07:37 +02:00
fkwp fb63e64eb4 removed old localhost tls certificates 2025-05-05 13:06:58 +02:00
fkwp 8679b90bd7 add new certs to nginx section 2025-05-05 13:06:02 +02:00