test(web): pin the parallel todo plan in the assembled application
The `+N` active count rides ToolRow's non-shrinking `summarySuffix` slot, but only jsdom package suites covered it: the ACP snapshots render no web surface and the built-boot smoke asserts no todo row. Add `apps/web/tests/todo-row.snapshot.ts`, which boots the built client bundles against the keyless fixture transport and records `summary`, `suffix`, and the plan strip's header as separate fields, so folding the count back into the summary string changes the expected output. The three assembled-jsdom files now share `apps/web/tests/assembled-boot.ts` instead of each carrying its own copy of the boot entry list, bundle map, jsdom stubs, and mount call. Also: name the policy branch in each `allowParallelInProgress` test title so no case asserting `true` sits under a `false` describe, reword the stale cap comment in todo-panel.spec.tsx, and record the plan strip's real header format in the Agent Note (per-status counts, not `<done>/<total> tasks`).
This commit is contained in:
@@ -140,13 +140,13 @@ describe('dsh-tool-todo', () => {
|
||||
expect(agent.session.events.findLast(e => e.type === 'todo/write')!.data.todos).toEqual(todos)
|
||||
})
|
||||
|
||||
describe('allowParallelInProgress: false', () => {
|
||||
describe('allowParallelInProgress', () => {
|
||||
const parallel = [
|
||||
{ content: 'run subagent a', status: 'in_progress' },
|
||||
{ content: 'run subagent b', status: 'in_progress' },
|
||||
]
|
||||
|
||||
it('rejects a call marking several items in_progress', async () => {
|
||||
it('false rejects a call marking several items in_progress', async () => {
|
||||
const ctx = await setup(false)
|
||||
const agent = agentWithSession('single-active')
|
||||
const result = await callTodo(ctx, { todos: parallel }, { agent })
|
||||
@@ -156,7 +156,7 @@ describe('dsh-tool-todo', () => {
|
||||
expect(agent.session.events.some(e => e.type === 'todo/write')).toBe(false)
|
||||
})
|
||||
|
||||
it('still accepts one active item', async () => {
|
||||
it('false still accepts one active item', async () => {
|
||||
const ctx = await setup(false)
|
||||
const todos: TodoItem[] = [
|
||||
{ content: 'run subagent a', status: 'in_progress' },
|
||||
@@ -166,7 +166,7 @@ describe('dsh-tool-todo', () => {
|
||||
expect(result.isError).toBe(false)
|
||||
})
|
||||
|
||||
it('an explicit true accepts a parallel write', async () => {
|
||||
it('true accepts the very list false rejects', async () => {
|
||||
const ctx = await setup(true)
|
||||
const result = await callTodo(ctx, { todos: parallel })
|
||||
expect(result.isError).toBe(false)
|
||||
|
||||
Reference in New Issue
Block a user