Bug 167385 - Comment resolution menu does not refresh after state change
Summary: Comment resolution menu does not refresh after state change
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.2.0.0 alpha0+
Hardware: x86-64 (AMD64) All
: medium minor
Assignee: Michael Weghorn
URL:
Whiteboard: target:26.8.0 target:25.8.5 target:26...
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Writer-Comments
  Show dependency treegraph
 
Reported: 2025-07-05 02:27 UTC by Takenori Yasuda
Modified: 2025-12-12 03:18 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Reproduction Step No. 5 (17.39 KB, image/png)
2025-07-18 04:20 UTC, Takenori Yasuda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Takenori Yasuda 2025-07-05 02:27:48 UTC
Description:
In LibreOffice Writer, the context menu for comments and comment threads contains a toggle to mark a comment as resolved or unresolved. However, this menu does not correctly reflect the current state immediately after a change.

Although the internal resolution state is updated correctly, the menu entry continues to show the previous state until the menu is closed and reopened.
This leads to apparent reversals (e.g., selecting “Unresolved” resolves the comment).

Steps to Reproduce:
1.Open a Writer document.
2.Insert a comment.
3.Open the comment's bottom-right menu.
4.Select "Resolve".
5.Open the menu again.
6.Open the menu again.

Actual Results:
(Steps 4) The comment is now resolved (correct).
(Steps 5) The menu still shows "Resolve" (wrong — it should now show "Unresolve").
(Steps 6) The menu shows "Unresolve" (correct).

Expected Results:
- The menu should always show the correct toggle label reflecting the next available state.
- After marking a comment or thread as resolved, the menu should immediately update to show "Unresolve", and vice versa.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 25.2.5.1 (X86_64) / LibreOffice Community
Build ID: 484541f705153d4ff78284873b0153c3e5a280db
CPU threads: 8; OS: Windows 11 X86_64 (10.0 build 26100); UI render: default; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: threaded

Version: 25.8.0.0.beta1+ (X86_64) / LibreOffice Community
Build ID: a0c68c28f5102e4fd87ca03aa720fc69153d3fbb
CPU threads: 8; OS: Windows 11 X86_64 (build 26100); UI render: default; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: threaded
Comment 1 Takenori Yasuda 2025-07-18 04:20:22 UTC
Created attachment 201861 [details]
Reproduction Step No. 5

Note:
When we select "Resolve" or "Resolve Thread" in this state, the comment will return to the "Unresolved" status (no status display—same as immediately after creating the comment).
Comment 2 Takenori Yasuda 2025-07-20 08:03:57 UTC
Reproduced.
Version: 24.2.0.0.alpha1 (X86_64) / LibreOffice Community
Build ID: 06946980c858649160c634007e5fac9a5aa81f38
CPU threads: 8; OS: Windows 10.0 Build 26100; UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: threaded Jumbo


Not reproduced.
Version: 7.6.0.0.alpha1 (X86_64) / LibreOffice Community
Build ID: 9366f83c88fc93d40ea0c0035508f24ad5dcb144
CPU threads: 8; OS: Windows 10.0 Build 26100; UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: threaded Jumbo


This issue may have started occurring after "Reply" was added to the context menu for comments and comment threads.

I don't know about other OSes because I don't have them and can't test them.
Comment 3 Takenori Yasuda 2025-11-24 04:57:19 UTC
This seems to be caused by the same underlying issue, but at step 3 the menu shows the option "Unresolve".
However, presenting "Unresolve" as an option for a comment that is already unresolved is puzzling.

Furthermore, selecting "Unresolve" at that point sets the comment to the resolved state.  
Selecting "Resolve" also sets it to the resolved state, but "Unresolve" results in the same outcome.

After that, the behavior described from step 4 onward can be reproduced as well.


Version: 26.2.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 620(Build:0)
CPU threads: 8; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL threaded Jumbo
Comment 4 Buovjaga 2025-12-09 08:40:38 UTC
Repro with gen and qt6, but not with gtk3.

Version: 26.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: a76f0371596f0037444c40fe3dcad5b4fef18c24
CPU threads: 4; OS: Linux 6.17; UI render: default; VCL: qt6 (cairo+wayland)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Comment 5 Saburo 2025-12-10 06:38:11 UTC
bibisected with linux-64-24.2 (using SAL_USE_VCLPLUGIN=gen)
commit f075fa01cb4f74185f13eb0a8d7f84cf1f47af49
author	Michael Weghorn

tdf#141101 tdf#101886 a11y: Restore previous focus on col/line popup close

***
adding CC: Michael Weghorn
Please, take a look?

I don't know if this is related
sw/source/uibase/docvw/AnnotationMenuButton.cxx
Comment 6 Michael Weghorn 2025-12-10 11:44:18 UTC
(In reply to Saburo from comment #5)
> bibisected with linux-64-24.2 (using SAL_USE_VCLPLUGIN=gen)
> commit f075fa01cb4f74185f13eb0a8d7f84cf1f47af49
> author	Michael Weghorn
> 
> tdf#141101 tdf#101886 a11y: Restore previous focus on col/line popup close
> 
> ***
> adding CC: Michael Weghorn
> Please, take a look?
> 
> I don't know if this is related
> sw/source/uibase/docvw/AnnotationMenuButton.cxx

Thanks a lot for the bibisect and the code pointer, that's indeed the relevant place.

Pending fix:
https://gerrit.libreoffice.org/c/core/+/195376
Comment 7 Commit Notification 2025-12-11 17:46:30 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9c9357a350d8e4ca532af36ea26a2fd90e6c9257

tdf#167385 sw: Keep AnnotationWin menu up to date

It will be available in 26.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Buovjaga 2025-12-11 19:09:23 UTC
Verified, thanks

Version: 26.8.0.0.alpha0+ (X86_64)
Build ID: 9c9357a350d8e4ca532af36ea26a2fd90e6c9257
CPU threads: 8; OS: Linux 6.17; UI render: default; VCL: qt6 (cairo+wayland)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: CL threaded
Comment 9 Commit Notification 2025-12-12 03:18:48 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

https://git.libreoffice.org/core/commit/8b7650f6fd7b6e4442e16eb930a5cfc4c61773a3

tdf#167385 sw: Keep AnnotationWin menu up to date

It will be available in 25.8.5.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2025-12-12 03:18:52 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "libreoffice-26-2":

https://git.libreoffice.org/core/commit/d439c345897d961616dd475b4ec7ced750886b7a

tdf#167385 sw: Keep AnnotationWin menu up to date

It will be available in 26.2.0.0.beta2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.