feat(02-12): route scoped records to granted domains

- keep shared navigation independent of actor module preferences\n- open scoped records at their first allowed destination\n- announce record access and kind in doorway names
This commit is contained in:
Marc-André Bombeck committed 2026-08-06 05:02:37 +02:00
1 parent 34073cf8dc
commit 6c4dd2d96b
6 files changed
+77 -15

No files matched your search

+8 -1
View File
@@ -18,7 +18,7 @@ export const SHARED_RECORD_DOMAIN_ROUTE_FAMILIES = {
measurements: ["/measurements"],
medications: ["/medications"],
labs: ["/labs"],
profile: ["/settings/anamnesis"],
profile: ["/profile"],
illness: ["/illness"],
mind: ["/mood", "/mental-wellbeing"],
cycle: ["/cycle"],
@@ -87,6 +87,13 @@ export function resolveSharedRecordNavigation(
};
}
/** The first scope-presentable location to load after a record switch. */
export function sharedRecordLandingHref(
sections: readonly ShareDomain[] | null,
): string {
return resolveSharedRecordNavigation(sections).destinationHrefs[0] ?? "/";
}
/**
* Does the server-resolved scope make this browser route presentable?
*