Visitar URL original
fix(app): transition draft project updates (#34252) · iwwadigital/opencode@4a4e540 · GitHub
Skip to content

Commit 4a4e540

Browse files
Brendonovichiwwa-bot
authored andcommitted
fix(app): transition draft project updates (anomalyco#34252)
1 parent 4312287 commit 4a4e540

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

‎packages/app/src/context/tabs.tsx‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,12 @@ export const { use: useTabs, provider: TabsProvider } = createSimpleContext({
173173
})
174174
},
175175
updateDraft(draftID: string, draft: Partial<Omit<DraftTab, "type" | "draftID">>) {
176-
setStore(
177-
(tab) => tab.type === "draft" && tab.draftID === draftID,
178-
produce((tab) => Object.assign(tab, draft)),
179-
)
176+
void startTransition(() => {
177+
setStore(
178+
(tab) => tab.type === "draft" && tab.draftID === draftID,
179+
produce((tab) => Object.assign(tab, draft)),
180+
)
181+
})
180182
},
181183
promoteDraft(draftID: string, session: Omit<SessionTab, "type">) {
182184
// Keep the replacement and navigation atomic so /new-session never renders

0 commit comments

Comments
 (0)