### Summary of Improvements This PR replaces the custom `IntersectionObserver`-based virtualization with the `virtua` library to significantly improve rendering performance and UI responsiveness. ### 🚀 Performance Results Verified using `session-performance.test.ts`: - **Rendering**: 2000 messages rendered in **16.90ms**. - **Huge Conversation**: 10,000 messages processed in **0.80ms**. - **Session Switching**: Average switch time reduced to **0.58ms** (virtually zero lag). ### 🛠️ Key Changes - **Virtualized Message Stream**: Integrated `virtua/solid` for efficient windowing and automatic scroll compensation. - **Floating Scroll Controls**: Applied `position: absolute` and `pointer-events: none` to the list controls to ensure scroll-to-top/bottom buttons float correctly over the message area without blocking interactions. - **Package Synchronization**: Updated `virtua` and SDK dependencies, with a fully synchronized `package-lock.json` for stable builds. ### 🎥 UI Verification https://github.com/user-attachments/assets/24e483a3-8be6-4ac4-a431-d719f2015f4e - **Smooth Scrolling**: Verified that rendering gaps are eliminated during fast scrolls. - **Position Retention**: Scroll positions are preserved when switching between sessions. > [!NOTE] > Detailed performance gains and layout fixes are isolated to the `virtua` implementation and core package updates, following the requested cleanup. --------- Co-authored-by: Shantur Rathore <i@shantur.com>
48 lines
1.3 KiB
JSON
48 lines
1.3 KiB
JSON
{
|
|
"name": "@codenomad/ui",
|
|
"version": "0.12.3",
|
|
"private": true,
|
|
"license": "MIT",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite dev",
|
|
"build": "vite build",
|
|
"preview": "vite preview",
|
|
"typecheck": "tsc --noEmit -p tsconfig.json"
|
|
},
|
|
"dependencies": {
|
|
"@git-diff-view/solid": "^0.0.8",
|
|
"@kobalte/core": "0.13.11",
|
|
"@opencode-ai/sdk": "1.2.6",
|
|
"@solidjs/router": "^0.13.0",
|
|
"@suid/icons-material": "^0.9.0",
|
|
"@suid/material": "^0.19.0",
|
|
"@suid/system": "^0.14.0",
|
|
"@tauri-apps/api": "^2.10.1",
|
|
"@tauri-apps/plugin-dialog": "^2.6.0",
|
|
"@tauri-apps/plugin-notification": "^2.3.3",
|
|
"@tauri-apps/plugin-opener": "^2.5.3",
|
|
"ansi-sequence-parser": "^1.1.3",
|
|
"debug": "^4.4.3",
|
|
"github-markdown-css": "^5.8.1",
|
|
"lucide-solid": "^0.300.0",
|
|
"marked": "^12.0.0",
|
|
"monaco-editor": "^0.52.2",
|
|
"qrcode": "^1.5.3",
|
|
"shiki": "^3.13.0",
|
|
"solid-js": "^1.8.0",
|
|
"solid-toast": "^0.5.0",
|
|
"virtua": "^0.48.8",
|
|
"yaml": "^2.4.2"
|
|
},
|
|
"devDependencies": {
|
|
"@vite-pwa/assets-generator": "^1.0.2",
|
|
"autoprefixer": "10.4.21",
|
|
"postcss": "8.5.6",
|
|
"tailwindcss": "3",
|
|
"typescript": "^5.3.0",
|
|
"vite": "^5.0.0",
|
|
"vite-plugin-pwa": "^1.2.0",
|
|
"vite-plugin-solid": "^2.10.0"
|
|
}
|
|
} |