Skip to content

Commit 21f708e

Browse files
docs(mobile): Add project path comment says only one host's edit is kept
The path state remembers the last typed or browsed path with its host, not one path per host. Editing on another host replaces it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 3ff2ccf commit 21f708e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎apps/mobile/src/features/projects/AddProjectScreen.tsx‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,9 @@ function useBrowsePathInput(environment: EnvironmentOption | null, pinnedDirecto
296296
getAddProjectInitialQuery(environmentBaseDirectory),
297297
pinnedDirectoryName,
298298
);
299-
// A path belongs to the host it was typed or browsed for. Another host shows its own
300-
// default, and coming back restores the path, so a host that drops out briefly loses nothing.
299+
// Only the last typed or browsed path is kept, tagged with its host. Other hosts show their
300+
// own default; a host that drops out briefly (null) keeps showing the path, and returning to
301+
// the tagged host restores it unless the path was edited on another host meanwhile.
301302
const [pathState, setPathState] = useState({ environmentId, path: seedPath });
302303
const pathInput =
303304
environmentId === null || pathState.environmentId === environmentId ? pathState.path : seedPath;

0 commit comments

Comments
 (0)