feat: consolidate local-first mnote web runtime
This commit is contained in:
@@ -2,16 +2,16 @@ use crate::app::AppConfig;
|
||||
use crate::context::RequestContext;
|
||||
use crate::error::WebError;
|
||||
use crate::routes::query_support::{
|
||||
execute_runtime_query_via_convex, resolve_effective_workspace_id,
|
||||
execute_runtime_query_via_legacy_cloud, resolve_effective_workspace_id,
|
||||
};
|
||||
use crate::routes::snapshot_support::{
|
||||
execute_kernel_query, load_projection_snapshot, load_sidebar_dataset, subtree_query,
|
||||
ProjectionSnapshotSpec,
|
||||
ProjectionSnapshotSpec, execute_kernel_query, load_projection_snapshot, load_sidebar_dataset,
|
||||
subtree_query,
|
||||
};
|
||||
use bridge_runtime::RuntimeQueryEnvelopeWire;
|
||||
use core_protocol::KernelProjectionKind;
|
||||
use serde::Deserialize;
|
||||
use serde_json::{json, Value};
|
||||
use serde_json::{Value, json};
|
||||
|
||||
const TREE_STREAM_NOOP_COMMANDS: [&str; 6] = [
|
||||
"page.body.save",
|
||||
@@ -627,7 +627,7 @@ pub async fn load_stream_overview(
|
||||
let effective_workspace_id =
|
||||
resolve_effective_workspace_id(context, query.workspace_id.as_deref(), true)?
|
||||
.expect("workspace_required 已确保存在");
|
||||
let overview = execute_runtime_query_via_convex(
|
||||
let overview = execute_runtime_query_via_legacy_cloud(
|
||||
config,
|
||||
context,
|
||||
Some(&effective_workspace_id),
|
||||
@@ -670,7 +670,7 @@ pub async fn load_stream_snapshot(
|
||||
}
|
||||
};
|
||||
|
||||
let overview = execute_runtime_query_via_convex(
|
||||
let overview = execute_runtime_query_via_legacy_cloud(
|
||||
config,
|
||||
context,
|
||||
Some(&effective_workspace_id),
|
||||
@@ -701,8 +701,9 @@ pub async fn load_stream_snapshot(
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::{
|
||||
StreamChangeKind, StreamSnapshotQuery, StreamSnapshotScope,
|
||||
delta_requires_projection_snapshot, resolve_stream_change, resolve_stream_cursor,
|
||||
resolve_stream_scope, StreamChangeKind, StreamSnapshotQuery, StreamSnapshotScope,
|
||||
resolve_stream_scope,
|
||||
};
|
||||
use serde_json::json;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user