feat(manager): remove the KDS page; app cards lead to pairing a screen (platform-v2 3.2d)

- Deleted pages/KdsPage.jsx, its /kds route, nav entry and text: the kitchen display
  runs only on paired screens (D-25).
- Apps: cards of apps that run on a screen get "Set up a screen" (core.devices.manage)
  → /devices?pair=<app>, which opens the pair dialog on that app.
- manager.mjs: no "Open" on the KDS card, "Set up a screen" lands on the pair dialog,
  /kds is gone; the module-off rule stays covered by the Notes checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-14 20:46:50 +02:00
co-authored by Claude Opus 5.5
parent 6b237fd169
commit b1112b249e
9 changed files with 36 additions and 3049 deletions
+11 -10
View File
@@ -150,7 +150,16 @@ try {
r.check('apps: turning off Ordering first lists what stops with it', ['Kitchen display', 'Waiter app', 'Pricing'].every(n => stopped.includes(n)), stopped)
await page.getByRole('dialog').getByRole('button', { name: 'Cancel' }).click()
r.check('apps: Cancel leaves Ordering on', await card('ordering').getAttribute('data-state') === 'on')
r.check('apps: a card with a page has "Open" (KDS)', await card('kds').getByRole('button', { name: 'Open' }).count() === 1)
// 3.2d: the KDS lives on paired screens only; its card leads to pairing one
r.check('apps: the KDS card has no "Open" (no KDS page in the manager)', await card('kds').getByRole('button', { name: 'Open' }).count() === 0)
await card('kds').getByRole('button', { name: 'Set up a screen' }).click()
await page.getByLabel('App to run').waitFor({ timeout: 8000 }).catch(() => {})
r.check('apps: "Set up a screen" → Devices with the pair dialog on the kitchen display',
new URL(page.url()).pathname === '/devices' && await page.getByLabel('App to run').inputValue().catch(() => '') === 'kds', page.url())
await page.getByRole('dialog').getByRole('button', { name: 'Cancel' }).click()
await page.goto(`${APP}/kds`)
await sleep(1500)
r.check('apps: /kds is no longer a manager page', await page.getByTestId('app-kds').count() === 0 && !(await page.content()).includes('kds-board'))
// ── 2.6c: Integrations and License ─────────────────────────────────────────
await page.goto(`${APP}/integrations`)
@@ -256,16 +265,8 @@ try {
await page.getByTestId('lock-screen').count() === 0 && new URL(page.url()).pathname === '/dashboard'
&& await page.evaluate(() => localStorage.getItem('manager_token')) === tokenBeforeLock)
// ── A module turned off: /kds shows the "turned off" screen ────────────────
// ("a module turned off shows its page as turned off" is checked with Notes above; the KDS page went in 3.2d)
const mgr = await page.evaluate(() => localStorage.getItem('manager_token'))
await api('PUT', '/api/platform/modules/kds', { token: mgr, body: { enabled: false } })
await page.goto(`${APP}/kds`)
await sleep(2000)
r.check('kds off → "feature turned off" screen', await page.locator('.x-empty__title').count() === 1, await page.locator('body').innerText().then(t => t.slice(0, 80)))
await api('PUT', '/api/platform/modules/kds', { token: mgr, body: { enabled: true } })
await page.goto(`${APP}/kds`)
await sleep(2000)
r.check('kds on again → the KDS renders', await page.locator('.x-empty__title').count() === 0)
// ── 2.6b: five wrong PINs on the lock screen end the session ───────────────
await page.goto(`${APP}/dashboard`)