From 9123111b3787ed10c085117967742f4ab42b8bd5 Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Tue, 18 Aug 2026 15:52:12 +0900 Subject: [PATCH] fix(ui): improve suite interaction and layout in explorer tree (#10970) Co-authored-by: Hiroshi Ogawa <4232207+hi-ogawa@users.noreply.github.com> Co-authored-by: OpenCode --- .../components/explorer/ExplorerItem.vue | 42 ++++++++----------- test/ui/test/ui.spec.ts | 16 +++++++ 2 files changed, 34 insertions(+), 24 deletions(-) diff --git a/packages/ui/client/components/explorer/ExplorerItem.vue b/packages/ui/client/components/explorer/ExplorerItem.vue index 1a6b9ed3d..5215b69ea 100644 --- a/packages/ui/client/components/explorer/ExplorerItem.vue +++ b/packages/ui/client/components/explorer/ExplorerItem.vue @@ -64,7 +64,6 @@ const failedSnapshot = computed(() => { function toggleOpen() { if (!expandable) { - onItemClick?.(task.value!) return } @@ -95,17 +94,14 @@ function updateSnapshot(task: Task) { return client.rpc.updateSnapshot(task.file) } -const data = computed(() => { - return indent <= 0 ? [] : Array.from({ length: indent }, (_, i) => `${taskId}-${i}`) -}) const gridStyles = computed(() => { - const entries = data.value const gridColumns: string[] = [] - // folder icon - if (type === 'file' || type === 'suite') { - gridColumns.push('min-content') + // allocate zero-width columns to simulate indentation via grid gap + for (let i = 0; i < indent; i++) { + gridColumns.push('0') } - + // all items have collapse/expand icon equivalent spacing + gridColumns.push('min-content') // status icon gridColumns.push('min-content') // typecheck icon @@ -116,11 +112,7 @@ const gridStyles = computed(() => { gridColumns.push('minmax(0, 1fr)') // action buttons gridColumns.push('min-content') - - // all the vertical lines with width 1rem and mx-2: always centered - return `grid-template-columns: ${ - entries.map(() => '1rem').join(' ') - } ${gridColumns.join(' ')};` + return `grid-template-columns: ${gridColumns.join(' ')};` }) const runButtonTitle = computed(() => { @@ -206,13 +198,21 @@ const tagsBgGradient = computed(() => { :aria-label="name" :data-current="current" data-testid="explorer-item" - @click="toggleOpen()" + @click="onItemClick?.(task)" > -
-
+
+
@@ -294,12 +294,6 @@ const tagsBgGradient = computed(() => {