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:
lix-2026
2026-04-17 00:25:28 +08:00
parent b1d5d97142
commit ddf285b82d
27 changed files with 2650 additions and 340 deletions
+13 -3
View File
@@ -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 {