Merge remote-tracking branch 'origin/main' into rega/research-gallery-embed

This commit is contained in:
doxa-maps-88655c70 2026-09-24 21:47:29 +00:00
commit 43e8d0e365
2 changed files with 17 additions and 8 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

View file

@ -280,15 +280,24 @@ await shot('cap5-plugin-studio', '/doxa-maps/plugin-studio/plugin-studio/index.h
before: async (page) => {
// The rail lives inside the element's shadow root, so a light-DOM selector finds nothing —
// click through an evaluated deep walk instead (the same seen-Set walk the readiness guard uses).
// The rail is an Explorer tree (f63d75e): its plugin rows are .st-row[role=treeitem], and a
// .st-sec row is a section heading, not a plugin. The older .vtl-tab rail is kept as a
// fallback. Without a tree row, the walk would reach the NESTED gallery's own .vtl-tab buttons
// instead, and click a tab inside the plugin rather than a plugin in the rail.
await page.evaluate(() => {
const seen = new Set(); let first = null
;(function w(n) {
if (!n || seen.has(n) || first) return
seen.add(n)
if (n.tagName === 'BUTTON' && /vtl-tab\b/.test((n.className || '').toString())) { first = n; return }
if (n.shadowRoot) w(n.shadowRoot)
for (const c of (n.children || [])) w(c)
})(document.body)
const find = (test) => {
const seen = new Set(); let hit = null
;(function w(n) {
if (!n || seen.has(n) || hit) return
seen.add(n)
if (n.nodeType === 1 && test(n)) { hit = n; return }
if (n.shadowRoot) w(n.shadowRoot)
for (const c of (n.children || [])) w(c)
})(document.body)
return hit
}
const first = find((n) => n.matches('.st-row[role="treeitem"]:not(.st-sec)'))
|| find((n) => n.tagName === 'BUTTON' && /vtl-tab\b/.test((n.className || '').toString()))
if (first) first.click()
})
await page.waitForTimeout(3000) // let the selected element mount before the main wait