Skip to content

Conversation

@bfollington
Copy link
Contributor

@bfollington bfollington commented Oct 17, 2025

Summary by cubic

Fix getEntityId to return the underlying entity’s ID for Cells with paths (e.g., array items via .key(i)) instead of a path-based composite. This removes ID mismatches and simplifies mention resolution in the code editor.

  • Bug Fixes
    • getEntityId now dereferences Cells with non-empty paths and uses the inner entity ID when present; falls back to path-based ID otherwise.
    • Added tests covering arrays of Cells accessed via .key() to ensure IDs match the underlying items.
    • Simplified CTCodeEditor mention lookup to rely on the consistent ID from getEntityId.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 3 files

@seefeldb
Copy link
Contributor

#1916 adds .resolveAsCell(), which should make the ct-code-editor change simpler, just call that on cells before call getEntityId.

@bfollington bfollington force-pushed the fix/2025-10-17-get-entity-id-patc branch from 633f069 to f35ae76 Compare October 17, 2025 21:21
@bfollington bfollington marked this pull request as ready for review October 17, 2025 21:21
@bfollington bfollington merged commit 0f771f4 into main Oct 20, 2025
8 checks passed
@bfollington bfollington deleted the fix/2025-10-17-get-entity-id-patc branch October 20, 2025 21:04
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.

3 participants