Skip to content

fix(code): refresh autocomplete when the schema changes - #1790

Open
sridharkalaibala wants to merge 1 commit into
josdejong:developfrom
sridharkalaibala:fix/dynamic-schema-completion
Open

fix(code): refresh autocomplete when the schema changes#1790
sridharkalaibala wants to merge 1 commit into
josdejong:developfrom
sridharkalaibala:fix/dynamic-schema-completion

Conversation

@sridharkalaibala

Copy link
Copy Markdown

Fixes #1579.

After setSchema, validation uses the new schema but Ace keeps the autocomplete list initialized for the original schema. Assign the new schema completer to the active list as well as the option. Refresh an already-open popup, and clear/detach suggestions when schema completion is disabled so removal and re-enabling cannot retain the old values.

Adds a browser regression page in test/test_dynamic_schema.html, following the existing browser-test format. It covers initial suggestions, repeated schema replacements while the popup stays open, a single suggestion without inserting it, schema removal, and re-enabling.

Validation:

  • The same browser regression fails on a separate unchanged develop build at the first schema update (old suggestions persist).
  • The patched build passes in Chromium 153 with the bundled Ace 1.44.0.
  • npm run build, all 69 npm test tests, npm run lint, and git diff --check pass.

This follows the reproduction and Ace-setter analysis shared in the issue. Prepared with AI assistance and verified against the actual editor and popup.

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.

Autocompletion based on dynamic schema doesn't work

1 participant