Commit Graph
469 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