Skip to content

Commit a91c490

Browse files
appflowyclaude
andcommitted
perf: lazy-load mentionable users instead of preloading on app init
Remove the useEffect that preloads mentionable users on app mount. The data is now fetched on-demand when: - User types @ in the editor (MentionPerson component) - User opens the share panel (SharePanel component) This improves initial load performance and avoids potential race conditions during OAuth login where the API might be called before the token is fully recognized. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 1352f02 commit a91c490

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/components/app/layers/AppBusinessLayer.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -229,11 +229,6 @@ export const AppBusinessLayer: React.FC<AppBusinessLayerProps> = ({ children })
229229
}
230230
}, [debouncedRefreshOutline, lastUpdatedCollab]);
231231

232-
// Load mentionable users on mount
233-
useEffect(() => {
234-
void loadMentionableUsers();
235-
}, [loadMentionableUsers]);
236-
237232
// Enhanced toView that uses loadViewMeta
238233
const enhancedToView = useCallback(
239234
async (viewId: string, blockId?: string, keepSearch?: boolean) => {

0 commit comments

Comments
 (0)