mirror of
https://github.com/hanzo-apps/hanzo.ai.git
synced 2026-10-29 07:20:43 +00:00
This export carried a second copy of the builder at /dev — the composer,
a run's transcript and a project pane (app/(app)/dev and
components/workspace/{Build,Session,project}.tsx), plus DevStudio.tsx and
enter.ts, which nothing else used. They are deleted, and dev.hanzo.ai is no
longer published from this export.
Every link to the builder is DEV or dev(ref) from lib/host.ts. dev() carries
a run id or a project slug into the path only when it is exactly one, so no
caller can make it name another address. The shell's Dev tile, Projects and
Runs open it there; /code forwards there. The edge's permanent redirects for
hanzo.ai/dev, /code, dev.hanzo.ai and hanzo.app live in universe.
Gates and specs that drove the old /dev drive /chat where they tested the
shared shell, and are removed where the builder itself was the subject.
Co-authored-by: Hanzo Dev <[email protected]>
75 lines
3.0 KiB
TypeScript
75 lines
3.0 KiB
TypeScript
import { expect, test } from '@playwright/test'
|
|
import { signIn } from './session'
|
|
|
|
|
|
test.describe('beside the room', () => {
|
|
test.beforeEach(async ({ page }) => {
|
|
await signIn(page)
|
|
})
|
|
|
|
test('opens a column the room fills, sizes it, and shuts it', async ({ page }) => {
|
|
await page.setViewportSize({ width: 1440, height: 900 })
|
|
await page.goto('/chat')
|
|
await page.waitForLoadState('networkidle')
|
|
|
|
const open = page.getByRole('button', { name: 'Open side panel' })
|
|
await expect(open).toBeVisible({ timeout: 30_000 })
|
|
|
|
// Nothing stands beside the room until it is asked for.
|
|
await expect(page.getByRole('separator', { name: 'Resize side panel' })).toHaveCount(0)
|
|
|
|
await open.click()
|
|
|
|
// The frame opened a column, and the ROOM put its own content in it.
|
|
const edge = page.getByRole('separator', { name: 'Resize side panel' })
|
|
await expect(edge).toBeVisible({ timeout: 10_000 })
|
|
const column = page.locator('aside')
|
|
await expect(column).toContainText('Answering')
|
|
await expect(column).toContainText('Work')
|
|
|
|
// The same control, mirrored: on the right edge, LEFT widens.
|
|
const before = await edge.evaluate((el) => el.parentElement!.getBoundingClientRect().width)
|
|
await edge.focus()
|
|
for (let i = 0; i < 4; i++) await edge.press('ArrowLeft')
|
|
await expect
|
|
.poll(() => edge.evaluate((el) => el.parentElement!.getBoundingClientRect().width))
|
|
.toBeGreaterThan(before)
|
|
|
|
// And the button that opened it says what it now does.
|
|
await page.getByRole('button', { name: 'Close side panel' }).click()
|
|
await expect(page.getByRole('separator', { name: 'Resize side panel' })).toHaveCount(0)
|
|
})
|
|
|
|
// A ROOM THAT CAN OPEN THE COLUMN MUST FILL IT, and three rooms have now
|
|
// failed to in turn: /chat lost its panel when the workspace was unified,
|
|
// /dev's idle pane "opened onto a blank strip" (Build.tsx says so in its own
|
|
// comment), and a run filled nothing at all. The frame owning the column and
|
|
// the room owning its contents is the right split, and this is the half of it
|
|
// that no gate could see — the export ships the frame, so a static check
|
|
// passes while every reader gets an empty strip.
|
|
//
|
|
// What is asserted is that SOMETHING is there, never which words: each room
|
|
// says its own thing and a copy check would go red on every rewrite.
|
|
for (const [room, url] of [
|
|
['chat', '/chat'],
|
|
] as const) {
|
|
test(`${room} fills the column it opens`, async ({ page }) => {
|
|
await page.setViewportSize({ width: 1440, height: 900 })
|
|
await page.goto(url)
|
|
await page.waitForLoadState('networkidle').catch(() => {})
|
|
|
|
const open = page.getByRole('button', { name: 'Open side panel' })
|
|
await expect(open).toBeVisible({ timeout: 30_000 })
|
|
await open.click()
|
|
|
|
const column = page.locator('aside').first()
|
|
await expect(column).toBeVisible({ timeout: 10_000 })
|
|
await expect
|
|
.poll(async () => (await column.innerText().catch(() => '')).trim().length, {
|
|
timeout: 15_000,
|
|
})
|
|
.toBeGreaterThan(0)
|
|
})
|
|
}
|
|
})
|