Skip to content

Commit f8fe702

Browse files
committed
fix(web): refresh draft project settings route
1 parent e0a1541 commit f8fe702

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎apps/web/src/components/ChatView.tsx‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1970,7 +1970,11 @@ export default function ChatView(props: ChatViewProps) {
19701970
const handleNewThreadInActiveProject = useCallback(() => {
19711971
startNewThreadForProject(activeProjectRef, handleNewThread);
19721972
}, [activeProjectRef, handleNewThread]);
1973-
const activeDraftLogicalProjectKey = !isServerThread ? draftThread?.logicalProjectKey : undefined;
1973+
const projectGroupingSettings = useClientSettings(selectProjectGroupingSettings);
1974+
const activeDraftLogicalProjectKey =
1975+
!isServerThread && activeProject
1976+
? deriveLogicalProjectKeyFromSettings(activeProject, projectGroupingSettings)
1977+
: undefined;
19741978
const handleOpenDraftProjectSettings = useCallback(() => {
19751979
if (!activeDraftLogicalProjectKey) return;
19761980
void navigate({
@@ -1985,7 +1989,6 @@ export default function ChatView(props: ChatViewProps) {
19851989
const activeProjectKey = activeProject
19861990
? `${activeProject.environmentId}:${activeProject.workspaceRoot}`
19871991
: null;
1988-
const projectGroupingSettings = useClientSettings(selectProjectGroupingSettings);
19891992
const clientSettingsHydrated = useClientSettingsHydrated();
19901993
const [pendingFileSurfaceIdsByProject, setPendingFileSurfaceIdsByProject] = useState<
19911994
ReadonlyMap<string, ReadonlySet<string>>

0 commit comments

Comments
 (0)