agnes-the-ai-analyst/app/web
Monika Feigler 86933a2cb5
fix(web): move keboola {% endif %} so edit-modal JS is always available (#340)
* fix(web): keboola sync-mode helpers escape the {% if data_source_type == 'keboola' %} guard

Edit-modal functions were wrapped inside
{% if data_source_type == 'keboola' %} in admin_tables.html. Two of
them — _getEditKbSyncMode and onEditKbSyncModeChange — are called
from sync-mode radio buttons that are rendered for ALL instance
types (not inside any Jinja2 conditional). On a BigQuery or CSV
instance the JS functions were absent from the page, causing a
ReferenceError when the edit modal was opened.

Fix: split the conditional into two regions:

1. Discover helpers (loadKeboolaBuckets, loadKeboolaTables) — remain
   inside {% if keboola %}, they call the Keboola Storage API.
2. _getEditKbSyncMode + onEditKbSyncModeChange — moved outside the
   guard, because the sync-mode radio buttons are rendered for all
   instance types.
3. Phase F2 edit modal + prefillFromKeboolaTable — remain inside
   {% if keboola %}, called only from Keboola-conditional HTML.

Credit @MonikaFeigler.

* release: 0.54.27 — /admin/tables edit modal ReferenceError fix on non-Keboola instances

---------

Co-authored-by: ZdenekSrotyr <zdenek.srotyr@keboola.com>
2026-05-18 20:58:24 +02:00
..
static release(0.54.18): Curated Memory restructure + per-user Dismiss + bundled adversarial-review fixes (#316/#320/#322) (#324) 2026-05-15 18:51:05 +02:00
templates fix(web): move keboola {% endif %} so edit-modal JS is always available (#340) 2026-05-18 20:58:24 +02:00
__init__.py feat: add FastAPI server with auth, RBAC, and all API endpoints 2026-03-27 15:19:18 +01:00
connector_prompts.py feat(setup): configurable instance brand + connector setup overhaul (#268) 2026-05-12 17:10:08 +02:00
router.py fix(store): restore reuses prior approved verdict + admin detail surfaces content_quality (#332) 2026-05-16 07:12:29 +02:00
setup_instructions.py feat(setup): configurable instance brand + connector setup overhaul (#268) 2026-05-12 17:10:08 +02:00