fix(maestro): fold the sole root sidebar folder into its own children
~ never distinguishes anything from a sibling — nothing else sits beside it — so it showed as its own header even when it immediately branched into multiple real projects. Now it folds into each child instead, at the top only; a real divergence further down still gets its own header.
This commit is contained in:
@@ -39,6 +39,16 @@ describe("buildTree", () => {
|
||||
expect(names(root)).toEqual(["~/git/naps62/maestro"]);
|
||||
});
|
||||
|
||||
it("folds the sole root folder into each of its own children when it branches", () => {
|
||||
const root = buildTree(
|
||||
[session("a", "/home/n/subvisual/bullish"), session("b", "/home/n/tea/maestro")],
|
||||
"/home/n",
|
||||
"",
|
||||
) as TreeFolder;
|
||||
|
||||
expect(names(root).sort()).toEqual(["~/subvisual/bullish", "~/tea/maestro"]);
|
||||
});
|
||||
|
||||
it("stops collapsing where a directory branches", () => {
|
||||
const root = buildTree(
|
||||
[session("a", "/home/n/git/one"), session("b", "/home/n/git/two")],
|
||||
|
||||
Reference in New Issue
Block a user