refactor(web): reorganize phases + fix Open-your-node URL
Move sections to where they read better: - Phase 1 (Team registration): drop the "Your Agent" block. - Phase 2 (Meet your agent): host the "Your Agent" section (say-hi / Telegram / voice) AND the agent chat under it; remove "Pick your domain". - Module 1 (Domain & events): "Pick your domain" moves here (no more read-only carry) alongside the ADD Layer 1 card. - Module 2 (Skills & policies): the chat is gone; the L2/L3 ADD cards show directly (still auto-prefilled if the three prompts ran in Meet your agent). Also: OpenYourNode opens the browser-reachable board URL. In self-host/USB mode the stored url is container-facing (host.docker.internal) which the browser can't resolve — derive the current host on :8080 instead. Tests updated. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
48b88b0f0d
commit
4dd3681eef
@@ -35,13 +35,10 @@ describe('Module1', () => {
|
||||
expect(screen.getByRole('heading', { name: /domain.*events/i })).toBeInTheDocument()
|
||||
})
|
||||
|
||||
it('shows the domain carried over from the earlier screen (read-only)', () => {
|
||||
useSession.getState().setDomain('air quality')
|
||||
it('lets you pick the domain here (no read-only carry)', () => {
|
||||
renderPage()
|
||||
const carried = screen.getByTestId('domain-carried')
|
||||
expect(carried).toHaveTextContent('air quality')
|
||||
// no editable domain input here anymore
|
||||
expect(screen.queryByLabelText(/your domain/i)).toBeNull()
|
||||
expect(screen.queryByTestId('domain-carried')).toBeNull()
|
||||
expect(screen.getByPlaceholderText(/image measurement|structural stress|air quality/i)).toBeInTheDocument()
|
||||
})
|
||||
|
||||
it('focuses on Layer 1 — no live board feed or actor map cards', () => {
|
||||
@@ -50,12 +47,13 @@ describe('Module1', () => {
|
||||
expect(screen.queryByTestId('actor-map')).toBeNull()
|
||||
})
|
||||
|
||||
it('gates Proceed until the board is online and L1 is filled', async () => {
|
||||
it('gates Proceed until the board is online, a domain is named, and L1 is filled', async () => {
|
||||
const user = userEvent.setup()
|
||||
renderPage()
|
||||
const proceed = screen.getByRole('button', { name: /proceed/i })
|
||||
expect(proceed).toBeDisabled()
|
||||
|
||||
act(() => useSession.getState().setDomain('resonance'))
|
||||
await user.type(screen.getByLabelText(/layer 1/i), 'structural resonance')
|
||||
expect(proceed).toBeDisabled() // board not online yet
|
||||
|
||||
|
||||
Reference in New Issue
Block a user