diff --git a/apps/mobile/src/j5/agents/AgentCreateModal.tsx b/apps/mobile/src/j5/agents/AgentCreateModal.tsx
index d2bc9a60cf67e..e04a3e7dc2d95 100644
--- a/apps/mobile/src/j5/agents/AgentCreateModal.tsx
+++ b/apps/mobile/src/j5/agents/AgentCreateModal.tsx
@@ -112,124 +112,126 @@ export function AgentCreateModal(props: {
if (!saving) props.onClose();
}}
>
- {/* Inline flex: on Android a `flex-1` class left this Modal's content zero-height. */}
-
-
-
-
- {props.initial ? "Duplicate persona" : "Create persona"}
-
-
- Cancel
-
-
-
+
+
-
- A personal persona for this environment. It joins the library like an import, so you
- can edit, switch off, or remove it later.
-
-
- Name
-
- setDraft({
- ...draft,
- displayName,
- id: draft.idEdited ? draft.id : agentPersonaIdFromName(displayName),
- })
- }
- />
-
-
- ID
- setDraft({ ...draft, id: id.trim(), idEdited: true })}
- />
-
- {draft.id !== "" && idError !== null
- ? idError
- : "Stable identifier used in @persona: mentions. Lowercase letters, digits, hyphens."}
-
-
-
- Description
- setDraft({ ...draft, description })}
- />
-
-
- Instructions
- setDraft({ ...draft, instructions })}
- />
-
- Markdown. Instructions describe behavior; the runtime policy below is what is
- enforced.
+
+
+ {props.initial ? "Duplicate persona" : "Create persona"}
-
- {modelRoute === null ? (
-
- Sign in to Codex or Claude on this environment to choose the persona's models.
-
- ) : (
- setDraft({ ...draft, ...next })}
- />
- )}
- {error ? (
-
- {error}
-
- ) : null}
- void submit()}
+ onPress={props.onClose}
+ className="px-3 py-2"
+ >
+ Cancel
+
+
+
-
- {saving ? "Creating…" : "Create persona"}
+
+ A personal persona for this environment. It joins the library like an import, so you
+ can edit, switch off, or remove it later.
-
-
-
-
+
+ Name
+
+ setDraft({
+ ...draft,
+ displayName,
+ id: draft.idEdited ? draft.id : agentPersonaIdFromName(displayName),
+ })
+ }
+ />
+
+
+ ID
+ setDraft({ ...draft, id: id.trim(), idEdited: true })}
+ />
+
+ {draft.id !== "" && idError !== null
+ ? idError
+ : "Stable identifier used in @persona: mentions. Lowercase letters, digits, hyphens."}
+
+
+
+ Description
+ setDraft({ ...draft, description })}
+ />
+
+
+ Instructions
+ setDraft({ ...draft, instructions })}
+ />
+
+ Markdown. Instructions describe behavior; the runtime policy below is what is
+ enforced.
+
+
+ {modelRoute === null ? (
+
+ Sign in to Codex or Claude on this environment to choose the persona's models.
+
+ ) : (
+ setDraft({ ...draft, ...next })}
+ />
+ )}
+ {error ? (
+
+ {error}
+
+ ) : null}
+ void submit()}
+ >
+
+ {saving ? "Creating…" : "Create persona"}
+
+
+
+
+
+
);
}
diff --git a/apps/mobile/src/j5/agents/AgentEditorModal.tsx b/apps/mobile/src/j5/agents/AgentEditorModal.tsx
index 5036e6a064e51..64da2034622af 100644
--- a/apps/mobile/src/j5/agents/AgentEditorModal.tsx
+++ b/apps/mobile/src/j5/agents/AgentEditorModal.tsx
@@ -77,100 +77,102 @@ export function AgentEditorModal(props: {
if (!saving) props.onClose();
}}
>
- {/* Inline flex: on Android a `flex-1` class left this Modal's content zero-height. */}
-
-
-
- Edit persona
-
- Cancel
-
-
-
+
+
-
- Changes apply to this imported copy and future launches. The original file and
- existing tasks stay unchanged.
-
-
- Name
- setDraft({ ...draft, displayName })}
- />
+
+ Edit persona
+
+ Cancel
+
-
- Description
- setDraft({ ...draft, description })}
- />
-
-
- Instructions
-
-
- Markdown. Instructions describe behavior; the runtime policy below is what is
- enforced.
-
-
- setDraft({ ...draft, ...next })}
- />
- {error ? (
-
- {error}
-
- ) : null}
- void submit()}
+
-
- {saving ? "Saving…" : "Save changes"}
+
+ Changes apply to this imported copy and future launches. The original file and
+ existing tasks stay unchanged.
-
-
-
-
+
+ Name
+ setDraft({ ...draft, displayName })}
+ />
+
+
+ Description
+ setDraft({ ...draft, description })}
+ />
+
+
+ Instructions
+
+
+ Markdown. Instructions describe behavior; the runtime policy below is what is
+ enforced.
+
+
+ setDraft({ ...draft, ...next })}
+ />
+ {error ? (
+
+ {error}
+
+ ) : null}
+ void submit()}
+ >
+
+ {saving ? "Saving…" : "Save changes"}
+
+
+
+
+
+
);
}
diff --git a/apps/mobile/src/j5/agents/AgentFolderPickerModal.tsx b/apps/mobile/src/j5/agents/AgentFolderPickerModal.tsx
index 5be7398f1b7b0..170eb119b478b 100644
--- a/apps/mobile/src/j5/agents/AgentFolderPickerModal.tsx
+++ b/apps/mobile/src/j5/agents/AgentFolderPickerModal.tsx
@@ -64,80 +64,85 @@ export function AgentFolderPickerModal(props: {
presentationStyle="pageSheet"
onRequestClose={props.onClose}
>
- {/* Inline flex: on Android a `flex-1` class left this Modal's content zero-height. */}
-
-
-
- Choose a library folder
-
- Cancel
-
-
-
-
- Folders on {props.environmentLabel}. Open a folder to browse into it, then choose it.
-
-
-
-
+
+
- {browsePath.canBrowseUp && browsePath.parentPath ? (
- setPathInput(browsePath.parentPath!)}
+
+ Choose a library folder
+
+ Cancel
+
+
+
+
+ Folders on {props.environmentLabel}. Open a folder to browse into it, then choose
+ it.
+
+
- ) : null}
- {browseState.error ? (
- {browseState.error}
- ) : browseState.isPending && browseState.data === null ? (
-
-
-
- ) : visibleEntries.length === 0 ? (
- No subfolders.
- ) : (
- visibleEntries.map((entry) => (
+
+
+ {browsePath.canBrowseUp && browsePath.parentPath ? (
- setPathInput(appendBrowsePathSegment(browsePath.directoryPath, entry.name))
- }
+ label=".."
+ symbol="arrow.turn.left.up"
+ onPress={() => setPathInput(browsePath.parentPath!)}
/>
- ))
- )}
-
-
-
- {selection ?? "Enter a folder path to browse."}
-
- selection && props.onSelect(selection)}
- >
- Choose folder
-
-
-
-
+ ) : null}
+ {browseState.error ? (
+
+ {browseState.error}
+
+ ) : browseState.isPending && browseState.data === null ? (
+
+
+
+ ) : visibleEntries.length === 0 ? (
+ No subfolders.
+ ) : (
+ visibleEntries.map((entry) => (
+
+ setPathInput(appendBrowsePathSegment(browsePath.directoryPath, entry.name))
+ }
+ />
+ ))
+ )}
+
+
+
+ {selection ?? "Enter a folder path to browse."}
+
+ selection && props.onSelect(selection)}
+ >
+ Choose folder
+
+
+
+
+
);
}
diff --git a/apps/mobile/src/j5/agents/AgentImportConflictModal.tsx b/apps/mobile/src/j5/agents/AgentImportConflictModal.tsx
index e1be52950b6a0..0b79bc5e6801c 100644
--- a/apps/mobile/src/j5/agents/AgentImportConflictModal.tsx
+++ b/apps/mobile/src/j5/agents/AgentImportConflictModal.tsx
@@ -20,58 +20,61 @@ export function AgentImportConflictModal(props: {
presentationStyle="pageSheet"
onRequestClose={() => props.onConfirm(null)}
>
-
-
- Replace existing personas?
+ {/* SafeAreaView takes no className, so the theme surface and flex go on a View. */}
+
+
+
+ Replace existing personas?
+ props.onConfirm(null)}
+ >
+ Cancel
+
+
+
+ {props.error.message}
+
+ {AGENT_PERSONA_IMPORT_CONFIRMATION_MESSAGE}
+
+ {props.error.conflicts.map((conflict) => {
+ const checked = selected.some(({ personaId }) => personaId === conflict.personaId);
+ return (
+
+
+ {conflict.displayName}
+
+ {conflict.personaId} · {checked ? "Replace" : "Skip"}
+
+
+
+ setSelected(
+ enabled
+ ? [...selected, conflict]
+ : selected.filter(({ personaId }) => personaId !== conflict.personaId),
+ )
+ }
+ />
+
+ );
+ })}
+
props.onConfirm(null)}
+ className="mx-5 mb-4 items-center rounded-xl bg-danger-foreground px-4 py-3"
+ onPress={() => props.onConfirm(selected)}
>
- Cancel
+ Import selected
-
-
- {props.error.message}
-
- {AGENT_PERSONA_IMPORT_CONFIRMATION_MESSAGE}
-
- {props.error.conflicts.map((conflict) => {
- const checked = selected.some(({ personaId }) => personaId === conflict.personaId);
- return (
-
-
- {conflict.displayName}
-
- {conflict.personaId} · {checked ? "Replace" : "Skip"}
-
-
-
- setSelected(
- enabled
- ? [...selected, conflict]
- : selected.filter(({ personaId }) => personaId !== conflict.personaId),
- )
- }
- />
-
- );
- })}
-
- props.onConfirm(selected)}
- >
- Import selected
-
-
+
+
);
}
diff --git a/apps/mobile/src/j5/archive/ArchiveWarningSheet.tsx b/apps/mobile/src/j5/archive/ArchiveWarningSheet.tsx
index 21efa114872ac..0e9f1d7ee56ad 100644
--- a/apps/mobile/src/j5/archive/ArchiveWarningSheet.tsx
+++ b/apps/mobile/src/j5/archive/ArchiveWarningSheet.tsx
@@ -179,29 +179,32 @@ export function ArchiveWarningHost() {
presentationStyle={Platform.OS === "ios" ? "pageSheet" : "fullScreen"}
onRequestClose={() => answer(false)}
>
- {/* A Modal is its own native hierarchy, so it measures its own safe area. */}
+ {/* A Modal is its own native hierarchy, so it measures its own safe area. The theme's
+ surface goes on a View, as upstream's sheets do: SafeAreaView doesn't take className. */}
-
-
- {warning.title}
-
-
- {warning.payload === null ? null : }
-
-
-
-
-
-
+
+
);
diff --git a/apps/mobile/src/j5/playbooks/PlaybookConversationModal.tsx b/apps/mobile/src/j5/playbooks/PlaybookConversationModal.tsx
index 96aefa00191e9..60a3081f71280 100644
--- a/apps/mobile/src/j5/playbooks/PlaybookConversationModal.tsx
+++ b/apps/mobile/src/j5/playbooks/PlaybookConversationModal.tsx
@@ -146,57 +146,62 @@ export function PlaybookConversationModal({
if (!busy) onClose();
}}
>
-
-
-
- {name === null ? "Create playbook" : "Prepare chat"}
-
-
- {name === null
- ? "Choose a project for the conversation. New playbooks are saved to the environment library."
- : "Choose the project to run the playbook in."}
-
- {workspace ? (
-
- ) : (
- Add a project to open a conversation. You can import playbooks without one.
- )}
- {error ? (
-
- {error}
-
- ) : null}
-
-
- Cancel
-
- void submit()}
- >
-
- {name === null ? "Open Playbook Author" : "Prepare chat"}
-
-
+
-
-
+
+
);
}
diff --git a/apps/mobile/src/j5/playbooks/PlaybookLibrarySettingsScreen.tsx b/apps/mobile/src/j5/playbooks/PlaybookLibrarySettingsScreen.tsx
index 7e52fb87d0620..c247f0053282a 100644
--- a/apps/mobile/src/j5/playbooks/PlaybookLibrarySettingsScreen.tsx
+++ b/apps/mobile/src/j5/playbooks/PlaybookLibrarySettingsScreen.tsx
@@ -397,18 +397,21 @@ function PlaybookLibrary({
presentationStyle="pageSheet"
onRequestClose={() => setDetails(null)}
>
-
-
- {detail.title}
- {detail.description}
- {detail.steps.map((step, index) => (
- {playbookStepLabel(step, index)}
- ))}
- setDetails(null)}>
- Close
-
-
-
+ {/* SafeAreaView takes no className, so the theme surface and flex go on a View. */}
+
+
+
+ {detail.title}
+ {detail.description}
+ {detail.steps.map((step, index) => (
+ {playbookStepLabel(step, index)}
+ ))}
+ setDetails(null)}>
+ Close
+
+
+
+
) : null}
{importing || copyTarget || renameTarget ? (
@@ -418,97 +421,102 @@ function PlaybookLibrary({
presentationStyle="pageSheet"
onRequestClose={closeEditor}
>
-
-
-
- {renameTarget
- ? "Rename playbook"
- : copyTarget
- ? "Copy playbook"
- : "Import playbook"}
-
-
- Available in every project on the environment.
-
-
- renameTarget ? setRenameTarget({ ...renameTarget, title: value }) : setName(value)
- }
- editable={!busy}
- autoCapitalize="none"
- className="rounded-lg border border-border p-3 text-foreground"
- />
- {importing ? (
+ {/* SafeAreaView takes no className, so the theme surface and flex go on a View. */}
+
+
+
+
+ {renameTarget
+ ? "Rename playbook"
+ : copyTarget
+ ? "Copy playbook"
+ : "Import playbook"}
+
+
+ Available in every project on the environment.
+
+ renameTarget
+ ? setRenameTarget({ ...renameTarget, title: value })
+ : setName(value)
+ }
editable={!busy}
- multiline
- className="min-h-48 rounded-lg border border-border p-3 text-foreground"
+ autoCapitalize="none"
+ className="rounded-lg border border-border p-3 text-foreground"
/>
- ) : null}
- {error ? (
-
- {error}
-
- ) : null}
-
-
- Cancel
-
-
- void act(async () => {
- if (renameTarget) {
- const result = await rename({
- environmentId,
- input: { ...scope, ...renameTarget, title: renameTarget.title.trim() },
- });
- if (result._tag === "Failure") throw squashAtomCommandFailure(result);
- setRenameTarget(null);
- } else {
- let text = yaml;
- if (copyTarget) {
- const result = await exportDefinition({
+ {importing ? (
+
+ ) : null}
+ {error ? (
+
+ {error}
+
+ ) : null}
+
+
+ Cancel
+
+
+ void act(async () => {
+ if (renameTarget) {
+ const result = await rename({
environmentId,
- input: { ...scope, name: copyTarget.name, source: copyTarget.source },
+ input: { ...scope, ...renameTarget, title: renameTarget.title.trim() },
+ });
+ if (result._tag === "Failure") throw squashAtomCommandFailure(result);
+ setRenameTarget(null);
+ } else {
+ let text = yaml;
+ if (copyTarget) {
+ const result = await exportDefinition({
+ environmentId,
+ input: { ...scope, name: copyTarget.name, source: copyTarget.source },
+ });
+ if (result._tag === "Failure") throw squashAtomCommandFailure(result);
+ text = result.value.yaml;
+ }
+ const result = await save({
+ environmentId: copyTarget?.destination ?? environmentId,
+ input: { name, yaml: text },
});
if (result._tag === "Failure") throw squashAtomCommandFailure(result);
- text = result.value.yaml;
+ setImporting(false);
+ setCopyTarget(null);
+ setName("");
+ setYaml("");
}
- const result = await save({
- environmentId: copyTarget?.destination ?? environmentId,
- input: { name, yaml: text },
- });
- if (result._tag === "Failure") throw squashAtomCommandFailure(result);
- setImporting(false);
- setCopyTarget(null);
- setName("");
- setYaml("");
- }
- })
- }
- >
-
- {renameTarget ? "Save" : copyTarget ? "Copy" : "Import"}
-
-
-
-
-
+ })
+ }
+ >
+
+ {renameTarget ? "Save" : copyTarget ? "Copy" : "Import"}
+
+
+
+
+
+
) : null}
>
diff --git a/apps/mobile/src/j5/sharing/NameQuestion.tsx b/apps/mobile/src/j5/sharing/NameQuestion.tsx
index f147a9777660d..2cf564b0a2fed 100644
--- a/apps/mobile/src/j5/sharing/NameQuestion.tsx
+++ b/apps/mobile/src/j5/sharing/NameQuestion.tsx
@@ -144,93 +144,95 @@ function NameQuestion({
return (
// Full screen, so it can't be swiped away; "Not now" and "Remove this server" are the ways out.
{}}>
- {/* Inline flex: on Android a `flex-1` class left this Modal's content zero-height. */}
-
-
-
-
-
- What should people and agents on {serverName} call you?
-
- {kind === "claim" ? (
-
- This device is paired but the server does not know who it belongs to.
+ {/* SafeAreaView takes no className, so the theme surface and flex go on a View. */}
+
+
+
+
+
+
+ What should people and agents on {serverName} call you?
+ {kind === "claim" ? (
+
+ This device is paired but the server does not know who it belongs to.
+
+ ) : null}
+
+ {people.length > 0 ? (
+
+ {people.map((person, index) => {
+ const level = offeredLevel(person.levels);
+ return (
+ 0}
+ disabled={busy}
+ onPress={() => {
+ setChoice(person.personId);
+ setError(null);
+ }}
+ />
+ );
+ })}
+ {
+ setChoice(SOMEONE_NEW);
+ setError(null);
+ }}
+ />
+
) : null}
-
- {people.length > 0 ? (
-
- {people.map((person, index) => {
- const level = offeredLevel(person.levels);
- return (
- 0}
- disabled={busy}
- onPress={() => {
- setChoice(person.personId);
- setError(null);
- }}
- />
- );
- })}
- {
- setChoice(SOMEONE_NEW);
- setError(null);
- }}
- />
-
- ) : null}
- {naming ? nameInput(people.length > 0 ? "Someone new" : "Your name") : null}
- {claimable.error === null || busy ? null : (
-
- The people on this server could not be listed: {claimable.error}
-
- )}
- {error === null ? null : (
-
- {error}
-
- )}
- void save()}
- />
- {/* Ways out that touch only this server. A device the server cannot place reaches nothing
+ {naming ? nameInput(people.length > 0 ? "Someone new" : "Your name") : null}
+ {claimable.error === null || busy ? null : (
+
+ The people on this server could not be listed: {claimable.error}
+
+ )}
+ {error === null ? null : (
+
+ {error}
+
+ )}
+ void save()}
+ />
+ {/* Ways out that touch only this server. A device the server cannot place reaches nothing
there until it says whose it is, so it may put the question off; the first owner
already holds the server, so only naming or removing it ends their question (AC6). */}
- {kind === "claim" ? (
+ {kind === "claim" ? (
+
+ ) : null}
- ) : null}
-
-
-
-
+
+
+
+
);
}