This lands the clue collection line on top of origin/dev (v0.32.1, DSH 0.2.2-rc.2). The 14 commits that carried it are squashed into this one because every one of them overlapped upstream's own changes (version, 19 dictionaries, CHANGELOG), and each intermediate commit would have failed to compile against rc.2's menu API. The pre-integration head is kept at backup/clues-uiux-refresh-pre-rebase. What the feature is: - a Clues tab that reads local files, Feishu tasks/docs and GitHub issues/pulls through one source registry, with a scope row, shared search, filters, paging and stable [[dsh-clue:...]] references; - one window host for detail, pack management, source configuration, new pack and sharing (preview and edit are separate paths: a read is never saved over); - .cluepack export/import with per-row resolvability previews; - a source runtime that owns dependency installs and connection authorization (gh, lark-cli device code) and only probes on an explicit read; - the public betterSidebarClues service and the windows capability (features gains clues / windowHost). Merged with upstream rather than over it: - the settings section keeps upstream's start-page takeover group and this branch's clue sources group; navigation is now six groups; - the dictionaries keep both sides' new keys (1211 each, verified equal across all 19), the external-plugin guide and CHANGELOG keep both histories, and service features list both capability sets. Adapted to 0.2.2-rc.2: - menu call sites use anchorPoint instead of getAnchorRect; - the shared SelectMenu mounts the host menu only while open, because rc.2's Menu reads the DOM during render and broke server-rendered settings surfaces; - the submenu flip workaround stays deleted (the host positions submenus now), pinned by an updated layout-css assertion. Version 0.33.0 (three synced spots) with a new 未发布 / Unreleased changelog section; package.json regains the ./clues export, lib/clues.js and the uqr dependency that upstream never had. Gates: typecheck, lint, 5410 unit tests, build, check:consumer-types and the full mount lane (35 passed) against dsh 0.2.2-rc.2 in Chromium.
41 lines
1.7 KiB
TypeScript
41 lines
1.7 KiB
TypeScript
/**
|
|
* layout.css must let the DSH conversation column shrink below its content
|
|
* size. Without min-height:0 a long unbreakable URL grows the grid item
|
|
* past the viewport and clips the composer.
|
|
*/
|
|
import { readFileSync } from 'node:fs'
|
|
import { describe, expect, it } from 'vitest'
|
|
|
|
const css = readFileSync('src/client/layout.css', 'utf8')
|
|
|
|
describe('layout.css conversation column', () => {
|
|
it('leaves submenu placement to the host instead of flip-flopping it in CSS', () => {
|
|
// DSH 0.2.2-rc.2 positions menus from a CSS anchor and renders submenus in
|
|
// their own surface, so the plugin's old submenu flip/offset workaround was
|
|
// deleted (the call sites pass `anchorPoint` instead). A reintroduced rule
|
|
// would fight the host's own placement.
|
|
expect(css).not.toContain('data-dsh-sidebar-submenu')
|
|
})
|
|
it('targets the AppFrame center column through the shell-written tag', () => {
|
|
// The bottom-push rule anchors on the [data-dsh-center-col] tag the
|
|
// Sidebar shell's locator writes onto the measured column node (see
|
|
// Sidebar.tsx locate) — not on a `:has()` selector, whose cache
|
|
// invalidates on every #root subtree mutation (the streaming chat).
|
|
expect(css).toContain('[data-dsh-center-col]')
|
|
expect(css).not.toContain(':has(')
|
|
})
|
|
|
|
it('allows the center column to shrink and wrap long tokens', () => {
|
|
expect(css).toMatch(/min-height:\s*0/)
|
|
expect(css).toMatch(/overflow-wrap:\s*anywhere/)
|
|
})
|
|
|
|
it('leaves overflow ownership to the host conversation descendants', () => {
|
|
const conversationRule = css.match(
|
|
/#root \[data-dsh-center-col\][\s\S]*?\{([\s\S]*?)\n\}/,
|
|
)?.[1]
|
|
expect(conversationRule).toBeDefined()
|
|
expect(conversationRule).not.toMatch(/(?:^|[;\s])overflow\s*:/)
|
|
})
|
|
})
|