From d66b77f000ce9b14818f19cdb23dc15574795b70 Mon Sep 17 00:00:00 2001 From: Alex Bikeyev Date: Wed, 25 Nov 2026 12:17:29 +1300 Subject: [PATCH 01/20] webview: tour anchors engine indicator, opens DCF example, covers rules + calc flow --- webview/app.ts | 3 ++- webview/components/appShell.ts | 12 +++++++++++- webview/tour.ts | 31 ++++++++++++++++++++++++------- 3 files changed, 37 insertions(+), 9 deletions(-) diff --git a/webview/app.ts b/webview/app.ts index 87c3c41..0f2e1cc 100644 --- a/webview/app.ts +++ b/webview/app.ts @@ -40,7 +40,8 @@ export async function mount(root: HTMLElement, opts: MountOptions): Promise shell.openExampleById(id) }); // Status updates from the host (connecting/connected/disconnected/error). transport.onStatus((status, message, extra) => { diff --git a/webview/components/appShell.ts b/webview/components/appShell.ts index 60f01ab..c21fd8d 100644 --- a/webview/components/appShell.ts +++ b/webview/components/appShell.ts @@ -490,7 +490,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"]), ]); @@ -899,6 +899,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 { + 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. diff --git a/webview/tour.ts b/webview/tour.ts index b2b4551..b8fa120 100644 --- a/webview/tour.ts +++ b/webview/tour.ts @@ -22,17 +22,23 @@ export interface TourStep { text: string; } +/** The model the tour opens so every step shows real content — a catalog id + * resolved by the host's file boundary, same as Open Example…. */ +const TOUR_EXAMPLE_ID = "dcf-valuation"; + export const TOUR_STEPS: readonly TourStep[] = [ { id: "welcome", title: "Welcome to OM Core", - text: "This is your model workspace — a live view of your data." }, + text: "This tour opens the DCF Valuation example — a live model you can explore." }, { id: "menus", anchor: "menubar", place: "bottom", title: "Menus", text: "File opens models and bundles; View, Tools, and Help hold the rest." }, { id: "views", anchor: "view-area", place: "top", title: "Views", text: "Each tab is a live view into the model — drag a tab to split." }, { id: "rules", anchor: "rules", fallbackAnchor: "view-area", place: "left", title: "Rules", - text: "Rules define how cells calculate — select one to inspect or edit it." }, - { id: "status", anchor: "statusbar", place: "top", title: "Engine status", - text: "The indicator shows the engine state and current selection." }, + text: "Rules attach a formula to a region of cells — select one here to inspect or edit it." }, + { id: "calc-flow", anchor: "view-area", place: "top", title: "Calculation flow", + text: "Changing an input recomputes every dependent cell in order — that dependency chain is the calculation flow." }, + { id: "status", anchor: "engine-status", fallbackAnchor: "statusbar", place: "bottom", title: "Engine status", + text: "The dot shows the live engine state; the status bar below tracks your selection and version." }, { id: "help", anchor: "help-menu", place: "bottom", title: "That's it", text: "Replay this tour anytime from Help → Take the Tour." }, ]; @@ -86,7 +92,13 @@ export class TourManager { private startPoll = 0; private onResize = () => { if (this.active()) this.render(); }; - constructor(private store: Store) {} + /** Opens a catalog example by id (host resolves om-example: refs); injected + * at mount so the tour loads a real model to point at. */ + private openExample: ((id: string) => Promise) | null = null; + + constructor(private store: Store, openExample?: (id: string) => Promise) { + this.openExample = openExample ?? null; + } active(): boolean { return this.stepIndex >= 0; } inviteVisible(): boolean { return this.inviteEl !== null; } @@ -118,6 +130,11 @@ export class TourManager { this.hideInvite(); this.stepIndex = i; window.addEventListener("resize", this.onResize); + // Load a real model so anchored steps have something to point at. Async — + // the first (centered) step reads while it loads; confirmDirty inside + // openExampleById still protects unsaved work. Fire-and-forget: a declined + // or failed load never blocks the tour. + this.openExample?.(TOUR_EXAMPLE_ID)?.catch(() => {}); this.render(); } @@ -261,9 +278,9 @@ let mgr: TourManager | null = null; /** Called once at mount, beside initTips: registers the tour/invite suppression * gate with the tips channel and fires the first-run invite. */ -export function initTour(store: Store): TourManager { +export function initTour(store: Store, opts?: { openExample?: (id: string) => Promise }): TourManager { mgr?.dispose(); - mgr = new TourManager(store); + mgr = new TourManager(store, opts?.openExample); setTipSuppression(() => (mgr?.active() || mgr?.inviteVisible()) ?? false); mgr.maybeInvite(); return mgr; From 05dfd2e56659ea23e02b96b5306a9d3f4b1df119 Mon Sep 17 00:00:00 2001 From: Alex Bikeyev Date: Wed, 25 Nov 2026 12:23:18 +1300 Subject: [PATCH 02/20] =?UTF-8?q?webview:=20tour=20callouts=20track=20anch?= =?UTF-8?q?or=20position=20=E2=80=94=20cross-axis=20clamp,=20inside=20plac?= =?UTF-8?q?ement,=20arrow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...DEMO-106--VALUATION-NEW--20260628-1628.omz | Bin 15549 -> 16467 bytes webview/styles.css | 6 ++ webview/tour.ts | 79 +++++++++++++----- 3 files changed, 63 insertions(+), 22 deletions(-) diff --git a/examples/DEMO-106--VALUATION-NEW--20260628-1628.omz b/examples/DEMO-106--VALUATION-NEW--20260628-1628.omz index b5edb8367c8a46c467c004a01836e3cdbb1d5993..65d9ee0b91408363018bb2b5e2d5e1cca97e6fa5 100644 GIT binary patch literal 16467 zcmZ|019W6TyEYm-lZiF4(J>~roen0p?TIItWMXGx+qP}nw(Z=W@7(`C_nftE_u6Y$ z@2cvmUG>z9r|MOdfrP>U1A~JD`}Zk!tlQxS-4#I>GU&1~u(dEXadKv`bh5K8Ril-k zkQ|p&sZk!8oR^^;ml>9t=Tw%+gGd8jQPb=r`Hc=*nHViN8orYOqTT4`tK;!BX zNoa7=2;D4C6RqfYD8DFX;xPK+ZTIP8Td4=G3E$2lzL}y&*-Bl{%JtcG#~Z0!U8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0i0>y!alYRratL??Nm;@2^sw^ z7%p&C-K%tyFBozUKa5N>c1d?)Q+Qnv8vf-=(B2`%+8=zIbi+#E&aVDmscydGN^yxC zd-QCH_Jq-n^Ac#^DO9UES^sULv#VaxTQ;$cXucEWaX77L*;J=J+ZGZ zYz^~%D6W`c62k65C?W7V!ZY(6wyG7Q*i!R@=Y6;Gqa}iWdX_#|+(GlEm0EYK=`_x7SR}RNb}P9RW+DKB41r z(|?86la$`by-{fmLn-M49Ay`>i_f;6BaV4VjI zl+CT-LbS)&DA7ueaggc_xwiv{F-f%$5sl>bk?qlnu`^hv?YoSlAgpfw^ZGdk=yY&~ z&Y~1djbcnR$!Y76t0ne__z~qW@4R+mSfF<0i*xXZFJr6exk8hlrq^Y!rAto;?$_bX zR4Z!c3U3N+LI%PpPEu&`SfRy+=LsZm68u*%OE4J|Vt|rEwYBwf@T}gAPvNBHkuC;b zk}=Q4`APxa(MOzYR!RXbqL;@tdL-Qxok}lp_4&D7?DFV{PTFNU$g^#CUwe2mdh9}M zkyH$Q4KhG6_wwr01?ehuelTWUc)BPoTN34E?xg*BWK+RYug5dyq5BzUtEuN2{~_eZ z=c~T^fh`T+?&&3kZ{TGT^eMg)F_HQx=w+wS-qD6GA~63>*XE|Bv|nXWaku@CW Math.min(Math.max(lo, v), Math.max(lo, hi)); + +/** Position a callout so it corresponds to the anchor's actual location: + * the main axis (below/above/beside) decides placement — the first side whose + * main-axis edge fits wins; the cross axis is then CLAMPED into the viewport + * rather than flipped, so a callout under an edge anchor still sits under it. + * "inside" centers within the anchor region (for large areas like view-area). * Pure — the DOM render just applies {x,y}. */ export function placeCallout( anchor: RectLike, @@ -57,7 +63,14 @@ export function placeCallout( preferred: Placement, viewport: { w: number; h: number }, ): { x: number; y: number; placement: Placement } { - const at = (p: Placement): { x: number; y: number } => { + if (preferred === "inside") { + return { + x: clamp(anchor.x + anchor.w / 2 - size.w / 2, MARGIN, viewport.w - MARGIN - size.w), + y: clamp(anchor.y + anchor.h / 2 - size.h / 2, MARGIN, viewport.h - MARGIN - size.h), + placement: "inside", + }; + } + const at = (p: Exclude): { x: number; y: number } => { const cx = anchor.x + anchor.w / 2 - size.w / 2; const cy = anchor.y + anchor.h / 2 - size.h / 2; switch (p) { @@ -67,18 +80,25 @@ export function placeCallout( case "left": return { x: anchor.x - size.w - GAP, y: cy }; } }; - const fits = ({ x, y }: { x: number; y: number }) => - x >= MARGIN && y >= MARGIN && x + size.w <= viewport.w - MARGIN && y + size.h <= viewport.h - MARGIN; - const order = [preferred, "bottom", "top", "right", "left"] - .filter((p, i, a): p is Placement => a.indexOf(p) === i); + const fitsMain = (p: Exclude, { x, y }: { x: number; y: number }) => + (p === "bottom" || p === "top") + ? y >= MARGIN && y + size.h <= viewport.h - MARGIN + : x >= MARGIN && x + size.w <= viewport.w - MARGIN; + const clampCross = (p: Exclude, { x, y }: { x: number; y: number }) => + (p === "bottom" || p === "top") + ? { x: clamp(x, MARGIN, viewport.w - MARGIN - size.w), y } + : { x, y: clamp(y, MARGIN, viewport.h - MARGIN - size.h) }; + const OPPOSITE = { bottom: "top", top: "bottom", left: "right", right: "left" } as const; + const order = ([preferred, OPPOSITE[preferred], "bottom", "top", "right", "left"] as const) + .filter((p, i, a): p is Exclude => a.indexOf(p) === i); for (const p of order) { const pos = at(p); - if (fits(pos)) return { ...pos, placement: p }; + if (fitsMain(p, pos)) return { ...clampCross(p, pos), placement: p }; } - const { x, y } = at(preferred); + const { x, y } = at(preferred as Exclude); return { - x: Math.min(Math.max(MARGIN, x), Math.max(MARGIN, viewport.w - MARGIN - size.w)), - y: Math.min(Math.max(MARGIN, y), Math.max(MARGIN, viewport.h - MARGIN - size.h)), + x: clamp(x, MARGIN, viewport.w - MARGIN - size.w), + y: clamp(y, MARGIN, viewport.h - MARGIN - size.h), placement: preferred, }; } @@ -154,19 +174,21 @@ export class TourManager { private prev() { if (this.stepIndex > 0) { this.stepIndex--; this.render(); } } - private anchorEl(step: TourStep): HTMLElement | null { + private anchorEl(step: TourStep): { el: HTMLElement; fallback: boolean } | null { if (!step.anchor) return null; const primary = document.querySelector(`[data-tour="${step.anchor}"]`); - if (primary) return primary as HTMLElement; - if (step.fallbackAnchor) - return document.querySelector(`[data-tour="${step.fallbackAnchor}"]`) as HTMLElement | null; - return null; + if (primary) return { el: primary as HTMLElement, fallback: false }; + if (!step.fallbackAnchor) return null; + const fb = document.querySelector(`[data-tour="${step.fallbackAnchor}"]`); + return fb ? { el: fb as HTMLElement, fallback: true } : null; } private render() { this.teardownDom(); const step = TOUR_STEPS[this.stepIndex]; - const anchor = this.anchorEl(step); + const found = this.anchorEl(step); + const anchor = found?.el ?? null; + const place = found?.fallback ? (step.fallbackPlace ?? step.place) : step.place; if (anchor) { anchor.classList.add("om-tour-mark"); this.markedEl = anchor; } const n = this.stepIndex, total = TOUR_STEPS.length, last = n === total - 1; @@ -200,12 +222,25 @@ export class TourManager { const pos = placeCallout( { x: r.x, y: r.y, w: r.width, h: r.height }, { w: c.width, h: c.height }, - step.place ?? "bottom", + place ?? "bottom", { w: window.innerWidth, h: window.innerHeight }, ); this.callout.style.left = `${pos.x}px`; this.callout.style.top = `${pos.y}px`; this.callout.dataset.placement = pos.placement; + // Arrow on the edge facing the anchor, aligned to the anchor's centre + // (clamped inside the callout's rounded corners). "inside"/centered → none. + if (pos.placement !== "inside") { + const arrow = el("span", { class: "om-tour-arrow" }); + if (pos.placement === "bottom" || pos.placement === "top") { + arrow.classList.add(pos.placement === "bottom" ? "edge-top" : "edge-bottom"); + arrow.style.left = `${clamp(r.x + r.width / 2 - pos.x, 16, c.width - 16)}px`; + } else { + arrow.classList.add(pos.placement === "left" ? "edge-right" : "edge-left"); + arrow.style.top = `${clamp(r.y + r.height / 2 - pos.y, 16, c.height - 16)}px`; + } + this.callout.appendChild(arrow); + } } nextBtn.focus(); } From 35569e3b1613b0b53a321683fae3f515346ea95d Mon Sep 17 00:00:00 2001 From: Alex Bikeyev Date: Wed, 25 Nov 2026 12:33:54 +1300 Subject: [PATCH 03/20] webview: rules step points at the expanded pane with the Rules tab active --- webview/tour.ts | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/webview/tour.ts b/webview/tour.ts index 1407a81..f80d8bf 100644 --- a/webview/tour.ts +++ b/webview/tour.ts @@ -19,6 +19,7 @@ export interface TourStep { fallbackAnchor?: string; // used when the primary anchor is absent from the DOM place?: Placement; // preferred side (default bottom) fallbackPlace?: Placement; // placement when the fallback anchor is used + activeTab?: string; // prefer the match whose active .lower-tab shows this label title: string; text: string; } @@ -34,7 +35,7 @@ export const TOUR_STEPS: readonly TourStep[] = [ text: "File opens models and bundles; View, Tools, and Help hold the rest." }, { id: "views", anchor: "view-area", place: "inside", title: "Views", text: "Each tab is a live view into the model — drag a tab to split." }, - { id: "rules", anchor: "rules", fallbackAnchor: "view-area", place: "left", fallbackPlace: "inside", title: "Rules", + { id: "rules", anchor: "rules", fallbackAnchor: "view-area", place: "left", fallbackPlace: "inside", activeTab: "Rules", title: "Rules", text: "Rules attach a formula to a region of cells — select one here to inspect or edit it." }, { id: "calc-flow", anchor: "view-area", place: "inside", title: "Calculation flow", text: "Changing an input recomputes every dependent cell in order — that dependency chain is the calculation flow." }, @@ -176,11 +177,30 @@ export class TourManager { private anchorEl(step: TourStep): { el: HTMLElement; fallback: boolean } | null { if (!step.anchor) return null; - const primary = document.querySelector(`[data-tour="${step.anchor}"]`); - if (primary) return { el: primary as HTMLElement, fallback: false }; - if (!step.fallbackAnchor) return null; - const fb = document.querySelector(`[data-tour="${step.fallbackAnchor}"]`); - return fb ? { el: fb as HTMLElement, fallback: true } : null; + const qsa = (name: string) => [...document.querySelectorAll(`[data-tour="${name}"]`)]; + let els = qsa(step.anchor); + let fallback = false; + if (!els.length && step.fallbackAnchor) { els = qsa(step.fallbackAnchor); fallback = true; } + if (!els.length) return null; + return { el: this.pickAnchor(els, step), fallback }; + } + + /** Multiple view panes can carry the same anchor — each pane has its own + * rules subpane, and a collapsed pane stays in the DOM as a thin tab strip. + * Point at the one that is actually open: prefer an expanded pane showing + * the step's active tab, then any expanded pane, then the largest match. + * The 40px floor never eliminates every candidate (collapsed ≈ 28px). */ + private pickAnchor(els: HTMLElement[], step: TourStep): HTMLElement { + const area = (e: HTMLElement) => { const r = e.getBoundingClientRect(); return r.width * r.height; }; + const biggest = (pool: HTMLElement[]) => pool.reduce((a, b) => (area(b) > area(a) ? b : a)); + const expanded = els.filter((e) => e.getBoundingClientRect().height > 40); + const pool = expanded.length ? expanded : els; + if (step.activeTab) { + const tabbed = pool.filter((e) => + (e.querySelector(".lower-tab.active")?.textContent ?? "").trim() === step.activeTab); + if (tabbed.length) return biggest(tabbed); + } + return biggest(pool); } private render() { From 6cbeb1a0005a829065dfc317a7bd41ad16af9e23 Mon Sep 17 00:00:00 2001 From: Alex Bikeyev Date: Wed, 25 Nov 2026 12:44:01 +1300 Subject: [PATCH 04/20] webview: outlined tour arrow (border + fill triangles) --- webview/styles.css | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/webview/styles.css b/webview/styles.css index da55712..76e1314 100644 --- a/webview/styles.css +++ b/webview/styles.css @@ -909,12 +909,20 @@ body.splitter-dragging-y, body.splitter-dragging-y * { cursor: row-resize !impor .om-tour-skip:hover { color: var(--text); } /* 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; } -/* Arrow sits on the callout edge facing the anchor — ties callout to target. */ -.om-tour-arrow { position: absolute; width: 0; height: 0; border: 7px solid transparent; } -.om-tour-arrow.edge-top { top: -13px; margin-left: -7px; border-bottom: 7px solid var(--popup-bg); } -.om-tour-arrow.edge-bottom { bottom: -13px; margin-left: -7px; border-top: 7px solid var(--popup-bg); } -.om-tour-arrow.edge-left { left: -13px; margin-top: -7px; border-right: 7px solid var(--popup-bg); } -.om-tour-arrow.edge-right { right: -13px; margin-top: -7px; border-left: 7px solid var(--popup-bg); } +/* Arrow sits on the callout edge facing the anchor — ties callout to target. + * Element = border-coloured triangle; ::after = fill triangle inset 1px, so the + * slants read as an outline. 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::after { content: ""; position: absolute; border: 7px solid transparent; } +.om-tour-arrow.edge-top { top: -16px; margin-left: -8px; border-bottom-color: var(--border-strong); } +.om-tour-arrow.edge-bottom { bottom: -16px; margin-left: -8px; border-top-color: var(--border-strong); } +.om-tour-arrow.edge-left { left: -16px; margin-top: -8px; border-right-color: var(--border-strong); } +.om-tour-arrow.edge-right { right: -16px; margin-top: -8px; border-left-color: var(--border-strong); } +.om-tour-arrow.edge-top::after { left: 0; top: 1px; border-bottom-color: var(--popup-bg); } +.om-tour-arrow.edge-bottom::after { left: 0; top: -1px; border-top-color: var(--popup-bg); } +.om-tour-arrow.edge-left::after { left: 1px; top: 0; border-right-color: var(--popup-bg); } +.om-tour-arrow.edge-right::after { left: -1px; top: 0; border-left-color: var(--popup-bg); } .om-tour-invite { max-width: 460px; } .ctx-item.disabled:hover { background: transparent; color: var(--text-disabled); } .ctx-sep { height: 1px; background: var(--border); margin: 2px 0; } From 9339ce38248441d321eda20800049b5440a95c41 Mon Sep 17 00:00:00 2001 From: Alex Bikeyev Date: Wed, 25 Nov 2026 12:46:59 +1300 Subject: [PATCH 05/20] webview: tour explains dimensions, cubes, and views against the model browser --- webview/components/modelBrowser.ts | 5 ++++- webview/tour.ts | 8 +++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/webview/components/modelBrowser.ts b/webview/components/modelBrowser.ts index d8af725..88e4622 100644 --- a/webview/components/modelBrowser.ts +++ b/webview/components/modelBrowser.ts @@ -33,8 +33,9 @@ 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)); @@ -46,6 +47,7 @@ export class ModelBrowser { // 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))); @@ -54,6 +56,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)); diff --git a/webview/tour.ts b/webview/tour.ts index f80d8bf..bb823e8 100644 --- a/webview/tour.ts +++ b/webview/tour.ts @@ -33,7 +33,13 @@ export const TOUR_STEPS: readonly TourStep[] = [ text: "This tour opens the DCF Valuation example — a live model you can explore." }, { id: "menus", anchor: "menubar", place: "bottom", title: "Menus", text: "File opens models and bundles; View, Tools, and Help hold the rest." }, - { id: "views", anchor: "view-area", place: "inside", title: "Views", + { id: "browser-dims", anchor: "dims", fallbackAnchor: "view-area", place: "right", fallbackPlace: "inside", title: "Dimensions", + text: "Dimensions are the model's axes — Year, Account. Their items become the rows and columns." }, + { id: "browser-cubes", anchor: "cubes", fallbackAnchor: "view-area", place: "right", fallbackPlace: "inside", title: "Cubes", + text: "A cube stores the data — each cell is addressed by items of its dimensions." }, + { id: "browser-views", anchor: "views", fallbackAnchor: "view-area", place: "right", fallbackPlace: "inside", title: "Views", + text: "A view is a live window into a cube — opening one adds a tab to the workspace." }, + { id: "views", anchor: "view-area", place: "inside", title: "View tabs", text: "Each tab is a live view into the model — drag a tab to split." }, { id: "rules", anchor: "rules", fallbackAnchor: "view-area", place: "left", fallbackPlace: "inside", activeTab: "Rules", title: "Rules", text: "Rules attach a formula to a region of cells — select one here to inspect or edit it." }, From ad23e2f3b5e5393c3b9a0c12aaa2303f0bdeb5cc Mon Sep 17 00:00:00 2001 From: Alex Bikeyev Date: Wed, 25 Nov 2026 12:49:56 +1300 Subject: [PATCH 06/20] webview: tour explains the pivot chips (page/rows/columns drag) Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- webview/components/pivotBar.ts | 2 +- webview/tour.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/webview/components/pivotBar.ts b/webview/components/pivotBar.ts index 105ca94..6c7bb4c 100644 --- a/webview/components/pivotBar.ts +++ b/webview/components/pivotBar.ts @@ -55,7 +55,7 @@ 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 topLeft = el("div", { class: "pc-topleft drop-zone", "data-zone": "page", "data-tour": "pivot" }); const gridMount = el("div", { class: "pc-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" }); diff --git a/webview/tour.ts b/webview/tour.ts index bb823e8..df3ba67 100644 --- a/webview/tour.ts +++ b/webview/tour.ts @@ -41,6 +41,8 @@ export const TOUR_STEPS: readonly TourStep[] = [ text: "A view is a live window into a cube — opening one adds a tab to the workspace." }, { id: "views", anchor: "view-area", place: "inside", title: "View tabs", text: "Each tab is a live view into the model — drag a tab to split." }, + { id: "chips", anchor: "pivot", fallbackAnchor: "view-area", place: "bottom", fallbackPlace: "inside", title: "Dimension chips", + text: "Drag chips between Page, Rows and Columns to rearrange a view; Page chips filter the slice." }, { id: "rules", anchor: "rules", fallbackAnchor: "view-area", place: "left", fallbackPlace: "inside", activeTab: "Rules", title: "Rules", text: "Rules attach a formula to a region of cells — select one here to inspect or edit it." }, { id: "calc-flow", anchor: "view-area", place: "inside", title: "Calculation flow", From 29f451d7eea75191368ed32601c87c147bc6fbde Mon Sep 17 00:00:00 2001 From: Alex Bikeyev Date: Wed, 25 Nov 2026 12:55:55 +1300 Subject: [PATCH 07/20] webview: tour explains @ channels, channel pills, cube rules Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- webview/components/pivotBar.ts | 4 ++-- webview/components/rulePanel.ts | 2 +- webview/tour.ts | 23 +++++++++++++++++------ 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/webview/components/pivotBar.ts b/webview/components/pivotBar.ts index 6c7bb4c..b37d6a2 100644 --- a/webview/components/pivotBar.ts +++ b/webview/components/pivotBar.ts @@ -117,7 +117,7 @@ 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); @@ -125,7 +125,7 @@ export class PivotBar { } // 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; diff --git a/webview/components/rulePanel.ts b/webview/components/rulePanel.ts index 25396a0..c80dab4 100644 --- a/webview/components/rulePanel.ts +++ b/webview/components/rulePanel.ts @@ -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("@.", ""); diff --git a/webview/tour.ts b/webview/tour.ts index df3ba67..27f1c0b 100644 --- a/webview/tour.ts +++ b/webview/tour.ts @@ -36,15 +36,19 @@ export const TOUR_STEPS: readonly TourStep[] = [ { id: "browser-dims", anchor: "dims", fallbackAnchor: "view-area", place: "right", fallbackPlace: "inside", title: "Dimensions", text: "Dimensions are the model's axes — Year, Account. Their items become the rows and columns." }, { id: "browser-cubes", anchor: "cubes", fallbackAnchor: "view-area", place: "right", fallbackPlace: "inside", title: "Cubes", - text: "A cube stores the data — each cell is addressed by items of its dimensions." }, + text: "A cube stores the data — cells addressed by items of its dimensions — and the rules that compute them." }, { id: "browser-views", anchor: "views", fallbackAnchor: "view-area", place: "right", fallbackPlace: "inside", title: "Views", text: "A view is a live window into a cube — opening one adds a tab to the workspace." }, { id: "views", anchor: "view-area", place: "inside", title: "View tabs", text: "Each tab is a live view into the model — drag a tab to split." }, { id: "chips", anchor: "pivot", fallbackAnchor: "view-area", place: "bottom", fallbackPlace: "inside", title: "Dimension chips", text: "Drag chips between Page, Rows and Columns to rearrange a view; Page chips filter the slice." }, + { id: "at-dim", anchor: "at-dim", fallbackAnchor: "view-area", place: "bottom", fallbackPlace: "inside", title: "The @ dimension", + text: "Every cube's channel axis — 'value' holds the data; the other items carry formatting (fill, fonts, number formats)." }, { id: "rules", anchor: "rules", fallbackAnchor: "view-area", place: "left", fallbackPlace: "inside", activeTab: "Rules", title: "Rules", text: "Rules attach a formula to a region of cells — select one here to inspect or edit it." }, + { id: "channel-pills", anchor: "channel-filter", fallbackAnchor: "view-area", place: "left", fallbackPlace: "inside", activeTab: "Rules", title: "Channel pills", + text: "Click a pill to show only that channel's rules — Ctrl-click to combine; none selected shows all." }, { id: "calc-flow", anchor: "view-area", place: "inside", title: "Calculation flow", text: "Changing an input recomputes every dependent cell in order — that dependency chain is the calculation flow." }, { id: "status", anchor: "engine-status", fallbackAnchor: "statusbar", place: "bottom", title: "Engine status", @@ -197,15 +201,22 @@ export class TourManager { * rules subpane, and a collapsed pane stays in the DOM as a thin tab strip. * Point at the one that is actually open: prefer an expanded pane showing * the step's active tab, then any expanded pane, then the largest match. - * The 40px floor never eliminates every candidate (collapsed ≈ 28px). */ + * The 40px floor never eliminates every candidate (collapsed ≈ 28px); + * anchors that are thin themselves (chips, the pill bar) fall back to the + * largest *rendered* match so a collapsed pane's zero-size leftovers lose. + * Tab matching scopes to the .va-rules ancestor so anchors nested inside + * the pane (which don't contain the tab labels) still match. */ private pickAnchor(els: HTMLElement[], step: TourStep): HTMLElement { const area = (e: HTMLElement) => { const r = e.getBoundingClientRect(); return r.width * r.height; }; const biggest = (pool: HTMLElement[]) => pool.reduce((a, b) => (area(b) > area(a) ? b : a)); - const expanded = els.filter((e) => e.getBoundingClientRect().height > 40); - const pool = expanded.length ? expanded : els; + const visible = els.filter((e) => { const r = e.getBoundingClientRect(); return r.width > 0 && r.height > 0; }); + const expanded = visible.filter((e) => e.getBoundingClientRect().height > 40); + const pool = expanded.length ? expanded : (visible.length ? visible : els); if (step.activeTab) { - const tabbed = pool.filter((e) => - (e.querySelector(".lower-tab.active")?.textContent ?? "").trim() === step.activeTab); + const tabbed = pool.filter((e) => { + const scope = e.closest(".va-rules") ?? e; + return (scope.querySelector(".lower-tab.active")?.textContent ?? "").trim() === step.activeTab; + }); if (tabbed.length) return biggest(tabbed); } return biggest(pool); From 63885c4548b3746314ff50d94e759b667c3b4615 Mon Sep 17 00:00:00 2001 From: Alex Bikeyev Date: Wed, 25 Nov 2026 13:01:42 +1300 Subject: [PATCH 08/20] webview: tour explains hard values vs rules precedence Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- webview/components/pivotBar.ts | 2 +- webview/tour.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/webview/components/pivotBar.ts b/webview/components/pivotBar.ts index b37d6a2..afbe059 100644 --- a/webview/components/pivotBar.ts +++ b/webview/components/pivotBar.ts @@ -56,7 +56,7 @@ export class PivotBar { const frame = el("div", { class: "pc-frame" }); const topLeft = el("div", { class: "pc-topleft drop-zone", "data-zone": "page", "data-tour": "pivot" }); - const gridMount = el("div", { class: "pc-grid" }); + 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" }); diff --git a/webview/tour.ts b/webview/tour.ts index 27f1c0b..900f57b 100644 --- a/webview/tour.ts +++ b/webview/tour.ts @@ -51,6 +51,8 @@ export const TOUR_STEPS: readonly TourStep[] = [ text: "Click a pill to show only that channel's rules — Ctrl-click to combine; none selected shows all." }, { id: "calc-flow", anchor: "view-area", place: "inside", title: "Calculation flow", text: "Changing an input recomputes every dependent cell in order — that dependency chain is the calculation flow." }, + { id: "hardvalues", anchor: "grid", fallbackAnchor: "view-area", place: "inside", title: "Hard values", + text: "Typing into a cell sets a hard value — it overrides rules until cleared; start with = to write a rule. More specific rules win." }, { id: "status", anchor: "engine-status", fallbackAnchor: "statusbar", place: "bottom", title: "Engine status", text: "The dot shows the live engine state; the status bar below tracks your selection and version." }, { id: "help", anchor: "help-menu", place: "bottom", title: "That's it", From 5cf7a0f5ce4fa58ab25dc23dc530c24315b7eebf Mon Sep 17 00:00:00 2001 From: Alex Bikeyev Date: Wed, 25 Nov 2026 13:08:48 +1300 Subject: [PATCH 09/20] webview: tour explains set vs sequence dimensions Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- webview/components/modelBrowser.ts | 3 +++ webview/tour.ts | 14 +++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/webview/components/modelBrowser.ts b/webview/components/modelBrowser.ts index 88e4622..b13dd21 100644 --- a/webview/components/modelBrowser.ts +++ b/webview/components/modelBrowser.ts @@ -41,6 +41,9 @@ export class ModelBrowser { 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); diff --git a/webview/tour.ts b/webview/tour.ts index 900f57b..b4a52ab 100644 --- a/webview/tour.ts +++ b/webview/tour.ts @@ -35,6 +35,10 @@ export const TOUR_STEPS: readonly TourStep[] = [ text: "File opens models and bundles; View, Tools, and Help hold the rest." }, { id: "browser-dims", anchor: "dims", fallbackAnchor: "view-area", place: "right", fallbackPlace: "inside", title: "Dimensions", text: "Dimensions are the model's axes — Year, Account. Their items become the rows and columns." }, + { id: "dim-set", anchor: "dim-set", fallbackAnchor: "view-area", place: "right", fallbackPlace: "inside", title: "Set dimensions", + text: "An unordered set dimension — you can drag its items into any order." }, + { id: "dim-seq", anchor: "dim-seq", fallbackAnchor: "view-area", place: "right", fallbackPlace: "inside", title: "Sequence dimensions", + text: "An ordered sequence — rules reach items by index (FIRST, LAST, THIS, PREV, NEXT); the order can't be dragged." }, { id: "browser-cubes", anchor: "cubes", fallbackAnchor: "view-area", place: "right", fallbackPlace: "inside", title: "Cubes", text: "A cube stores the data — cells addressed by items of its dimensions — and the rules that compute them." }, { id: "browser-views", anchor: "views", fallbackAnchor: "view-area", place: "right", fallbackPlace: "inside", title: "Views", @@ -194,9 +198,13 @@ export class TourManager { const qsa = (name: string) => [...document.querySelectorAll(`[data-tour="${name}"]`)]; let els = qsa(step.anchor); let fallback = false; - if (!els.length && step.fallbackAnchor) { els = qsa(step.fallbackAnchor); fallback = true; } - if (!els.length) return null; - return { el: this.pickAnchor(els, step), fallback }; + let picked = els.length ? this.pickAnchor(els, step) : null; + // A collapsed dock keeps its anchors mounted at zero size — a picked + // zero-area element degrades to the fallback just like a missing one. + const zero = (e: HTMLElement) => { const r = e.getBoundingClientRect(); return r.width === 0 && r.height === 0; }; + if ((!picked || zero(picked)) && step.fallbackAnchor) { els = qsa(step.fallbackAnchor); picked = els.length ? this.pickAnchor(els, step) : null; fallback = true; } + if (!picked || zero(picked)) return null; + return { el: picked, fallback }; } /** Multiple view panes can carry the same anchor — each pane has its own From a92164321865eeac42bae01b8b2a3f3022fdb954 Mon Sep 17 00:00:00 2001 From: Alex Bikeyev Date: Wed, 25 Nov 2026 13:09:56 +1300 Subject: [PATCH 10/20] =?UTF-8?q?webview:=20tour=20privacy=20step=20?= =?UTF-8?q?=E2=80=94=20local=20compute,=20remote=20LLM=20caveat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- webview/tour.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/webview/tour.ts b/webview/tour.ts index b4a52ab..9083dff 100644 --- a/webview/tour.ts +++ b/webview/tour.ts @@ -31,6 +31,8 @@ const TOUR_EXAMPLE_ID = "dcf-valuation"; export const TOUR_STEPS: readonly TourStep[] = [ { id: "welcome", title: "Welcome to OM Core", text: "This tour opens the DCF Valuation example — a live model you can explore." }, + { id: "privacy", anchor: "assistant", fallbackAnchor: "view-area", place: "top", fallbackPlace: "inside", title: "Runs locally", + text: "Everything runs locally — your model never leaves the browser. The exception is the Assistant: a remote LLM sends what you send it to your provider. For maximum privacy, use the VS Code extension — it pairs with any assistant you choose." }, { id: "menus", anchor: "menubar", place: "bottom", title: "Menus", text: "File opens models and bundles; View, Tools, and Help hold the rest." }, { id: "browser-dims", anchor: "dims", fallbackAnchor: "view-area", place: "right", fallbackPlace: "inside", title: "Dimensions", From 3c0fc235dc0d640bb1b12f3986f2a3aac9f18373 Mon Sep 17 00:00:00 2001 From: Alex Bikeyev Date: Wed, 25 Nov 2026 13:13:35 +1300 Subject: [PATCH 11/20] webview: privacy step notes local-model assistant option Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- webview/tour.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webview/tour.ts b/webview/tour.ts index 9083dff..bda2bad 100644 --- a/webview/tour.ts +++ b/webview/tour.ts @@ -32,7 +32,7 @@ export const TOUR_STEPS: readonly TourStep[] = [ { id: "welcome", title: "Welcome to OM Core", text: "This tour opens the DCF Valuation example — a live model you can explore." }, { id: "privacy", anchor: "assistant", fallbackAnchor: "view-area", place: "top", fallbackPlace: "inside", title: "Runs locally", - text: "Everything runs locally — your model never leaves the browser. The exception is the Assistant: a remote LLM sends what you send it to your provider. For maximum privacy, use the VS Code extension — it pairs with any assistant you choose." }, + text: "Everything runs locally — your model never leaves the browser. The exception is the Assistant: a remote LLM sends what you send it to your provider — however, you can set it up with a local model as well. For maximum privacy, use the VS Code extension — it pairs with any assistant you choose." }, { id: "menus", anchor: "menubar", place: "bottom", title: "Menus", text: "File opens models and bundles; View, Tools, and Help hold the rest." }, { id: "browser-dims", anchor: "dims", fallbackAnchor: "view-area", place: "right", fallbackPlace: "inside", title: "Dimensions", From 0119aa7349513fba3d3895fb30a163ed6ee9972c Mon Sep 17 00:00:00 2001 From: Alex Bikeyev Date: Wed, 25 Nov 2026 13:15:49 +1300 Subject: [PATCH 12/20] webview: tour points at docs and Discord link buttons Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- webview/components/appShell.ts | 7 ++++--- webview/tour.ts | 4 ++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/webview/components/appShell.ts b/webview/components/appShell.ts index c21fd8d..ee21ce1 100644 --- a/webview/components/appShell.ts +++ b/webview/components/appShell.ts @@ -538,10 +538,10 @@ export class AppShell { * 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. */ 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) { @@ -549,6 +549,7 @@ export class AppShell { 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( diff --git a/webview/tour.ts b/webview/tour.ts index bda2bad..4f97a5e 100644 --- a/webview/tour.ts +++ b/webview/tour.ts @@ -61,6 +61,10 @@ export const TOUR_STEPS: readonly TourStep[] = [ text: "Typing into a cell sets a hard value — it overrides rules until cleared; start with = to write a rule. More specific rules win." }, { id: "status", anchor: "engine-status", fallbackAnchor: "statusbar", place: "bottom", title: "Engine status", text: "The dot shows the live engine state; the status bar below tracks your selection and version." }, + { id: "docs", anchor: "link-docs", fallbackAnchor: "help-menu", place: "bottom", title: "Documentation", + text: "The book icon opens the documentation — guides and reference, always one click away." }, + { id: "discord", anchor: "link-discord", fallbackAnchor: "help-menu", place: "bottom", title: "Join our Discord", + text: "Questions, bugs, or ideas — join our Discord channel anytime from this button." }, { id: "help", anchor: "help-menu", place: "bottom", title: "That's it", text: "Replay this tour anytime from Help → Take the Tour." }, ]; From ff4e7c62ce19b7fcf16146c6b8361f2ae9fa51e5 Mon Sep 17 00:00:00 2001 From: Alex Bikeyev Date: Wed, 25 Nov 2026 13:21:01 +1300 Subject: [PATCH 13/20] webview: marketplace link in tour privacy step + Help menu Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- shared/messages.ts | 1 + webview/components/appShell.ts | 8 ++++++++ webview/styles.css | 5 +++++ webview/tour.ts | 18 ++++++++++++++++-- 4 files changed, 30 insertions(+), 2 deletions(-) diff --git a/shared/messages.ts b/shared/messages.ts index 7af9d9d..17ca9c7 100644 --- a/shared/messages.ts +++ b/shared/messages.ts @@ -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); diff --git a/webview/components/appShell.ts b/webview/components/appShell.ts index ee21ce1..7860b38 100644 --- a/webview/components/appShell.ts +++ b/webview/components/appShell.ts @@ -537,6 +537,13 @@ 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; tour?: string }[] = [ { icon: brandIconSvg("github"), title: "Open Modeling on GitHub", label: "GitHub repository", url: LINKS.github }, @@ -761,6 +768,7 @@ 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/") }, ]; diff --git a/webview/styles.css b/webview/styles.css index 76e1314..90ea0d5 100644 --- a/webview/styles.css +++ b/webview/styles.css @@ -907,6 +907,11 @@ 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; + * in a browser host,