Open
Conversation
…1138) The SwiftUI sitemap introduced in 3.2.x hitches during inertial scrolling when items update frequently. Every long-poll result previously called reconcileWidgets + copyWidgetProperties unconditionally, then always reassigned @published rowInputs — causing a broad objectWillChange broadcast on every cycle even when nothing the list renders had changed. Fix: snapshot row inputs from fresh page data before any widget mutation. updateUI now returns early (skipping all reconciliation and @published writes) when the computed preview inputs equal the current rowInputs and the page title is unchanged. When searchText is active, reconciliation still runs to keep currentPage fresh so clearing the filter won't expose stale hidden widgets. Widen widget-version granularity from bare widgetId to full RowID so repeated widget IDs on one page track independently. widgetUpdateVersions is now keyed by RowID.rawValue; bumpWidgetVersions increments by row- identity pairs; SliderRowView, SegmentedRowView, SelectionRowView, and ImageRowView pass input.rowID to the lookup; affected row-input types carry their rowID. Adds SitemapPageViewModelDiffingTests covering: stable rebuild equality, objectWillChange suppression on unchanged data, structure-change rebuild, bumpWidgetVersions no-op on identical inputs, per-row version isolation, structure-change full bump, and repeated-widgetId independence. Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
updateUI now replaces currentPage wholesale instead of mutating existing OpenHABWidget objects through reconcileWidgets/copyWidgetProperties. Row inputs are already computed from fresh page data before any stored state changes, so the mutable widget graph was redundant as a rendering model. Deletes: - reconcileWidgets(_:with:) and copyWidgetProperties(from:to:) — 70 lines of in-place @published mutation that ran on every changed poll - injectSendCommand(for:) — the injected widget.sendCommand closure was never invoked; all row views call viewModel.sendCommand(command,for:itemName) directly via @EnvironmentObject - rowWidgetIndex / buildWidgetIndex / widget(for:) — the RowID→OpenHABWidget lookup was dead code; no row view called widget(for:) - WidgetRenderKey and its five support types — only used by trackWidgetUpdates which was removed in the previous commit loadCurrentPage drops the injectSendCommand call for the same reason. rebuildRowInputs drops the index rebuild. No behaviour change for any interactive row; slider optimistic values, segmented/selection sync, and media refresh all go through the row-input and item-name paths that were already in place. Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
* Decouple hot sitemap rows from shared view model * Clean up slider override decoupling * Restore page-scoped icon identity --------- Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
* Lazy-load linked sitemap page navigation * Remove redundant sitemap title modifiers * Fix linked page mapper tests --------- Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
…rows Text, generic, and linked rows had no update mechanism — no @EnvironmentObject subscription and no widgetVersion — so SwiftUI could skip re-evaluating them when rowInputs changed on foreground refresh. Add widgetVersion to TextRowInput, GenericRowInput, and LinkedPageRowInput, handle them in applyingWidgetVersions(), and remove the leftover @mainactor factory-function pattern from TextRowView and GenericRowView. Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
…t syntax Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
… model Off-screen list rows rendered stale data when scrolled into view after a foreground refresh. SwiftUI reuses cached renders for views with no observable dependencies. Adding @EnvironmentObject to EmbeddingRowInputView ensures every row is re-evaluated when rowInputs change, covering all row types at once. Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
f14652c to
4e702a8
Compare
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.
Summary
ApplicationPreferencesbackward decoding for the temporary diagnostics flagNotes
This branch is intended to be easy to remove once the scrolling issue is diagnosed and fixed. The diagnostics are hidden behind the
Sitemap Diagnostics Loggingdebug toggle.Testing