feat(dsh): adapt to DSH 0.1.5-alpha.2
Baseline moves to DSH 0.1.5-alpha.2 only (peer floor ^0.1.5-alpha.2, CI pin, manifest engines); alpha.1 users stay on v0.19.0-alpha.0. Host-contract changes handled: - the native guide entry lost its `description` field (entries are icon+title capsules now): `TabDescriptor.description` and the six `guideDesc*` keys plus the `nativeGuideDesc` fallback are removed. - the file address grammar changed: `fileAddressFor` always returns a session-scoped address (absolute paths keep their leading `/`), `parseFileAddress` is prefix-based and strips `?`/`#`. The plugin's purity-gated mirror follows. - global main panels replaced the `conversation` root slot with the keyed `main` slot (`main.conversation`): the bottom workbench's center-column locator now accepts both keys and skips `display: contents` slot hosts. Fixes a pre-existing fill bug the alpha.2 probe made obvious: the native tab body host is a block scroller with a definite height, so tab roots that only declared `flex: 1` collapsed to content height and the side chat composer drifted off the pane bottom. The native adapter now wraps every tab body in a `height: 100%` column flex host. Also promotes the dependencies `dsh-client-ui-primitives@0.1.5-alpha.2` dropped from its manifest (anser / shiki / mdast-util-* / micromark-* / katex / @shikijs/langs) and the newly unmet `dsh-session-persistence` peer into devDependencies.
This commit is contained in:
1 parent
d4765819c0
commit
0b6ac5d267
43 files changed
+944
-930
No files matched your search
@@ -314,6 +314,39 @@ test('plugin mounts into the DSH shell and survives a built-in tab sweep', async
|
||||
)
|
||||
.toBe(true)
|
||||
|
||||
// The native tab body host is a BLOCK scroller with a definite height, not a
|
||||
// flex container, so a tab root that only declares `flex: 1` collapses to its
|
||||
// content height — exactly how the side-chat composer used to drift away from
|
||||
// the pane bottom. The native adapter wraps every body in a full-height column
|
||||
// host; assert the box really fills its pane and the composer sits on the
|
||||
// pane's floor. This is the regression guard for that fill contract.
|
||||
await expect
|
||||
.poll(
|
||||
() => page.evaluate(() => {
|
||||
const hosts = [...document.querySelectorAll('[data-dsh-native-tab-host]')]
|
||||
const host = hosts.find(element => element.getBoundingClientRect().height > 0)
|
||||
if (host === undefined) return 'no visible native tab host'
|
||||
// The wrapper's parent is the SLOT HOST, which renders with
|
||||
// `display: contents` and therefore has no box of its own; the pane
|
||||
// body is the first ancestor that actually draws one.
|
||||
const view = host.ownerDocument.defaultView
|
||||
let paneBody = host.parentElement
|
||||
while (paneBody !== null && (view?.getComputedStyle(paneBody).display ?? '') === 'contents') {
|
||||
paneBody = paneBody.parentElement
|
||||
}
|
||||
if (paneBody === null) return 'the native tab host has no boxed ancestor'
|
||||
const fillGap = Math.round(paneBody.getBoundingClientRect().height - host.getBoundingClientRect().height)
|
||||
if (Math.abs(fillGap) > 2) return `tab body does not fill its pane: gap ${fillGap}px`
|
||||
const composer = document.querySelector('[class*="sidechatComposer"]')
|
||||
if (composer === null) return 'the side-chat composer is not rendered'
|
||||
// The composer's own 8px bottom margin is the only allowed gap.
|
||||
const bottomGap = Math.round(paneBody.getBoundingClientRect().bottom - composer.getBoundingClientRect().bottom)
|
||||
return bottomGap <= 12 ? 'filled' : `the composer sits ${bottomGap}px above the pane bottom`
|
||||
}),
|
||||
{ timeout: 30_000 },
|
||||
)
|
||||
.toBe('filled')
|
||||
|
||||
// Side Chat host-route smoke against the REAL host: create a thread child
|
||||
// under the seeded session (custom-seed creation through AgentRegistry),
|
||||
// deliver a follow-up, cancel, and release it. The turn itself cannot run
|
||||
|
||||
Reference in new issue
Block a user