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

Fix history. #3598

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Fix history. #3598

wants to merge 11 commits into from

Conversation

jmercouris
Copy link
Member

@jmercouris jmercouris commented Feb 9, 2025

Description

Strip history tree for greatly simplified and more reliable history. This solves many issues within the codebase (particularly startup).

The global history tree has shown us that it does not work, and is not worth it. This simplification is the first step in building something reliable.

As soon as Nyxt is stable, we will resume with the per-buffer history tree. So we will bring back the old behavior before the global history tree.

@jmercouris jmercouris requested a review from aadcg February 9, 2025 21:13
@aadcg
Copy link
Member

aadcg commented Feb 10, 2025

I think that this PR is still very raw to be reviewed. But I like the direction that it is taking.

@jmercouris jmercouris force-pushed the fix-history branch 2 times, most recently from a7d7c16 to 7875e68 Compare February 12, 2025 04:36
@jmercouris jmercouris force-pushed the fix-history branch 4 times, most recently from af0ff34 to 070b1e0 Compare February 12, 2025 05:15
@jmercouris jmercouris marked this pull request as ready for review February 12, 2025 05:15
@jmercouris
Copy link
Member Author

@aadcg I think it is ready for review. Please let me know if I missed anything!

Copy link
Member

@aadcg aadcg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit c48d6d7 changes git submodule by mistake it seems.


I've noticed that the history file is populated by entries whose URL and title conflict with each other.

(
...
(:url "https://en.wikipedia.org/wiki/Tomato" :title "Tomato - Wikipedia")
(:url "https://en.wikipedia.org/wiki/Tobacco" :title "Tomato - Wikipedia")
...
)

Which trips the user:

Screenshot From 2025-02-13 14-09-57


I'm not convinced about the idea of keeping track of every URL, which results in duplicates. This duplicated information doesn't seem to be used anywhere.

From the user perspective, it makes sense to see the last visited URL first. Either the data structure must be free of duplicates and shuffled accordingly, or :from-end t must be passed to remove-duplicates.


Complete the changelog with deleted commands and other relevant API changes.


Ensure that custom spinneret tags don't reference deleted symbols.


Objects of class history-entry are being instantiated with deleted slots.


Tests should be added as well.


This may not be an exhaustive review, but it's a start. Thanks.

nyxt.asd Outdated Show resolved Hide resolved
:type boolean
:documentation "Whether to restore buffers from the previous session.
You can store and restore sessions manually to various files with
`store-history-by-name' and `restore-history-by-name'.")
Copy link
Member

@aadcg aadcg Feb 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this option is deleted then it needs to be documented in the changelog and migration guide.

Also, take care of (:nxref :slot 'restore-session-on-startup-p :class-name 'browser). The same applies to deleted symbols.

Since it's a key feature, an issue needs to be opened to remind its re-implementation.

source/buffer.lisp Outdated Show resolved Hide resolved
source/mode/history-migration.lisp Outdated Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix deleted tests files in nyxt.asd.

nyxt.asd Outdated Show resolved Hide resolved
@jmercouris jmercouris force-pushed the fix-history branch 4 times, most recently from 7d5f29e to 5f95ac4 Compare February 14, 2025 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants