Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
2f4bfc0
fix(ux): customer copy states the next action and hides internal boun…
seonghobae Aug 26, 2026
0efb510
test(ux): cover every human-unit branch of the size guidance message
seonghobae Aug 26, 2026
ee78bb4
fix(ux): make the hostile non-Error image rejection fallback coverage…
seonghobae Aug 26, 2026
5b8037d
fix(ux): single-line v8 ignore so the guarded fallback stays coverage…
seonghobae Aug 26, 2026
1473210
fix(ux): use v8 ignore start/stop for the hostile-rejection fallback
seonghobae Aug 26, 2026
594a0ae
fix(ux): export normalizeImageError and cover both arms with real tests
seonghobae Aug 26, 2026
6c61f4f
fix(ux): reconcile customer copy ownership boundaries
seonghobae Aug 28, 2026
427a172
test(image): preserve non-cloneable native errors
seonghobae Aug 28, 2026
88d4044
test(image): codify fail-closed error metadata
seonghobae Aug 28, 2026
a00ece3
docs(image): make fail-closed error contract explicit
seonghobae Aug 28, 2026
af5575d
chore(ownership): return Base64Image source to canonical lane
seonghobae Aug 28, 2026
0193966
chore(ownership): remove competing Base64Image test
seonghobae Aug 28, 2026
307d645
chore(ownership): remove competing Base64Image hostile-error test
seonghobae Aug 28, 2026
55bc494
chore(ownership): restore canonical image source-policy tests
seonghobae Aug 28, 2026
3f26f69
chore(ownership): return toolbar copy to canonical lane
seonghobae Aug 28, 2026
32bd33a
chore(ownership): return toolbar tests to canonical lane
seonghobae Aug 28, 2026
6f40f2b
test(ux): require customer-facing image action copy
seonghobae Aug 28, 2026
48e481c
fix(ux): remove implementation jargon from image action
seonghobae Aug 28, 2026
20f9064
test: align toolbar keyboard queries with customer copy
seonghobae Aug 28, 2026
3edd749
chore(ci): refresh required workflow evidence
seonghobae Aug 28, 2026
f3d6a6f
fix(ownership): leave SafeClipboard guidance with canonical owner
seonghobae Aug 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions src/components/Toolbar.customerCopy.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { afterEach, describe, expect, it } from 'vitest';
import { cleanup, render, screen } from '@testing-library/react';
import { Editor } from '@tiptap/react';
import { Toolbar } from './Toolbar.js';
import { buildExtensions } from '../extensions/kit.js';

let editor: Editor | undefined;

afterEach(() => {
cleanup();
if (editor && !editor.isDestroyed) editor.destroy();
editor = undefined;
});

describe('Toolbar customer-facing copy', () => {
it('keeps implementation jargon out of the image action accessible name', () => {
const element = document.createElement('div');
document.body.appendChild(element);
editor = new Editor({
element,
extensions: buildExtensions({ image: { maxDimension: 0 } }),
content: '<p>hello</p>',
});

render(<Toolbar editor={editor} />);

expect(
screen.getByRole('button', { name: 'Insert inline image' }),
).toBeInTheDocument();
expect(
screen.queryByRole('button', { name: /base64/i }),
).not.toBeInTheDocument();
});
});
4 changes: 2 additions & 2 deletions src/components/Toolbar.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ describe('Toolbar', () => {
const italic = screen.getByRole('button', { name: /Italic/ });
const insertTable = screen.getByRole('button', { name: /^Insert table$/ });
const insertImage = screen.getByRole('button', {
name: /Insert inline \(base64\) image/,
name: /Insert inline image/,
});
const enabledButtons = (
screen.getAllByRole('button') as HTMLButtonElement[]
Expand Down Expand Up @@ -149,7 +149,7 @@ describe('Toolbar', () => {

const bold = screen.getByRole('button', { name: /Bold/ });
const insertImage = screen.getByRole('button', {
name: /Insert inline \(base64\) image/,
name: /Insert inline image/,
});
fireEvent.focus(insertImage);
expect(insertImage).toHaveAttribute('tabindex', '0');
Expand Down
2 changes: 1 addition & 1 deletion src/components/Toolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ export function Toolbar({ editor, image, onImageError }: ToolbarProps) {
onClick={() => editor.chain().focus().deleteTable().run()}
/>
<ToolbarButton
title="Insert inline (base64) image"
title="Insert inline image"
Comment thread
devin-ai-integration[bot] marked this conversation as resolved.
label="🖼"
onClick={() => fileInputRef.current?.click()}
/>
Expand Down
Loading