- add document evidence parsing/search/open routes, Hermes tool wiring, local index settings/status, and the document-evidence skill plus design notes - fix PDF resource tabs by rendering PDFs inline with pdf.js canvases instead of iframe preview pages, release PDF documents on close, and document the fourth-PDF stall bug - keep PDF preview at 2x rendering while removing the previous lazy-load/placeholder direction, and make dev:hot bind loopback defaults externally reachable Verification: - node --check rust/crates/mnote-web/browser/document-resource-tab-runtime.js - node scripts/task-dev-hot-plan-test.js - cargo test -p mnote-web --manifest-path rust/Cargo.toml pdf_preview_page_does_not_render_visible_toolbar - cargo test -p mnote-web --manifest-path rust/Cargo.toml document_shell_returns_page_aggregate_snapshot - cargo build -p mnote-web --manifest-path rust/Cargo.toml - browser smoke: sequentially opened the four tea_seed_oil_cosmetic PDFs; fourth PDF rendered 15/15 canvases, iframeCount=0, browser errors=0
28 lines
881 B
JavaScript
28 lines
881 B
JavaScript
#!/usr/bin/env node
|
|
"use strict";
|
|
|
|
const assert = require("node:assert");
|
|
const { buildDevHotEnv } = require("./dev-hot.js");
|
|
|
|
const env = buildDevHotEnv({
|
|
FRONTEND_PORT: "3200",
|
|
MNOTE_WEB_CMD: "",
|
|
});
|
|
|
|
assert.equal(env.MNOTE_WEB_DEV_HOT_RELOAD, "1");
|
|
assert.match(env.MNOTE_WEB_CMD, /cargo watch/);
|
|
assert.match(env.MNOTE_WEB_CMD, /run -p mnote-web --bin mnote-web/);
|
|
assert.match(env.MNOTE_WEB_CMD, /crates\/mnote-web\/src/);
|
|
assert.match(env.MNOTE_WEB_CMD, /crates\/mnote-web\/browser/);
|
|
assert.equal(env.FRONTEND_PORT, "3200");
|
|
assert.equal(env.MNOTE_WEB_BIND, "0.0.0.0:3200");
|
|
|
|
const loopbackEnv = buildDevHotEnv({
|
|
MNOTE_WEB_BIND: "127.0.0.1:3300",
|
|
MNOTE_WEB_CMD: "custom",
|
|
});
|
|
assert.equal(loopbackEnv.MNOTE_WEB_BIND, "0.0.0.0:3300");
|
|
assert.equal(loopbackEnv.MNOTE_WEB_CMD, "custom");
|
|
|
|
console.log(JSON.stringify({ ok: true, command: env.MNOTE_WEB_CMD }, null, 2));
|