Skip to content

Unify transform persistence for filter, sort, advQuery, and pivot#239

Open
RachanaB5 wants to merge 1 commit intoc2siorg:mainfrom
RachanaB5:feat/persist-view-transforms
Open

Unify transform persistence for filter, sort, advQuery, and pivot#239
RachanaB5 wants to merge 1 commit intoc2siorg:mainfrom
RachanaB5:feat/persist-view-transforms

Conversation

@RachanaB5
Copy link
Copy Markdown

Closes #238

Summary

This PR standardizes the behavior of view-level transformations (filter, sort, advQueryFilter, pivotTables) by making them persisted operations.

Previously, these operations could return updated data without saving to the working CSV, leading to inconsistencies between:

  • Main table (UI)
  • Working CSV (disk)
  • Data after reload (GET /projects/get/{project_id})

Changes

Backend

  • Set should_save = True for:
    • filter
    • sort
    • advQueryFilter
    • pivotTables
  • Ensures transformations:
    • are written to working CSV
    • are logged consistently
  • Added replay support for these operations in apply_logged_transformation

Frontend

  • Filter, Sort, Advanced Query, Pivot now:
    • call onTransform after API success
    • update main table state
    • close panel after apply
  • Synced ProjectContext via updateData (important for pivot/dtypes)

Tests

  • Added replay unit tests (TestApplyLoggedViewTransforms)
  • No integration tests added to avoid local DB/env dependency issues

Result

  • Main table updates immediately after Apply
  • Changes persist to working CSV
  • Reload (GET) returns consistent data
  • Transformations are replayable via logs/checkpoints

Notes

How to test

  1. Apply filter/sort/adv query/pivot
  2. Verify table updates
  3. Refresh page → data remains consistent
  4. (Optional) test checkpoint/replay

Happy to split this into smaller PRs if preferred.

…able

- Backend: save and log filter, sort, advQueryFilter, pivotTables; replay in apply_logged_transformation
- Frontend: wire Filter/Sort/AdvQuery/Pivot to onTransform; sync ProjectContext from DataScreen
- fix: call onTransform/onClose in adv query and pivot forms (ESLint)

Made-with: Cursor
@RachanaB5 RachanaB5 force-pushed the feat/persist-view-transforms branch from b700635 to 2aa0cd7 Compare March 28, 2026 11:03
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.

Unify applied transform semantics: main table, working CSV, and GET reload (filter / sort / query / pivot)

1 participant