style(web): refine subagent navigation chrome
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
* suite only proves the assembled wiring.
|
||||
*/
|
||||
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 type { ISession, SessionId, TodoItem, ToolResultNode } from '@deepseek-ai/dsh-client-runtime/client'
|
||||
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', () => {
|
||||
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 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 waitFor(() => { expect(view.getByRole('heading', { name: '修订标题', level: 1 })).toBeTruthy() })
|
||||
expect(view.queryByRole('heading', { name: 'S', level: 1 })).toBeNull()
|
||||
await waitFor(() => {
|
||||
expect(within(hierarchy).getByRole('button', { name: '修订标题' }).hasAttribute('disabled')).toBe(true)
|
||||
})
|
||||
expect(within(hierarchy).queryByRole('button', { name: 'S' })).toBeNull()
|
||||
await runtime.dispose()
|
||||
})
|
||||
})
|
||||
@@ -41,7 +41,7 @@
|
||||
width: 336px;
|
||||
max-width: min(400px, calc(100vw - 32px));
|
||||
max-height: min(560px, calc(100vh - 140px));
|
||||
padding: 6px;
|
||||
padding: 4px;
|
||||
overflow: auto;
|
||||
border: 1px solid var(--dsw-alias-border-l2);
|
||||
border-radius: 12px;
|
||||
@@ -64,7 +64,7 @@
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
min-height: 50px;
|
||||
padding: 7px 8px;
|
||||
padding: 7px 8px 7px 3px;
|
||||
border: 0;
|
||||
border-radius: 8px;
|
||||
background: transparent;
|
||||
@@ -154,17 +154,40 @@
|
||||
|
||||
.children {
|
||||
position: relative;
|
||||
margin-left: 15px;
|
||||
padding-left: 11px;
|
||||
margin-left: 10px;
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
.children::before,
|
||||
.children > .node::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
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 {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 24px;
|
||||
left: -12px;
|
||||
width: 9px;
|
||||
left: -4px;
|
||||
width: 7px;
|
||||
border-top: 1px solid var(--dsw-alias-border-l2);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user