Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

News does not remember last viewed version without undocumented option #3391

Open
Bckempa opened this issue Apr 22, 2024 · 6 comments
Open

Comments

@Bckempa
Copy link

Bckempa commented Apr 22, 2024

Running taskwarrior 3.0 and 3.0.1 I've been getting random reminders to read the version news, despite having read both task news and task news 3.0.1 minor. I would expect that to satisfy the automatic news version tracking.

Checking with task show | grep version I noticed that the news.version variable had not been updated. I had to check the CmdNews source to discover that the saved "read version" is only updated when task news all is run, but the "all" specifier doesn't seem to be documented anywhere?

Logically something seems off, it only reverts the signal handler and asks for donations if the "all" command is used?

Not sure exactly what the intended behavior is and if that ending if case needs to be rescoped but I think at minimum reading the news should update the config flag. As a minimal change, maybe the "all" setting that updates the config flag should be the default?

I am willing to contribute a PR for this if given guidance on the preferred behavior.

@djmitche
Copy link
Collaborator

Thanks! @tbabej, I think you originated the task news support -- how do you think we should handle this?

@Bckempa
Copy link
Author

Bckempa commented Apr 23, 2024

Oh, and another interesting bit of behavior, I'm now getting news reminders for 3.0.2 because my config news version is 3.0.1, even though there aren't any unread news items, so a reasonable user could see this:

Recently upgraded to 3.0.2. Please run 'task news' to read highlights about the new release.
❯ task news
You are up to date!

Which in turn will continue to pop-up occasionally because of all the logic for marking new versions as read.

@tbabej
Copy link
Sponsor Member

tbabej commented Apr 23, 2024

The original intent of the task news command was to only display the footnote if the notes for the given version were not displayed yet. If the prompt to display news is shown in a repeated manner, I would definitely consider that a bug.

Similarly, displaying the major items should be sufficient. Using minor or all should not be required.

@tbabej
Copy link
Sponsor Member

tbabej commented Apr 23, 2024

Can't dive deeper right now but my suspicion would be that the bug revolves around the fact that in CmdNews.cpp now we require full_summary flag to be on in order to set the config variable recording the last displayed news version, possibly recently introduced in #3342.

@Bckempa if you have capacity to double check and produce a PR with a fix, that would be highly appreciated!

@djmitche
Copy link
Collaborator

Maybe it's best to get rid of the minor/major distinction and just include major, then?

@Bckempa
Copy link
Author

Bckempa commented Apr 23, 2024

@Bckempa if you have capacity to double check and produce a PR with a fix, that would be highly appreciated!

Might take me a few days to find the cycles, but I'm happy to take swing at this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

3 participants