feat(kernel): finish phase3 bridge cutover and phase4 tree projection
- add generic mnote-web query transport and bridge routes for workspace/request/trace - route sidebar compat traffic through mnote-web and tighten fixture fallback to dev/test - unify sidebar/page tree/file tree/picker consumers on page_tree projection - sync phase3/phase4 checklist, breakdown docs, and harness progress state
This commit is contained in:
@@ -9,6 +9,10 @@ import {
|
||||
type SidebarDatasetListQueryResult,
|
||||
} from "@/lib/sidebar-data";
|
||||
import type { WorkspaceSummary } from "@/lib/workspaces";
|
||||
import {
|
||||
fetchSidebarDatasetFromMnoteWeb,
|
||||
getMnoteWebBaseUrl,
|
||||
} from "@/lib/server/mnote-web";
|
||||
|
||||
type LoadSidebarDataFromConvexInput = {
|
||||
client: ConvexHttpClient;
|
||||
@@ -57,9 +61,15 @@ export async function loadSidebarDataFromConvex(
|
||||
};
|
||||
}
|
||||
|
||||
const sidebarDataset = (await input.client.query(sidebarDatasetListQuery, {
|
||||
workspaceId: targetWorkspaceId,
|
||||
})) as SidebarDatasetListQueryResult;
|
||||
const sidebarDataset = getMnoteWebBaseUrl()
|
||||
? (
|
||||
await fetchSidebarDatasetFromMnoteWeb({
|
||||
workspaceId: targetWorkspaceId,
|
||||
})
|
||||
).dataset
|
||||
: ((await input.client.query(sidebarDatasetListQuery, {
|
||||
workspaceId: targetWorkspaceId,
|
||||
})) as SidebarDatasetListQueryResult);
|
||||
const normalizedDocuments = (sidebarDataset.documents ?? []) as DocumentRecord[];
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user