formula_editor/formula_editor
Ali bb1287acc2 refactor(generator): emit config, not a code-generated engine
The generator unrolled the whole engine into the Client Script: one inline block
per formula per trigger, plus an if-chain over every report field. A VAT
declaration came out at 403 KB of generated code, which then shipped inside
taxes_az's fixtures.

It now emits a CONFIG object — a copy of the storage — and one call into
taxes_az.formula. The storage format is untouched, so every existing Formula
Editor record keeps working. Generated scripts no longer reference this app, which
is what lets it be removed from production machines.

Generation moved from the browser to on_update. It used to run in before_save off
the editor's rendered DOM, so a half-drawn form could serialise empty formulas
over real ones; it now builds from the stored JSON.

Removed with it: the emitters (transform_expression, table-row handlers, universal
fields, report fields), plus dead code they hid — processFormula had no call
sites, applyAggregation was never emitted, and generate_child_table_script
referenced a variable outside its closure and would have thrown on the first
is_table_field formula.

VAT script: 403 KB -> 120 KB. Output verified identical across all 426 formulas.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-13 12:22:07 +00:00
..
config feat: Initialize App 2025-02-27 19:01:56 +04:00
fixtures push from mvp 2026-07-13 09:59:36 +00:00
formula_editor refactor(generator): emit config, not a code-generated engine 2026-07-13 12:22:07 +00:00
locale Fixed bug with logs 2025-04-22 18:33:58 +00:00
public refactor(generator): emit config, not a code-generated engine 2026-07-13 12:22:07 +00:00
templates feat: Initialize App 2025-02-27 19:01:56 +04:00
__init__.py feat: Initialize App 2025-02-27 19:01:56 +04:00
api.py refactor(generator): emit config, not a code-generated engine 2026-07-13 12:22:07 +00:00
hooks.py refactor(generator): emit config, not a code-generated engine 2026-07-13 12:22:07 +00:00
modules.txt feat: Initialize App 2025-02-27 19:01:56 +04:00
patches.txt feat: Initialize App 2025-02-27 19:01:56 +04:00