refactor: move selectedRowIndices to @Observable GridSelectionState on coordinator#914
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 38769a3ccc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -0,0 +1 @@ | |||
| /Users/ngoquocdat/Projects/TablePro/Libs No newline at end of file | |||
There was a problem hiding this comment.
Revert absolute symlink for Libs
This change replaces the repository’s Libs directory with a symlink to /Users/ngoquocdat/Projects/TablePro/Libs, which is a machine-local absolute path. On CI and every other developer machine that path will not exist, so required bundled libraries under Libs/ are no longer present in the checkout and builds become non-reproducible or fail outright. Libs needs to remain project-relative content (or a proper submodule), not a user-specific symlink.
Useful? React with 👍 / 👎.
38769a3 to
55e34fa
Compare
55e34fa to
9dd96d1
Compare
Summary
selectedRowIndiceswas a@State varonMainContentView(the top-level view). Every row click invalidatedMainContentView.body, cascading re-renders through sidebar (186 samples in profiler) and inspector.Now lives in
GridSelectionState(@Observableclass) onMainContentCoordinator. Only views that actually read.indicesre-render (DataGrid, status bar, inspector).MainContentView.bodypasses the reference without reading.indices— zero invalidation.@State var selectedRowIndicesremoved fromMainContentViewGridSelectionStateadded toMainContentCoordinatorhandleSort,addNewRow,undoInsertRow, etc.) read/writeselectionState.indicesdirectly instead of acceptinginout Set<Int>MainContentCommandActionsusesGridSelectionStatedirectly instead ofBinding<Set<Int>>scheduleInspectorUpdate()Test plan