Skip to content

Beautiful, AI-native markdown IDE and LLM wiki

Move config-sharing into Advanced in Create-new-project dialog (#1973)

Andrew Mikofalvy43376459286d
diff --git a/.changeset/create-project-sharing-into-advanced.md b/.changeset/create-project-sharing-into-advanced.md
new file mode 100644
index 000000000..7dfe2e1af
--- /dev/null
+++ b/.changeset/create-project-sharing-into-advanced.md
@@ -0,0 +1,5 @@
+---
+"@inkeep/open-knowledge": patch
+---
+
+Tuck the config-sharing choice into "Advanced settings" in the Create-new-project dialog. Greenfield projects already default to Shared, so the dialog now leads with just the project name and location; the Shared / Local only cards move under Advanced alongside the AI-tool connections. The open-folder setup dialog is unchanged. It still surfaces the sharing choice at the top level, where the decision is more consequential for an existing folder.
diff --git a/packages/app/src/components/CreateProjectDialog.runtime.dom.test.tsx b/packages/app/src/components/CreateProjectDialog.runtime.dom.test.tsx
index e051affba..4c43110f0 100644
--- a/packages/app/src/components/CreateProjectDialog.runtime.dom.test.tsx
+++ b/packages/app/src/components/CreateProjectDialog.runtime.dom.test.tsx
@@ -180,9 +180,10 @@ describe('CreateProjectDialog runtime wiring', () => {
await waitForLocationHydrate();
- expect(screen.getByTestId('create-sharing')).not.toBeNull();
+ expect(screen.queryByTestId('create-sharing')).toBeNull();
expect(screen.queryByTestId('create-editor-cursor')).toBeNull();
fireEvent.click(screen.getByTestId('create-advanced-trigger'));
+ expect(screen.getByTestId('create-sharing')).not.toBeNull();
for (const id of ALL_EDITOR_IDS) {
const checkbox = screen.getByTestId(`create-editor-${id}`);
@@ -215,6 +216,28 @@ describe('CreateProjectDialog runtime wiring', () => {
expect(stub.onOpenChange).toHaveBeenLastCalledWith(false);
});
+ test('reopening the dialog re-collapses Advanced so sharing is hidden again', async () => {
+ const stub = makeBridge();
+ const onOpenChange = mock(() => {});
+ const { rerender } = render(
+ <CreateProjectDialog open={true} onOpenChange={onOpenChange} bridge={stub.bridge} />,
+ );
+ await screen.findByTestId('create-project-dialog');
+ await waitForLocationHydrate();
+
+ fireEvent.click(screen.getByTestId('create-advanced-trigger'));
+ expect(screen.getByTestId('create-sharing')).not.toBeNull();
+
+ rerender(<CreateProjectDialog open={false} onOpenChange={onOpenChange} bridge={stub.bridge} />);
+ rerender(<CreateProjectDialog open={true} onOpenChange={onOpenChange} bridge={stub.bridge} />);
+ await screen.findByTestId('create-project-dialog');
+
+ await waitFor(() => {
+ expect(screen.queryByTestId('create-sharing')).toBeNull();
+ });
+ expect(screen.getByTestId('create-advanced-trigger')).not.toBeNull();
+ });
+
test('Location hydrates from defaultProjectsRoot and Browse picks a fresh parent', async () => {
const stub = await renderDialog();
@@ -284,6 +307,7 @@ describe('CreateProjectDialog runtime wiring', () => {
await typeProjectName(PROJECT_NAME);
await waitForSubmitEnabled();
+ fireEvent.click(screen.getByTestId('create-advanced-trigger'));
await userEvent.click(screen.getByTestId('create-sharing-local-only'));
fireEvent.click(screen.getByTestId('create-submit'));
@@ -378,6 +402,7 @@ describe('CreateProjectDialog runtime wiring', () => {
const stub = await renderDialog();
await waitForLocationHydrate();
+ fireEvent.click(screen.getByTestId('create-advanced-trigger'));
const info = screen.getByTestId('config-sharing-info') as HTMLButtonElement;
expect(info.type).toBe('button');
diff --git a/packages/app/src/components/CreateProjectDialog.tsx b/packages/app/src/components/CreateProjectDialog.tsx
index aa2f13402..7dfee77eb 100644
--- a/packages/app/src/components/CreateProjectDialog.tsx
+++ b/packages/app/src/components/CreateProjectDialog.tsx
@@ -555,14 +555,6 @@ export function CreateProjectDialog({ open, onOpenChange, bridge }: CreateProjec
onConfirmRemoveGit={onConfirmRemoveGit}
/>
- <SharingModeField
- idPrefix="create"
- testIdPrefix="create-sharing"
- value={sharing}
- onValueChange={setSharing}
- disabled={busy}
- />
-
<Collapsible
open={advancedOpen}
onOpenChange={setAdvancedOpen}
@@ -603,6 +595,14 @@ export function CreateProjectDialog({ open, onOpenChange, bridge }: CreateProjec
);
})}
</fieldset>
+
+ <SharingModeField
+ idPrefix="create"
+ testIdPrefix="create-sharing"
+ value={sharing}
+ onValueChange={setSharing}
+ disabled={busy}
+ />
</CollapsibleContent>
</Collapsible>