Skip to content

fix: simplify hotel page copy without render loop - #18

Merged
hoangsvit merged 3 commits into
mainfrom
fix/hotel-professional-copy
Aug 28, 2026
Merged

fix: simplify hotel page copy without render loop#18
hoangsvit merged 3 commits into
mainfrom
fix/hotel-professional-copy

Conversation

@hoangsvit

@hoangsvit hoangsvit commented Aug 27, 2026

Copy link
Copy Markdown
Member

Summary

  • keep the cleaner, product-facing hotel copy
  • fix the UI regression caused by the previous global MutationObserver
  • stop observing the entire document / characterData
  • scope result-card copy updates to direct list rerenders only
  • update hotel detail copy only when the detail modal is opened
  • guard all text assignments to avoid self-triggering mutation loops
  • keep pending/stale data messages concise and user-facing

Root cause

The previous copy layer observed the entire document with characterData: true while also assigning text inside the observer callback. discoveryMeta.textContent was rewritten on every callback, which could continually retrigger MutationObserver and cause the hotel page to lag, freeze, or render incorrectly.

Fix

Copy cleanup is now idempotent and scoped. There is no global DOM observer.

@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 7799d13c-9497-479b-a6d1-ab6301ee5c2a


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.

@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

🌍 Web preview

Preview is pinned to commit 499c962 and updates automatically when the PR changes.

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@hoangsvit hoangsvit changed the title fix: simplify hotel page copy fix: simplify hotel page copy without render loop Aug 27, 2026
@hoangsvit
hoangsvit merged commit 8815ab4 into main Aug 28, 2026
2 checks passed
@hoangsvit
hoangsvit deleted the fix/hotel-professional-copy branch August 28, 2026 00:53
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