atlas-engineer / nyxt

Nyxt - the hacker's browser.
https://nyxt-browser.com/
9.8k stars 409 forks source link

Impersistent settings #3321

Closed mmahmoudian closed 8 months ago

mmahmoudian commented 8 months ago

Describe the bug

In the settings, when a setting is set, the minibuffer shows that the setting is written to the config file, but when the user switches to another tab in the settings and then return to the previous tab, that setting has changed to the previous state.

Precise recipe to reproduce the issue

Screencast_20240125_122833-2.webm

For website-specific issues: Can you reproduce this issue with Epiphany / GNOME Web (https://wiki.gnome.org/Apps/Web)?

-> Nothing from Gnome will ever touch my computer.

Information

Nyxt version: 4
Renderer: GI-GTK
Operating system kernel: Linux 6.6.10-1-MANJARO
Lisp implementation: SBCL 2.3.8 (Dynamic space size: 3221225472)
Features: (:NYXT-GI-GTK :NYXT-GTK :NYXT-GI-GTK :NYXT-GTK :NYXT-4 :CLIPBOARD-CONTENT-METHOD :SWANK :SLYNK :PLUMP-UTF-32 :PARENSCRIPT :NSYMBOLS :FSET-EXT-STRINGS :SBCL+SAFE-STANDARD-READTABLE :NAMED-READTABLES :GLOBAL-VARS :CL-FAD :LPARALLEL :21BIT-CHARS :CUSTOM-HASH-TABLE-NATIVE :CL-PPCRE-UNICODE :CL-UNICODE :CL-JSON-DOUBLE-FLOAT-IS-SUBSUMED :CL-JSON-SINGLE-FLOAT-IS-SUBSUMED :CHUNGA :FLEXI-STREAMS :CL-PPCRE :WEBKIT2 :WEBKIT-2.42.1 :WEBKIT-2.42 :WEBKIT-2 :WEBKIT2-CORS-ALLOWLIST :WEBKIT2-PASTE-PLAINTEXT :WEBKIT2-TRACKING :WEBKIT2-MUTE :WEBKIT2-EMOJI :WEBKIT2-MEDIA :WEBKIT2-SANDBOXING :GTK-3-22 :GTK-3-20 :GTK-3-18 :GTK-3-16 :GTK-3-14 :GTK-3-12 :GTK-3-10 :GTK-3-8 :GTK-3-6 :GTK-3-4 :GTK :GDK-3-22 :GDK-3-20 :GDK-3-18 :GDK-3-16 :GDK-3-14 :GDK-3-12 :GDK-3-10 :GDK-3-8 :GDK-3-6 :GDK-3-4 :CAIRO-1-10 :CAIRO-1-12 :GDK-PIXBUF :CLOSER-MOP :GLIB-2-30 :GLIB-2-32 :GLIB-2-34 :GLIB-2-36 :GLIB-2-38 :GLIB-2-40 :GLIB-2-42 :GLIB-2-44 :GLIB-2-46 :GLIB-2-48 :GLIB-2-50 :GLIB-2-52 :GLIB-2-54 :GLIB-2-56 :GLIB-2-58 :GLIB :BORDEAUX-THREADS :LPARALLEL.WITH-CLTL2 :LPARALLEL.WITH-CAS :LPARALLEL.WITH-STEALING-SCHEDULER :SPLIT-SEQUENCE CFFI-FEATURES:FLAT-NAMESPACE CFFI-FEATURES:X86-64 CFFI-FEATURES:UNIX :CFFI CFFI-SYS::FLAT-NAMESPACE ALEXANDRIA::SEQUENCE-EMPTYP :FAST-IO-SV :FAST-IO :CL-JSON-CLOS :CL-JSON :SBCL-USES-SB-ROTATE-BYTE CHIPZ-SYSTEM:GRAY-STREAMS :THREAD-SUPPORT :ASDF3.3 :ASDF3.2 :ASDF3.1 :ASDF3 :ASDF2 :ASDF :OS-UNIX :NON-BASE-CHARS-EXIST-P :ASDF-UNICODE :ARENA-ALLOCATOR :X86-64 :GENCGC :64-BIT :ANSI-CL :COMMON-LISP :ELF :IEEE-FLOATING-POINT :LINUX :LITTLE-ENDIAN :PACKAGE-LOCAL-NICKNAMES :SB-CORE-COMPRESSION :SB-LDB :SB-PACKAGE-LOCKS :SB-THREAD :SB-UNICODE :SBCL :UNIX)

ASDF version: 3.3.1
ASDF registries: (NYXT-SOURCE-REGISTRY ENVIRONMENT-SOURCE-REGISTRY)
Critical dependencies: (/home/mehrad/.cache/paru/clone/nyxt-git/src/nyxt/_build/cl-cffi-gtk/gtk/cl-cffi-gtk.asd /home/mehrad/.cache/paru/clone/nyxt-git/src/nyxt/_build/cl-gobject-introspection/cl-gobject-introspection.asd /home/mehrad/.cache/paru/clone/nyxt-git/src/nyxt/_build/cl-webkit/webkit2/cl-webkit2.asd)

Guix version: 7e4324575c80cbe3c18c26b0507776b16ba3989e

Output when started from a shell

Nyxt version 4
<INFO> [12:46:54] Source location: #P"/home/mehrad/.cache/paru/clone/nyxt-git/src/nyxt/"
<INFO> [12:46:54] Loading Lisp file #P"/home/mehrad/.config/nyxt/auto-config.4.lisp".
<INFO> [12:46:54] Listening to socket: #P"/run/user/1001/nyxt/nyxt.socket"

(nyxt:238699): libenchant-WARNING **: 12:46:54.892: Error loading plugin: libvoikko.so.1: cannot open shared object file: No such file or directory

(nyxt:238699): libenchant-WARNING **: 12:46:54.893: Error loading plugin: libhspell.so.0: cannot open shared object file: No such file or directory

(nyxt:238699): libenchant-WARNING **: 12:46:54.893: Error loading plugin: libaspell.so.15: cannot open shared object file: No such file or directory

(nyxt:238699): libenchant-WARNING **: 12:46:54.893: Error loading plugin: libnuspell.so.5: cannot open shared object file: No such file or directory

<INFO> [12:46:54] GTK extensions directory: #P"/home/mehrad/.cache/paru/clone/nyxt-git/src/nyxt/libraries/web-extensions/"

(nyxt:238699): Gtk-CRITICAL **: 12:46:54.958: gtk_box_pack: assertion '_gtk_widget_get_parent (child) == NULL' failed
<INFO> [12:46:55] GTK extensions directory: #P"/home/mehrad/.cache/paru/clone/nyxt-git/src/nyxt/libraries/web-extensions/"
<INFO> [12:46:56] Loading #P"/home/mehrad/.local/share/nyxt/history/default.lisp".
<INFO> [12:46:56] Restoring 1 buffer from history.
<INFO> [12:46:57] Loading #P"/home/mehrad/.local/share/nyxt/auto-rules.lisp".
<WARN> [12:46:57] Warning: Error while processing the "nyxt:" URL: There is no applicable method for the generic function
  #&lt;STANDARD-GENERIC-FUNCTION (COMMON-LISP:SETF NYXT:TITLE) (8)&gt;
when called with arguments
  (&quot;*New buffer*&quot; NIL).
See also:
  The ANSI Standard, Section 7.6.6
aadcg commented 8 months ago

@mmahmoudian thanks for reporting.

This interface has many issues, namely that some settings require reloading the buffer or reloading the whole program. The overarching issue is that we need to mutate the state of slots on the fly. Related to #2351.

Also, it's not clear for the user what's the goal of common-settings. It must both (1) enact the settings right away and (2) save them for future sessions. It seems that (1) is lacking.

aadcg commented 8 months ago

While #3326 certainly doesn't address all of the issues I've detailed above, I'd prefer to close this issue since it is a duplicate or related to #2351 and #2296.