Repository navigation
Add deep equality for frontend Vars - #7208
Conversation
|
Merging this PR will degrade performance by 4.44%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ❌ | test_state_access[read_inherited] |
50.2 ms | 52.5 ms | -4.44% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing flcrom:fix/deep-equals-var (36d0e69) with main (5d969cc)
Footnotes
-
17 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
All reported issues were addressed across 1 file (changes from recent commits).
You’re at about 90% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact [email protected].
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
masenf
left a comment
There was a problem hiding this comment.
thanks for the contribution, will bring back the AppHarnessProd parametrization, then bring this in.
What changed
Add
Var.deep_equals()for structural frontend comparisons. It compiles to the single-purposelodash.isequalpackage, so nested objects and arrays compare by value rather than JavaScript identity.This covers the data-driven form use case in #7160, including object key order and nested mappings.
Testing
uv run pytest -q tests/units/test_var.py(239 passed)uv run pytest -q tests/integration/tests_playwright/test_cond_match.pyin dev and production: nested and reordered objects, arrays, nulls, type boundaries, reactive form edits and saves, and existing conditional rendering.make_pyiin independent QAlodash.isEqualfor objects, collections, typed values, sparse arrays, symbols, and cyclic graphsThe package is pinned to
[email protected]. npm marks that package deprecated in favor of Node'sutil.isDeepStrictEqual, but its behavior matches the lodash-style semantics requested here and avoids adding all of lodash.