Skip to content

fix(tabs): keep a table tab's rows until you reload it (#3848) - #3921

Merged
datlechin merged 1 commit into
release/0.83from
backport/3848-0.83
Oct 30, 2026
Merged

datlechin merged 1 commit into
release/0.83from
backport/3848-0.83

Conversation

@datlechin

Copy link
Copy Markdown
Member

Pick of #3848.

Summary

  • Same behavior as fix(tabs): keep a table tab's rows until you reload it #3848 on 0.83: no 5 s resign-key eviction, no per-switch row budget, no isEvicted, evict(for:), QueryTab.loadEpoch, discardRowsKeepingMetadata or MemoryPressureAdvisor.
  • A tab TablePro wrote to still reloads when shown. ParkedTableLoad, the shared holdsUnsavedWork and the canEditActiveResult busy gate come over as on main.
  • Differs from main because 0.83 predates refactor(data-grid)!: rebuild the macOS data grid on one model and native AppKit #3833:
    • 0.83 has no grid models, so no pruneGridDisplayCaches at the switch. Its displayStateCache already prunes itself on insert; that prune now uses GridDisplayCacheBudget instead of the pressure-halved MemoryPressureAdvisor budget.
    • holdsUnsavedWork matches the change manager to the selected tab (0.83 has no changeManagerTabId) and counts an open cell through hasOpenCellOverlay, the check 0.83's refresh plan already used (no isEditingActiveGrid).
    • FindBarView's rowsRevision drops loadEpoch; only eviction moved it.
    • Dropped the stale doc comment on handleWindowDidResignKey.
  • Tests adapted to 0.83's types:
    • changedTableWaitsForAnOpenCell opens a real CellOverlayViewer instead of main's DataGridMountedView stub.
    • TableTabRowRetentionTests checks displayStateCache instead of grid model caches; the switching case is a contract test here, since 0.83 has no deferred prune to wait on.
    • rowsAreReadOnlyWhileReplaced checks canEditActiveResult only (0.83 has no gridConfiguration(for:)).
  • Changelog fragments kept as 3848.*.md.

Test plan

  • verify.sh build: PASS
  • verify.sh test: 242 executed, 242 passed, 0 failed, over the 20 suites fix(tabs): keep a table tab's rows until you reload it #3848 touched or that read the changed code (TableTabRowRetentionTests, MainContentCoordinatorLazyLoadTests, CatalogChangeWindowTests, MainContentCoordinatorTabSwitchTests, TableRowsRefreshPlanTests, MaterializedViewRowWriteTests, GridDisplayCacheBudgetTests and others)
  • rowsAreReadOnlyWhileReplaced and changedTableWaitsForAnOpenCell assert the two gates release/0.83 lacks (the busy edit gate, the open cell in canAutoLoadTableTab). Not run against the unfixed branch.
  • verify.sh lint on the 32 changed Swift files: PASS, 0 violations

Fixes #3841

@datlechin
datlechin enabled auto-merge (squash) October 30, 2026 16:47
@datlechin
datlechin merged commit 458bc79 into release/0.83 Oct 30, 2026
8 checks passed
@datlechin
datlechin deleted the backport/3848-0.83 branch October 31, 2026 06:13
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.

1 participant