Skip to content

fix(web): normalize composer whitespace - #39

Merged
leeguooooo merged 1 commit into
leeguooooo:mainfrom
joscabmar:fix/web-prompt-verification
Oct 7, 2026
Merged

leeguooooo merged 1 commit into
leeguooooo:mainfrom
joscabmar:fix/web-prompt-verification

Conversation

@joscabmar

@joscabmar joscabmar commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • normalize CRLF, CR, and non-breaking spaces before comparing the pasted ChatGPT composer text
  • preserve strict verification for all other prompt content before submission

Validation

  • manually reproduced the editor conversion of an indented space to U+00A0
  • verified a 15,176-character prompt with one reference image passed the patched pre-send check and was submitted once through the web backend
  • no automated regression test was added by request

Summary by CodeRabbit

  • Bug Fixes
    • Pasted prompts now handle Windows and legacy line endings consistently.
    • Non-breaking spaces are normalized to regular spaces during verification, while other content remains subject to exact matching.

@coderabbitai

coderabbitai Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

Understand this PR’s impact

Explore downstream dependencies and potential security impact with Blast Radius.

View blast radius →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 7333c2b1-ecc1-4cde-953f-1af2090e24e5

📥 Commits

Reviewing files that changed from the base of the PR and between 1df8a9d and d6463cb.

📒 Files selected for processing (1)
  • image-use

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

Composer verification now normalizes CRLF, CR, and non-breaking spaces to equivalent forms before comparing the pasted prompt. Other content remains subject to exact comparison.

Changes

Composer verification

Layer / File(s) Summary
Canonicalization and verification
image-use
Added _canonicalize_composer_text and updated prompt verification to compare normalized composer text.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Suggested reviewers: leeguooooo

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: normalizing composer whitespace in the web prompt verification flow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

leeguooooo added a commit that referenced this pull request Sep 21, 2026
…release v0.29.2 (#39)

Co-authored-by: joscabmar <joscabmar@users.noreply.github.com>
@leeguooooo

Copy link
Copy Markdown
Owner

已在 75b4e22 重新落地,另加了回归测试,随 v0.29.2 发布。感谢!

@leeguooooo leeguooooo closed this Sep 21, 2026
@leeguooooo leeguooooo reopened this Oct 7, 2026
@leeguooooo
leeguooooo merged commit 6460531 into leeguooooo:main Oct 7, 2026
5 checks passed
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.

2 participants