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:
@@ -17,6 +17,10 @@ import {
|
||||
mapSidebarDatasetListQueryResultToInitialData,
|
||||
type SidebarDatasetListQueryResult,
|
||||
} from "@/lib/sidebar-data";
|
||||
import {
|
||||
fetchSidebarDatasetFromMnoteWeb,
|
||||
getMnoteWebBaseUrl,
|
||||
} from "@/lib/server/mnote-web";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
@@ -37,6 +41,24 @@ export async function GET(request: Request) {
|
||||
}
|
||||
|
||||
try {
|
||||
if (getMnoteWebBaseUrl()) {
|
||||
const proxied = await fetchSidebarDatasetFromMnoteWeb({
|
||||
workspaceId: targetWorkspaceId,
|
||||
request,
|
||||
});
|
||||
const result = mapSidebarDatasetListQueryResultToInitialData(proxied.dataset);
|
||||
|
||||
return NextResponse.json({
|
||||
...result,
|
||||
meta: {
|
||||
requestId: proxied.meta.requestId,
|
||||
traceId: proxied.meta.traceId,
|
||||
queryName: "compat.next.sidebar",
|
||||
workspaceId: proxied.meta.workspaceId,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
const bridgeContext = await buildDocumentBridgeContext({
|
||||
request,
|
||||
workspaceId: targetWorkspaceId,
|
||||
|
||||
Reference in New Issue
Block a user