Skip to content

fix(editor): update image insertion test to current arguments - #25330

Closed
brennanb2025 wants to merge 1 commit into
mainfrom
brennanb2025/fix-rich-markdown-image-insert-test
Closed

brennanb2025 wants to merge 1 commit into
mainfrom
brennanb2025/fix-rich-markdown-image-insert-test

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Main's typecheck fails since #25176 and #24489 merged: #25176 replaced insertPos with getInsertionRange, then #24489 added a test using the old argument. This updates that test to the current arguments. No user-visible change.

What Changed

Supply the same collapsed insertion range used by neighboring tests and remove the obsolete editor cast. Production code is unchanged.

Why

The test must follow the current API; changing production behavior would undo the image clipboard fix.

Linked Issue

Regression from #25176 (e2460907c33, merged October 4 at 23:39:12 UTC) and #24489 (51fe6f3fbad, merged at 23:55:33 UTC).

Visual Proof

N/A — test-only correction.

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

What I verified: 35 tests passed across rich-markdown-image-insert.test.ts, rich-markdown-image-insert-code-block.test.ts, rich-markdown-image-insertion-target.test.ts, rich-markdown-paste-image.test.ts, and rich-markdown-local-image.test.ts; changed-file formatting and lint passed on macOS.

rich-markdown-async-image-paste.test.ts and rich-markdown-async-image-table.test.ts have 35 failures, reproduced on unchanged main with the same shared dependencies (12 passed). These are outside this test-only fix.

What I didn't verify: local typechecking, app UI, Linux, or Windows. CI is the typecheck authority: static analysis and typecheck passed, including its typecheck step. The separately known Claude evidence-retention type error is handled by #25063; any unrelated qoder-history-search-downgrade failure is outside this PR.

Review

Differences from the common pattern: none introduced; this only follows the existing test argument shape. No lifecycle, ownership, runtime, or UI mechanism changes.

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

No dependency, platform, SSH, folder-workspace, or mobile behavior changes. Draft only.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Superseded: main already fixed this test in #25351 (6f8eee3). The red unit shards here are useLocalImagePick.test.tsx failures that also fail on main; they are unrelated to this one-line test update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant