Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(soup): clear stale group-by when switching views within a split (#3534)

gbirman6613752e9b69
diff --git a/js/app/packages/app/component/next-soup/soup-view/soup-view.tsx b/js/app/packages/app/component/next-soup/soup-view/soup-view.tsx
index c44c5adf3c..05a830a187 100644
--- a/js/app/packages/app/component/next-soup/soup-view/soup-view.tsx
+++ b/js/app/packages/app/component/next-soup/soup-view/soup-view.tsx
@@ -976,9 +976,13 @@ export const SoupViewList = (props: SoupViewListProps) => {
if (!skipFiltersOnMount && props.initialClientFilters) {
soup.predicates.set(props.initialClientFilters);
}
- if (props.initialGroupBy) {
+ // soup state is shared at the SplitPanel level, so a prior view in the
+ // same split (e.g. tasks) may have left grouping state behind. Always
+ // reset to this view's initial grouping, even when undefined.
+ batch(() => {
soup.grouping.setActiveGroupId(props.initialGroupBy);
- }
+ soup.grouping.collapseAll([]);
+ });
// Set default tab for list views when no persisted state exists
if (!skipFiltersOnMount && isListViewID(contentId)) {
const defaultTab = VIEW_TAB_PRESETS[contentId].default;