Skip to content

Commit 8f8bf59

Browse files
fix(mobile): allow runtime mode draft updates without project metadata
Keep composer draft updates gated only on the selected thread key so the picker still works when project metadata is briefly missing; last-used persistence still requires the project. Co-authored-by: Cursor <[email protected]>
1 parent 921fed6 commit 8f8bf59

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎apps/mobile/src/state/use-thread-composer-state.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,10 +591,13 @@ export function useThreadComposerState() {
591591

592592
const onUpdateRuntimeMode = useCallback(
593593
(value: RuntimeMode) => {
594-
if (!selectedThreadKey || !selectedThreadProject) {
594+
if (!selectedThreadKey) {
595595
return;
596596
}
597597
updateComposerDraftSettings(selectedThreadKey, { runtimeMode: value });
598+
if (!selectedThreadProject) {
599+
return;
600+
}
598601
setLastUsedComposerRuntimeMode(
599602
deriveLogicalProjectKeyFromSettings(selectedThreadProject, projectGroupingSettings),
600603
value,

0 commit comments

Comments
 (0)