Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
d66b77f
webview: tour anchors engine indicator, opens DCF example, covers rul…
Nov 24, 2026
05dfd2e
webview: tour callouts track anchor position — cross-axis clamp, insi…
Nov 24, 2026
35569e3
webview: rules step points at the expanded pane with the Rules tab ac…
Nov 24, 2026
6cbeb1a
webview: outlined tour arrow (border + fill triangles)
Nov 24, 2026
9339ce3
webview: tour explains dimensions, cubes, and views against the model…
Nov 24, 2026
ad23e2f
webview: tour explains the pivot chips (page/rows/columns drag)
Nov 24, 2026
29f451d
webview: tour explains @ channels, channel pills, cube rules
Nov 24, 2026
63885c4
webview: tour explains hard values vs rules precedence
Nov 25, 2026
5cf7a0f
webview: tour explains set vs sequence dimensions
Nov 25, 2026
a921643
webview: tour privacy step — local compute, remote LLM caveat
Nov 25, 2026
3c0fc23
webview: privacy step notes local-model assistant option
Nov 25, 2026
0119aa7
webview: tour points at docs and Discord link buttons
Nov 25, 2026
ff4e7c6
webview: marketplace link in tour privacy step + Help menu
Nov 25, 2026
d0f8483
webview: raise tour invite above the assistant toggle
Nov 25, 2026
013eccc
webview: grey tour bubble matching the pointer; arrow on every step
Nov 25, 2026
b536148
webview: cream tour bubble (#fdefd9), arrow matches
Nov 25, 2026
ab8d3ba
webview: inside-placement arrow points at the anchor's centre
Nov 25, 2026
75e5282
webview: OM Core logo in the About dialog; refresh media/ copy
Nov 25, 2026
73d6c42
webview: copyright + licence lines in About, matching Qt
Nov 25, 2026
c1fd84d
webview+ext: un-block About logo (img-src), centre dialog, add version
Nov 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified examples/DEMO-106--VALUATION-NEW--20260628-1628.omz
Binary file not shown.
Binary file modified media/om-core-logo-transparent-new.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -381,10 +381,10 @@
"vscode:prepublish": "npm run build",
"build": "node scripts/build.mjs",
"build:ext": "esbuild ./src/extension.ts --bundle --platform=node --format=cjs --external:vscode --loader:.md=text --outfile=dist/extension.js",
"build:webview": "esbuild ./webview/main.ts --bundle --platform=browser --format=iife --outfile=dist/webview.js && node -e \"require('fs').copyFileSync('webview/index.html','dist/index.html')\"",
"build:webview": "esbuild ./webview/main.ts --bundle --platform=browser --format=iife --loader:.png=dataurl --outfile=dist/webview.js && node -e \"require('fs').copyFileSync('webview/index.html','dist/index.html')\"",
"build:bridge": "esbuild ./bridge/server.ts --bundle --platform=node --format=cjs --external:ws --outfile=dist/bridge.js",
"watch:ext": "esbuild ./src/extension.ts --bundle --platform=node --format=cjs --external:vscode --loader:.md=text --outfile=dist/extension.js --watch",
"watch:webview": "esbuild ./webview/main.ts --bundle --platform=browser --format=iife --outfile=dist/webview.js --watch",
"watch:webview": "esbuild ./webview/main.ts --bundle --platform=browser --format=iife --loader:.png=dataurl --outfile=dist/webview.js --watch",
"compile": "tsc --noEmit",
"test": "esbuild ./test-harness.ts --bundle --platform=node --format=cjs --external:vscode --outfile=dist/test-harness.js && node dist/test-harness.js",
"web": "npm run build && node dist/bridge.js",
Expand Down
4 changes: 2 additions & 2 deletions scripts/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ await build({
});
await build({
entryPoints: ["webview/main.ts"], bundle: true, platform: "browser", format: "iife",
define: guiDefine, outfile: "dist/webview.js",
define: guiDefine, loader: { ".png": "dataurl" }, outfile: "dist/webview.js",
});
await build({
// ESM variant of the om-gui library: exports mount()/transports, no self-mount.
// Hosts that can import modules (om-tools-web, future embedders) use this.
entryPoints: ["webview/index.ts"], bundle: true, platform: "browser", format: "esm",
define: guiDefine, outfile: "dist/webview.mjs",
define: guiDefine, loader: { ".png": "dataurl" }, outfile: "dist/webview.mjs",
});
copyFileSync("webview/index.html", "dist/index.html");
// Bundled examples: repo-root examples/ + shared/catalog.json → dist/examples/.
Expand Down
1 change: 1 addition & 0 deletions shared/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const LINKS = {
github: "https://github.com/cloudcell/om-tools",
discord: "https://discord.gg/GfU5ypAbaD",
docs: "https://cloudcell.github.io/om-docs/",
vscodeExt: "https://marketplace.visualstudio.com/items?itemName=cloudcell.om-tools",
} as const;
export const LINK_URLS: readonly string[] = Object.values(LINKS);

Expand Down
4 changes: 4 additions & 0 deletions src/assets.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ declare module "*.md" {
const content: string;
export default content;
}
declare module "*.png" {
const src: string; // bundled as a data-URI (esbuild loader:.png=dataurl)
export default src;
}
2 changes: 1 addition & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ function getHtml(context: vscode.ExtensionContext, webview: vscode.Webview): str
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src 'unsafe-inline' ${webview.cspSource}; script-src 'nonce-${nonce}'; font-src ${webview.cspSource};" />
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src 'unsafe-inline' ${webview.cspSource}; script-src 'nonce-${nonce}'; font-src ${webview.cspSource}; img-src ${webview.cspSource} data:;" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
${uiStateMeta}<title>OM Core</title>
<link rel="stylesheet" href="${webviewCss}" />
Expand Down
3 changes: 2 additions & 1 deletion webview/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ export async function mount(root: HTMLElement, opts: MountOptions): Promise<OmGu
// Contextual first-use tips (T-tips): subscribes to the store's UI-event channel.
initTips(store);
// First-run guided tour: registers the tips suppression gate + first-run invite.
initTour(store);
// The tour opens a catalog example so its steps point at a real model.
initTour(store, { openExample: (id) => shell.openExampleById(id) });

// Status updates from the host (connecting/connected/disconnected/error).
transport.onStatus((status, message, extra) => {
Expand Down
Binary file added webview/assets/om-core-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 27 additions & 5 deletions webview/components/appShell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import { el, clear, ICONS, NOT_IN_MVP_TITLE } from "../dom";
import { materialIconSvg as msym, brandIconSvg, type MaterialIcon } from "../menuIcons";
import { tipsEnabled, setTipsEnabled, resetTips } from "../tips";
import { startTour } from "../tour";
import { guiVersionShort } from "../version";
import logoPng from "../assets/om-core-logo.png";
import { ModelBrowser } from "./modelBrowser";
import { MultilevelGrid } from "./multilevelGrid";
import { RulePanel } from "./rulePanel";
Expand Down Expand Up @@ -490,7 +492,7 @@ export class AppShell {
document.addEventListener("keydown", (e) => this.onShortcut(e), true);
window.addEventListener("blur", () => this.closeAllMenus());
mb.appendChild(el("div", { class: "spacer" }));
const indicator = el("div", { class: "engine-indicator" }, [
const indicator = el("div", { class: "engine-indicator", "data-tour": "engine-status" }, [
el("span", { class: "engine-dot" }, []),
el("span", { class: "engine-text" }, ["disconnected"]),
]);
Expand Down Expand Up @@ -537,18 +539,26 @@ export class AppShell {
* (native new-tab navigation, keyboard-focusable, no popup-blocker involvement); buttons
* in the VS Code webview that ask the host to open the URL — which it only does when the
* URL is one of the fixed `LINKS` destinations. */
/** One external-URL open path for menu items: native new-tab in a browser
* host, the LINKS-allowlisted openExternal bridge in the VS Code webview. */
private openExternalLink(url: string): void {
if (this.store.api.supportsNativeExternalLinks) window.open(url, "_blank", "noopener");
else void this.store.api.openExternal(url);
}

private buildLinkButtons(): HTMLElement {
const defs: { icon: string; title: string; label: string; url: string }[] = [
const defs: { icon: string; title: string; label: string; url: string; tour?: string }[] = [
{ icon: brandIconSvg("github"), title: "Open Modeling on GitHub", label: "GitHub repository", url: LINKS.github },
{ icon: brandIconSvg("discord"), title: "Open Modeling Discord", label: "Discord community", url: LINKS.discord },
{ icon: msym("menu_book"), title: "Open Modeling documentation", label: "Documentation", url: LINKS.docs },
{ icon: brandIconSvg("discord"), title: "Open Modeling Discord", label: "Discord community", url: LINKS.discord, tour: "link-discord" },
{ icon: msym("menu_book"), title: "Open Modeling documentation", label: "Documentation", url: LINKS.docs, tour: "link-docs" },
];
const group = el("div", { class: "link-btns", role: "group", "aria-label": "External links" });
for (const d of defs) {
const attrs = {
class: "link-btn",
title: d.title,
"aria-label": `${d.title} — opens in your browser`,
...(d.tour ? { "data-tour": d.tour } : {}),
};
const children = [el("span", { class: "link-icon", html: d.icon })];
group.appendChild(
Expand Down Expand Up @@ -760,8 +770,10 @@ export class AppShell {
{ icon: msym("menu_book"), label: "Take the Tour…", fn: () => startTour() },
{ icon: msym("info"), label: "Show Tips", checked: tipsEnabled(), fn: () => setTipsEnabled(!tipsEnabled()) },
{ icon: msym("refresh"), label: "Reset Tips…", fn: () => resetTips() },
{ icon: msym("open_in_new"), label: "Get the VS Code Extension…", fn: () => this.openExternalLink(LINKS.vscodeExt) },
{ sep: true },
{ icon: msym("info"), label: "About OM Core", fn: () => alertDialog("About OM Core", "OM Core — multidimensional modeling engine GUI.\nVSCode/VSCodium extension connecting to the om-core runtime.\n\nhttps://cloudcell.github.io/om-docs/") },
{ icon: msym("info"), label: "About OM Core", fn: () => alertDialog("About OM Core",
`OM Core — multidimensional modeling engine for structured financial,\noperational, and analytical models.\n\nCopyright © 2026 Alexander Bikeyev.\nPublished by Cloudcell Limited.\n\nLicensed under the GNU Affero General Public License v3.0.\nCommercial licensing may be available separately.\n\nhttps://cloudcell.github.io/om-docs/\n\nVersion: gui ${guiVersionShort}`, logoPng) },
];
}

Expand Down Expand Up @@ -899,6 +911,16 @@ export class AppShell {
private async openExample() {
const ex = await examplePickerDialog("Open Example", CATALOG);
if (!ex) return;
await this.openExampleById(ex.id);
}

/** Open a catalog example by id — used by Open Example… and the guided tour
* (which loads a real model to tour against). Same flow as the picker:
* .omz session first, plain model load otherwise, confirmDirty protects
* unsaved work. */
async openExampleById(id: string): Promise<void> {
const ex = CATALOG.find((e) => e.id === id);
if (!ex) return;
const ref = `om-example:${ex.id}`;
// .omz examples carry a saved session — apply it the way File → Open does
// for a picked bundle; anything unreadable falls back to the model load.
Expand Down
12 changes: 9 additions & 3 deletions webview/components/dialogs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export function choiceDialog(title: string, message: string, choices: DialogChoi
}

/** Show an alert dialog. Returns when dismissed. */
export function alertDialog(title: string, message: string): Promise<void> {
export function alertDialog(title: string, message: string, image?: string): Promise<void> {
return new Promise((resolve) => {
const ov = ensureOverlay();
clear(ov);
Expand All @@ -179,10 +179,16 @@ export function alertDialog(title: string, message: string): Promise<void> {
fontFamily: "-apple-system, system-ui, sans-serif",
} }) as HTMLElement;

const label = el("div", { style: { fontSize: "13px", fontWeight: "600", marginBottom: "8px", color: "var(--dlg-title)" } }, [title]);
// An image (e.g. the About logo) switches the dialog to Qt's centred layout.
const centered = image ? { textAlign: "center" } : {};
if (image) dlg.appendChild(el("img", { src: image, alt: "", style: {
display: "block", margin: "0 auto 12px", maxWidth: "240px", maxHeight: "120px", objectFit: "contain",
} }));

const label = el("div", { style: { fontSize: "13px", fontWeight: "600", marginBottom: "8px", color: "var(--dlg-title)", ...centered } }, [title]);
dlg.appendChild(label);

const msg = el("div", { style: { fontSize: "13px", color: "var(--dlg-text)", marginBottom: "16px", lineHeight: "1.4", whiteSpace: "pre-line" } }, [message]);
const msg = el("div", { style: { fontSize: "13px", color: "var(--dlg-text)", marginBottom: "16px", lineHeight: "1.4", whiteSpace: "pre-line", ...centered } }, [message]);
dlg.appendChild(msg);

const btnRow = el("div", { style: { display: "flex", justifyContent: "flex-end", gap: "8px" } }) as HTMLElement;
Expand Down
8 changes: 7 additions & 1 deletion webview/components/modelBrowser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,24 @@ export class ModelBrowser {

private refresh(tree: HTMLElement) {
clear(tree);
// Dimensions root
// Dimensions root — data-tour anchors the guided tour's concept step.
const dimRoot = this.makeTreeNode("Dimensions", kindIcon("dimension"), true, () => this.dimRootMenu());
(dimRoot.querySelector(".tree-row") as HTMLElement).dataset.tour = "dims";
const dimChildren = (dimRoot as any)._children as HTMLElement;
for (const dim of [...this.store.visibleDims()].sort(ModelBrowser.byName)) {
const node = this.makeTreeNode(`${dim.name} (${dim.items})`, kindIcon("dimension"), false, () => this.dimMenu(dim));
// Sequential dimension: the same link mark as its pivot chip (issue #2; was "→").
if (this.store.dimIsSeq(dim.id)) node.querySelector(".tree-label .tree-count")?.before(seqLinkIcon());
// data-tour anchors the guided tour's set-vs-sequence steps; "@" is covered by its own.
if (dim.name !== "@") (node.querySelector(".tree-row") as HTMLElement).dataset.tour =
this.store.dimIsSeq(dim.id) ? "dim-seq" : "dim-set";
dimChildren.appendChild(node);
}
tree.appendChild(dimRoot);

// Cubes root
const cubeRoot = this.makeTreeNode("Cubes", kindIcon("cube"), true, () => this.cubeRootMenu());
(cubeRoot.querySelector(".tree-row") as HTMLElement).dataset.tour = "cubes";
const cubeChildren = (cubeRoot as any)._children as HTMLElement;
for (const cube of [...this.store.visibleCubes()].sort(ModelBrowser.byName)) {
cubeChildren.appendChild(this.makeTreeNode(`${cube.name} (${cube.dimensions})`, kindIcon("cube"), false, () => this.cubeMenu(cube)));
Expand All @@ -54,6 +59,7 @@ export class ModelBrowser {

// Views root
const viewRoot = this.makeTreeNode("Views", kindIcon("view"), true, () => this.viewRootMenu());
(viewRoot.querySelector(".tree-row") as HTMLElement).dataset.tour = "views";
const viewChildren = (viewRoot as any)._children as HTMLElement;
for (const view of [...this.store.visibleViews()].sort(ModelBrowser.byName)) {
const viewNode = this.makeTreeNode(view.name, kindIcon("view"), false, () => this.viewMenu(view));
Expand Down
8 changes: 4 additions & 4 deletions webview/components/pivotBar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ export class PivotBar {
const container = el("div", { class: "pivot-canvas" });
const frame = el("div", { class: "pc-frame" });

const topLeft = el("div", { class: "pc-topleft drop-zone", "data-zone": "page" });
const gridMount = el("div", { class: "pc-grid" });
const topLeft = el("div", { class: "pc-topleft drop-zone", "data-zone": "page", "data-tour": "pivot" });
const gridMount = el("div", { class: "pc-grid", "data-tour": "grid" });
const pageRight = el("div", { class: "pc-pageright drop-zone", "data-zone": "col" });
const bottom = el("div", { class: "pc-bottom drop-zone", "data-zone": "row" });

Expand Down Expand Up @@ -117,15 +117,15 @@ export class PivotBar {
const curName = items.find((it) => it.id === curId)?.name || (items[0]?.name || "\u2014");
const label = el("span", {}, [`${name}: ${curName}`]);
const arrow = el("span", { class: "chip-arrow" });
const chip = el("div", { class: cls, draggable: "true", title: `Drag to move; click to pick ${name} item` },
const chip = el("div", { class: cls, draggable: "true", title: `Drag to move; click to pick ${name} item`, "data-tour": dimId === "@" ? "at-dim" : null },
[grip, label, seqMark, arrow].filter(Boolean) as HTMLElement[]);
chip.addEventListener("click", (e) => { e.stopPropagation(); this.showPageDropdown(chip, dimId, items); });
this.setupChipDrag(chip, dimId, zone);
return chip;
}

// AxisChip / HeaderChip: grip + name
const chip = el("div", { class: cls, draggable: "true", title: `Drag to move ${name}` },
const chip = el("div", { class: cls, draggable: "true", title: `Drag to move ${name}`, "data-tour": dimId === "@" ? "at-dim" : null },
[grip, el("span", {}, [name]), seqMark].filter(Boolean) as HTMLElement[]);
this.setupChipDrag(chip, dimId, zone);
return chip;
Expand Down
2 changes: 1 addition & 1 deletion webview/components/rulePanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export class RulePanel {
// Channel pills (Qt `ChannelFilterBar`): a filter on the `@` system dimension, not on cubes (issue #3).
// Click selects one channel (click again clears), Ctrl/Cmd+click adds or removes; none selected = all rules.
// Qt disables the bar while a rule is edited.
const filterBar = el("div", { class: "channel-filter", role: "group", "aria-label": "Filter rules by channel" });
const filterBar = el("div", { class: "channel-filter", role: "group", "aria-label": "Filter rules by channel", "data-tour": "channel-filter" });
for (const ch of RULE_CHANNELS) {
const n = counts.get(ch.id) || 0, on = this.selectedChannels.has(ch.id);
const short = ch.id.replace("@.", "");
Expand Down
28 changes: 24 additions & 4 deletions webview/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -892,9 +892,14 @@ body.splitter-dragging-y, body.splitter-dragging-y * { cursor: row-resize !impor
.om-tour {
position: fixed; z-index: 2600;
width: 280px; padding: 12px 14px;
background: var(--popup-bg); color: var(--text);
border: 1px solid var(--border-strong); border-radius: 10px;
box-shadow: var(--dlg-shadow); font-size: 13px; line-height: 1.4;
/* Bubble matches the pointer: one solid cream shape in both themes (dark text
* pinned for contrast — --text is light in the dark theme). The shadow is a
* filter, not box-shadow, so the arrow child shares one silhouette. */
--tour-bg: #fdefd9;
background: var(--tour-bg); color: #1c1c1e;
border-radius: 10px;
filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
font-size: 13px; line-height: 1.4;
animation: om-tip-in .18s ease-out;
}
.om-tour.centered { left: 50%; top: 50%; transform: translate(-50%, -50%); }
Expand All @@ -907,9 +912,24 @@ body.splitter-dragging-y, body.splitter-dragging-y * { cursor: row-resize !impor
color: var(--text-muted); font: inherit; font-size: 12px; cursor: pointer;
}
.om-tour-skip:hover { color: var(--text); }
/* Step link (e.g. marketplace CTA) — own line under the text, accent-coloured;
* <a> in a browser host, <button> via openExternal in the VS Code webview. */
.om-tour-link { display: block; margin-top: 6px; border: none; background: none; padding: 0;
color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; text-align: left; }
.om-tour-link:hover { filter: brightness(1.2); }
/* The highlight IS the ring — a static accent outline, no backdrop, no pulse. */
.om-tour-mark { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.om-tour-invite { max-width: 460px; }
/* Arrow sits on the callout edge facing the anchor — same cream as the bubble
* (--tour-bg inherits down), so pointer + window read as one shape under the
* shadow. Origin is the apex: JS sets left/top to the anchor centre directly. */
.om-tour-arrow { position: absolute; width: 0; height: 0; border: 8px solid transparent; }
.om-tour-arrow.edge-top { top: -16px; margin-left: -8px; border-bottom-color: var(--tour-bg); }
.om-tour-arrow.edge-bottom { bottom: -16px; margin-left: -8px; border-top-color: var(--tour-bg); }
.om-tour-arrow.edge-left { left: -16px; margin-top: -8px; border-right-color: var(--tour-bg); }
.om-tour-arrow.edge-right { right: -16px; margin-top: -8px; border-left-color: var(--tour-bg); }
/* Clears om-tools-web's fixed Assistant toggle (bottom:12px, ~36px tall → top
* edge ≈48px) — the invite must sit visibly above it, not behind it. */
.om-tour-invite { max-width: 460px; bottom: 60px; }
.ctx-item.disabled:hover { background: transparent; color: var(--text-disabled); }
.ctx-sep { height: 1px; background: var(--border); margin: 2px 0; }
.ctx-submenu { position: relative; }
Expand Down
Loading
Loading