Skip to content

A local-first personal finance app

Remove category spending report (#2344)

Johannes Löthberg65372e86a595
diff --git a/packages/desktop-client/src/components/reports/Overview.jsx b/packages/desktop-client/src/components/reports/Overview.jsx
index 16a6b1e321..e0b8163d6d 100644
--- a/packages/desktop-client/src/components/reports/Overview.jsx
+++ b/packages/desktop-client/src/components/reports/Overview.jsx
@@ -8,16 +8,12 @@ import { styles } from '../../style';
import { View } from '../common/View';
import { CashFlowCard } from './reports/CashFlowCard';
-import { CategorySpendingCard } from './reports/CategorySpendingCard';
import { CustomReportCard } from './reports/CustomReportCard';
import { NetWorthCard } from './reports/NetWorthCard';
import { SankeyCard } from './reports/SankeyCard';
export function Overview() {
const customReports = useReports();
- const categorySpendingReportFeatureFlag = useFeatureFlag(
- 'categorySpendingReport',
- );
const sankeyFeatureFlag = useFeatureFlag('sankeyReport');
const customReportsFeatureFlag = useFeatureFlag('customReports');
@@ -45,14 +41,12 @@ export function Overview() {
flexDirection: 'row',
}}
>
- {categorySpendingReportFeatureFlag && <CategorySpendingCard />}
{sankeyFeatureFlag && <SankeyCard />}
{customReportsFeatureFlag ? (
<CustomReportCard reports={customReports} />
) : (
<div style={{ flex: 1 }} />
)}
- {!categorySpendingReportFeatureFlag && <div style={{ flex: 1 }} />}
{!sankeyFeatureFlag && <div style={{ flex: 1 }} />}
</View>
</View>
diff --git a/packages/desktop-client/src/components/reports/ReportRouter.jsx b/packages/desktop-client/src/components/reports/ReportRouter.jsx
index 98063828a3..4318b31410 100644
--- a/packages/desktop-client/src/components/reports/ReportRouter.jsx
+++ b/packages/desktop-client/src/components/reports/ReportRouter.jsx
@@ -3,7 +3,6 @@ import { Route, Routes } from 'react-router-dom';
import { Overview } from './Overview';
import { CashFlow } from './reports/CashFlow';
-import { CategorySpending } from './reports/CategorySpending';
import { CustomReport } from './reports/CustomReport';
import { NetWorth } from './reports/NetWorth';
import { Sankey } from './reports/Sankey';
@@ -14,7 +13,6 @@ export function ReportRouter() {
<Route path="/" element={<Overview />} />
<Route path="/net-worth" element={<NetWorth />} />
<Route path="/cash-flow" element={<CashFlow />} />
- <Route path="/category-spending" element={<CategorySpending />} />
<Route path="/custom" element={<CustomReport />} />
<Route path="/sankey" element={<Sankey />} />
</Routes>
diff --git a/packages/desktop-client/src/components/reports/Tooltip.jsx b/packages/desktop-client/src/components/reports/Tooltip.jsx
deleted file mode 100644
index 0ec50a81fd..0000000000
--- a/packages/desktop-client/src/components/reports/Tooltip.jsx
+++ /dev/null
@@ -1,86 +0,0 @@
-import React, { Component } from 'react';
-import ReactDOM from 'react-dom';
-
-import { css, before } from 'glamor';
-import { VictoryTooltip } from 'victory';
-
-import { theme } from '../../style';
-
-export class Tooltip extends Component {
- static defaultEvents = VictoryTooltip.defaultEvents;
-
- render() {
- const {
- active,
- x,
- y: originalY,
- scale,
- datum,
- portalHost,
- offsetX = 0,
- offsetY,
- position: originalPosition,
- light,
- forceActive,
- style,
- } = this.props;
- const xRange = scale.x.range();
- const xPos = x - xRange[0];
-
- let position = originalPosition;
- if (!position) {
- if (datum.labelPosition) {
- position = datum.labelPosition;
- } else {
- position = xPos < 150 ? 'right' : 'left';
- }
- }
-
- if (!portalHost || (!active && !forceActive)) {
- return null;
- }
-
- const y = offsetY ? offsetY(originalY) : originalY;
-
- return ReactDOM.createPortal(
- <div
- className={`${css(
- {
- position: 'absolute',
- top: 0,
- left: offsetX,
- // prettier-ignore
- transform: position === 'right' ?
- `translate(calc(${x}px + 15px), calc(${y}px ${light ? '' : '- 50%'}))` :
- `translate(calc(${x}px - 100% - 15px), calc(${y}px ${light ? '' : '- 50%'}))`,
- zIndex: 1000,
- pointerEvents: 'none',
- borderRadius: 2,
- boxShadow: light ? 'none' : '0 1px 6px rgba(0, 0, 0, .20)',
- // TODO: Transparent background
- backgroundColor: light ? 'transparent' : theme.menuBackground,
- color: light ? 'inherit' : theme.menuItemText,
- padding: 10,
- },
- !light &&
- before({
- position: 'absolute',
- display: 'inline-block',
- borderTop: '7px solid transparent',
- borderBottom: '7px solid transparent',
- [position === 'right' ? 'borderRight' : 'borderLeft']:
- '7px solid ' + theme.menuBackground,
- [position === 'right' ? 'left' : 'right']: -6,
- top: 'calc(50% - 7px)',
- // eslint-disable-next-line rulesdir/typography
- content: '" "',
- }),
- style,
- )}`}
- >
- {datum.premadeLabel}
- </div>,
- portalHost,
- );
- }
-}
diff --git a/packages/desktop-client/src/components/reports/graphs/CategorySpendingGraph.tsx b/packages/desktop-client/src/components/reports/graphs/CategorySpendingGraph.tsx
deleted file mode 100644
index d4a221097a..0000000000
--- a/packages/desktop-client/src/components/reports/graphs/CategorySpendingGraph.tsx
+++ /dev/null
@@ -1,85 +0,0 @@
-import type { CSSProperties } from 'react';
-
-import * as d from 'date-fns';
-import { VictoryAxis, VictoryBar, VictoryChart, VictoryStack } from 'victory';
-
-import { chartTheme } from '../chart-theme';
-import { Container } from '../Container';
-import { type CategorySpendingGraphData } from '../spreadsheets/category-spending-spreadsheet';
-import { Tooltip } from '../Tooltip';
-
-import { Area } from './common';
-
-type CategorySpendingGraphProps = {
- start: string;
- end: string;
- graphData: CategorySpendingGraphData;
- compact?: boolean;
- style?: CSSProperties;
-};
-export function CategorySpendingGraph({
- style,
- start,
- end,
- graphData,
- compact,
-}: CategorySpendingGraphProps) {
- if (!graphData || !graphData.data) {
- return;
- }
-
- return (
- <Container
- style={{
- ...style,
- ...(compact && { height: 'auto', flex: 1 }),
- }}
- >
- {(width, height, portalHost) => (
- <VictoryChart
- scale={{ x: 'time', y: 'linear' }}
- theme={chartTheme}
- width={width}
- height={height}
- >
- <Area start={start} end={end} />
- <VictoryStack
- colorScale="qualitative"
- domainPadding={{ x: compact ? 5 : 15 }}
- >
- {graphData.categories.map(category => (
- <VictoryBar
- key={category.id}
- data={graphData.data[category.id]}
- labelComponent={
- !compact ? <Tooltip portalHost={portalHost} /> : undefined
- }
- labels={item => item.premadeLabel}
- />
- ))}
- </VictoryStack>
- {!compact && (
- <VictoryAxis
- style={{ ticks: { stroke: 'red' } }}
- // eslint-disable-next-line rulesdir/typography
- tickFormat={x => d.format(x, "MMM ''yy")}
- tickValues={graphData.tickValues}
- tickCount={Math.max(
- 1,
- Math.min(width > 760 ? 12 : 5, graphData.tickValues.length),
- )}
- offsetY={50}
- orientation="bottom"
- />
- )}
- <VictoryAxis
- dependentAxis
- crossAxis={false}
- invertAxis
- tickCount={compact ? 2 : height / 70}
- />
- </VictoryChart>
- )}
- </Container>
- );
-}
diff --git a/packages/desktop-client/src/components/reports/graphs/common.tsx b/packages/desktop-client/src/components/reports/graphs/common.tsx
deleted file mode 100644
index 4ea35408c0..0000000000
--- a/packages/desktop-client/src/components/reports/graphs/common.tsx
+++ /dev/null
@@ -1,68 +0,0 @@
-// @ts-strict-ignore
-import * as d from 'date-fns';
-
-import { chartTheme } from '../chart-theme';
-
-type AreaProps = {
- start: string;
- end: string;
- scale?;
- range?;
-};
-export function Area({ start, end, scale, range }: AreaProps) {
- const zero = scale.y(0);
-
- const startX = scale.x(d.parseISO(start + '-01'));
- const endX = scale.x(d.parseISO(end + '-01'));
-
- if (startX < 0 || endX < 0 || startX === undefined || endX === undefined) {
- return null;
- }
-
- return (
- <svg>
- <defs>
- <clipPath id="positive">
- <rect
- x={startX}
- y={range.y[1]}
- width={endX - startX}
- height={zero - range.y[1] + 1}
- fill="#ffffff"
- />
- </clipPath>
- <clipPath id="negative">
- <rect
- x={startX}
- y={zero + 1}
- width={endX - startX}
- height={Math.max(range.y[0] - zero - 1, 0)}
- fill="#ffffff"
- />
- </clipPath>
- <linearGradient
- id="positive-gradient"
- gradientUnits="userSpaceOnUse"
- x1={0}
- y1={range.y[1]}
- x2={0}
- y2={zero}
- >
- <stop offset="0%" stopColor={chartTheme.colors.blueFadeStart} />
- <stop offset="100%" stopColor={chartTheme.colors.blueFadeEnd} />
- </linearGradient>
- <linearGradient
- id="negative-gradient"
- gradientUnits="userSpaceOnUse"
- x1={0}
- y1={zero}
- x2={0}
- y2={range.y[0]}
- >
- <stop offset="0%" stopColor={chartTheme.colors.redFadeEnd} />
- <stop offset="100%" stopColor={chartTheme.colors.redFadeStart} />
- </linearGradient>
- </defs>
- </svg>
- );
-}
diff --git a/packages/desktop-client/src/components/reports/reports/CategorySpending.jsx b/packages/desktop-client/src/components/reports/reports/CategorySpending.jsx
deleted file mode 100644
index 13e195e525..0000000000
--- a/packages/desktop-client/src/components/reports/reports/CategorySpending.jsx
+++ /dev/null
@@ -1,174 +0,0 @@
-import React, { useState, useEffect, useMemo } from 'react';
-
-import * as d from 'date-fns';
-
-import { send } from 'loot-core/src/platform/client/fetch';
-import * as monthUtils from 'loot-core/src/shared/months';
-
-import { useCategories } from '../../../hooks/useCategories';
-import { styles } from '../../../style';
-import { Select } from '../../common/Select';
-import { View } from '../../common/View';
-import { CategorySelector } from '../CategorySelector';
-import { CategorySpendingGraph } from '../graphs/CategorySpendingGraph';
-import { Header } from '../Header';
-import { createSpreadsheet as categorySpendingSpreadsheet } from '../spreadsheets/category-spending-spreadsheet';
-import { useReport } from '../useReport';
-import { fromDateRepr } from '../util';
-
-export function CategorySpending() {
- const categories = useCategories();
-
- const [selectedCategories, setSelectedCategories] = useState(null);
-
- const [allMonths, setAllMonths] = useState(null);
-
- const [start, setStart] = useState(
- monthUtils.subMonths(monthUtils.currentMonth(), 5),
- );
- const [end, setEnd] = useState(monthUtils.currentMonth());
-
- const [numberOfMonthsAverage, setNumberOfMonthsAverage] = useState(1);
-
- useEffect(() => {
- if (selectedCategories === null && categories.list.length !== 0) {
- setSelectedCategories(categories.list);
- }
- }, [categories, selectedCategories]);
-
- const getGraphData = useMemo(() => {
- return categorySpendingSpreadsheet(
- start,
- end,
- numberOfMonthsAverage,
- (categories.list || []).filter(
- category =>
- !category.is_income &&
- !category.hidden &&
- selectedCategories &&
- selectedCategories.some(
- selectedCategory => selectedCategory.id === category.id,
- ),
- ),
- );
- }, [start, end, numberOfMonthsAverage, categories, selectedCategories]);
- const perCategorySpending = useReport('category_spending', getGraphData);
-
- useEffect(() => {
- async function run() {
- const trans = await send('get-earliest-transaction');
- const currentMonth = monthUtils.currentMonth();
- let earliestMonth = trans
- ? monthUtils.monthFromDate(d.parseISO(fromDateRepr(trans.date)))
- : currentMonth;
-
- // Make sure the month selects are at least populates with a
- // year's worth of months. We can undo this when we have fancier
- // date selects.
- const yearAgo = monthUtils.subMonths(monthUtils.currentMonth(), 12);
- if (earliestMonth > yearAgo) {
- earliestMonth = yearAgo;
- }
-
- const allMonths = monthUtils
- .rangeInclusive(earliestMonth, monthUtils.currentMonth())
- .map(month => ({
- name: month,
- pretty: monthUtils.format(month, 'MMMM, yyyy'),
- }))
- .reverse();
-
- setAllMonths(allMonths);
- }
- run();
- }, []);
-
- function onChangeDates(start, end) {
- setStart(start);
- setEnd(end);
- }
-
- if (!allMonths || !perCategorySpending) {
- return null;
- }
-
- const numberOfMonthsOptions = [
- { value: 1, description: 'No averaging' },
- { value: 3, description: '3 months' },
- { value: 6, description: '6 months' },
- { value: 12, description: '12 months' },
- { value: -1, description: 'All time' },
- ];
- const numberOfMonthsLine = numberOfMonthsOptions.length - 1;
-
- const headerPrefixItems = (
- <View
- style={{
- flexDirection: 'row',
- alignItems: 'center',
- gap: 5,
- }}
- >
- <View>Average: </View>
- <Select
- style={{ backgroundColor: 'white' }}
- onChange={setNumberOfMonthsAverage}
- value={numberOfMonthsAverage}
- options={numberOfMonthsOptions.map(number => [
- number.value,
- number.description,
- ])}
- line={numberOfMonthsLine}
- />
- </View>
- );
-
- return (
- <View style={{ ...styles.page, overflow: 'hidden' }}>
- <Header
- title="Category Spending"
- allMonths={allMonths}
- start={start}
- end={end}
- onChangeDates={onChangeDates}
- headerPrefixItems={headerPrefixItems}
- />
- <View
- style={{
- display: 'flex',
- flexDirection: 'row',
- padding: 15,
- gap: 15,
- flexGrow: 1,
- }}
- >
- <View style={{ width: 200 }}>
- <CategorySelector
- categoryGroups={categories.grouped.filter(
- categoryGroup => !categoryGroup.is_income,
- )}
- selectedCategories={selectedCategories}
- setSelectedCategories={setSelectedCategories}
- />
- </View>
-
- <View
- style={{
- flexGrow: 1,
- backgroundColor: 'white',
- padding: 30,
- overflow: 'auto',
- transition: 'flex-grow .3s linear',
- }}
- >
- <CategorySpendingGraph
- style={{ flexGrow: 1 }}
- start={start}
- end={end}
- graphData={perCategorySpending}
- />
- </View>
- </View>
- </View>
- );
-}
diff --git a/packages/desktop-client/src/components/reports/reports/CategorySpendingCard.jsx b/packages/desktop-client/src/components/reports/reports/CategorySpendingCard.jsx
deleted file mode 100644
index c6b86eac0d..0000000000
--- a/packages/desktop-client/src/components/reports/reports/CategorySpendingCard.jsx
+++ /dev/null
@@ -1,61 +0,0 @@
-import React, { useMemo } from 'react';
-
-import * as monthUtils from 'loot-core/src/shared/months';
-
-import { useCategories } from '../../../hooks/useCategories';
-import { styles } from '../../../style';
-import { Block } from '../../common/Block';
-import { View } from '../../common/View';
-import { DateRange } from '../DateRange';
-import { CategorySpendingGraph } from '../graphs/CategorySpendingGraph';
-import { LoadingIndicator } from '../LoadingIndicator';
-import { ReportCard } from '../ReportCard';
-import { createSpreadsheet as categorySpendingSpreadsheet } from '../spreadsheets/category-spending-spreadsheet';
-import { useReport } from '../useReport';
-
-export function CategorySpendingCard() {
- const { list: categories = [] } = useCategories();
-
- const end = monthUtils.currentDay();
- const start = monthUtils.subMonths(end, 3);
-
- const params = useMemo(() => {
- return categorySpendingSpreadsheet(
- start,
- end,
- 3,
- categories.filter(category => !category.is_income && !category.hidden),
- );
- }, [start, end, categories]);
-
- const perCategorySpending = useReport('category_spending', params);
-
- return (
- <ReportCard flex={1} to="/reports/category-spending">
- <View>
- <View style={{ flexDirection: 'row', padding: '20px 20px 0' }}>
- <View style={{ flex: 1 }}>
- <Block
- style={{ ...styles.mediumText, fontWeight: 500, marginBottom: 5 }}
- role="heading"
- >
- Spending
- </Block>
- <DateRange start={start} end={end} />
- </View>
- </View>
- </View>
-
- {perCategorySpending ? (
- <CategorySpendingGraph
- start={start}
- end={end}
- graphData={perCategorySpending}
- compact={true}
- />
- ) : (
- <LoadingIndicator />
- )}
- </ReportCard>
- );
-}
diff --git a/packages/desktop-client/src/components/reports/spreadsheets/category-spending-spreadsheet.tsx b/packages/desktop-client/src/components/reports/spreadsheets/category-spending-spreadsheet.tsx
deleted file mode 100644
index aac3cc2ecb..0000000000
--- a/packages/desktop-client/src/components/reports/spreadsheets/category-spending-spreadsheet.tsx
+++ /dev/null
@@ -1,216 +0,0 @@
-// @ts-strict-ignore
-import React from 'react';
-
-import * as d from 'date-fns';
-
-import { rolloverBudget } from 'loot-core/src/client/queries';
-import { runQuery } from 'loot-core/src/client/query-helpers';
-import * as monthUtils from 'loot-core/src/shared/months';
-import { q } from 'loot-core/src/shared/query';
-import { integerToAmount, integerToCurrency } from 'loot-core/src/shared/util';
-
-import { AlignedText } from '../../common/AlignedText';
-
-type CategoryGraphDataForMonth = {
- x: number;
- y: number;
- premadeLabel: JSX.Element;
-
- average: number;
- budgeted: number;
- total: number;
-};
-
-export type CategorySpendingGraphData = {
- categories: Category[];
- tickValues: number[];
- data: { [category: string]: CategoryGraphDataForMonth[] };
-};
-
-type Category = {
- id: string;
- name: string;
-};
-
-type CategoryBudgetForMonth = {
- budgeted: number;
- sumAmount: number;
- balance: number;
-};
-type CategoryBudgetPerMonth = {
- [month: string]: CategoryBudgetForMonth;
-};
-
-export function createSpreadsheet(
- start: string | null,
- end: string | null,
- numberOfMonthsAverage: number,
- categories: Category[],
-) {
- return async (
- spreadsheet: {
- get: (sheet: string, cell: string) => Promise<{ value: number }>;
- },
- setData: (graphData: CategorySpendingGraphData) => void,
- ) => {
- if (start === null || end === null || categories.length === 0) {
- return;
- }
-
- // Calculate the range of months that we will return data for. This will
- // contain more months than the specified start-end range in case we're
- // averaging data.
- let months: string[];
- if (numberOfMonthsAverage === -1) {
- // `numberOfMonthsAverage` is set to -1 to mean "all time."
- const firstTransaction = await runQuery(
- q('transactions')
- .filter({
- $or: categories.map(category => ({ category: category.id })),
- })
- .orderBy({ date: 'asc' })
- .limit(1)
- .select('date'),
- );
- if (firstTransaction.data.length === 0) {
- return;
- }
-
- months = monthUtils.rangeInclusive(
- monthUtils.monthFromDate(firstTransaction.data[0].date),
- end,
- );
- } else {
- months = monthUtils.rangeInclusive(
- monthUtils.subMonths(start, numberOfMonthsAverage),
- end,
- );
- }
-
- const budgetForMonth = async (
- sheet: string,
- category: Category,
- ): Promise<CategoryBudgetForMonth> =>
- Promise.all([
- spreadsheet
- .get(sheet, rolloverBudget.catBudgeted(category.id))
- .then((cell: { value: number }) => cell.value ?? 0),
- spreadsheet
- .get(sheet, rolloverBudget.catSumAmount(category.id))
- .then((cell: { value: number }) => cell.value ?? 0),
- spreadsheet
- .get(sheet, rolloverBudget.catBalance(category.id))
- .then((cell: { value: number }) => cell.value ?? 0),
- ]).then(([budgeted, sumAmount, balance]) => ({
- budgeted,
- sumAmount,
- balance,
- }));
-
- const budgetPerMonth = async (
- category: Category,
- ): Promise<CategoryBudgetPerMonth> =>
- months.reduce(
- async (perMonth, month) => ({
- ...(await perMonth),
- [month]: await budgetForMonth(
- monthUtils.sheetForMonth(month),
- category,
- ),
- }),
- Promise.resolve({}),
- );
-
- const data: { [category: string]: CategoryGraphDataForMonth[] } =
- await categories.reduce(
- async (perCategory, category) => ({
- ...(await perCategory),
- [category.id]: await budgetPerMonth(category).then(perMonth =>
- recalculate(start, end, category, numberOfMonthsAverage, perMonth),
- ),
- }),
- Promise.resolve({}),
- );
-
- setData({
- categories,
- tickValues: data[categories[0].id].map(item => item.x),
- data,
- });
- };
-}
-
-function recalculate(
- start: string,
- end: string,
- category: Category,
- numberOfMonthsAverage: number,
- budgetPerMonth: CategoryBudgetPerMonth,
-): CategoryGraphDataForMonth[] {
- const months = monthUtils.rangeInclusive(start, end);
- const [averagedData, _] = months.reduce(
- ([arr, idx], month) => {
- const thisMonth = budgetPerMonth[month];
- const x = d.parseISO(`${month}-01`);
-
- const months = numberOfMonthsAverage === -1 ? idx : numberOfMonthsAverage;
- const sumAmounts = [];
- for (let i = 0; i < months; i++) {
- sumAmounts.push(
- budgetPerMonth[monthUtils.subMonths(month, i)].sumAmount,
- );
- }
- const average = sumAmounts.reduce((a, b) => a + b) / sumAmounts.length;
-
- const label = (
- <div>
- <div style={{ marginBottom: 10 }}>
- <strong>{category.name}</strong>
- </div>
- <div style={{ lineHeight: 1.5 }}>
- {numberOfMonthsAverage !== 0 && (
- <>
- <AlignedText
- left="Average:"
- right={integerToCurrency(Math.round(average))}
- />
- <hr />
- </>
- )}
- <AlignedText
- left="Budgeted:"
- right={integerToCurrency(thisMonth.budgeted)}
- />
- <AlignedText
- left="Spent:"
- right={integerToCurrency(thisMonth.sumAmount)}
- />
- <AlignedText
- left="Balance:"
- right={integerToCurrency(thisMonth.balance)}
- />
- </div>
- </div>
- );
-
- return [
- [
- ...arr,
- {
- x,
- y: integerToAmount(Math.round(average)),
- premadeLabel: label,
-
- average,
- budgeted: thisMonth.budgeted,
- total: thisMonth.sumAmount,
- },
- ],
- idx + 1,
- ];
- },
- [[], 1],
- );
-
- return averagedData;
-}
diff --git a/packages/desktop-client/src/components/settings/Experimental.tsx b/packages/desktop-client/src/components/settings/Experimental.tsx
index 094af86241..fc1a942c52 100644
--- a/packages/desktop-client/src/components/settings/Experimental.tsx
+++ b/packages/desktop-client/src/components/settings/Experimental.tsx
@@ -87,9 +87,6 @@ export function ExperimentalFeatures() {
primaryAction={
expanded ? (
<View style={{ gap: '1em' }}>
- <FeatureToggle flag="categorySpendingReport">
- Category spending report
- </FeatureToggle>
<FeatureToggle flag="customReports">Custom reports</FeatureToggle>
<FeatureToggle flag="sankeyReport">Sankey report</FeatureToggle>
diff --git a/packages/desktop-client/src/hooks/useFeatureFlag.ts b/packages/desktop-client/src/hooks/useFeatureFlag.ts
index 1395862d78..40b79b84db 100644
--- a/packages/desktop-client/src/hooks/useFeatureFlag.ts
+++ b/packages/desktop-client/src/hooks/useFeatureFlag.ts
@@ -6,7 +6,6 @@ import { type PrefsState } from 'loot-core/client/state-types/prefs';
import type { FeatureFlag } from 'loot-core/src/types/prefs';
const DEFAULT_FEATURE_FLAG_STATE: Record<FeatureFlag, boolean> = {
- categorySpendingReport: false,
sankeyReport: false,
reportBudget: false,
goalTemplatesEnabled: false,
diff --git a/packages/loot-core/src/types/prefs.d.ts b/packages/loot-core/src/types/prefs.d.ts
index e924b32901..df63517dd8 100644
--- a/packages/loot-core/src/types/prefs.d.ts
+++ b/packages/loot-core/src/types/prefs.d.ts
@@ -1,7 +1,6 @@
import { type numberFormats } from '../shared/util';
export type FeatureFlag =
- | 'categorySpendingReport'
| 'sankeyReport'
| 'reportBudget'
| 'goalTemplatesEnabled'
diff --git a/upcoming-release-notes/2344.md b/upcoming-release-notes/2344.md
new file mode 100644
index 0000000000..67f56b4815
--- /dev/null
+++ b/upcoming-release-notes/2344.md
@@ -0,0 +1,6 @@
+---
+category: Features
+authors: [kyrias]
+---
+
+Remove category spending report which has been superseded by the custom reports feature.