Skip to content

Commit 1675330

Browse files
Copilothotlong
andcommitted
fix: address code review comments — add clarifying comments
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent c02579b commit 1675330

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

apps/studio/api/_kernel.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ async function seedData(kernel: ObjectKernel, configs: any[]) {
5858
const ql = (kernel as any).context?.getService('objectql');
5959
if (!ql) return;
6060

61+
// Reserved namespaces ('base', 'system') bypass FQN transformation —
62+
// objects in these namespaces keep their short name as-is.
6163
const RESERVED_NS = new Set(['base', 'system']);
6264
const toFQN = (name: string, namespace?: string) => {
6365
if (name.includes('__') || !namespace || RESERVED_NS.has(namespace)) return name;
@@ -80,6 +82,7 @@ async function seedData(kernel: ObjectKernel, configs: any[]) {
8082

8183
const objectFQN = toFQN(dataset.object, namespace);
8284

85+
// Handle PaginatedResult wrapper — InMemoryDriver may return { value: [...] }
8386
let existing = await ql.find(objectFQN);
8487
if (existing && (existing as any).value) existing = (existing as any).value;
8588

0 commit comments

Comments
 (0)