| 973 |
975
|
|
return task.id;
|
| 974 |
976
|
|
};
|
| 975 |
977
|
|
|
| 976 |
|
- |
it("sits directly under the delegate row while a child runs", async () => {
|
|
978
|
+ |
it("puts a running child in the right column, beside the conversation", async () => {
|
| 977 |
979
|
|
const rows = await driveDelegated((registry) => {
|
| 978 |
980
|
|
registerChild(registry);
|
| 979 |
981
|
|
});
|
| 980 |
982
|
|
|
| 981 |
|
- |
const delegateRow = rows.findIndex((row) => row.includes("delegate"));
|
| 982 |
|
- |
expect(delegateRow).toBeGreaterThan(0);
|
| 983 |
|
- |
const childRow = rows[delegateRow + 1] ?? "";
|
| 984 |
|
- |
expect(childRow).toContain("inspect the repo");
|
| 985 |
|
- |
expect(childRow).toContain("Initializing");
|
|
983
|
+ |
const heading = rows.find((row) => row.includes("children"));
|
|
984
|
+ |
expect(heading).toBeDefined();
|
|
985
|
+ |
expect(heading).toContain("1 working");
|
|
986
|
+ |
|
|
987
|
+ |
const at = rows.findIndex((row) => row.includes("inspect the repo"));
|
|
988
|
+ |
expect(at).toBeGreaterThan(0);
|
|
989
|
+ |
// Beside, not below: the divider is to its left, so the transcript still
|
|
990
|
+ |
// has the row it is on.
|
|
991
|
+ |
expect(rows[at]).toContain("│");
|
|
992
|
+ |
// A child that has not called a tool yet still says what it is doing.
|
|
993
|
+ |
expect(rows[at + 1] ?? "").toContain("Initializing");
|
|
994
|
+ |
|
| 986 |
995
|
|
// The session status lives at the bottom and does not repeat the fleet.
|
| 987 |
996
|
|
const bottom = rows.filter((row) => row.includes("repo · main")).at(-1) ?? "";
|
| 988 |
997
|
|
expect(bottom).toContain("repo · main");
|
| 989 |
998
|
|
expect(bottom).not.toContain("1 agent");
|
| 990 |
999
|
|
});
|
| 991 |
1000
|
|
|
|
1001
|
+ |
it("says it once: the fleet is in the column or in the feed, never both", async () => {
|
|
1002
|
+ |
const rows = await driveDelegated((registry) => {
|
|
1003
|
+ |
registerChild(registry);
|
|
1004
|
+ |
});
|
|
1005
|
+ |
|
|
1006
|
+ |
// The inline block drew the child directly under the `delegate` row. With
|
|
1007
|
+ |
// a column open that would be the same child twice on one screen.
|
|
1008
|
+ |
const delegateRow = rows.findIndex((row) => row.includes("delegate"));
|
|
1009
|
+ |
expect(delegateRow).toBeGreaterThan(0);
|
|
1010
|
+ |
const under = rows[delegateRow + 1] ?? "";
|
|
1011
|
+ |
expect(under).not.toContain("inspect the repo");
|
|
1012
|
+ |
|
|
1013
|
+ |
const mentions = rows.filter((row) => row.includes("inspect the repo"));
|
|
1014
|
+ |
expect(mentions).toHaveLength(1);
|
|
1015
|
+ |
});
|
|
1016
|
+ |
|
|
1017
|
+ |
it("falls back to the feed on a terminal too narrow for a column", async () => {
|
|
1018
|
+ |
// A fleet with nowhere to go is worse than one read in the feed, and a
|
|
1019
|
+ |
// column carved out of eighty would leave the transcript wrapping.
|
|
1020
|
+ |
const rows = await driveDelegated((registry) => {
|
|
1021
|
+ |
registerChild(registry);
|
|
1022
|
+ |
}, 80);
|
|
1023
|
+ |
|
|
1024
|
+ |
expect(rows.some((row) => row.includes("children"))).toBe(false);
|
|
1025
|
+ |
|
|
1026
|
+ |
const delegateRow = rows.findIndex((row) => row.includes("delegate"));
|
|
1027
|
+ |
expect(delegateRow).toBeGreaterThan(0);
|
|
1028
|
+ |
expect(rows[delegateRow + 1] ?? "").toContain("inspect the repo");
|
|
1029
|
+ |
});
|
|
1030
|
+ |
|
| 992 |
1031
|
|
it("previews the child's latest activity one line per thing, three lines at most", async () => {
|
| 993 |
1032
|
|
const rows = await driveDelegated((registry) => {
|
| 994 |
1033
|
|
const id = registerChild(registry);
|