0.9.3: Graph from Source on main.archify works again

On a main.archify page in Source, Graph built the Graph page but the
host held it back until Source closed, so nothing happened, and Model
then showed the held Graph page. Switching between the model and its
graph now leaves Source first, and the page forgets Source when Graph
replaces it, so Model on the Graph page comes back to the model.
This commit is contained in:
root-at-skic committed 2026-11-04 13:34:19 +02:00
1 parent a5a9f92e75
commit 2726a66113
6 files changed
+22 -4

No files matched your search

+6 -1
View File
@@ -704,7 +704,12 @@ function bridgeScript(options: PageOptions): string {
}
var name = (src && src.left) || sw.left;
var left = segment(name, name === 'View' ? 'Show the page' : 'Show the ' + name.toLowerCase(), function () { setSource(false); });
if (sw) segment('Graph', 'Open the model as one graph, with a query box', function () { post({ type: 'showGraph', query: sw.query }); });
if (sw) segment('Graph', 'Open the model as one graph, with a query box', function () {
// On main.archify the Graph page replaces this one; coming back must
// show the model, not Source. Other pages open the graph beside them.
if (sourceOn && config.model) vscode.setState(Object.assign({}, vscode.getState() || {}, { sourceView: false }));
post({ type: 'showGraph', query: sw.query });
});
var source = src ? segment('Source', 'Edit the YAML of this file, checked as you type', function () { setSource(true); }) : null;
if (source) {
var badge = el('span', 'archify-source-badge');