style(web): refine subagent navigation chrome
This commit is contained in:
@@ -20,7 +20,7 @@
|
|||||||
* suite only proves the assembled wiring.
|
* suite only proves the assembled wiring.
|
||||||
*/
|
*/
|
||||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
|
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
|
||||||
import { cleanup, fireEvent, waitFor } from '@testing-library/react'
|
import { cleanup, fireEvent, waitFor, within } from '@testing-library/react'
|
||||||
import { LocaleService } from '@deepseek-ai/dsh-client-locale/client'
|
import { LocaleService } from '@deepseek-ai/dsh-client-locale/client'
|
||||||
import type { ISession, SessionId, TodoItem, ToolResultNode } from '@deepseek-ai/dsh-client-runtime/client'
|
import type { ISession, SessionId, TodoItem, ToolResultNode } from '@deepseek-ai/dsh-client-runtime/client'
|
||||||
import type { PropsRenderSlots } from '@deepseek-ai/dsh-client-ui-slots'
|
import type { PropsRenderSlots } from '@deepseek-ai/dsh-client-ui-slots'
|
||||||
@@ -256,14 +256,17 @@ describe('prompt rejection through the assembled composer', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
describe('title projection across assembled surfaces', () => {
|
describe('title projection across assembled surfaces', () => {
|
||||||
it('one summary update re-labels the current-session heading', async () => {
|
it('one summary update re-labels the current-session crumb', async () => {
|
||||||
const runtime = await bench([])
|
const runtime = await bench([])
|
||||||
const view = runtime.renderRoot()
|
const view = runtime.renderRoot()
|
||||||
expect(view.getByRole('heading', { name: 'S', level: 1 })).toBeTruthy()
|
const hierarchy = view.getByRole('navigation', { name: '会话层级' })
|
||||||
|
expect(within(hierarchy).getByRole('button', { name: 'S' }).hasAttribute('disabled')).toBe(true)
|
||||||
|
|
||||||
await runtime.sessions.updateSummary(SID, { displayTitle: '修订标题', title: '修订标题' })
|
await runtime.sessions.updateSummary(SID, { displayTitle: '修订标题', title: '修订标题' })
|
||||||
await waitFor(() => { expect(view.getByRole('heading', { name: '修订标题', level: 1 })).toBeTruthy() })
|
await waitFor(() => {
|
||||||
expect(view.queryByRole('heading', { name: 'S', level: 1 })).toBeNull()
|
expect(within(hierarchy).getByRole('button', { name: '修订标题' }).hasAttribute('disabled')).toBe(true)
|
||||||
|
})
|
||||||
|
expect(within(hierarchy).queryByRole('button', { name: 'S' })).toBeNull()
|
||||||
await runtime.dispose()
|
await runtime.dispose()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
width: 336px;
|
width: 336px;
|
||||||
max-width: min(400px, calc(100vw - 32px));
|
max-width: min(400px, calc(100vw - 32px));
|
||||||
max-height: min(560px, calc(100vh - 140px));
|
max-height: min(560px, calc(100vh - 140px));
|
||||||
padding: 6px;
|
padding: 4px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
border: 1px solid var(--dsw-alias-border-l2);
|
border: 1px solid var(--dsw-alias-border-l2);
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 50px;
|
min-height: 50px;
|
||||||
padding: 7px 8px;
|
padding: 7px 8px 7px 3px;
|
||||||
border: 0;
|
border: 0;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
@@ -154,17 +154,40 @@
|
|||||||
|
|
||||||
.children {
|
.children {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-left: 15px;
|
margin-left: 10px;
|
||||||
padding-left: 11px;
|
padding-left: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.children::before,
|
||||||
|
.children > .node::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
border-left: 1px solid var(--dsw-alias-border-l2);
|
border-left: 1px solid var(--dsw-alias-border-l2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.children::before {
|
||||||
|
top: -26px;
|
||||||
|
height: 26px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.children > .node::before {
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: -4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.children > .node:last-child::before {
|
||||||
|
bottom: auto;
|
||||||
|
height: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
.children > .node > .row::before {
|
.children > .node > .row::before {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 24px;
|
top: 24px;
|
||||||
left: -12px;
|
left: -4px;
|
||||||
width: 9px;
|
width: 7px;
|
||||||
border-top: 1px solid var(--dsw-alias-border-l2);
|
border-top: 1px solid var(--dsw-alias-border-l2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user