Skip to content

refactor(datagrid): consolidate resolvedTableRowsForTab into the existing helper#936

Merged
datlechin merged 1 commit intomainfrom
refactor/datagrid-consolidate-resolvedtablerows
Apr 29, 2026
Merged

refactor(datagrid): consolidate resolvedTableRowsForTab into the existing helper#936
datlechin merged 1 commit intomainfrom
refactor/datagrid-consolidate-resolvedtablerows

Conversation

@datlechin
Copy link
Copy Markdown
Member

Summary

Drops the duplicate resolvedTableRowsForTab(coordinator:tabId:) helper in MainEditorContentView. Both helpers returned the same one-liner — the duplicate existed because the dataGridView closure captures [coordinator] and didn't have a QueryTab in scope.

Inlined the store read directly in the closure (already a one-liner, no helper needed). resolvedTableRows(for tab:) stays for the four other call sites that operate on a QueryTab.

Test plan

  • Build clean
  • Manual: open table, switch tabs, verify data displays correctly

Net −5 LOC. One less duplicate.

…ting helper

resolvedTableRowsForTab(coordinator:tabId:) and resolvedTableRows(for:) returned the same one-liner: coordinator.tableRowsStore.existingTableRows(for: id) ?? TableRows(). The duplicate existed because the dataGridView closure captures [coordinator] and didn't have a QueryTab in scope.

Inlined the store read directly in the closure (already a one-liner, no helper needed). Drops the duplicate method. resolvedTableRows(for tab:) stays for the four other call sites that operate on a QueryTab.
@datlechin datlechin merged commit aa4a260 into main Apr 29, 2026
2 checks passed
@datlechin datlechin deleted the refactor/datagrid-consolidate-resolvedtablerows branch April 29, 2026 04:50
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