diff --git a/scripts/ui-flows.mjs b/scripts/ui-flows.mjs index b67a2d4..77481d0 100644 --- a/scripts/ui-flows.mjs +++ b/scripts/ui-flows.mjs @@ -84,11 +84,11 @@ await sw.click(); await p.waitForTimeout(800) check('resume clears Paused', !(await p.locator('.routine').innerText()).includes('Paused')) await p.locator('.routine').getByRole('button', { name: 'Run now' }).click() check('run now finishes', await until(async () => (await p.locator('.routine').getByRole('button', { name: 'Run now' }).count()) > 0 && (await p.locator('.rh-dots .dot').count()) > 0, 20000)) -await p.locator('.routine').getByRole('button', { name: 'Edit' }).click(); await p.waitForTimeout(400) +await p.locator('.routine').getByRole('button', { name: 'More for this routine' }).click(); await p.getByRole('menuitem', { name: 'Edit' }).click(); await p.waitForTimeout(400) const prompt = p.locator('.routine-inline textarea').first() await prompt.fill('Brief me on tech news, edited'); await p.locator('.routine-inline').getByRole('button', { name: /Save/ }).click(); await p.waitForTimeout(800) check('edit saved', (await main()).includes('edited')) -await p.getByRole('button', { name: 'Delete routine' }).click(); await p.waitForTimeout(200) +await p.getByRole('button', { name: 'More for this routine' }).click(); await p.getByRole('menuitem', { name: 'Delete…' }).click(); await p.waitForTimeout(200) await p.locator('.ask-box').getByRole('button', { name: 'Delete' }).click(); await p.waitForTimeout(800) check('routine deleted', (await p.locator('.routine').count()) === 0) diff --git a/ui/src/App.tsx b/ui/src/App.tsx index 96b00bd..d04b6c8 100644 --- a/ui/src/App.tsx +++ b/ui/src/App.tsx @@ -185,7 +185,8 @@ function Main() { // Clicking a bot opens a chat with it (on this computer); its settings are a right-click (or the gear by the // composer's bot picker) away. const talkTo = (id: number) => { setChatBot(id); setChatId(LOCAL); setIncognito(false); setViaBot(true); setView('chat'); setMenu(null) } - const botChat = viaBot && view === 'chat' && chat.chat_id === LOCAL + // Opened from a bot: it stays that bot's chat across the section tabs, so the header and sidebar don't jump. + const botChat = viaBot && inChat && chat.chat_id === LOCAL // A bot's right-click menu, or pause choices (for one bot, or all of them: id null). const [menu, setMenu] = useState<{ x: number; y: number; id: number | null; pick?: boolean } | null>(null) // A bot file being read before it's added (from a file, or a bot's own for Duplicate). @@ -258,7 +259,7 @@ function Main() {
Mimir{remoteServer() && server}