A local-first personal finance app
[AI] Rename tags from the Tags page (#8752)
Tim06e495e850f5
diff --git a/packages/desktop-client/src/components/table.tsx b/packages/desktop-client/src/components/table.tsxindex a30f1cc65b..29ec5f9538 100644--- a/packages/desktop-client/src/components/table.tsx+++ b/packages/desktop-client/src/components/table.tsx@@ -937,7 +937,7 @@ export type TableProps<T extends TableItem = TableItem> = {item: T;editing: boolean;focusedField: string | null;- onEdit: (id: T['id'], field: string) => void;+ onEdit: TableNavigator<T>['onEdit'];index: number;position: number;}) => ReactNode;diff --git a/packages/desktop-client/src/components/tags/ManageTags.test.tsx b/packages/desktop-client/src/components/tags/ManageTags.test.tsxnew file mode 100644index 0000000000..9785b048b5--- /dev/null+++ b/packages/desktop-client/src/components/tags/ManageTags.test.tsx@@ -0,0 +1,152 @@+import React from 'react';+import { MemoryRouter } from 'react-router';++import { initServer } from '@actual-app/core/platform/client/connection';+import type { TagEntity } from '@actual-app/core/types/models';+import { act, render, screen, within } from '@testing-library/react';+import userEvent from '@testing-library/user-event';++import {+ configureTestAppStore,+ createTestQueryClient,+ TestProviders,+} from '#mocks';+import { tagQueries } from '#tags';++import { ManageTags } from './ManageTags';++vi.mock(+ '@actual-app/core/platform/client/connection',+ () => import('#mocks/connection'),+);++const tags: TagEntity[] = [+ { id: 'tag-1', tag: 'Reimbursable', color: null, description: null },+ { id: 'tag-2', tag: 'Work', color: null, description: null },+];++const createRenameTagMock = () =>+ vi.fn(async ({ id }: { id: string; tag: string }) => id);++describe('ManageTags', () => {+ let store: ReturnType<typeof configureTestAppStore>;+ let renameTag: ReturnType<typeof createRenameTagMock>;++ beforeEach(async () => {+ renameTag = createRenameTagMock();+ initServer({ 'tags-get': async () => tags, 'tags-rename': renameTag });++ const queryClient = createTestQueryClient();+ queryClient.setQueryData(tagQueries.list().queryKey, tags);+ store = configureTestAppStore({ queryClient });++ render(+ <TestProviders store={store} queryClient={queryClient}>+ <MemoryRouter>+ <ManageTags />+ </MemoryRouter>+ </TestProviders>,+ );+ await act(() => Promise.resolve());+ });++ function contextMenuItem(name: string) {+ const item = store+ .getState()+ .contextMenu.items.find(+ item => typeof item === 'object' && item.name === name,+ );+ return typeof item === 'object' ? item : undefined;+ }++ async function startRenaming(tagName: string) {+ await userEvent.pointer({+ target: screen.getByText(`#${tagName}`),+ keys: '[MouseRight]',+ });++ const rename = contextMenuItem('rename');+ if (!rename) {+ throw new Error('Rename context menu item not found');+ }+ await act(async () => rename.onClick?.());+ }++ async function selectTag(tagName: string) {+ const row = screen+ .getByText(`#${tagName}`)+ .closest<HTMLElement>('[data-testid="row"]');+ if (!row) {+ throw new Error(`Row for #${tagName} not found`);+ }+ await userEvent.click(within(row).getByTestId('select'));+ }++ async function openSelectionMenu() {+ await userEvent.click(screen.getByTestId('selected-tags-select-button'));+ return screen.getByTestId('selected-tags-select-tooltip');+ }++ it('offers renaming from the selection menu for a single tag', async () => {+ await selectTag('Reimbursable');++ const menu = await openSelectionMenu();+ await userEvent.click(within(menu).getByText('Rename'));++ expect(await screen.findByDisplayValue('Reimbursable')).toBeInTheDocument();+ // The selection is cleared so the closing menu cannot pull focus back+ // out of the input, which would leave the delete/hide hotkeys live+ expect(+ screen.queryByTestId('selected-tags-select-button'),+ ).not.toBeInTheDocument();+ });++ it('drops renaming from the row context menu for a multi-selection', async () => {+ await selectTag('Reimbursable');+ await selectTag('Work');+ await userEvent.pointer({+ target: screen.getByText('#Reimbursable'),+ keys: '[MouseRight]',+ });++ expect(contextMenuItem('rename')).toBeUndefined();+ expect(contextMenuItem('delete')).toBeDefined();+ });++ it('keeps renaming in the row context menu for one selected tag', async () => {+ await selectTag('Reimbursable');+ await userEvent.pointer({+ target: screen.getByText('#Reimbursable'),+ keys: '[MouseRight]',+ });++ expect(contextMenuItem('rename')).toBeDefined();+ });++ it('drops renaming from the selection menu for a multi-selection', async () => {+ await selectTag('Reimbursable');+ await selectTag('Work');++ const menu = await openSelectionMenu();++ expect(within(menu).queryByText('Rename')).not.toBeInTheDocument();+ expect(within(menu).getByText('Delete')).toBeInTheDocument();+ });++ it('renames the tag on submit', async () => {+ await startRenaming('Reimbursable');++ const input = screen.getByDisplayValue('Reimbursable');+ await userEvent.clear(input);+ await userEvent.type(input, 'ToBeReimbursed{Enter}');++ expect(renameTag).toHaveBeenCalledTimes(1);+ expect(renameTag).toHaveBeenCalledWith({+ id: 'tag-1',+ tag: 'ToBeReimbursed',+ });+ // No editor is left open anywhere: the navigator would otherwise carry+ // editing on to the next row's tag field+ expect(screen.queryAllByTestId('tag')).toHaveLength(0);+ });+});diff --git a/packages/desktop-client/src/components/tags/ManageTags.tsx b/packages/desktop-client/src/components/tags/ManageTags.tsxindex 99d81d808a..838a3ec40c 100644--- a/packages/desktop-client/src/components/tags/ManageTags.tsx+++ b/packages/desktop-client/src/components/tags/ManageTags.tsx@@ -12,6 +12,7 @@ import { listen } from '@actual-app/core/platform/client/connection';import { getNormalisedString } from '@actual-app/core/shared/normalisation';import { Search } from '#components/common/Search';+import { useTableNavigator } from '#components/table';import { SelectedProvider, useSelected } from '#hooks/useSelected';import { useTags } from '#hooks/useTags';@@ -39,6 +40,12 @@ export function ManageTags() {}, [filter, tags]);const selectedInst = useSelected('manage-tags', filteredTags, []);+ const tableNavigator = useTableNavigator(filteredTags, [+ 'select',+ 'tag',+ 'color',+ 'description',+ ]);return (<SelectedProvider instance={selectedInst}>@@ -73,7 +80,9 @@ export function ManageTags() {value={filter}onChange={setFilter}/>- <SelectedTagsButton />+ <SelectedTagsButton+ onRename={id => tableNavigator.onEdit(id, 'tag')}+ /><TagsMenuButton /></SpaceBetween><View style={{ marginTop: 12, ...styles.tableContainer }}>@@ -83,6 +92,7 @@ export function ManageTags() {)}{tags.length ? (<TagsList+ navigator={tableNavigator}tags={filteredTags}hoveredTag={hoveredTag}onHover={id => setHoveredTag(id ?? undefined)}diff --git a/packages/desktop-client/src/components/tags/SelectedTagsButton.tsx b/packages/desktop-client/src/components/tags/SelectedTagsButton.tsxindex 273011068e..b18e913ff8 100644--- a/packages/desktop-client/src/components/tags/SelectedTagsButton.tsx+++ b/packages/desktop-client/src/components/tags/SelectedTagsButton.tsx@@ -1,6 +1,9 @@import { useHotkeys } from 'react-hotkeys-hook';import { useTranslation } from 'react-i18next';+import type { MenuItemObject } from '@actual-app/components/menu';+import type { TagEntity } from '@actual-app/core/types/models';+import { SelectedItemsButton } from '#components/table';import { useSelectedDispatch, useSelectedItems } from '#hooks/useSelected';import {@@ -9,9 +12,13 @@ import {useUnhideTagsMutation,} from '#tags';-type Actions = 'delete-tags' | 'hide-tags' | 'unhide-tags';+type Actions = 'rename-tag' | 'delete-tags' | 'hide-tags' | 'unhide-tags';++type SelectedTagsButtonProps = {+ onRename: (id: TagEntity['id']) => void;+};-export function SelectedTagsButton() {+export function SelectedTagsButton({ onRename }: SelectedTagsButtonProps) {const dispatch = useSelectedDispatch();const { t } = useTranslation();const selectedItems = useSelectedItems();@@ -26,8 +33,17 @@ export function SelectedTagsButton() {);}+ // The closing menu restores focus to its trigger, so clear the selection+ // (which unmounts this button) and open the editor once that has settled+ function startRename(id: TagEntity['id']) {+ dispatch({ type: 'select-none' });+ requestAnimationFrame(() => onRename(id));+ }+function handleSelect(name: Actions, tagIds: string[]) {- if (name === 'delete-tags') {+ if (name === 'rename-tag') {+ startRename(tagIds[0]);+ } else if (name === 'delete-tags') {void handleDelete(tagIds);} else if (name === 'hide-tags') {hideTags({ ids: [...tagIds] });@@ -39,6 +55,11 @@ export function SelectedTagsButton() {}const enabled = !!selectedItems.size;+ // Renaming edits a single row, so it is only offered for one selected tag+ const isSingleSelection = selectedItems.size === 1;+ useHotkeys('r', () => startRename([...selectedItems][0]), {+ enabled: isSingleSelection,+ });useHotkeys('d', () => handleDelete([...selectedItems]), { enabled });useHotkeys('h', () => hideTags({ ids: [...selectedItems] }), { enabled });useHotkeys('u', () => unhideTags({ ids: [...selectedItems] }), { enabled });@@ -48,6 +69,15 @@ export function SelectedTagsButton() {id="selected-tags"name={c => `${c} Tags`}items={[+ ...(isSingleSelection+ ? [+ {+ name: 'rename-tag',+ text: t('Rename'),+ key: 'R',+ } satisfies MenuItemObject<Actions>,+ ]+ : []),{ name: 'delete-tags', text: t('Delete'), key: 'D' },{ name: 'hide-tags', text: t('Hide'), key: 'H' },{ name: 'unhide-tags', text: t('Unhide'), key: 'U' },diff --git a/packages/desktop-client/src/components/tags/TagRow.tsx b/packages/desktop-client/src/components/tags/TagRow.tsxindex 518d496bc5..b096d6be31 100644--- a/packages/desktop-client/src/components/tags/TagRow.tsx+++ b/packages/desktop-client/src/components/tags/TagRow.tsx@@ -1,4 +1,5 @@import React, { memo, useRef } from 'react';+import type { KeyboardEvent } from 'react';import { Trans, useTranslation } from 'react-i18next';import { SvgArrowThinRight } from '@actual-app/components/icons/v1';@@ -20,6 +21,7 @@ import { useSelectedDispatch, useSelectedItems } from '#hooks/useSelected';import {useDeleteTagsMutation,useHideTagsMutation,+ useRenameTagMutation,useUnhideTagsMutation,useUpdateTagMutation,} from '#tags';@@ -31,7 +33,7 @@ type TagRowProps = {hovered?: boolean;onHover: (id?: string) => void;focusedField: string | null;- onEdit: (id: string, field: string) => void;+ onEdit: (id: string | null, field?: string) => void;};export const TagRow = memo(@@ -50,6 +52,7 @@ export const TagRow = memo(const triggerRef = useRef(null);const navigate = useNavigate();const { mutate: updateTag } = useUpdateTagMutation();+ const { mutate: renameTag } = useRenameTagMutation();const { mutate: deleteTags } = useDeleteTagsMutation();const { mutate: hideTags } = useHideTagsMutation();const { mutate: unhideTags } = useUnhideTagsMutation();@@ -58,6 +61,26 @@ export const TagRow = memo(updateTag({ tag: { ...tag, description } });};+ const onRename = (name: string) => {+ const trimmed = name.trim();+ if (!trimmed || trimmed === tag.tag) {+ return;+ }+ renameTag({ id: tag.id, tag: trimmed });+ };++ // Enter must be handled here: the navigator would otherwise move editing+ // to the next row's tag field, which after the list re-sorts is an+ // unrelated tag+ const onRenameKeyDown = (e: KeyboardEvent<HTMLInputElement>) => {+ if (e.key === 'Enter') {+ e.preventDefault();+ e.stopPropagation();+ onRename(e.currentTarget.value);+ onEdit(null);+ }+ };+const onShowActivity = () => {const filterConditions = [{@@ -76,10 +99,18 @@ export const TagRow = memo(};const contextActionIds = selected ? Array.from(selectedIds) : [tag.id];+ // The other actions apply to every id above, so renaming — which edits a+ // single row — is only offered when that is the one tag+ const isSingleTagAction = contextActionIds.length === 1;useContextMenu({triggerRef,items: [+ isSingleTagAction && {+ name: 'rename',+ text: t('Rename'),+ onClick: () => onEdit(tag.id, 'tag'),+ },{name: 'delete',text: t('Delete'),@@ -128,9 +159,23 @@ export const TagRow = memo(selected={selected}/>- <Cell width={250} plain style={{ padding: '5px', display: 'block' }}>- <TagEditor tag={tag} ref={colorButtonRef} />- </Cell>+ {focusedField === 'tag' ? (+ <InputCell+ width={250}+ name="tag"+ textAlign="flex"+ exposed+ value={tag.tag}+ inputProps={{+ onUpdate: onRename,+ onKeyDownCapture: onRenameKeyDown,+ }}+ />+ ) : (+ <Cell width={250} plain style={{ padding: '5px', display: 'block' }}>+ <TagEditor tag={tag} ref={colorButtonRef} />+ </Cell>+ )}<InputCellwidth="flex"diff --git a/packages/desktop-client/src/components/tags/TagsList.tsx b/packages/desktop-client/src/components/tags/TagsList.tsxindex dc2d42ab2c..6a352ef5e9 100644--- a/packages/desktop-client/src/components/tags/TagsList.tsx+++ b/packages/desktop-client/src/components/tags/TagsList.tsx@@ -3,26 +3,27 @@ import React from 'react';import { theme } from '@actual-app/components/theme';import type { TagEntity } from '@actual-app/core/types/models';-import { Table, useTableNavigator } from '#components/table';+import { Table } from '#components/table';+import type { TableNavigator } from '#components/table';import { TagRow } from './TagRow';type TagsListProps = {+ navigator: TableNavigator<TagEntity>;tags: TagEntity[];hoveredTag?: string;onHover: (id?: string) => void;};-export function TagsList({ tags, hoveredTag, onHover }: TagsListProps) {- const tableNavigator = useTableNavigator(tags, [- 'select',- 'color',- 'description',- ]);-+export function TagsList({+ navigator,+ tags,+ hoveredTag,+ onHover,+}: TagsListProps) {return (<Table- navigator={tableNavigator}+ navigator={navigator}items={tags}backgroundColor={theme.tableBackground}renderItem={({ item: tag, focusedField, onEdit }) => {diff --git a/packages/desktop-client/src/tags/mutations.ts b/packages/desktop-client/src/tags/mutations.tsindex e55863df30..3ac6d297c2 100644--- a/packages/desktop-client/src/tags/mutations.ts+++ b/packages/desktop-client/src/tags/mutations.ts@@ -85,6 +85,32 @@ export function useUpdateTagMutation() {});}+type RenameTagPayload = {+ id: TagEntity['id'];+ tag: TagEntity['tag'];+};++export function useRenameTagMutation() {+ const queryClient = useQueryClient();+ const dispatch = useDispatch();+ const { t } = useTranslation();++ return useMutation({+ mutationFn: async ({ id, tag }: RenameTagPayload) => {+ return await send('tags-rename', { id, tag });+ },+ onSuccess: () => invalidateQueries(queryClient),+ onError: error => {+ console.error('Error renaming tag:', error);+ dispatchErrorNotification(+ dispatch,+ t('There was an error renaming the tag. Please try again.'),+ error,+ );+ },+ });+}+type DeleteTagPayload = {id: TagEntity['id'];};diff --git a/packages/docs/docs/transactions/tags.md b/packages/docs/docs/transactions/tags.mdindex b5ad1c3cf3..aa71b39e6a 100644--- a/packages/docs/docs/transactions/tags.md+++ b/packages/docs/docs/transactions/tags.md@@ -36,4 +36,5 @@ The Tag management page can be found in the sidebar under _More_. Here you can p- **Find Existing Tags** searches for tags already used within transactions and adds them to the list of managed tags.- Add a description by clicking in the description field.- **View Transactions** which use a given tag.+- **Rename** a tag from the context menu (right-click menu), or from the selection menu when exactly one tag is selected. Renaming also rewrites the hashtag in every transaction note that uses it. Tag names cannot contain spaces or `#`, and cannot match an existing tag.- Use the context menu (right-click menu) to delete a tag from this page. It will **not** delete the tag from the transaction notes.diff --git a/packages/loot-core/src/server/db/index.ts b/packages/loot-core/src/server/db/index.tsindex 0eeeffee46..866a5ca90e 100644--- a/packages/loot-core/src/server/db/index.ts+++ b/packages/loot-core/src/server/db/index.ts@@ -1110,9 +1110,9 @@ export function updateTag(tag: Partial<DbTag> & Pick<DbTag, 'id'>) {}export function findTags() {- return all<{ notes: string }>(+ return all<{ id: DbTransaction['id']; notes: string }>(`- SELECT notes+ SELECT id, notesFROM transactionsWHERE tombstone = 0 AND notes LIKE ?`,diff --git a/packages/loot-core/src/server/tags/app.test.ts b/packages/loot-core/src/server/tags/app.test.tsnew file mode 100644index 0000000000..0728c7d139--- /dev/null+++ b/packages/loot-core/src/server/tags/app.test.ts@@ -0,0 +1,104 @@+import * as db from '#server/db';+import { loadMappings } from '#server/db/mappings';+import { app } from '#server/tags/app';++beforeEach(async () => {+ await global.emptyDatabase()();+ await loadMappings();+});++async function insertTransaction(notes: string) {+ return await db.insertTransaction({+ account: 'account-1',+ date: '2024-01-01',+ amount: -1000,+ notes,+ });+}++async function getNotes(id: string) {+ const transaction = await db.first<{ notes: string }>(+ 'SELECT notes FROM transactions WHERE id = ?',+ [id],+ );+ return transaction?.notes;+}++describe('tags app', () => {+ describe('tags-rename', () => {+ beforeEach(async () => {+ await db.insertAccount({ id: 'account-1', name: 'Account 1' });+ });++ it('renames the tag and rewrites it in transaction notes', async () => {+ const id = await db.insertTag({+ tag: 'Reimbursable',+ color: null,+ description: null,+ });+ const matching = await insertTransaction('Lunch #Reimbursable');+ const partial = await insertTransaction('Dinner #ReimbursableLater');++ await app.handlers['tags-rename']({ id, tag: ' ToBeReimbursed ' });++ expect(await db.getTags()).toEqual([+ expect.objectContaining({ id, tag: 'ToBeReimbursed' }),+ ]);+ expect(await getNotes(matching)).toBe('Lunch #ToBeReimbursed');+ expect(await getNotes(partial)).toBe('Dinner #ReimbursableLater');+ });++ it('rejects an invalid name', async () => {+ const id = await db.insertTag({+ tag: 'Food',+ color: null,+ description: null,+ });++ await expect(+ app.handlers['tags-rename']({ id, tag: 'two words' }),+ ).rejects.toThrow('Invalid tag name');+ });++ it('rejects renaming onto an existing tag', async () => {+ const id = await db.insertTag({+ tag: 'Food',+ color: null,+ description: null,+ });+ await db.insertTag({+ tag: 'Groceries',+ color: null,+ description: null,+ });++ await expect(+ app.handlers['tags-rename']({ id, tag: 'Groceries' }),+ ).rejects.toThrow('A tag with that name already exists');+ });++ it('rejects renaming onto a deleted tag', async () => {+ const id = await db.insertTag({+ tag: 'Food',+ color: null,+ description: null,+ });+ const deletedId = await db.insertTag({+ tag: 'Groceries',+ color: null,+ description: null,+ });+ await app.handlers['tags-delete']({ id: deletedId });++ await expect(+ app.handlers['tags-rename']({ id, tag: 'Groceries' }),+ ).rejects.toThrow('A tag with that name already exists');+ });++ it('rejects an unknown tag', async () => {+ await expect(+ app.handlers['tags-rename']({ id: 'missing', tag: 'Food' }),+ ).rejects.toThrow('Tag not found');+ });+ });+});diff --git a/packages/loot-core/src/server/tags/app.ts b/packages/loot-core/src/server/tags/app.tsindex 390057d84b..a83e71d066 100644--- a/packages/loot-core/src/server/tags/app.ts+++ b/packages/loot-core/src/server/tags/app.ts@@ -3,6 +3,7 @@ import * as db from '#server/db';import { mutator } from '#server/mutators';import { batchMessages } from '#server/sync';import { undoable } from '#server/undo';+import { renameTagInNotes } from '#shared/tags';import type { TagEntity } from '#types/models';export type TagsHandlers = {@@ -13,6 +14,7 @@ export type TagsHandlers = {'tags-hide-all': typeof hideAllTags;'tags-unhide-all': typeof unhideAllTags;'tags-update': typeof updateTag;+ 'tags-rename': typeof renameTag;'tags-discover': typeof discoverTags;};@@ -24,6 +26,7 @@ app.method('tags-delete-all', mutator(undoable(deleteAllTags)));app.method('tags-hide-all', mutator(undoable(hideAllTags)));app.method('tags-unhide-all', mutator(undoable(unhideAllTags)));app.method('tags-update', mutator(undoable(updateTag)));+app.method('tags-rename', mutator(undoable(renameTag)));app.method('tags-discover', mutator(discoverTags));const collator = new Intl.Collator(undefined, {@@ -109,6 +112,43 @@ async function updateTag(return tag;}+async function renameTag({+ id,+ tag: newTag,+}: Pick<TagEntity, 'id' | 'tag'>): Promise<TagEntity['id']> {+ const name = newTag.trim();+ // accept any char except whitespaces and '#', same as tag creation+ if (!/^[^#\s]+$/.test(name)) {+ throw new Error('Invalid tag name');+ }++ const tags = await db.getTags();+ const allTags = await db.getAllTags();+ const existing = tags.find(t => t.id === id);+ if (!existing) {+ throw new Error('Tag not found');+ }+ if (existing.tag === name) {+ return id;+ }+ if (allTags.some(t => t.id !== id && t.tag === name)) {+ throw new Error('A tag with that name already exists');+ }++ await batchMessages(async () => {+ await db.updateTag({ id, tag: name });++ for (const { id: transactionId, notes } of await db.findTags()) {+ const renamed = renameTagInNotes(notes, existing.tag, name);+ if (renamed !== notes) {+ await db.updateTransaction({ id: transactionId, notes: renamed });+ }+ }+ });++ return id;+}+async function discoverTags(): Promise<TagEntity[]> {const taggedNotes = await db.findTags();diff --git a/packages/loot-core/src/shared/tags.test.ts b/packages/loot-core/src/shared/tags.test.tsnew file mode 100644index 0000000000..3211f4ce68--- /dev/null+++ b/packages/loot-core/src/shared/tags.test.ts@@ -0,0 +1,17 @@+import { renameTagInNotes } from './tags';++describe('renameTagInNotes', () => {+ test('renames only whole, unescaped, case-sensitive tags', () => {+ expect(+ renameTagInNotes(+ '##Food #FoodCourt #food #Food#Work #Work#Food',+ 'Food',+ 'Groceries',+ ),+ ).toBe('##Food #FoodCourt #food #Groceries#Work #Work#Groceries');+ });++ test('treats regex and replacement characters literally', () => {+ expect(renameTagInNotes('#a.b #axb', 'a.b', '$&')).toBe('#$& #axb');+ });+});diff --git a/packages/loot-core/src/shared/tags.ts b/packages/loot-core/src/shared/tags.tsindex 224622c19b..e156f08fbb 100644--- a/packages/loot-core/src/shared/tags.ts+++ b/packages/loot-core/src/shared/tags.ts@@ -15,3 +15,16 @@ export function extractTagsForFilter(value: string) {}return tagValues;}++// Tags in notes are delimited by whitespace or another '#', and a doubled+// '#' escapes the tag (see `parseNotes`). Matching is case sensitive because+// tag identity elsewhere (colors, discovery) is case sensitive too.+export function renameTagInNotes(+ notes: string,+ oldTag: string,+ newTag: string,+) {+ const escaped = oldTag.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');+ const pattern = new RegExp(`(?<!#)#${escaped}(?=[\\s#]|$)`, 'g');+ return notes.replace(pattern, () => `#${newTag}`);+}diff --git a/upcoming-release-notes/rename-tags-from-tags-page.md b/upcoming-release-notes/rename-tags-from-tags-page.mdnew file mode 100644index 0000000000..9d4e509f9a--- /dev/null+++ b/upcoming-release-notes/rename-tags-from-tags-page.md@@ -0,0 +1,6 @@+---+category: Features+authors: [tim-smart]+---++Rename a tag from the Tags page, updating the hashtag in every transaction note that uses it