Automations: move from Settings to a sidebar workspace with a task dropdown
The Automations caret in the main sidebar lists the user's tasks (status dot, persisted expand state, live refresh via AUTOMATIONS_CHANGED) and deep-links /automations?task=<id>, which scrolls to the card and highlights it. The management surface (compiler, task list, run history) moves to the standalone /automations route; the settings tab is removed and legacy ?tab=automations deep links redirect. Assistant proposal creation notifies the sidebar too. README/RUNNING/help wording follows; browser regression covers the dropdown, deep link, redirect and mobile overflow.
This commit is contained in:
+35
-2
@@ -74,6 +74,13 @@ const carddavSuggestions = [{ kind: 'nextcloud', name: 'Nextcloud contacts', url
|
||||
// origin is normalized, per-user DAV roots composed server-side, repeat
|
||||
// connects report "exists", and a wrong password stores nothing.
|
||||
let lastNextcloudConnect = null
|
||||
// Automations fixture: the sidebar dropdown and the /automations workspace
|
||||
// exercise against the same projection handlers/agent.go returns.
|
||||
const agentTasks = [{
|
||||
id: 'task-1', name: 'Watch the price', summary: 'Checks flights.example hourly and emails when below $400',
|
||||
spec: { condition: { type: 'url_watch', url: 'https://flights.example/q/123', question: 'price?', op: 'lt', threshold: 400 }, action: { type: 'email', to: 'david@email.com' }, pollMinutes: 60, once: false },
|
||||
enabled: true, status: 'active', fireCount: 2, lastCheckedAt: '2026-11-23T00:00:00Z', lastFiredAt: null, version: 1, createdAt: '2026-11-20T00:00:00Z',
|
||||
}]
|
||||
// The identity is mutable: Settings → Profile PATCHes it, and the NextAuth
|
||||
// jwt "update" trigger re-reads it from /api/me (session name refresh).
|
||||
const fixtureUser = {
|
||||
@@ -312,6 +319,14 @@ const api = http.createServer(async (req, res) => {
|
||||
results[key] = { status: 'created', id: conn.id, name: conn.name, url: u }
|
||||
}
|
||||
result = { results }
|
||||
} else if (url.pathname === '/api/agent/tasks') {
|
||||
result = agentTasks
|
||||
} else if (url.pathname === '/api/agent/runs') {
|
||||
result = []
|
||||
} else if (url.pathname === '/api/notifications/channels') {
|
||||
result = []
|
||||
} else if (url.pathname === '/api/ai/status') {
|
||||
result = { effective: 'user' }
|
||||
} else if (url.pathname === '/api/tags') result = tags
|
||||
else if (url.pathname === '/api/kanban/columns') result = kanbanColumns
|
||||
else if (/^\/api\/kanban\/cards\/[^/]+$/.test(url.pathname) && req.method === 'PUT') {
|
||||
@@ -877,6 +892,24 @@ try {
|
||||
await page.getByText('House docs').first().waitFor()
|
||||
console.log('PASS: Settings → Nextcloud connects files/calendars/contacts with one credential, syncs via the sibling surfaces, stays idempotent and never echoes the password')
|
||||
|
||||
// Automations moved from Settings to the sidebar: the caret drops down to
|
||||
// the user's tasks, a task deep-links to /automations?task=<id> with the
|
||||
// card highlighted, the legacy settings deep link redirects, and the
|
||||
// settings tab is gone.
|
||||
await page.getByRole('button', { name: 'Expand Automations' }).click()
|
||||
await page.getByRole('link', { name: 'Watch the price' }).waitFor()
|
||||
await page.getByRole('link', { name: 'Watch the price' }).click()
|
||||
await page.waitForURL('**/automations?task=task-1')
|
||||
await page.getByText('Hey Superbrain').waitFor()
|
||||
await page.getByText('Your automations').waitFor()
|
||||
assert.ok(await page.locator('#automation-task-1').evaluate(el => el.className.includes('ring-1')), 'deep-linked task card not highlighted')
|
||||
await page.goto(`${base}/settings?tab=automations`)
|
||||
await page.waitForURL('**/automations')
|
||||
await page.goto(`${base}/settings`)
|
||||
await page.getByRole('tab', { name: 'Profile' }).click()
|
||||
assert.equal(await page.getByRole('tab', { name: 'Automations', exact: true }).count(), 0, 'Automations tab still present in Settings')
|
||||
console.log('PASS: Automations lives in the sidebar with a task dropdown, deep-links to /automations, and the legacy settings tab redirects')
|
||||
|
||||
// Mobile pass (390x844): the shell becomes a drawer, tables become cards,
|
||||
// rail screens become master-detail, and NO screen may overflow the
|
||||
// viewport horizontally. A separate context keeps the desktop session and
|
||||
@@ -923,7 +956,7 @@ try {
|
||||
await mobile.getByRole('button', { name: 'Back', exact: true }).click()
|
||||
await mobile.getByPlaceholder('New tag').waitFor()
|
||||
|
||||
// Settings: the 12-tab strip scrolls inside its own container; deep tabs
|
||||
// Settings: the tab strip scrolls inside its own container; deep tabs
|
||||
// remain reachable and the page itself never overflowed.
|
||||
await mobile.goto(`${base}/settings`)
|
||||
await mobile.getByRole('tab', { name: 'WebDAV' }).scrollIntoViewIfNeeded()
|
||||
@@ -939,7 +972,7 @@ try {
|
||||
await noOverflow('kanban')
|
||||
|
||||
// Remaining screens: no horizontal overflow.
|
||||
for (const path of ['/calendar', '/collections', '/contacts']) {
|
||||
for (const path of ['/calendar', '/collections', '/contacts', '/automations']) {
|
||||
await mobile.goto(`${base}${path}`)
|
||||
await new Promise(resolve => setTimeout(resolve, 400))
|
||||
await noOverflow(path)
|
||||
|
||||
Reference in New Issue
Block a user