fix: quick add opens create ui

Add createKey to quick-add manifests and client create dialog host.

FAB and command palette open in-place create UIs instead of navigating away.
This commit is contained in:
ginnoir
2026-07-04 11:47:35 -05:00
parent 76f68548b2
commit 68a573c4d6
24 changed files with 1017 additions and 20 deletions
+2
View File
@@ -67,6 +67,8 @@ export type QuickAddAction = {
icon?: string;
/** Navigation target used by the FAB sheet and command palette. */
url: string;
/** Client-side create dialog key (see quick-add create registry). */
createKey?: string;
action?: (ctx: WidgetContext) => void | Promise<void>;
};
+3 -1
View File
@@ -43,6 +43,7 @@ export type SerializedQuickAddItem = {
label: string;
icon?: string;
url: string;
createKey?: string;
moduleId: string;
moduleName: string;
};
@@ -95,11 +96,12 @@ export async function fireItemToggleHooks(payload: ItemTogglePayload): Promise<v
export function getQuickAdds(): SerializedQuickAddItem[] {
return [...modules.values()].flatMap((manifest) =>
(manifest.quickAdds ?? []).map(({ id, label, icon, url }) => ({
(manifest.quickAdds ?? []).map(({ id, label, icon, url, createKey }) => ({
id,
label,
icon,
url,
createKey,
moduleId: manifest.id,
moduleName: manifest.name,
})),