feat(app): refine mobile diff review and wrapping preferences (#46390)

This commit is contained in:
Brendan Allan
2026-08-31 22:32:11 +08:00
committed by GitHub
Unverified
parent 1b3eb1138e
commit 6b1ed3918a
13 changed files with 341 additions and 45 deletions
@@ -0,0 +1,43 @@
import { expect, test } from "@playwright/test"
import { fixture, pageMessages } from "../performance/timeline/session-timeline-stress.fixture"
import { stressSessionHref } from "../performance/timeline/timeline-test-helpers"
import { mockOpenCodeServer } from "../utils/mock-server"
test("opening changed files selects the requested tab before file loading completes", async ({ page }) => {
await page.setViewportSize({ width: 390, height: 844 })
const loading = Promise.withResolvers<void>()
await mockOpenCodeServer(page, {
directory: fixture.directory,
project: fixture.project,
sessions: fixture.sessions,
provider: fixture.provider,
pageMessages,
fileList: () => [],
fileContent: async (path) => {
if (path === "second.ts") await loading.promise
return `contents:${path}`
},
vcsDiff: ["first.ts", "second.ts"].map((file) => ({
file,
status: "modified",
additions: 1,
deletions: 1,
patch: `diff --git a/${file} b/${file}\n--- a/${file}\n+++ b/${file}\n@@ -1 +1 @@\n-before\n+after\n`,
})),
})
await page.goto(stressSessionHref(fixture.targetID))
const navigation = page.getByRole("tablist", { name: "Session view", exact: true })
const files = page.locator('[data-slot="session-mobile-files"]')
for (const file of ["first.ts", "second.ts", "first.ts", "second.ts"]) {
await navigation.getByRole("tab", { name: "Changes", exact: true }).click()
const diff = page.locator(`[data-component="session-review"] [data-file="${file}"]`)
const header = diff.getByRole("button", { name: file, exact: true })
await expect(header).toBeEnabled()
if ((await header.getAttribute("aria-expanded")) === "false") await header.click()
await diff.getByRole("button", { name: "Open file", exact: true }).click()
await expect(navigation.getByRole("tab", { name: "Files", exact: true })).toHaveAttribute("aria-selected", "true")
await expect(files.getByRole("tab", { name: file, exact: true })).toHaveAttribute("aria-selected", "true")
if (file === "second.ts") loading.resolve()
await expect(files.getByText(`contents:${file}`, { exact: true })).toBeVisible()
}
})
@@ -0,0 +1,138 @@
import { expect, test } from "@playwright/test"
import { fixture } from "../performance/timeline/session-timeline-stress.fixture"
import { mockStressTimeline, stressSessionHref } from "../performance/timeline/timeline-test-helpers"
for (const direction of ["ltr", "rtl"] as const) {
test(`mobile change summaries appear only for expanded diffs in ${direction}`, async ({ page }) => {
await page.setViewportSize({ width: 390, height: 844 })
await mockStressTimeline(page, {
vcsDiff: [
{
file: "added.ts",
status: "added",
additions: 1,
deletions: 0,
patch:
"diff --git a/added.ts b/added.ts\n--- /dev/null\n+++ b/added.ts\n@@ -0,0 +1 @@\n+export const added = 1\n",
},
{
file: "removed.ts",
status: "deleted",
additions: 0,
deletions: 1,
patch:
"diff --git a/removed.ts b/removed.ts\n--- a/removed.ts\n+++ /dev/null\n@@ -1 +0,0 @@\n-export const removed = 1\n",
},
{
file: "modified.ts",
status: "modified",
additions: 1,
deletions: 1,
patch: `diff --git a/modified.ts b/modified.ts\n--- a/modified.ts\n+++ b/modified.ts\n@@ -1 +1 @@\n-export const value = 1\n+export const value = "${"long content ".repeat(30)}"\n`,
},
],
})
await page.goto(stressSessionHref(fixture.targetID))
await page.getByRole("tab", { name: "Changes", exact: true }).click()
const review = page.locator('[data-component="session-review"]')
await expect(review.getByRole("button", { name: "Expand all", exact: true })).toBeVisible()
await page.evaluate((direction) => (document.documentElement.dir = direction), direction)
await expect(review.locator('[data-file="added.ts"] [data-slot="accordion-trigger"]')).toHaveCSS(
"border-top-width",
"0px",
)
await expect(review.locator('[data-file="modified.ts"] [data-slot="accordion-trigger"]')).toHaveCSS(
"border-bottom-width",
"0px",
)
for (const change of [
{ file: "added.ts", status: "Added", additions: "+1", deletions: "-0" },
{ file: "removed.ts", status: "Removed", additions: "+0", deletions: "-1" },
{ file: "modified.ts", status: undefined, additions: "+1", deletions: "-1" },
]) {
const item = review.locator(`[data-file="${change.file}"]`)
const trigger = item.getByRole("button", { name: change.file, exact: true })
const summary = item.locator('[data-slot="session-review-change-summary"]')
await expect(trigger).toHaveAttribute("aria-expanded", "false")
await expect(trigger.locator('[data-component="diff-changes"]')).toHaveCount(0)
await expect(trigger.locator('[data-slot="session-review-change"]')).toHaveCount(0)
await expect(summary).toHaveCount(0)
await trigger.click()
await expect(trigger).toHaveAttribute("aria-expanded", "true")
if (change.file === "modified.ts") {
await expect(item.locator('[data-slot="accordion-content"]')).toHaveCSS("border-bottom-width", "0px")
await expect(trigger).not.toHaveCSS("border-bottom-width", "0px")
}
await expect(summary).toBeVisible()
await expect(summary.getByRole("button", { name: "Open file", exact: true })).toBeVisible()
await expect(summary.locator('[data-slot="diff-changes-additions"]')).toHaveText(change.additions)
await expect(summary.locator('[data-slot="diff-changes-deletions"]')).toHaveText(change.deletions)
if (change.status) await expect(summary.getByText(change.status, { exact: true })).toBeVisible()
await trigger.click()
await expect(trigger).toHaveAttribute("aria-expanded", "false")
await expect(summary).toHaveCount(0)
}
await expect(review.locator('[data-slot="session-review-view-button"]')).toHaveCount(0)
const modified = review.locator('[data-file="modified.ts"]')
await modified.getByRole("button", { name: "modified.ts", exact: true }).click()
await expect(modified.locator("[data-line-number-content]")).toHaveText(["1", "1"])
await expect(modified.locator("[data-diff]")).not.toHaveAttribute("data-disable-line-numbers")
await expect(modified.locator("[data-diff]")).toHaveAttribute("data-overflow", "wrap")
await expect(review.getByRole("button", { name: "Diff options", exact: true })).toHaveCount(0)
await page.keyboard.press("Control+,")
const settings = page.getByTestId("settings-screen")
const wrap = settings.getByRole("switch", { name: "Wrap lines", exact: true })
const wrapControl = settings.locator('[data-action="settings-mobile-diff-wrap"] [data-slot="switch-control"]')
await expect(wrap).toBeChecked()
await wrapControl.click()
await expect(wrap).not.toBeChecked()
await expect
.poll(() => page.evaluate(() => JSON.parse(localStorage.getItem("settings.v3") ?? "{}").general?.mobileDiffWrap))
.toBe(false)
await settings.getByRole("button", { name: "Back to app", exact: true }).click()
await expect(modified.locator("[data-diff]")).toHaveAttribute("data-overflow", "scroll")
await expect
.poll(() => modified.locator("[data-code]").evaluate((element) => element.scrollWidth > element.clientWidth))
.toBe(true)
await modified.locator("[data-code]").evaluate((element) => {
element.scrollLeft = 100
})
await expect
.poll(() => modified.locator("[data-code]").evaluate((element) => Math.abs(element.scrollLeft)))
.toBeGreaterThan(0)
const navigation = page.getByRole("tablist", { name: "Session view", exact: true })
await navigation.getByRole("tab", { name: "Session", exact: true }).click()
await navigation.getByRole("tab", { name: "Changes", exact: true }).click()
await expect(modified.locator("[data-diff]")).toHaveAttribute("data-overflow", "scroll")
await page.keyboard.press("Control+,")
await expect(wrap).not.toBeChecked()
await wrapControl.click()
await expect(wrap).toBeChecked()
await expect
.poll(() => page.evaluate(() => JSON.parse(localStorage.getItem("settings.v3") ?? "{}").general?.mobileDiffWrap))
.toBe(true)
await settings.getByRole("button", { name: "Back to app", exact: true }).click()
await expect(modified.locator("[data-diff]")).toHaveAttribute("data-overflow", "wrap")
const openFile = modified.getByRole("button", { name: "Open file", exact: true })
await expect(openFile).toBeVisible()
await expect
.poll(async () => {
const button = await openFile.boundingBox()
const summary = await modified.locator('[data-slot="session-review-change-summary"]').boundingBox()
if (!button || !summary) return false
return direction === "ltr"
? button.x > summary.x + summary.width / 2
: button.x + button.width < summary.x + summary.width / 2
})
.toBe(true)
await openFile.click()
await expect(
page.getByRole("tablist", { name: "Session view", exact: true }).getByRole("tab", { name: "Files", exact: true }),
).toHaveAttribute("aria-selected", "true")
const files = page.locator('[data-slot="session-mobile-files"]')
await expect(files.getByRole("tab", { name: "modified.ts", exact: true })).toHaveAttribute("aria-selected", "true")
await expect(files).toHaveAttribute("data-browsing", "false")
})
}
+3
View File
@@ -702,6 +702,7 @@ export const dict = {
"session.review.change.one": "Change",
"session.review.change.other": "Changes",
"session.review.loadingChanges": "Loading changes...",
"session.review.wrapLines": "Wrap lines",
"session.review.empty": "No changes in this session yet",
"session.review.noVcs": "No Git Version Control System detected, changes not displayed",
"session.review.noVcs.createGit.title": "Create a Git repository",
@@ -983,6 +984,8 @@ export const dict = {
"settings.general.row.mobileTitlebarBottom.title": "Bottom navigation",
"settings.general.row.mobileTitlebarBottom.description":
"Place the title bar at the bottom of the screen on mobile",
"settings.general.row.mobileDiffWrap.description":
"Wrap long lines in mobile diffs instead of scrolling horizontally",
"settings.general.row.showCustomAgents.title": "Show agent",
"settings.general.row.showCustomAgents.description":
"Switch between agents in the composer. When hidden, defaults to Build agent.",
+22
View File
@@ -36,6 +36,28 @@ describe("createOpenReviewFile", () => {
expect(calls).toEqual(["show", "load:src/a.ts", "tab:src/a.ts", "open:file://src/a.ts", "active:file://src/a.ts"])
})
test("selects immediately and does not steal focus when loading finishes", async () => {
const loading = Promise.withResolvers<void>()
const state = { active: "file://previous.ts", opened: [] as string[] }
const openReviewFile = createOpenReviewFile({
showAllFiles: () => undefined,
tabForPath: (path) => `file://${path}`,
openTab: (tab) => state.opened.push(tab),
setActive: (tab) => {
state.active = tab
},
loadFile: () => loading.promise,
})
openReviewFile("requested.ts")
expect(state.opened).toEqual(["file://requested.ts"])
expect(state.active).toBe("file://requested.ts")
state.active = "file://previous.ts"
loading.resolve()
await loading.promise
expect(state.active).toBe("file://previous.ts")
})
})
describe("createOpenSessionFileTab", () => {
+4 -8
View File
@@ -124,14 +124,10 @@ export const createOpenReviewFile = (input: {
return (path: string) => {
batch(() => {
input.showAllFiles()
const maybePromise = input.loadFile(path)
const open = () => {
const tab = input.tabForPath(path)
input.openTab(tab)
input.setActive(tab)
}
if (maybePromise instanceof Promise) void maybePromise.then(open)
else open()
input.loadFile(path)
const tab = input.tabForPath(path)
input.openTab(tab)
input.setActive(tab)
})
}
}
@@ -23,6 +23,9 @@ export interface SessionReviewTabProps {
diffs: ReviewDiff[]
view: ReturnType<ReturnType<typeof useLayout>["view"]>
diffStyle: DiffStyle
changeSummary?: boolean
overflow?: "wrap" | "scroll"
disableLineNumbers?: boolean
onDiffStyleChange?: (style: DiffStyle) => void
onViewFile?: (file: string) => void
onLineComment?: (comment: { file: string; selection: SelectedLineRange; comment: string; preview?: string }) => void
@@ -122,6 +125,7 @@ export function SessionReviewTab(props: SessionReviewTabProps) {
createEffect(() => {
props.diffs.length
props.diffStyle
props.overflow
if (!layout.ready()) return
queueRestore()
})
@@ -156,6 +160,9 @@ export function SessionReviewTab(props: SessionReviewTabProps) {
}}
diffs={props.diffs}
diffStyle={props.diffStyle}
changeSummary={props.changeSummary}
overflow={props.overflow}
disableLineNumbers={props.disableLineNumbers}
onDiffStyleChange={props.onDiffStyleChange}
onViewFile={props.onViewFile}
focusedFile={props.focusedFile}
+13 -4
View File
@@ -8,6 +8,7 @@ import { Menu } from "@opencode-ai/ui/menu"
import { For, Match, Show, Suspense, Switch, lazy, createEffect, onCleanup, type JSX } from "solid-js"
import { createStore } from "solid-js/store"
import { useLanguage } from "@/runtime/i18n/language"
import { useSettings } from "@/settings/model"
import { SessionSidePanel } from "../files/session-side-panel"
import { ReviewPanel } from "./panel"
import { SessionReviewTab } from "./review-tab"
@@ -173,6 +174,7 @@ export function SessionDesktopReview(props: { review: SessionReviewModel; presen
}
function ReviewContent(props: { review: SessionReviewModel }) {
const settings = useSettings()
return (
<Show when={!props.review.deferRender()}>
<SessionReviewTab
@@ -181,6 +183,13 @@ function ReviewContent(props: { review: SessionReviewModel }) {
diffs={props.review.diffs()}
view={props.review.view()}
diffStyle="unified"
changeSummary
disableLineNumbers={false}
overflow={settings.general.mobileDiffWrap() ? "wrap" : "scroll"}
onViewFile={(file) => {
props.review.openFile(file)
props.review.mobile.setTab("files")
}}
onScrollRef={props.review.setScroll}
focusedFile={props.review.activeFile()}
onLineComment={props.review.comments.add}
@@ -191,11 +200,11 @@ function ReviewContent(props: { review: SessionReviewModel }) {
comments={props.review.comments.all()}
focusedComment={props.review.comments.focus()}
onFocusedCommentChange={props.review.comments.setFocus}
onViewFile={props.review.openFile}
classes={{
root: "pb-8 [&_[data-slot=session-review-list]]:pb-0",
header: "!px-2 !h-10 !pb-0",
container: "px-4",
root: "[&_[data-slot=session-review-list]]:pb-0 [&_[data-slot=accordion-trigger]]:!rounded-none [&_[data-slot=accordion-trigger]]:!border-x-0 [&_[data-slot=accordion-item]:first-child_[data-slot=accordion-trigger]]:!border-t-0 [&_[data-slot=accordion-item]:last-child:not([data-expanded])_[data-slot=accordion-trigger]]:!border-b-0 [&_[data-slot=accordion-item]:last-child_[data-slot=accordion-content]]:!border-b-0 [&_[data-slot=accordion-item]:last-child_[data-slot=session-review-diff-placeholder]]:!border-b-0 [&_[data-slot=accordion-content]]:!rounded-none [&_[data-slot=accordion-content]]:!border-x-0 [&_[data-slot=session-review-diff-placeholder]]:!rounded-none [&_[data-slot=session-review-diff-placeholder]]:!border-x-0",
header:
"!px-2 !h-10 !pb-0 relative before:pointer-events-none before:absolute before:inset-x-0 before:bottom-0 before:h-px before:bg-v2-border-border-base before:content-['']",
container: "!px-0",
}}
/>
</Show>
@@ -362,6 +362,22 @@ export const SettingsGeneral: Component<{
<ReasoningModeSetting />
<SettingsRow
title={language.t("session.review.wrapLines")}
description={language.t("settings.general.row.mobileDiffWrap.description")}
>
<div data-action="settings-mobile-diff-wrap">
<Switch
aria-label={language.t("session.review.wrapLines")}
checked={settings.general.mobileDiffWrap()}
onChange={settings.general.setMobileDiffWrap}
hideLabel
>
{language.t("session.review.wrapLines")}
</Switch>
</div>
</SettingsRow>
<SettingsRow
title={language.t("settings.general.row.shellToolPartsExpanded.title")}
description={language.t("settings.general.row.shellToolPartsExpanded.description")}
+6
View File
@@ -41,6 +41,7 @@ export interface Settings {
editToolPartsExpanded: boolean
showCustomAgents: boolean
mobileTitlebarPosition: "top" | "bottom"
mobileDiffWrap: boolean
terminalPlacement: TerminalPlacement
followUpBehavior: FollowUpBehavior
}
@@ -130,6 +131,7 @@ const defaultSettings: Settings = {
editToolPartsExpanded: false,
showCustomAgents: false,
mobileTitlebarPosition: "top",
mobileDiffWrap: true,
terminalPlacement: "side",
followUpBehavior: "steer",
},
@@ -268,6 +270,10 @@ export const { use: useSettings, provider: SettingsProvider } = createSimpleCont
setMobileTitlebarPosition(value: "top" | "bottom") {
setStore("general", "mobileTitlebarPosition", value)
},
mobileDiffWrap: withFallback(() => store.general?.mobileDiffWrap, defaultSettings.general.mobileDiffWrap),
setMobileDiffWrap(value: boolean) {
setStore("general", "mobileDiffWrap", value)
},
terminalPlacement: withFallback(
() => store.general?.terminalPlacement,
defaultSettings.general.terminalPlacement,
+1 -1
View File
@@ -1085,7 +1085,7 @@ function DiffViewer<T>(props: DiffFileProps<T>) {
const perf = large() ? { ...base, ...largeOptions } : base
if (!mobile()) return perf
return { ...perf, disableLineNumbers: true }
return { ...perf, disableLineNumbers: props.disableLineNumbers ?? true }
})
const notify = (done?: VoidFunction) => {
@@ -25,13 +25,14 @@
height: 40px;
padding-bottom: 8px;
flex-shrink: 0;
display: flex;
justify-content: space-between;
display: grid;
grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
align-items: center;
align-self: stretch;
}
[data-slot="session-review-title"] {
justify-self: start;
font-family: var(--font-family-sans);
font-size: var(--font-size-large);
font-weight: var(--font-weight-medium);
@@ -40,6 +41,8 @@
}
[data-slot="session-review-actions"] {
grid-column: 3;
justify-self: end;
display: flex;
align-items: center;
column-gap: 12px;
@@ -170,12 +173,33 @@
gap: 12px;
}
[data-slot="session-review-change-summary"] {
position: sticky;
top: calc(32px + var(--sticky-accordion-offset, 0px));
z-index: 9;
width: 100%;
display: flex;
align-items: center;
gap: 12px;
min-height: 32px;
padding-block: 8px;
padding-inline: 12px;
line-height: var(--line-height-compact);
background-color: var(--v2-background-bg-base);
border-bottom: 0.5px solid var(--v2-border-border-base);
}
[data-slot="session-review-change"] {
font-family: var(--font-family-sans);
font-size: var(--font-size-small);
font-weight: var(--font-weight-medium);
}
[data-slot="session-review-summary-open-file"] {
margin-inline-start: auto;
flex-shrink: 0;
}
[data-slot="session-review-change"][data-type="added"] {
color: var(--icon-diff-add-base);
}
@@ -96,6 +96,9 @@ export interface SessionReviewProps {
empty?: JSX.Element
split?: boolean
diffStyle?: SessionReviewDiffStyle
changeSummary?: boolean
overflow?: "wrap" | "scroll"
disableLineNumbers?: boolean
onDiffStyleChange?: (diffStyle: SessionReviewDiffStyle) => void
onDiffRendered?: VoidFunction
onLineComment?: (comment: SessionReviewLineComment) => void
@@ -339,6 +342,9 @@ export const SessionReview = (props: SessionReviewProps) => {
<div data-slot="session-review-title">
{props.title === undefined ? i18n.t("ui.sessionReview.title") : props.title}
</div>
<Show when={hasDiffs()}>
<DiffChanges appearance="standard" changes={props.diffs} />
</Show>
<div data-slot="session-review-actions">
<Show when={hasDiffs() && props.onDiffStyleChange}>
<SegmentedControl
@@ -364,7 +370,7 @@ export const SessionReview = (props: SessionReviewProps) => {
<Button
size="small"
icon="chevron-grabber-vertical"
class="w-[106px] justify-start"
class="shrink-0 whitespace-nowrap justify-start"
onClick={handleExpandOrCollapseAll}
>
<Switch>
@@ -506,6 +512,37 @@ export const SessionReview = (props: SessionReviewProps) => {
commentsUi.onLineSelectionEnd(range)
}
const changes = (summary = false) => (
<>
<Switch>
<Match when={isAdded()}>
<div data-slot="session-review-change-group" data-type="added">
<span data-slot="session-review-change" data-type="added">
{i18n.t("ui.sessionReview.change.added")}
</span>
<DiffChanges appearance="standard" changes={diff()} />
</div>
</Match>
<Match when={isDeleted()}>
<span data-slot="session-review-change" data-type="removed">
{i18n.t("ui.sessionReview.change.removed")}
</span>
<Show when={summary}>
<DiffChanges appearance="standard" changes={diff()} />
</Show>
</Match>
<Match when={!!mediaKind()}>
<span data-slot="session-review-change" data-type="modified">
{i18n.t("ui.sessionReview.change.modified")}
</span>
</Match>
<Match when={true}>
<DiffChanges appearance="standard" changes={diff()} />
</Match>
</Switch>
</>
)
return (
<Accordion.Item
value={diffCanRender() ? file : null!}
@@ -524,7 +561,7 @@ export const SessionReview = (props: SessionReviewProps) => {
<span data-slot="session-review-directory">{`\u202A${getDirectory(file)}\u202C`}</span>
</Show>
<span data-slot="session-review-filename">{getFilename(file)}</span>
<Show when={props.onViewFile && diffCanRender()}>
<Show when={props.onViewFile && diffCanRender() && !props.changeSummary}>
<Tooltip appearance="standard" value={openFileLabel()} placement="top" gutter={4}>
<button
data-slot="session-review-view-button"
@@ -542,29 +579,7 @@ export const SessionReview = (props: SessionReviewProps) => {
</div>
</div>
<div data-slot="session-review-trigger-actions">
<Switch>
<Match when={isAdded()}>
<div data-slot="session-review-change-group" data-type="added">
<span data-slot="session-review-change" data-type="added">
{i18n.t("ui.sessionReview.change.added")}
</span>
<DiffChanges appearance="standard" changes={diff()} />
</div>
</Match>
<Match when={isDeleted()}>
<span data-slot="session-review-change" data-type="removed">
{i18n.t("ui.sessionReview.change.removed")}
</span>
</Match>
<Match when={!!mediaKind()}>
<span data-slot="session-review-change" data-type="modified">
{i18n.t("ui.sessionReview.change.modified")}
</span>
</Match>
<Match when={true}>
<DiffChanges appearance="standard" changes={diff()} />
</Match>
</Switch>
<Show when={!props.changeSummary || !diffCanRender()}>{changes()}</Show>
<Show when={diffCanRender()}>
<span data-slot="session-review-diff-chevron">
<Icon name="chevron-down" size="small" />
@@ -574,6 +589,22 @@ export const SessionReview = (props: SessionReviewProps) => {
</div>
</Accordion.Trigger>
</StickyAccordionHeader>
<Show when={props.changeSummary && expanded()}>
<div data-slot="session-review-change-summary">
{changes(true)}
<Show when={props.onViewFile}>
<Button
data-slot="session-review-summary-open-file"
size="small"
variant="ghost"
icon="open-file"
onClick={() => props.onViewFile?.(file)}
>
{openFileLabel()}
</Button>
</Show>
</div>
</Show>
<Accordion.Content data-slot="session-review-accordion-content">
<div
data-slot="session-review-diff-wrapper"
@@ -621,6 +652,8 @@ export const SessionReview = (props: SessionReviewProps) => {
fileDiff={diff().fileDiff}
preloadedDiff={diff().preloaded}
diffStyle={diffStyle()}
overflow={props.overflow ?? "wrap"}
disableLineNumbers={props.disableLineNumbers}
onRendered={() => {
props.onDiffRendered?.()
}}
@@ -50,11 +50,10 @@
line-height: var(--line-height-large);
letter-spacing: var(--letter-spacing-normal);
&:hover:not([data-disabled]) {
background-color: var(--v2-overlay-simple-overlay-hover);
}
&:active:not([data-disabled]) {
background-color: var(--v2-overlay-simple-overlay-pressed);
@media (hover: hover) {
&:hover:not([data-disabled]) {
background-color: var(--v2-overlay-simple-overlay-hover);
}
}
&:focus-visible {
outline: none;