hughhhh opened a new pull request, #45560:
URL: https://github.com/apache/superset/pull/45560

   ### SUMMARY
   In the dataset editor, "Sync columns from source" merged the fetched columns 
against `datasource.columns` — the snapshot taken when the editor opened. 
Column edits only update the `databaseColumns`/`calculatedColumns` state, and 
`updateColumns` passes an unchanged column through verbatim, so a sync silently 
reverted every column edit made earlier in the session (labels, descriptions, 
flags).
   
   The sync now merges against the live column state, read through refs so a 
request still in flight sees edits made after it started. A column deleted in 
the session but still present in the source is restored from its saved row 
(keeping its `id`) rather than re-added as a new column, which would otherwise 
fail the save with "columns already exist".
   
   Split out of #43870 at a reviewer's request; it is independent of partition 
filter mapping.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   Before: edit a column's description, click "Sync columns from source" → the 
description reverts. After: the edit survives the sync.
   
   ### TESTING INSTRUCTIONS
   - `npx jest 
src/components/Datasource/components/DatasourceEditor/tests/DatasourceEditor.test.tsx`
 — "syncing columns keeps column edits made in the session" and "syncing 
restores a column deleted in the session as its saved row" each fail without 
their part of the fix.
   - Manual: open a physical dataset's Edit modal → Columns, change a 
description, click "Sync columns from source", save; the description is kept.
   
   ### ADDITIONAL INFORMATION
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [x] Changes UI
   - [ ] Includes DB Migration
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to