From 2e6b7aaebeb1ab8f0022a8144c9427effd3c3163 Mon Sep 17 00:00:00 2001 From: Theo <36564257+theoholl@users.noreply.github.com> Date: Tue, 23 Dec 2025 15:14:50 +0000 Subject: [PATCH 1/2] Keep current board title in sync after rename Signed-off-by: Theo <36564257+theoholl@users.noreply.github.com> --- src/store/main.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/store/main.js b/src/store/main.js index 1225cd062..d2d92c543 100644 --- a/src/store/main.js +++ b/src/store/main.js @@ -391,9 +391,14 @@ export default function storeFactory() { * @param board The board to update. * @return {Promise} */ - async updateBoard({ commit }, board) { + async updateBoard({ commit, state }, board) { const storedBoard = await apiClient.updateBoard(board) commit('addBoard', storedBoard) + + // keep the currently opened board title in sync after edits + if (state.currentBoard?.id === storedBoard.id) { + commit('setCurrentBoard', storedBoard) + } }, async createBoard({ commit }, boardData) { try { From 62a25be688e95420674c1826a398020abbd3bff8 Mon Sep 17 00:00:00 2001 From: Theo <36564257+theoholl@users.noreply.github.com> Date: Fri, 9 Jan 2026 23:13:42 +0000 Subject: [PATCH 2/2] Add Cypress tests for PR #2746 Signed-off-by: Theo <36564257+theoholl@users.noreply.github.com> --- cypress/e2e/boardFeatures.js | 76 ++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/cypress/e2e/boardFeatures.js b/cypress/e2e/boardFeatures.js index 1343fa361..1108f9879 100644 --- a/cypress/e2e/boardFeatures.js +++ b/cypress/e2e/boardFeatures.js @@ -180,6 +180,82 @@ describe('Board export', function() { }) }) +describe('Board title editing', function() { + before(function() { + cy.createUser(user) + }) + + it('Shows updated board title immediately on the opened board', function() { + const originalTitle = `Live rename ${Date.now()}` + const updatedTitle = `${originalTitle} updated` + + cy.createExampleBoard({ user, board: sampleBoard(originalTitle) }).then((board) => { + cy.login(user) + cy.visit(`/apps/deck/board/${board.id}`) + + cy.intercept({ method: 'PUT', url: `**/apps/deck/boards/${board.id}` }).as('updateBoard') + + cy.get(`.app-navigation__list .app-navigation-entry:contains("${originalTitle}")`) + .parent() + .find('button[aria-label="Actions"]') + .click() + + cy.get('button:contains("Edit board")').click() + + cy.get('.board-edit form input[type=text]') + .clear() + .type(updatedTitle) + + cy.get('.board-edit form button[title="Save board"]').click() + + cy.get('.board-title h2').contains(updatedTitle) + + cy.wait('@updateBoard').its('response.statusCode').should('equal', 200) + + cy.get('.app-navigation__list .app-navigation-entry') + .contains(updatedTitle) + .should('be.visible') + }) + }) + + it('Does not change the opened board title when editing another board', function() { + const boardATitle = `Active board ${Date.now()}` + const boardBTitle = `Background board ${Date.now()}` + const boardBUpdatedTitle = `${boardBTitle} updated` + + cy.createExampleBoard({ user, board: sampleBoard(boardATitle) }).then((boardA) => { + cy.createExampleBoard({ user, board: sampleBoard(boardBTitle) }).then((boardB) => { + cy.login(user) + cy.visit(`/apps/deck/board/${boardA.id}`) + + cy.intercept({ method: 'PUT', url: `**/apps/deck/boards/${boardB.id}` }).as('updateBoardOther') + + cy.get('.board-title h2').should('contain', boardATitle) + + cy.get(`.app-navigation__list .app-navigation-entry:contains("${boardBTitle}")`) + .parent() + .find('button[aria-label="Actions"]') + .click() + + cy.get('button:contains("Edit board")').click() + + cy.get('.board-edit form input[type=text]') + .clear() + .type(boardBUpdatedTitle) + + cy.get('.board-edit form button[title="Save board"]').click() + + cy.wait('@updateBoardOther').its('response.statusCode').should('equal', 200) + + cy.get('.board-title h2').should('contain', boardATitle) + cy.get('.app-navigation__list .app-navigation-entry') + .contains(boardBUpdatedTitle) + .should('be.visible') + }) + }) + }) +}) + describe('Board import', function() { before(function () { cy.createUser(user)