From efc0d191c68858757e9093dc606d10c50ead2002 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 23 Nov 2026 15:57:45 +0800 Subject: [PATCH] =?UTF-8?q?fix(ui):=20the=20=E9=9A=8F=E7=BC=98=E7=89=88=20?= =?UTF-8?q?tag=20stays=20in=20the=20corner=20of=20the=20active=20sidebar?= =?UTF-8?q?=20tile=20(BUG-2256)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DbBXp2U3BH1SxwAGyhhbe1 --- frontend/src/app/globals.css | 2 ++ frontend/tests/rect-casual-edition-2256.test.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/frontend/src/app/globals.css b/frontend/src/app/globals.css index c02ed5b67..dfeaf2bf5 100644 --- a/frontend/src/app/globals.css +++ b/frontend/src/app/globals.css @@ -8747,4 +8747,6 @@ button.report-ask-excerpt-toggle { height: 32px; padding: 0; color: var(--color- top-right corner of the sidebar tile. */ .secondary-header-tag { flex: none; padding: 3px 7px; border-radius: 999px; background: var(--color-canvas-muted); color: var(--color-ink-secondary); font-size: 12px; font-weight: 400; line-height: 1.2; white-space: nowrap; } .sidebar-nav-link:has(.sidebar-nav-tag) { position: relative; } +/* The active tile lifts its children with position: relative (.sidebar-nav-link[data-active] > :not(...)); the tag stays in the corner. */ +.sidebar-nav-link > .sidebar-nav-tag, .sidebar-nav-link[data-active="true"] > .sidebar-nav-tag { position: absolute; z-index: 2; } .sidebar-nav-tag { position: absolute; top: 4px; right: 4px; padding: 2px 5px; border-radius: 999px; background: var(--sidebar-solid, var(--color-canvas)); color: var(--color-ink-secondary); font-size: 10px; line-height: 1.2; white-space: nowrap; pointer-events: none; } diff --git a/frontend/tests/rect-casual-edition-2256.test.ts b/frontend/tests/rect-casual-edition-2256.test.ts index 9166fe94e..b31bb0721 100644 --- a/frontend/tests/rect-casual-edition-2256.test.ts +++ b/frontend/tests/rect-casual-edition-2256.test.ts @@ -17,6 +17,8 @@ test("生时纠正 says 随缘版 beside its title and on its sidebar tile", () const css = read("../src/app/globals.css"); assert.match(css, /\.secondary-header-tag \{/); assert.match(css, /\.sidebar-nav-tag \{/); + // The active tile (on 生时纠正 itself) must not pull the tag back into the flow. + assert.match(css, /\.sidebar-nav-link\[data-active="true"\] > \.sidebar-nav-tag \{ position: absolute; z-index: 2; \}/); }); test("the home no longer says the report opens by naming your own choice", () => {