Conversation
…lient-side rendering
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Review by RecurseML
🔍 Review performed on fe6f830..5891dfa
| Severity | Location | Issue | Delete |
|---|---|---|---|
| surfsense_web/app/dashboard/[search_space_id]/new-chat/[[...chat_id]]/page.tsx:81 | Invalid dynamic import syntax |
✅ Files analyzed, no issues (15)
• VERSION
• surfsense_backend/pyproject.toml
• surfsense_browser_extension/package.json
• surfsense_desktop/package.json
• surfsense_web/app/desktop/suggestion/page.tsx
• surfsense_web/app/docs/sidebar-separator.tsx
• surfsense_web/components/homepage/navbar.tsx
• surfsense_web/components/layout/ui/sidebar/SidebarSlideOutPanel.tsx
• surfsense_web/components/new-chat/chat-share-button.tsx
• surfsense_web/components/pricing/pricing-section.tsx
• surfsense_web/components/public-chat-snapshots/public-chat-snapshots-manager.tsx
• surfsense_web/components/settings/image-model-manager.tsx
• surfsense_web/components/settings/model-config-manager.tsx
• surfsense_web/components/sources/DocumentUploadTab.tsx
• surfsense_web/package.json
⏭️ Files skipped (1)
| Locations |
|---|
surfsense_backend/uv.lock |
| import Loading from "../loading"; | ||
|
|
||
| const MobileEditorPanel = dynamic( | ||
| () => |
There was a problem hiding this comment.
Invalid Next.js dynamic import syntax: duplicate import function passed as second argument. The dynamic() function from Next.js accepts exactly two arguments: (1) a function returning a dynamic import, and (2) an optional options object like { ssr: false }. However, this code passes THREE arguments:
Arg 1 (lines 81-84): () => import(...) - Correct
Arg 2 (lines 85-88): () => import(...) - INCORRECT (duplicate function, should be options object)
Arg 3 (line 89): { ssr: false } - This will be ignored
This will cause:
- TypeScript compilation error: 'dynamic()' expects at most 2 arguments, but got 3
- Runtime error: Next.js will treat the second function argument as the options object, causing type errors when it tries to read properties like 'ssr', 'loading', etc. from a function
- The intended SSR disabling behavior will not work as the { ssr: false } option is passed as a 3rd argument and will be ignored
The same bug occurs for MobileEditorPanel (line 81), MobileHitlEditPanel (line 92), and MobileReportPanel (line 103). The fix is to remove the duplicate arrow function at lines 81-84, 92-95, and 103-106, leaving only the original import function and the options object.
React with 👍 to tell me that this comment was useful, or 👎 if not (and I'll stop posting more comments like this in the future)
Description
Motivation and Context
FIX #
Screenshots
API Changes
Change Type
Testing Performed
Checklist
High-level PR Summary
This PR bumps the version from 0.0.14 to 0.0.15 across all project components (backend, browser extension, desktop app, and web frontend) and includes various minor code quality improvements. The changes include formatting fixes for multi-line logical expressions, removing duplicate
classNameattributes, converting non-semanticdivelements to properbuttonelements for better accessibility, fixing animation properties in motion components, adding missing "use client" directives, removing redundant dynamic import statements, and updating the pricing page to reflect 500 pages (down from 1,000) included in the free plan.⏱️ Estimated Review Time: 5-15 minutes
💡 Review Order Suggestion
VERSIONsurfsense_backend/pyproject.tomlsurfsense_browser_extension/package.jsonsurfsense_desktop/package.jsonsurfsense_web/package.jsonsurfsense_web/components/pricing/pricing-section.tsxsurfsense_web/app/docs/sidebar-separator.tsxsurfsense_web/components/homepage/navbar.tsxsurfsense_web/app/desktop/suggestion/page.tsxsurfsense_web/components/sources/DocumentUploadTab.tsxsurfsense_web/components/layout/ui/sidebar/SidebarSlideOutPanel.tsxsurfsense_web/components/new-chat/chat-share-button.tsxsurfsense_web/components/public-chat-snapshots/public-chat-snapshots-manager.tsxsurfsense_web/components/settings/image-model-manager.tsxsurfsense_web/components/settings/model-config-manager.tsxsurfsense_web/app/dashboard/[search_space_id]/new-chat/[[...chat_id]]/page.tsxsurfsense_backend/uv.lock