Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion apps/local-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"dependencies": {
"@alchemy.run/cloudflare": "catalog:alchemy",
"@floating-ui/dom": "1.8.0",
"@foldkit/ui": "0.170.0",
"@fontsource-variable/geist": "^5.3.0",
"@fontsource-variable/geist-mono": "^5.3.0",
"@maple/domain": "workspace:*",
Expand Down
18 changes: 1 addition & 17 deletions apps/local-ui/src/page/kit/log-sheet/log-sheet.scene.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import * as Animation from "@foldkit/ui/animation"
import { Option } from "effect"
import * as Dialog from "@maple/web/ui/dialog"
import * as Tabs from "@maple/web/ui/tabs"
import * as Tooltip from "@maple/web/ui/tooltip"
import { click, Command, expect as expectView, given, hover, Mount, role, scene, text, withViewInputs } from "foldkit/scene"
import { click, expect as expectView, given, Mount, role, scene, text, withViewInputs } from "foldkit/scene"
import { describe, expect, test } from "vitest"
import { Message } from "./message"
import type { LocalLog } from "./model"
Expand Down Expand Up @@ -48,20 +46,6 @@ describe("log detail sheet", () => {
scene({ update, view }, given(openLog(Option.none(), log("INFO")).model), ...mounted, expectView(role("button", { name: "Copy error message" })).not.toExist())
})

test("resting on the Log JSON copy button opens its tooltip", () => {
scene(
{ update, view },
given(openLog(Option.none(), log("INFO")).model),
...mounted,
hover(role("button", { name: "Copy Log JSON" })),
Command.resolve(Tooltip.WaitOpenDelay, Tooltip.Message.ElapsedOpenDelay({ generation: 1 })),
Mount.resolve(Tooltip.MountTooltip, Tooltip.Message.CompletedMountTooltip()),
Command.resolve(Animation.WaitForPaint, Animation.Message.CompletedWaitForPaint({ generation: 1 })),
Command.resolve(Animation.WaitForAnimationSettled, Animation.Message.EndedAnimation({ generation: 1 })),
expectView(text("Copy Log JSON")).toExist(),
)
})

test("the close button closes it; reopening on the same log keeps its expansion", () => {
const opened = openLog(Option.none(), log("ERROR"))
const expanded = update(opened.model, Message.ToggledBodyExpanded()).model
Expand Down
2 changes: 1 addition & 1 deletion apps/local-ui/src/page/traces/traces.scene.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ describe("local traces list", () => {
scene(
{ update: pageUpdate, view },
given(loaded([row("t1")]).model),
expectView(text("1")).toExist(),
expectView(role("link", { name: "Trace GET /" })).toExist(),
click(role("checkbox", { name: "Has error" })),
expectOutMessage(PageOutMessage.RequestedNavigation({ hash: "#/traces?errors=1", isReplace: true })),
)
Expand Down
31 changes: 0 additions & 31 deletions apps/web/src/lab/gcp-filter-lab/update.test.ts

This file was deleted.

14 changes: 0 additions & 14 deletions apps/web/src/lab/service-map-3d-lab/update.test.ts

This file was deleted.

17 changes: 0 additions & 17 deletions apps/web/src/lab/timeline-lab/timeline-lab.test.ts

This file was deleted.

1 change: 0 additions & 1 deletion bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ function Publisher({ items }: { items: readonly PlotLegendItem[] | null }) {
return <div data-testid="hoisted">{String(hoisted)}</div>
}

/** Records what the hook answers on every render, including the first. */
function Recorder({ onAnswer }: { onAnswer: (answer: boolean) => void }) {
onAnswer(usePlotLegendSlot(series))
return null
}

function hoisted(container: HTMLElement): string {
return container.querySelector("[data-testid='hoisted']")?.textContent ?? ""
}
Expand Down Expand Up @@ -75,13 +81,14 @@ describe("usePlotLegendSlot", () => {
it("answers during the first render, not a frame later", () => {
// The publish itself is an effect. If the answer were read back out of it
// the strip would paint and then withdraw, so this asserts the value is
// already correct in the DOM the very first commit produces.
const { container } = render(
// already correct on the very first render.
const answers: boolean[] = []
render(
<SlotHost>
<Publisher items={series} />
<Recorder onAnswer={(answer) => answers.push(answer)} />
</SlotHost>,
)
expect(hoisted(container)).not.toBe("")
expect(answers[0]).toBe(true)
})

it("carries the dashed flag through to the host", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ describe("buildElkGraph", () => {
it("flat graphs pack connected components (no hierarchy handling)", () => {
const graph = buildElkGraph([node("a"), node("b")], [edge("a", "b")], DEFAULT_LAYOUT_CONFIG)
expect(graph.layoutOptions!["elk.separateConnectedComponents"]).toBe("true")
expect(graph.layoutOptions!["elk.aspectRatio"]).toBe("1.8")
expect(graph.layoutOptions!["elk.hierarchyHandling"]).toBeUndefined()
expect(graph.children!.map((c) => c.id).sort()).toEqual(["a", "b"])
})
Expand Down Expand Up @@ -70,13 +69,6 @@ describe("buildElkGraph", () => {
const many = Array.from({ length: 301 }, (_, i) => node(`svc-${i}`))
const large = buildElkGraph(many, [], DEFAULT_LAYOUT_CONFIG)
expect(large.layoutOptions!["elk.layered.nodePlacement.strategy"]).toBe("BRANDES_KOEPF")
expect(large.layoutOptions!["elk.layered.thoroughness"]).toBe("3")
})

it("always uses deterministic ordering + cycle breaking", () => {
const graph = buildElkGraph([node("a")], [], DEFAULT_LAYOUT_CONFIG)
expect(graph.layoutOptions!["elk.layered.cycleBreaking.strategy"]).toBe("GREEDY_MODEL_ORDER")
expect(graph.layoutOptions!["elk.layered.considerModelOrder.strategy"]).toBe("NODES_AND_EDGES")
})
})

Expand Down
Loading