Commit Graph
100 Commits
Author SHA1 Message Date
Jannis Braun 46126d671f fix: patch uiohook-napi to use listen-only CGEventTap on macOS
Fixes system-wide freeze when Accessibility permissions are enabled.
Two changes to libuiohook/src/darwin/input_hook.c via pnpm patch:
- Switch kCGEventTapOptionDefault to kCGEventTapOptionListenOnly
- Strip mouse move/drag/scroll/left/right-click events from mask

Listen-only taps are passive observers that cannot freeze the system.
Keeps keyboard events and mouse buttons 3+ for PTT side buttons.
Windows and Linux native paths are completely untouched.
2026-03-22 23:40:37 +01:00
Jannis Braun 313ff4ef87 feat: add Nori mascot to mobile empty states 2026-03-22 23:39:16 +01:00
Jannis Braun b3051c25cd feat: add lonely Nori mascot to empty Explore page 2026-03-22 23:39:15 +01:00
Jannis Braun 4e23cb5bf9 feat: add sleeping Nori mascot to empty DM sidebar 2026-03-22 23:39:13 +01:00
Jannis Braun a4ebd52900 feat: replace Wumpus empty states with Nori mascot on Friends page 2026-03-22 23:37:15 +01:00
Jannis Braun 43eaceadc0 fix: improve animation hook robustness
- Add .catch handler to scheduleNext to prevent unhandled promise
  rejections from killing the scheduling loop
- Replace `as unknown as Animation` cast with Cancellable interface
  for type-safe cleanup handles
2026-03-22 23:31:50 +01:00
Jannis Braun 977983eed1 feat: add useMascotAnimation hook with WAAPI state machine 2026-03-22 23:26:53 +01:00
Jannis Braun e5495ac0d8 fix: resolve TS2322 ref type error and Tailwind class conflict in Mascot
- Change SvgProps.svgRef to React.Ref<SVGSVGElement> for React 18 compat
- className now replaces default w-32/h-32 instead of appending (avoids
  Tailwind specificity conflicts)
- Replace inline style={{ position: 'relative' }} with Tailwind 'relative'
2026-03-22 23:22:06 +01:00
Jannis Braun 386bd85c8d fix: attach svgRef to SVG elements in Mascot sub-components
The svgRef was created but never passed to the sub-component SVG
elements, meaning it would always be null when the animation hook
tries to use it. Now passed via SvgProps interface.
2026-03-22 23:18:37 +01:00
Jannis Braun 7d5b9c1eee feat: add Mascot component with state-driven SVG rendering
Implement the <Mascot> component that renders Nori in four emotional
states (idle, sleeping, excited, lonely) with distinct SVG geometry,
color palettes, and facial expressions. Includes useMascotAnimation
hook stub for Task 2 and full test coverage (15 tests).
2026-03-22 23:15:46 +01:00
Jannis Braun 623928812d fix: always enable web fallback keybind listeners alongside Electron IPC
When the Electron main process can't start uiohook (macOS Accessibility
denied, Linux missing input group), the IPC path silently produces no
events. Previously this left zero keybind listeners active. Now the web
capture-phase fallback is always set up as a safety net, ensuring
keybinds work in-app even when the OS-level hook fails.
2026-03-22 22:31:59 +01:00
Jannis Braun e5bf5f71ab fix: unpack native .node binaries from asar for uiohook-napi
Removed blanket !node_modules exclusion and added asarUnpack for .node
files so uiohook-napi's native binary can be loaded at runtime.
2026-03-22 22:27:10 +01:00
Jannis Braun 39ee894d77 fix: fall back to web keybind listeners when Electron lacks keybind APIs
When running in Electron but the desktop app hasn't been rebuilt with
keybind support (no syncKeybinds/onKeybindAction in preload), the hook
now falls through to the web capture-phase listener instead of silently
doing nothing. This ensures keybinds work immediately on the web-served
UI regardless of the desktop app version.
2026-03-22 21:36:05 +01:00
Jannis Braun 5554b1abc7 fix: replace broken 2-char hash with djb2 for keybind code mapping
The previous hash (charCodeAt(0)*256 + charCodeAt(1)) only used the
first 2 characters of KeyboardEvent.code strings, causing all Key*
codes (KeyA, KeyB, ..., KeyZ) to collide to the same numeric value.
This made Ctrl+D and Ctrl+M appear as identical bindings (false
conflict) and broke keybind matching in the web fallback.

djb2 hashes the full string, producing unique values for all codes.
2026-03-22 21:01:02 +01:00
Jannis Braun 6ca28765bc feat: add user-configurable global keybinds for voice actions
Adds keyboard/mouse shortcut support for mute, deafen, camera,
screenshare, push-to-talk, and disconnect. Desktop app uses
uiohook-napi for OS-level global shortcuts that work while minimized.
Web fallback uses capture-phase listeners. Settings UI with keybind
recorder, conflict detection, and platform-specific permission handling.
2026-03-22 20:51:40 +01:00
Jannis Braun 3ce9ee0db0 feat(desktop): add KeybindManager with uiohook-napi for global shortcuts
Installs uiohook-napi for OS-level non-consuming input hooks, creates
KeybindManager class that receives keybind configs from the renderer,
matches the OS-wide key/mouse event stream, and sends matched actions
back via IPC. Exposes syncKeybinds, onKeybindAction, onAccessibilityStatus,
onKeybindHookError, and checkAccessibility APIs through the preload bridge.
2026-03-22 20:47:41 +01:00
Jannis Braun 11d802f86c feat(keybinds): add KeybindsPanel settings UI with recorder and conflict detection 2026-03-22 20:42:48 +01:00
Jannis Braun 895f665da9 feat(keybinds): wire useKeybinds hook into AppLayout 2026-03-22 20:37:45 +01:00
Jannis Braun c6d345048a feat(keybinds): add useKeybinds hook with Electron IPC bridge and web fallback 2026-03-22 20:35:31 +01:00
Jannis Braun fb964cc01a feat(keybinds): add keybindStore with persist, conflict detection, and tests 2026-03-22 20:32:22 +01:00
Jannis Braun 11081dbf5a refactor(voice): extract action handlers into voiceActions.ts, remove hard-coded M/D shortcuts
Move mute/deafen/camera/screen-share/disconnect logic out of VoiceControlBar into a shared voiceActions.ts utility so the same handlers can be called from both UI buttons and the upcoming keybind dispatcher.
2026-03-22 20:27:10 +01:00
Jannis Braun 063d73cff1 feat(voice): add setMuted() idempotent setter and pttActive state for PTT keybinds 2026-03-22 20:23:23 +01:00
Jannis Braun 7694f732c9 fix: replace AccountPanel inline success banners with toasts
Missed in previous pass: "Profile updated!" and "Password changed!"
banners now use addToast instead of inline layout-shifting divs.
2026-03-22 04:57:55 +01:00
Jannis Braun dd33a62b22 fix: replace inline save banners with toast notifications
Removes layout-shifting "Settings saved" / "Role saved" inline
banners from 5 settings panels. Uses existing addToast from
uiStore instead. Error banners kept inline.
2026-03-22 04:49:10 +01:00
Jannis Braun ca5cf61e53 fix: replace inline save banners with toast notifications 2026-03-22 04:48:32 +01:00
Jannis Braun 7ff8614127 refactor: extract SettingsTabBar as reusable infrastructure component
Replace one-off inline tab bar in InstancePanel with a reusable
SettingsTabBar that reads from SettingsSectionsContext. Any panel
using tab mode can drop it in with zero configuration.

Polish: proper underline indicator, consistent gap spacing,
negative top margin to sit flush with content area padding.
2026-03-22 04:42:46 +01:00
Jannis Braun 2d7395ba64 feat: add top tab bar to Instance settings panel
Renders tab pills (General, Streaming, Storage, Users) at the
top of the content area, matching Discord's Family Center pattern.
Works alongside the sidebar sub-links — both navigate the same tabs.
2026-03-22 04:34:02 +01:00
Jannis Braun 9317ccb3a0 feat: add filter row with instance, role, date, and sort to UsersPanel 2026-03-22 04:26:00 +01:00
Jannis Braun 6615b0b700 feat: add filter params and listInstances to admin API client 2026-03-22 04:23:33 +01:00
Jannis Braun fd4c73c3cb feat: add filter and sort params to admin users endpoint
Add homeInstance, role, joinedAfter, joinedBefore, and sort query
params to GET /api/admin/users. Add GET /api/admin/users/instances
endpoint returning distinct home instance domains.
2026-03-22 04:22:22 +01:00
Jannis Braun 4f143bb289 fix: add missing Instance sub-panel titles and overhaul reset password UX
- Add <h2> title headings to General, Streaming, Storage, Users panels
- Reset password now shows confirmation dialog before executing
- Temp password displays inline below the user row (not at top of list)
- Temp password has copy button and dismiss action
2026-03-22 04:04:46 +01:00
Jannis Braun 437873c823 refactor: Instance settings back to separate pages with sidebar sub-links
The continuous scroll was wrong for Instance — its sub-panels are
fundamentally different page types (user table, storage tool, bitrate
matrix, toggles). Revert to conditional rendering.

The hook now supports two modes:
- Scroll mode (default): smooth scroll + IntersectionObserver spy
- Tab mode (onNavigate callback): sidebar sub-links switch tabs

Instance uses tab mode. The scroll-spy infrastructure remains for
future panels that benefit from it (e.g. Account sections).

Also reverts GeneralPanel to sticky save bar since it's on its own
page again with no overlap risk.
2026-03-22 03:52:26 +01:00
Jannis Braun ca9b971c29 fix: improve Instance settings section spacing and save UX
- Section headings: text-lg with descriptions, dividers spaced my-10
- GeneralPanel: convert to auto-save (toggles save immediately,
  text fields save on blur) — no more hidden save bar
- StreamingPanel: restore sticky save bar (complex multi-field form
  needs explicit save, and it's the only sticky bar now)
2026-03-22 03:43:23 +01:00
Jannis Braun fbf83cf8f4 fix: prevent infinite re-render loop in settings sections
- Memoize context value in SettingsSectionsProvider
- Use ctxRef pattern in hook to avoid depending on ctx object
  in useLayoutEffect deps (ctx object changes on every render,
  causing effect → setState → re-render → effect loop)
2026-03-22 03:32:43 +01:00
Jannis Braun 9210fb6616 fix: use stable SECTIONS array to prevent unnecessary re-renders
Remove `as const` + spread pattern that created a new array on
every render, triggering useLayoutEffect re-registration. Use
typed SettingsSection[] constant instead.
2026-03-22 03:25:50 +01:00
Jannis Braun d96d2d4dd1 fix: convert Instance save bars from sticky to inline for sectioned layout 2026-03-22 03:20:50 +01:00
Jannis Braun 61a0bff4a3 feat: refactor InstancePanel from tabs to sectioned single page 2026-03-22 03:19:36 +01:00
Jannis Braun f94958354a feat: integrate section sub-links into UserSettings sidebar 2026-03-22 03:18:28 +01:00
Jannis Braun 537f489432 feat: apply delayed loading to member sidebar skeleton 2026-03-22 03:17:01 +01:00
Jannis Braun 44e8b32c2f feat: apply delayed loading to app boot skeleton 2026-03-22 03:17:00 +01:00
Jannis Braun b6f4659849 feat: apply delayed loading to channel sidebar skeleton 2026-03-22 03:16:47 +01:00
Jannis Braun fce2d7c3f0 feat: apply delayed loading to message list skeletons 2026-03-22 03:16:40 +01:00
Jannis Braun a152ee9a4c feat: add useSettingsSections hook with scroll-spy and smooth scrolling 2026-03-22 03:16:17 +01:00
Jannis Braun 2924c83717 feat: add useDelayedLoading hook to prevent skeleton flicker 2026-03-22 03:16:02 +01:00
Jannis Braun 346fceeb74 feat: add SettingsSectionsContext for sidebar section communication 2026-03-22 03:14:59 +01:00
Jannis Braun fcbdac7a2f fix: improve skeleton loading accessibility and consistency
- Add role="status" and aria-label to all skeleton containers
- Refactor ChannelSidebar from conditional siblings to ternary
  for consistent mutual exclusivity with MemberSidebar pattern
2026-03-22 02:51:02 +01:00
Jannis Braun 7d21f25f39 feat: replace app boot spinner with layout shell skeleton 2026-03-22 02:47:09 +01:00
Jannis Braun 9044fe5539 feat: add skeleton loading state to channel sidebar 2026-03-22 02:45:11 +01:00
Jannis Braun a2ff5cb75d feat: add skeleton loading state to member sidebar 2026-03-22 02:44:46 +01:00
Jannis Braun 02dcd2f903 feat: replace pagination spinner with skeleton rows in message list 2026-03-22 02:43:32 +01:00
Jannis Braun d93b710dbd feat: replace message list loading spinner with skeleton rows 2026-03-22 02:42:44 +01:00
Jannis Braun ddaf6fee68 feat: add loadingSpaceId flag to spaceStore for skeleton loading guards 2026-03-22 02:41:32 +01:00
Jannis Braun 4222537831 feat: add skeleton shimmer CSS primitives for loading states 2026-03-22 02:41:07 +01:00
Jannis Braun 9812e13a0e fix: center settings content within content area
Content was left-aligned in the content pane, making it appear
off-center relative to the full modal. Add mx-auto to center
the max-w-[640px] wrapper within the content area, matching
Discord's centering behavior.
2026-03-22 02:33:05 +01:00
Jannis Braun 2fdf379cb2 fix: raise PWA precache size limit to 3 MB
Main bundle grew past the default 2 MB workbox limit, breaking
Docker builds. Raise to 3 MB to unblock deployment.
2026-03-22 02:28:15 +01:00
Jannis Braun 1f3d10842d fix: correct mobileView initial state and add SpaceSettings tab reset
- UserSettings: change mobileView default from 'content' to 'tabs'
- SpaceSettings: add useEffect to reset tab and mobileView on modal open
2026-03-22 02:26:15 +01:00
Jannis Braun e87cab58bf feat: add panel title headings to all SpaceSettings panels 2026-03-22 02:20:51 +01:00
Jannis Braun b3cb84c6a2 feat: rebuild SpaceSettings with expanded layout and grouped sidebar 2026-03-22 02:19:15 +01:00
Jannis Braun d54de16ec8 feat: add panel title headings to all UserSettings panels 2026-03-22 02:17:38 +01:00
Jannis Braun 3b06818614 feat: rebuild UserSettings with expanded layout and grouped sidebar 2026-03-22 02:15:27 +01:00
Jannis Braun 9bacc8fb3d feat: add size='settings' variant to Modal component 2026-03-22 02:13:49 +01:00
Jannis Braun 4c4bd8dec6 fix: add editable input alongside slider step presets for custom values 2026-03-22 01:44:24 +01:00
Jannis Braun 46f17cf172 fix: replace slider step number input with pill presets 2026-03-22 01:29:40 +01:00
Jannis Braun eff3210f29 fix: make slider step a compact inline row instead of prominent section 2026-03-22 01:25:03 +01:00
Jannis Braun 30cbf58770 fix: stack bitrate slider and input vertically for responsive layout 2026-03-22 01:19:28 +01:00
Jannis Braun 7e7e77b298 fix: prevent ghost voice users after server restart
Replace the stale-flag-based voice re-registration in the WS ready
handler with a server-authoritative check. If the server's voiceStates
doesn't include us (server restarted, lost in-memory voiceRooms),
cleanly tear down the LiveKit session via leaveVoice() + disconnect().
If the server still knows about us (WS blip), do nothing.
2026-03-22 01:05:30 +01:00
Jannis Braun f3ff07aa6d feat: add bitrate matrix editor with scale macro and uncapped max inputs 2026-03-22 00:52:40 +01:00
Jannis Braun c0618a0b75 refactor: convert screenShare.ts to kbps with override-first lookup 2026-03-22 00:47:08 +01:00
Jannis Braun 19cdfe58a4 feat: add bitrateMatrixOverrides validation, raise bitrate caps to 1 Gbps
- Import BITRATE_MATRIX_KBPS from shared constants
- Parse and return bitrateMatrixOverrides in rowToLimits
- Widen updateData type to accept null values
- Raise maxBitrateKbps and minBitrateKbps caps from 50 000 to 1 000 000 kbps
- Add full validation for bitrateMatrixOverrides (null to clear, key/value checks)
2026-03-22 00:44:24 +01:00
Jannis Braun 267dc8d992 feat: add bitrateMatrixOverrides to types, schema, and migration 2026-03-22 00:42:23 +01:00
Jannis Braun c7c7793aef feat: add BITRATE_MATRIX_KBPS to shared constants 2026-03-22 00:41:55 +01:00
Jannis Braun 6122c7829f fix: replace regex-based isNewlyCreated with explicit isNew prop
Pass isNew from parent state instead of guessing from the role name
pattern. Set true on create/copy, cleared on back/click-to-edit.
2026-03-22 00:17:14 +01:00
Jannis Braun b8c8e39dfd fix: use existing success banner style for role created indicator
Match the status-online pattern already used for "Role saved" in the
same file, instead of introducing a one-off accent-primary variant.
2026-03-22 00:12:33 +01:00
Jannis Braun 0bd87c4ebf fix: auto-focus name input and show creation indicator in role editor
After creating or copying a role, the name input is now auto-focused
with text selected so the user immediately starts typing. A subtle
"Role created" banner appears until the user makes any change.
2026-03-22 00:05:17 +01:00
Jannis Braun da82ba6d94 fix: add key prop to RoleEditView to reset state when switching roles
RoleEditView used useState(role.name) for draft state, but React
reuses the component instance when editingRoleId changes, ignoring
the new initial value. Adding key={editingRoleId} forces a remount,
re-initializing all draft state (name, color, permissions) correctly.
2026-03-21 23:43:00 +01:00
Jannis Braun 09bfd1ccab fix: use grid layout for stream settings pills to prevent uneven wrapping 2026-03-21 23:41:01 +01:00
Jannis Braun f9f7dd158f feat: guard applyConstraints for native mode in useLiveKit 2026-03-21 23:33:30 +01:00
Jannis Braun 8885662766 docs: update CLAUDE.md with high-end streaming settings 2026-03-21 23:32:04 +01:00
Jannis Braun b4b22faf55 feat: auto-increment role names to avoid uniqueness conflicts on create and copy 2026-03-21 23:31:35 +01:00
Jannis Braun a9a676bc70 feat: expand admin streaming pills, add high-end resource warning
Replaces hardcoded 3-resolution/3-framerate arrays with ALL_RESOLUTIONS
and STANDARD_FRAMERATES from shared constants (540p–Native, 30–120 fps).
Adds amber warning banner when high-end options (≥1440p or ≥75 fps) are
enabled, and fixes toggleResolution to handle 'native' with correct sort.
2026-03-21 23:30:46 +01:00
Jannis Braun 5ac0917d81 feat: dynamic resolution/framerate pills from instance limits 2026-03-21 23:30:14 +01:00
Jannis Braun 57b192533d feat: add Copy Role button to duplicate roles with permissions 2026-03-21 23:30:12 +01:00
Jannis Braun cb34bfc8ea feat: expand bitrate matrix, add native mode with pixel-proportional fallback 2026-03-21 23:26:54 +01:00
Jannis Braun 3fe9f774a1 feat: add client-side role name uniqueness validation with 409 handling 2026-03-21 23:26:06 +01:00
Jannis Braun b9f11489fe feat: update server validation for expanded resolutions and framerates
Replace hardcoded VALID_RESOLUTIONS/VALID_FRAMERATES with shared STANDARD_RESOLUTIONS/STANDARD_FRAMERATES constants. Update rowToLimits to handle the 'native' resolution value in DB parsing, and update all PATCH validation blocks to accept the expanded resolution/framerate sets and the 'native' option.
2026-03-21 23:23:25 +01:00
Jannis Braun a02b098fa7 feat: widen ScreenShareConfig types, bump persist to v12 2026-03-21 23:22:49 +01:00
Jannis Braun ec71dd2c50 feat: widen InstanceStreamingLimits.allowedResolutions to support 'native' 2026-03-21 23:22:46 +01:00
Jannis Braun bc1d92f853 feat: add shared streaming constants module 2026-03-21 23:20:58 +01:00
Jannis Braun 05fe1df5f0 feat: enforce case-insensitive unique role names per space 2026-03-21 23:20:40 +01:00
Jannis Braun 7fb87de09a feat: default new roles to @everyone permissions instead of null 2026-03-21 23:17:16 +01:00
Jannis Braun f7657e3adb fix: prevent duplicate messages when sending image without text
Optimistic message used content: '' while the server normalized it to
null, causing the content-based dedup to fail and leaving both the
empty temp message and the real attachment message in the list.
2026-03-21 22:46:01 +01:00
Jannis Braun 0d8913f589 feat: register CategorySettingsModal in AppLayout 2026-03-21 22:18:01 +01:00
Jannis Braun cb2eac24eb docs: update CLAUDE.md with category overrides schema, API, and permission changes 2026-03-21 22:11:22 +01:00
Jannis Braun cc7d1c191c feat: add CategorySettingsModal with overview and permissions tabs 2026-03-21 22:08:47 +01:00
Jannis Braun edb050fd39 feat: add category settings context menu, lock icon, empty category hiding 2026-03-21 18:38:47 +01:00
Jannis Braun 892164f3a5 refactor: use extracted PermissionsEditor in ChannelSettingsModal 2026-03-21 18:35:38 +01:00
Jannis Braun c43afc23a8 feat: extract TriStateToggle, OverrideEntry, PermissionsEditor shared components 2026-03-21 18:35:35 +01:00
Jannis Braun 637e083e9a feat: add category override API endpoints, fix channel categoryId reassignment, include isPrivate on categories
- Add GET/PUT/DELETE /api/categories/:id/overrides endpoints with
  privilege escalation guard matching existing channel override pattern
- Add isCategoryPrivate() and broadcastCategoryOverrideChange() helpers
  that cascade visibility changes to all channels in a category
- Fix PATCH /api/channels/:id to recompute permissions via
  broadcastOverrideChange when categoryId changes (different category
  overrides may apply)
- Include isPrivate flag on categories in GET /api/spaces/:id payload
  using batch-fetched @everyone overrides
- Include isPrivate on categories in broadcastChannelLayout and
  PATCH /api/categories/:id broadcasts
2026-03-21 18:29:25 +01:00
Jannis Braun b5ac7d3ee4 feat: add category override API client methods 2026-03-21 18:29:16 +01:00
Jannis Braun 17289445bd feat: add categorySettings modal type to uiStore 2026-03-21 18:25:56 +01:00