fix(web): align the context separator with ToolRow and name the caption

Review follow-ups on the context provenance row:

- the producer name now follows ToolRow's aria-hidden separator dot instead
  of a literal middot inside the text, so the two disclosure rows expose one
  accessible-name shape;
- the English steering caption becomes the noun `Interjection`, parallel to
  the Chinese 插话 and to the label this bubble carried before;
- the history fold gets its own provenance assertion, so the mapping it
  declares separately from TranscriptAdapter is pinned on both sides;
- the superseded-in-part bullet on the no-interjection-chrome note now
  enumerates the third Decision bullet too, whose no-badge and no-IconActions
  clauses had both lapsed.
This commit is contained in:
creatixchu
2026-08-04 18:25:44 +08:00
parent 95a89078d5
commit fab131a366
34 changed files with 105 additions and 71 deletions

View File

@@ -165,7 +165,7 @@ describe('MessageItem arms', () => {
} as never}
/>,
)
const disclosure = ctxView.getByRole('button', { name: /^上下文注入\s*· fixture$/ })
const disclosure = ctxView.getByRole('button', { name: /^上下文注入\s*fixture$/ })
expect(disclosure.getAttribute('aria-expanded')).toBe('false')
expect(ctxView.container.querySelector('[data-context-injection-body]')).toBeNull()
expect(ctxView.container.querySelector('svg')).not.toBeNull()
@@ -208,7 +208,7 @@ describe('MessageItem arms', () => {
} as never}
/>,
)
expect(view.getByRole('button', { name: /^跨会话召回\s*· 重构 loader$/ })).toBeTruthy()
expect(view.getByRole('button', { name: /^跨会话召回\s*重构 loader$/ })).toBeTruthy()
expect(view.queryByText('上下文注入')).toBeNull()
})
@@ -223,10 +223,10 @@ describe('MessageItem arms', () => {
} as never}
/>,
)
const disclosure = view.getByRole('button', { name: /^上下文注入\s*· AGENTS\.md$/ })
const disclosure = view.getByRole('button', { name: /^上下文注入\s*AGENTS\.md$/ })
fireEvent.click(disclosure)
expect(disclosure.getAttribute('aria-expanded')).toBe('true')
expect(view.container.querySelector('[data-context-source]')?.textContent).toBe('· AGENTS.md')
expect(view.container.querySelector('[data-context-source]')?.textContent).toBe('AGENTS.md')
})
it('a context source that names no producer shows the role alone', () => {