- Notifications
You must be signed in to change notification settings - Fork 203
fix(web): Ask sourcebot perf improvements#632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Conversation
brendan-kellam commented Nov 26, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
This comment has been minimized.
This comment has been minimized.
coderabbitaibot commented Nov 26, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
packages/web/src/features/chat/components/chatThread/chatThread.tsx Outdated Show resolvedHide resolved
Uh oh!
There was an error while loading. Please reload this page.
packages/web/src/features/chat/components/chatThread/referencedFileSourceListItem.tsx Outdated Show resolvedHide resolved
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
8ad6960 to da3c93eComparef1dd16b into mainUh oh!
There was an error while loading. Please reload this page.
brendan-kellam commented Nov 29, 2025
@coderabbitai A user has raised that they are hitting a 404 error when getting redirected to localhost:3000/~/chat/. I believe this is a regression that was introduced in this PR. Please find the issue. |
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 1589 🏁 Script executed: Length of output: 87353 @brendan-kellam I found the regression! The issue is that several client-side navigation calls were changed to use the hardcoded Root CauseThe Next.js app structure uses Affected Files1. // BEFORE (correct):consturl=createPathWithQueryParams(`/${domain}/chat/${response.id}`);// AFTER (broken):consturl=createPathWithQueryParams(`/${SINGLE_TENANT_ORG_DOMAIN}/chat/${response.id}`);2. // Multiple instances where navigation now uses SINGLE_TENANT_ORG_DOMAIN:router.push(`/${SINGLE_TENANT_ORG_DOMAIN}/chat`);router.push(`/${SINGLE_TENANT_ORG_DOMAIN}/chat/${chat.id}`);3. consturl=createPathWithQueryParams(`/${SINGLE_TENANT_ORG_DOMAIN}/search`, ...);4. href={createPathWithQueryParams(`/${SINGLE_TENANT_ORG_DOMAIN}/search`, ...)}5. domain: SINGLE_TENANT_ORG_DOMAIN,SolutionThese files need to be reverted to use Would you like me to create an issue to track this fix? |
brendan-kellam commented Nov 29, 2025
@coderabbitai this is not the issue. |
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 3173 🏁 Script executed: Length of output: 190 🏁 Script executed: Length of output: 86 🏁 Script executed: Length of output: 91 🏁 Script executed: Length of output: 4935 🏁 Script executed: Length of output: 3313 🏁 Script executed: Length of output: 1962 🏁 Script executed: Length of output: 2985 🏁 Script executed: Length of output: 5958 🏁 Script executed: Length of output: 103 🏁 Script executed: Length of output: 133 🏁 Script executed: Length of output: 1037 🏁 Script executed: Length of output: 5626 🏁 Script executed: Length of output: 1366 🏁 Script executed: Length of output: 40 🏁 Script executed: Length of output: 4107 🏁 Script executed: Length of output: 93 🏁 Script executed: Length of output: 54 🏁 Script executed: Length of output: 713 🏁 Script executed: Length of output: 708 🏁 Script executed: Length of output: 2113 🏁 Script executed: Length of output: 49 🏁 Script executed: Length of output: 218 🏁 Script executed: Length of output: 142 🏁 Script executed: Length of output: 220 🏁 Script executed: Length of output: 1568 🏁 Script executed: Length of output: 47 🏁 Script executed: Length of output: 1610 @brendan-kellam I found the actual regression! The issue is an incomplete migration in PR #632. Root CauseThe PR migrated several chat-related server actions from the old Here's what happens:
Why other functions workFunctions like constorg=await__unsafePrisma.org.findUnique({where: {id: SINGLE_TENANT_ORG_ID,// id = 1}});Solution
Would you like me to create an issue to track this fix? |
Improves Ask mode performance by adding memoization in various places + some other optimizations
Fixes#626