Files
ChatApp/apps/desktop/package.json
T
byGalax d3b708636f perf(P6B.T8): virtualize message list with react-virtuoso
Switches the ConversationPage chat list from a full O(N) render to
windowed rendering via react-virtuoso. On long histories only the
visible rows (plus a 400px overscan buffer) live in the DOM, ending the
scroll jank and layout thrashing that hit conversations with >500
messages.

Preserved behaviors:
- Newest message visible on open via initialTopMostItemIndex.
- Auto-scroll on send via a pending-count-based effect (the old
  setStickToBottom + useLayoutEffect pattern doesn't apply now that
  Virtuoso owns the scroll element).
- Realtime auto-follow only when scrolled to bottom (followOutput).
- 'New messages while away' counter + 'jump to newest' pill via
  atBottomStateChange.
- Pinned-message / reply / search jumps via virtuosoRef.scrollToIndex;
  expands displayCount on the fly if the target is outside the
  rendered slice. Flash highlight unchanged.
- Load-older infinite scroll via Virtuoso startReached (replaces the
  IntersectionObserver-on-sentinel pattern).
- Per-conversation position memory now keys on row index instead of
  pixel scrollTop (the latter isn't meaningful under virtualization).

Also wires the PinnedMessagesPanel onJump callback (previously a TODO
that just closed the panel) into jumpToMessage, since virtualization
made the smooth-scroll-from-pinned UX easy to deliver as a side
benefit.
2026-05-17 00:20:41 +02:00

102 lines
2.7 KiB
JSON

{
"name": "@chat-app/desktop",
"version": "0.19.1",
"private": true,
"description": "Electron desktop client (Windows / macOS / Linux)",
"type": "module",
"main": "out/main/main.js",
"scripts": {
"dev": "pnpm build:native && electron-vite dev",
"build": "pnpm build:native && electron-vite build && electron-builder",
"build:win": "pnpm build:native && electron-vite build && electron-builder --win",
"build:native": "pnpm --filter @chatapp/audio-loopback-native run build",
"preview": "electron-vite preview",
"lint": "eslint src --ext .ts,.tsx",
"typecheck": "tsc --noEmit",
"test": "vitest run",
"test:watch": "vitest",
"clean": "rimraf dist out .turbo *.tsbuildinfo"
},
"dependencies": {
"@chat-app/db-types": "workspace:*",
"@chat-app/shared": "workspace:*",
"@chat-app/ui-web": "workspace:*",
"@livekit/components-react": "^2.9.0",
"@livekit/track-processors": "^0.7.2",
"@supabase/supabase-js": "^2.46.0",
"better-sqlite3": "^11.3.0",
"canvas-confetti": "^1.9.4",
"electron-updater": "^6.3.0",
"i18next": "^23.16.4",
"libsodium-wrappers-sumo": "0.7.15",
"livekit-client": "^2.7.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-easy-crop": "^5.5.7",
"react-i18next": "^15.1.1",
"react-router-dom": "^6.28.0",
"react-virtuoso": "^4.18.7",
"zustand": "^5.0.1"
},
"devDependencies": {
"@types/better-sqlite3": "^7.6.0",
"@types/canvas-confetti": "^1.9.0",
"@types/libsodium-wrappers": "^0.7.14",
"@types/libsodium-wrappers-sumo": "^0.8.2",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react": "^4.3.3",
"autoprefixer": "^10.4.20",
"electron": "^33.0.0",
"electron-builder": "^25.0.0",
"electron-vite": "^2.3.0",
"postcss": "^8.4.49",
"rimraf": "^6.0.0",
"tailwindcss": "^3.4.15",
"vite": "^5.4.11"
},
"build": {
"appId": "com.meinname.chatapp",
"productName": "Netralax",
"directories": {
"output": "release",
"buildResources": "resources"
},
"files": [
"out/**/*",
"package.json"
],
"extraResources": [
{
"from": "native/audio-loopback/audio-loopback.win32-x64-msvc.node",
"to": "native/audio-loopback.node"
}
],
"win": {
"target": [
"nsis"
],
"icon": "resources/icon.ico"
},
"mac": {
"target": [
"dmg"
],
"icon": "resources/icon.icns",
"identity": null
},
"linux": {
"target": [
"AppImage"
],
"icon": "resources/icon.png"
},
"publish": [
{
"provider": "generic",
"url": "https://update.netralax.cloud/windows/"
}
]
}
}