Skip to content

Fix mb strings for our chinese users#4415

Merged
ildyria merged 1 commit into
masterfrom
fix-mb-strings
Jun 13, 2026
Merged

Fix mb strings for our chinese users#4415
ildyria merged 1 commit into
masterfrom
fix-mb-strings

Conversation

@ildyria

@ildyria ildyria commented Jun 13, 2026

Copy link
Copy Markdown
Member

Fixes #3824

Summary by CodeRabbit

  • Bug Fixes
    • Enhanced photo title extraction and handling with improved support for international characters and automatic truncation to maintain consistency across the app.

@ildyria ildyria requested a review from a team as a code owner June 13, 2026 10:07
@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 73aa662b-602b-4b1a-bfd8-d10ee5726fa4

📥 Commits

Reviewing files that changed from the base of the PR and between 079839a and 68db6e5.

📒 Files selected for processing (2)
  • app/Actions/Photo/Pipes/Init/LoadFileMetadata.php
  • app/Actions/Photo/Pipes/Shared/HydrateMetadata.php

📝 Walkthrough

Walkthrough

EXIF metadata title extraction and photo hydration are updated to consistently use multibyte-safe mb_substr with UTF-8 encoding and enforce a 100-character limit. LoadFileMetadata now applies this truncation during filename-based title generation, while HydrateMetadata adds null-checking and applies the same truncation when copying EXIF titles to photos.

Changes

UTF-8 Title Truncation

Layer / File(s) Summary
EXIF title UTF-8 handling with consistent truncation
app/Actions/Photo/Pipes/Init/LoadFileMetadata.php, app/Actions/Photo/Pipes/Shared/HydrateMetadata.php
Filename-based EXIF title extraction in LoadFileMetadata and photo title hydration in HydrateMetadata both switch to mb_substr with UTF-8 encoding and 100-character limits. HydrateMetadata also adds conditional null assignment when EXIF title is absent.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A title truncated with care so true,
Multibyte-safe, UTF-8 through and through,
One hundred chars per EXIF frame,
Lychee's photos now sing the same,
Unicode handled without a fright! 📸

🚥 Pre-merge checks | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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 and usage tips.

@ildyria ildyria merged commit 0c8ee31 into master Jun 13, 2026
44 checks passed
@ildyria ildyria deleted the fix-mb-strings branch June 13, 2026 11:17
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.

Uploading a specific image caused an InvalidArgumentException error in the photo album.

1 participant