From a4e61f30f9ba83e9c3dfd500c361779d8689887b Mon Sep 17 00:00:00 2001 From: logfox-agent Date: Wed, 26 Aug 2026 22:03:21 -0400 Subject: [PATCH 1/2] chore: update app parity comments Co-authored-by: Cursor --- src/components/codeBlockTitles.spec.ts | 2 +- src/components/codeBlockTitles.ts | 8 ++++---- src/styles/starlight-custom.css | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/codeBlockTitles.spec.ts b/src/components/codeBlockTitles.spec.ts index 56df0b8f..ca507772 100644 --- a/src/components/codeBlockTitles.spec.ts +++ b/src/components/codeBlockTitles.spec.ts @@ -11,7 +11,7 @@ import { tryCopyText, } from './codeBlockTitles'; -test('copyButtonContent matches app-frontend idle / copied labels', (assert) => { +test('copyButtonContent matches app idle / copied labels', (assert) => { assert.equal(copyButtonContent(false), {label: 'Copy', state: 'idle'}); assert.equal(copyButtonContent(true), {label: 'Copied!', state: 'copied'}); }); diff --git a/src/components/codeBlockTitles.ts b/src/components/codeBlockTitles.ts index 3d82040b..39ee3f78 100644 --- a/src/components/codeBlockTitles.ts +++ b/src/components/codeBlockTitles.ts @@ -1,7 +1,7 @@ -/** Matches app-frontend `useCopyToClipboard` reset window. */ +/** Matches app `useCopyToClipboard` reset window. */ export const COPY_FEEDBACK_MS = 1500; -/** Idle / copied labels — same strings as app-frontend `Code` copy button. */ +/** Idle / copied labels — same strings as app `Code` copy button. */ export function copyButtonContent( isCopied: boolean, idleLabel = 'Copy', @@ -21,7 +21,7 @@ export type TryCopyTextDeps = { }; /** - * Copy text like app-frontend `useCopyToClipboard`: succeed → true; failure → false. + * Copy text like app `useCopyToClipboard`: succeed → true; failure → false. * Inject `writeText` in tests; browser path uses `navigator.clipboard.writeText`. */ export async function tryCopyText(text: string, deps: TryCopyTextDeps = {}): Promise { @@ -206,7 +206,7 @@ function ensureDots(header: HTMLElement): void { } /** - * Park the EC copy control in the chrome row and apply app-frontend copy feedback: + * Park the EC copy control in the chrome row and apply app copy feedback: * icon + “Copy” → green check + “Copied!” for COPY_FEEDBACK_MS. */ function ensureCopyInHeader(frame: HTMLElement, header: HTMLElement): void { diff --git a/src/styles/starlight-custom.css b/src/styles/starlight-custom.css index fd6696fc..0cd2d191 100644 --- a/src/styles/starlight-custom.css +++ b/src/styles/starlight-custom.css @@ -2262,7 +2262,7 @@ html[data-theme='light'] .expressive-code .cs-code-file { } /* - * Copy control — app-frontend Code / useCopyToClipboard behavior: + * Copy control — app Code / useCopyToClipboard behavior: * idle: icon + “Copy”; copied: green pill + check + “Copied!” for 1.5s. * Kill EC’s floating tooltip — we own the feedback UI. */ @@ -2382,7 +2382,7 @@ html[data-theme='light'] .expressive-code .frame.is-terminal .copy button.cs-cop background: color-mix(in srgb, var(--cs-ink) 6%, transparent) !important; } -/* app-frontend Code.module.scss `.copied` — success green wins over hover */ +/* app Code.module.scss `.copied` — success green wins over hover */ .expressive-code .frame.has-title .copy button.cs-copy-btn.cs-copied, .expressive-code .frame.is-terminal .copy button.cs-copy-btn.cs-copied, .expressive-code .frame.has-title .copy button.cs-copy-btn.cs-copied:hover, From 94934cd1494558623c77056e7eaad551c9235327 Mon Sep 17 00:00:00 2001 From: logfox-agent Date: Thu, 27 Aug 2026 02:12:39 -0400 Subject: [PATCH 2/2] chore: remove logfox app copy-ui cross-references Drop comments and test names that pointed at Logfox app / useCopyToClipboard. Callspec copy chrome is self-contained; no consumer-repo coupling in source. Co-authored-by: Cursor --- src/components/codeBlockTitles.spec.ts | 4 ++-- src/components/codeBlockTitles.ts | 9 ++------- src/styles/starlight-custom.css | 5 ++--- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/components/codeBlockTitles.spec.ts b/src/components/codeBlockTitles.spec.ts index ca507772..e82d4330 100644 --- a/src/components/codeBlockTitles.spec.ts +++ b/src/components/codeBlockTitles.spec.ts @@ -11,7 +11,7 @@ import { tryCopyText, } from './codeBlockTitles'; -test('copyButtonContent matches app idle / copied labels', (assert) => { +test('copyButtonContent idle and copied labels', (assert) => { assert.equal(copyButtonContent(false), {label: 'Copy', state: 'idle'}); assert.equal(copyButtonContent(true), {label: 'Copied!', state: 'copied'}); }); @@ -43,7 +43,7 @@ test('copyButtonMarkup accepts id, copy value, and a custom idle label', (assert assert.equal(html.includes('class="btn'), false); }); -test('COPY_FEEDBACK_MS matches useCopyToClipboard reset window', (assert) => { +test('COPY_FEEDBACK_MS is 1500ms', (assert) => { assert.equal(COPY_FEEDBACK_MS, 1500); }); diff --git a/src/components/codeBlockTitles.ts b/src/components/codeBlockTitles.ts index 39ee3f78..d24b3f34 100644 --- a/src/components/codeBlockTitles.ts +++ b/src/components/codeBlockTitles.ts @@ -1,7 +1,5 @@ -/** Matches app `useCopyToClipboard` reset window. */ export const COPY_FEEDBACK_MS = 1500; -/** Idle / copied labels — same strings as app `Code` copy button. */ export function copyButtonContent( isCopied: boolean, idleLabel = 'Copy', @@ -21,7 +19,7 @@ export type TryCopyTextDeps = { }; /** - * Copy text like app `useCopyToClipboard`: succeed → true; failure → false. + * Copy text to the clipboard: succeed → true; failure → false. * Inject `writeText` in tests; browser path uses `navigator.clipboard.writeText`. */ export async function tryCopyText(text: string, deps: TryCopyTextDeps = {}): Promise { @@ -205,10 +203,7 @@ function ensureDots(header: HTMLElement): void { dots.replaceChildren(); } -/** - * Park the EC copy control in the chrome row and apply app copy feedback: - * icon + “Copy” → green check + “Copied!” for COPY_FEEDBACK_MS. - */ +/** Park the EC copy control in the chrome row; icon + “Copy” → green check + “Copied!” for COPY_FEEDBACK_MS. */ function ensureCopyInHeader(frame: HTMLElement, header: HTMLElement): void { const copy = frame.querySelector(':scope > .copy') ?? header.querySelector(':scope > .copy'); if (!(copy instanceof HTMLElement)) { diff --git a/src/styles/starlight-custom.css b/src/styles/starlight-custom.css index 0cd2d191..ddb654e7 100644 --- a/src/styles/starlight-custom.css +++ b/src/styles/starlight-custom.css @@ -2262,8 +2262,7 @@ html[data-theme='light'] .expressive-code .cs-code-file { } /* - * Copy control — app Code / useCopyToClipboard behavior: - * idle: icon + “Copy”; copied: green pill + check + “Copied!” for 1.5s. + * Copy control: idle icon + “Copy”; copied green pill + check + “Copied!” for 1.5s. * Kill EC’s floating tooltip — we own the feedback UI. */ .expressive-code .frame.has-title > .header > .copy, @@ -2382,7 +2381,7 @@ html[data-theme='light'] .expressive-code .frame.is-terminal .copy button.cs-cop background: color-mix(in srgb, var(--cs-ink) 6%, transparent) !important; } -/* app Code.module.scss `.copied` — success green wins over hover */ +/* Success green wins over hover when copied */ .expressive-code .frame.has-title .copy button.cs-copy-btn.cs-copied, .expressive-code .frame.is-terminal .copy button.cs-copy-btn.cs-copied, .expressive-code .frame.has-title .copy button.cs-copy-btn.cs-copied:hover,