Skip to content

draft: please ignore#1098

Open
anguyen-yext2 wants to merge 3 commits intomainfrom
anguyen-testing
Open

draft: please ignore#1098
anguyen-yext2 wants to merge 3 commits intomainfrom
anguyen-testing

Conversation

@anguyen-yext2
Copy link
Contributor

No description provided.

@anguyen-yext2 anguyen-yext2 added the create-dev-release Triggers dev release workflow label Mar 17, 2026
@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 17, 2026

commit: 9646dea

@github-actions
Copy link
Contributor

Warning: Component files have been updated but no migrations have been added. See https://github.com/yext/visual-editor/blob/main/packages/visual-editor/src/components/migrations/README.md for more information.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 23, 2026

Walkthrough

Two files were modified to add debugging logging statements. In Locator.tsx, two console.log statements were inserted in the LocatorComponent.resolveData method to output entityDocument and entityTypes. In InternalLayoutEditor.tsx, two console.log statements were added in the reloadDataOnDocumentChange flow to output appState.data and resolvedData. These logging statements provide visibility into intermediate values during data resolution processes. No functional logic or control flow was altered.

Suggested reviewers

  • mkilpatrick
  • briantstephan
  • jwartofsky-yext
  • mkouzel-yext
🚥 Pre-merge checks | ❌ 2

❌ Failed checks (2 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'draft: please ignore' is vague and generic, using non-descriptive terms that don't convey meaningful information about the actual changes (console.log statements added). Replace the title with a descriptive summary of the main change, such as 'Add debug logging to Locator and InternalLayoutEditor components'.
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to assess whether it relates to the changeset. Add a description explaining the purpose of the debug logging changes and why they are needed.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch anguyen-testing

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/visual-editor/src/components/Locator.tsx`:
- Around line 882-886: In resolveData, remove the raw console.log calls that
output entityDocument and entityTypeSourceMap/entityTypes (the two console.log
lines currently printing "entityDocument:" and "entityTypes:"); either delete
these debug logs or replace them with a conditional/debug-level logger (e.g.,
guarded by an isDebug flag or using a logger.debug) so internal document
payloads are not emitted on every reconciliation pass and runtime noise is
reduced. Ensure references to entityDocument, entityTypeSourceMap, and the
derived entityTypes remain unchanged otherwise.

In `@packages/visual-editor/src/internal/components/InternalLayoutEditor.tsx`:
- Around line 292-293: In InternalLayoutEditor, remove the unconditional
console.log calls that print appState.data and resolvedData; instead either
delete them or replace them with a guarded debug logger (e.g., only log when a
DEBUG flag or logger.isDebugEnabled() is true) and avoid dumping full state by
logging only non-sensitive summaries (IDs, lengths, or hashes) from
appState.data and resolvedData to reduce noise and prevent sensitive data
leakage. Ensure the changes target the console.log("appState.data:",
appState.data) and console.log("Resolved Data:", resolvedData) sites.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: b4e6c2c7-049c-4c66-808a-9fa0b07d4418

📥 Commits

Reviewing files that changed from the base of the PR and between ea5c656 and 9646dea.

📒 Files selected for processing (2)
  • packages/visual-editor/src/components/Locator.tsx
  • packages/visual-editor/src/internal/components/InternalLayoutEditor.tsx

Comment on lines +882 to +886
console.log("entityDocument:", entityDocument, entityTypeSourceMap);
const entityTypes = Object.keys(
entityTypeSourceMap
) as (keyof typeof entityTypeSourceMap)[];
console.log("entityTypes:", entityTypes);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Remove raw debug logging from resolveData before merge.

Line 882 and Line 886 log entityDocument/entity-type resolution data on every reconciliation pass. This can expose internal document payloads in console output and adds unnecessary runtime noise.

Suggested change
-    console.log("entityDocument:", entityDocument, entityTypeSourceMap);
@@
-    console.log("entityTypes:", entityTypes);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
console.log("entityDocument:", entityDocument, entityTypeSourceMap);
const entityTypes = Object.keys(
entityTypeSourceMap
) as (keyof typeof entityTypeSourceMap)[];
console.log("entityTypes:", entityTypes);
const entityTypes = Object.keys(
entityTypeSourceMap
) as (keyof typeof entityTypeSourceMap)[];
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/visual-editor/src/components/Locator.tsx` around lines 882 - 886, In
resolveData, remove the raw console.log calls that output entityDocument and
entityTypeSourceMap/entityTypes (the two console.log lines currently printing
"entityDocument:" and "entityTypes:"); either delete these debug logs or replace
them with a conditional/debug-level logger (e.g., guarded by an isDebug flag or
using a logger.debug) so internal document payloads are not emitted on every
reconciliation pass and runtime noise is reduced. Ensure references to
entityDocument, entityTypeSourceMap, and the derived entityTypes remain
unchanged otherwise.

Comment on lines +292 to +293
console.log("appState.data:", appState.data);
console.log("Resolved Data:", resolvedData);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Avoid logging full editor state via console.log in this path.

Line 292 and Line 293 print full appState.data and resolvedData. That can leak large/sensitive content into browser logs and create noisy output in normal editor usage.

Suggested change
-          console.log("appState.data:", appState.data);
-          console.log("Resolved Data:", resolvedData);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
console.log("appState.data:", appState.data);
console.log("Resolved Data:", resolvedData);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/visual-editor/src/internal/components/InternalLayoutEditor.tsx`
around lines 292 - 293, In InternalLayoutEditor, remove the unconditional
console.log calls that print appState.data and resolvedData; instead either
delete them or replace them with a guarded debug logger (e.g., only log when a
DEBUG flag or logger.isDebugEnabled() is true) and avoid dumping full state by
logging only non-sensitive summaries (IDs, lengths, or hashes) from
appState.data and resolvedData to reduce noise and prevent sensitive data
leakage. Ensure the changes target the console.log("appState.data:",
appState.data) and console.log("Resolved Data:", resolvedData) sites.

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

Labels

create-dev-release Triggers dev release workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant