aminghadersohi commented on code in PR #38409:
URL: https://github.com/apache/superset/pull/38409#discussion_r2894933518
##########
superset/mcp_service/dashboard/tool/add_chart_to_existing_dashboard.py:
##########
@@ -63,35 +63,106 @@ def _find_next_row_position(layout: Dict[str, Any]) -> str:
return row_key
-def _find_tab_insert_target(layout: Dict[str, Any]) -> str | None:
+def _normalize_tab_text(text: str) -> str:
+ """Strip emoji and extra whitespace from tab text for flexible matching."""
+ import re
+
+ # Remove emoji characters (Unicode emoji ranges)
+ cleaned = re.sub(
+ r"[\U0001F300-\U0001F9FF\U00002600-\U000027BF\U0000FE00-\U0000FE0F"
+ r"\U0001FA00-\U0001FA6F\U0001FA70-\U0001FAFF\U00002702-\U000027B0"
+ r"\U0000200D\U0000FE0F]+",
Review Comment:
Great catch\! Fixed in d7a4665 — removed the raw string prefix so Python
processes the `\U` escapes as proper Unicode code points instead of matching
literal characters.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]