Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): open the startup composer without waiting for every environment #20183

Mergedshxntanu(GitHub profile, opens in a new tab)merged 3 commits intomain fromrefs/pull/20183/headmerged by juliusmarminge View on GitHub

Showing 1 changed file with 4 additions and 8 deletions.

x
0 of 1 viewed, 1 left
4 additions and 8 deletionsapps/web/src/routes/_chat.index.tsxModified
View file
@@ -41,13 +41,11 @@
// Read at effect time: this page stays mounted while a navigation away from
// "/" is still loading, but the router already points at the new location.
const isStillOnIndex = useEffectEvent(() => router.state.location.pathname === "/");
- // One start per attempt; a retry request opens the next attempt.
const startedAttemptRef = useRef<number | null>(null);
const [startState, setStartState] = useState({ failed: false, retryRequest: 0 });
​
- const mostRecentProject = bootstrapped
- ? (sortScopedProjectsForSidebar(projects, threads, "updated_at")[0] ?? null)
- : null;
+ const mostRecentProject =
+ sortScopedProjectsForSidebar(projects, threads, "updated_at")[0] ?? null;
const attempt = startState.retryRequest;
​
useEffect(() => {
@@ -71,9 +69,6 @@
});
}, [attempt, handleNewThread, mostRecentProject]);
​
- if (!bootstrapped) {
- return null;
- }
if (mostRecentProject !== null) {
return startState.failed ? (
<DraftStartError
@@ -86,7 +81,8 @@
/>