Problem/Motivation

The installer seeds the module's AI Context items (from varbase_ai_figma.settings: ai_context_items) as published global items. The ai_context module caps published global items at 3 by default and rejects saves over the cap. When ai_figma has already seeded its own 3 global items, this module's items fail to save with EntityStorageException: The global context limit (3 items) has been reached, the installer's catch swallows the failure, and the items are silently missing after install.

Proposed resolution

In VarbaseAiFigmaInstaller::seedOwnContextItems(), before seeding: count the published global items, and when published + items to seed exceeds ai_context.settings: max_global_items, raise the cap to fit. Every item this module teaches then lands regardless of what was seeded before it.

Remaining tasks

  • ✅ File an issue about this project
  • ✅ Addition/Change/Update/Fix to this project
  • ✅ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ➖ Developer Documentation support on feature change/addition
  • ➖ User Guide Documentation support on feature change/addition
  • ➖ UX/UI designer responsibilities
  • ➖ Accessibility and Readability
  • ✅ Reviewed by a human
  • ✅ Code review by maintainers
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ➖ Review with the product owner
  • ✅ Update Release Notes
  • ✅ Release

User interface changes

None.

API changes

None.

Data model changes

ai_context.settings: max_global_items may be raised at install when needed.

Release notes snippet

The installer now raises the AI Context global items cap when needed, so the Figma rule context items are never silently dropped at install.

AI usage disclosure: drafted with AI (Claude) assistance, reviewed and tested by Rajab Natshah, per the Drupal AI policy.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

rajab natshah created an issue. See original summary.

  • rajab natshah committed b89cc49f on 1.0.x
    fix: #3613296 Raise the AI Context global items cap before seeding so...
rajab natshah’s picture

Assigned: Unassigned » josebc
Issue summary: View changes
Status: Active » Needs review
Issue tags: +varbase_ai_figma-1.0.0-alpha2
rajab natshah’s picture

Assigned: josebc » mohammed j. razem
rajab natshah’s picture

Assigned: mohammed j. razem » Unassigned
Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.