Commit Graph
493 Commits
Author SHA1 Message Date
Jannis Braun 8f104e1c5b fix: derive spaceId from voice channel in buildVoiceModMenuItems
Use channelToSpaceMap.get(channelId) for permission checks instead of
currentSpaceId from the navigation store. On mobile, UI navigation
decouples from the active voice session.
2026-03-23 16:32:47 +01:00
Jannis Braun fd6be8c713 fix: suppress native iOS callout on mobile long-press
Add -webkit-touch-callout: none on mobile viewports to prevent the
native iOS copy/lookup popup from racing with our context menu.
Clear any text selection when the long-press timer fires.
2026-03-23 15:26:09 +01:00
Jannis Braun ce33d8f7ea feat: global long-press context menus for all mobile touch targets
Add useGlobalLongPress to ContextMenuRenderer that detects 500ms hold
with <10px movement and dispatches a synthetic contextmenu event on the
touched element. All existing onContextMenu handlers (spaces, channels,
voice users, messages, etc.) now work on touch devices automatically.

Remove per-message useLongPress integration from Message.tsx since the
global handler covers it.
2026-03-23 15:12:58 +01:00
Jannis Braun 05a4b23d88 fix: prevent scroll snap-back during mobile momentum scrolling
ResizeObserver and media load callbacks were using isNearBottomRef
(5000px threshold) to decide whether to auto-scroll to bottom. On
mobile, inertial flick scrolling hadn't moved far enough to clear
that threshold before the observer fired, snapping the user back.

Now these callbacks check actual scroll distance at fire time with
a tight 150px threshold — only auto-scrolls if truly at the bottom.
2026-03-23 15:04:44 +01:00
Jannis Braun 2c372a5d34 fix: three mobile bugs — scroll, GeneralPanel loading, activity tab
1. Chat scroll: add flex flex-col to MobileChatScreen messages wrapper
   so MessageList's flex-1 actually works (parent must be flex container)

2. Instance General panel: add fetchInstanceSettings/fetchStreamingLimits
   to MobileInstancePanel mount (mirrors desktop InstancePanel useEffect)

3. Friends activity: add Activity tab to mobile FriendsPage showing
   friends grouped by activity status (active, online, offline)
2026-03-23 14:56:07 +01:00
Jannis Braun 80c32ae1e6 feat: add long-press context menus for mobile messages
Create useLongPress hook with 500ms delay, 10px movement cancellation
(Euclidean distance), and ghost click suppression. Integrate into
Message component to trigger the existing context menu bottom sheet
on touch devices.
2026-03-23 14:22:38 +01:00
Jannis Braun 77a1a7920c feat: add standalone MobileMembersScreen replacing blank member panel
Create MobileMembersScreen that renders space members grouped by role
without depending on desktop memberListOpen flag or hidden md:block.
Add members button to voice full screen header for space channels.
2026-03-23 14:20:06 +01:00
Jannis Braun 54b367924d feat: add drill-down navigation for Instance settings on mobile
Replace inline InstancePanel render with MobileInstancePanel that shows
a navigation list for General, Streaming, Storage, and Users sub-panels.
Each sub-panel pushes onto the mobile screen stack with MobileScreenHeader.
2026-03-23 14:16:56 +01:00
Jannis Braun 7c40a230bc feat: add reusable MobileScreenHeader component
Extracts the back-button header pattern used across all mobile screens
into a single component. Props: title (string), rightActions (ReactNode).
2026-03-23 14:15:04 +01:00
Jannis Braun d8c5e7ff16 fix: restore mobile chat scrolling by fixing height constraint chain
Add overflow-hidden to MobileScreenStack stacked screen wrapper to
establish block formatting context. Add min-h-0 to MobileChatScreen
messages wrapper to override flex min-height: auto default.
2026-03-23 14:14:18 +01:00
Jannis Braun 9a5e613331 feat: add upload progress bars and error toasts
Adds uploadWithProgress() using XMLHttpRequest for real-time upload
progress events. MessageInput now shows per-file progress bars with
percentage overlay during upload. Failed uploads show toast warnings
with the specific error instead of silently failing. Upload timeout
raised to 10 minutes for large files.
2026-03-23 02:51:56 +01:00
Jannis Braun fdc8732ba7 fix: raise upload size cap from 500 MB to 5 GB
The 500 MB cap was arbitrary. Self-hosted admins should decide based
on their own disk space. Global multipart ceiling raised to 5 GB,
validation cap to 5120 MB.
2026-03-23 02:36:22 +01:00
Jannis Braun 9044bfd26f fix: use toasts instead of inline banners for Storage panel feedback
Replaces the layout-shifting error banner at the bottom of the panel
with non-intrusive toast notifications. Upload limit save, cleanup
success, and all error feedback now use the existing toast system.
Cleanup preview results stay inline as expected contextual responses.
2026-03-23 02:32:57 +01:00
Jannis Braun 7ba6c4074e feat: add upload limit setting and media retention cleanup to Storage panel 2026-03-23 02:24:25 +01:00
Jannis Braun 3c2c333a56 feat: show dangling attachment count in Storage panel
Adds a 'Dangling Records' card to the storage overview grid and
includes dangling records in the cleanup eligibility check.
2026-03-23 01:56:51 +01:00
Jannis Braun aa2c6f7aa1 feat: add 'Sync now' button for connected instances with pending password sync 2026-03-23 00:53:48 +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 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 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 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 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 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 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 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