feat(transcription): wire dropdown search input to editor @-text
For issue #380. The search input mirrors the @-text the user types until the user takes ownership by typing into the input itself. After that, the input owns its own state and editor typing no longer overrides it. Two empty states now exist: - "Namen eingeben…" when the search input is empty (AC-4) - "Keine Personen gefunden" when the search input has a query but the list is empty (existing behavior) The dropdown reads editorQuery through the shared $state proxy via a getter prop, matching the established pattern for model.items. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -161,6 +161,21 @@ describe('PersonMentionEditor — typeahead', () => {
|
||||
});
|
||||
});
|
||||
|
||||
// ─── AC-1: search input prefilled with text typed after @ ───────────────────
|
||||
|
||||
describe('PersonMentionEditor — AC-1: search input prefill', () => {
|
||||
it('prefills the dropdown search input with the text typed after @', async () => {
|
||||
mockFetchEmpty();
|
||||
renderHost();
|
||||
|
||||
await userEvent.type(page.getByRole('textbox'), '@WdG');
|
||||
|
||||
await vi.waitFor(async () => {
|
||||
await expect.element(page.getByRole('searchbox')).toHaveValue('WdG');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// ─── AC-1: typed text becomes displayName, not DB name ───────────────────────
|
||||
|
||||
describe('PersonMentionEditor — AC-1: typed text as displayName', () => {
|
||||
|
||||
Reference in New Issue
Block a user