From 8aa4ae32b19a200cebf847c028c65f0f9e708de1 Mon Sep 17 00:00:00 2001 From: Menghuan1918 Date: Tue, 24 Nov 2026 11:32:47 +0800 Subject: [PATCH] chore: reconcile the clues line with dev's newest client surfaces Upstream moved under the branch while it was being rebased: the changes lens grew its own underline tabs (#1236) and kept ONE native branch select (#944), the task graph squared its controls (#948), the host admission call moved to rc.3's admit fallback, and the graph viewport got a fixed 248px floor. Where the two designs collided this takes upstream's newer chrome and re-applies the branch's kit only where it defines our own surfaces. - changes/GitGraphSection: keep the branch's kit buttons but restore the native branch select, and give it token colours plus the 32px / 44px touch sizes so it stops falling back to the OS chrome in a dark panel. - sidebar/dock-fallback: upstream's 28px host-matched geometry plus the branch's 44px coarse-pointer target (no longer a 32px base). - ui/workbench-section: the disclosure bar is exactly 28px INCLUDING its divider, so the sections keep the heights the changes graph measures. - tests: theme.spec, dock-fallback, git-graph-ui and git-view-worktree follow upstream's newer shapes; the surface sweep stops demanding one identical tab for upstream's underline lens strip, and the graph e2e clicks the shared section disclosure instead of the old div > button. --- src/client/changes/GitGraphSection.tsx | 17 +++++----- src/client/changes/graph.module.css | 20 +++++++++++- src/client/sidebar/dock-fallback.tsx | 2 +- src/client/ui/workbench-section.module.css | 3 ++ tests/dock-fallback.spec.tsx | 19 ++++++----- tests/e2e/git-graph.e2e.ts | 4 ++- tests/e2e/global-uiux.e2e.ts | 20 ++++++++---- tests/git-graph-ui.spec.tsx | 25 ++++++--------- tests/git-view-worktree.spec.tsx | 5 ++- tests/theme.spec.ts | 37 ++++++++++++++-------- 10 files changed, 91 insertions(+), 61 deletions(-) diff --git a/src/client/changes/GitGraphSection.tsx b/src/client/changes/GitGraphSection.tsx index d5ddf10f..9b6968f2 100644 --- a/src/client/changes/GitGraphSection.tsx +++ b/src/client/changes/GitGraphSection.tsx @@ -14,7 +14,7 @@ import { import { api, SidebarApiError, type SessionScope } from '../api.ts' import type { SidebarDiffRef } from '../state.ts' import { relativeTime, t } from '../locales.ts' -import { ActionButton, Notice, SelectMenu } from '../ui/index.ts' +import { ActionButton, Notice } from '../ui/index.ts' import { AnchoredPopover } from '../AnchoredPopover.tsx' import { edgePath, layoutGraph } from './graph-layout.ts' import { createFrameBatcher } from '../frame-batcher.ts' @@ -351,13 +351,12 @@ export function GitGraphSection({ scope, worktree, visible, refreshTick = 0, onP data-graph-count={page?.entries.length ?? 0}>
{linearFallback && {t('graphLinearFallback')}} - {!linearFallback && ({ value: item.ref, label: item.name })), - ...(branch && !branches.some(item => item.ref === branch) ? [{ value: branch, label: branch }] : []), - ]} />} + {!linearFallback && }
{ @@ -370,7 +369,7 @@ export function GitGraphSection({ scope, worktree, visible, refreshTick = 0, onP { if (stale || !failedAppend.current) setRetry(value => value + 1); else void request(true) }}>{t('retry')}
} {loading && {t('loading')}} - {!loading && !error && page !== null && page.entries.length === 0 && {t(page.isRepo ? 'graphEmpty' : 'notRepo')}} + {!loading && !error && page !== null && page.entries.length === 0 &&
{t(page.isRepo ? 'graphEmpty' : 'notRepo')}
} {range.top > 0 &&