Et2Nextmatch: stop CustomfieldsHeader's endless update loop when all customfield columns are hidden - #270
Open
asig2016 wants to merge 1 commit into
Open
Conversation
…customfield columns are hidden With custom fields defined but every customfield column hidden by the user's column preferences, the datagrid hands the header an explicit empty fields map. updated() treated that as "not yet hydrated" and re-ran _syncCustomfieldsFromModifications(), which reassigned this.fields with a fresh-but-identical clone every cycle - Lit's default hasChanged is !==, so each update scheduled the next one forever and hard-froze the tab (no stack overflow, no console output; every task-level probe enters and exits cleanly, only a performUpdate wrap shows the loop). Keep the fields object untouched when explicit visibility is preserved, and only re-sync for missing metadata or a non-explicit empty fields map. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
|
I'm not sure how you can tell the difference here between all customfields turned off and first time loading, when there is no preference. If it's the first time / no preference, no fields selected should mean all fields selected. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Symptom: the browser tab hard-freezes (renderer unresponsive, must be killed) as soon as anything re-applies column preferences on a nextmatch whose app has custom fields defined while the user has every customfield column hidden — e.g. applying a filter. There is no stack overflow and no console output, which makes it very hard to diagnose: profiling probes on promises, timers, rAF and events all come back clean; only wrapping Lit's
performUpdatereveals the loop.Cause: the datagrid's column-preferences pass hands
Et2CustomfieldsHeaderan explicit emptyfieldsmap ("all hidden").updated()treats the empty map as "not yet hydrated" and calls_syncCustomfieldsFromModifications(), which reportschangedand reassignsthis.fields = {...previousFields}— a fresh but content-identical object. Lit's defaulthasChangedis!==, so every update schedules the next one, forever.Fix:
fieldswhen explicit visibility is preserved anyway (no fresh clone → no phantom property change),Verified live against a production instance exhibiting the freeze (patching the deployed class the same way stops the loop; the filter applies normally).
Et2Nextmatchtest suite passes (149/149), includingCustomfieldsHeader.test.ts.🤖 Generated with Claude Code