Three-panel mode size cookies overwritten on page refresh

  • [ ] I’m using stock docker compose setup, unmodified.
  • [X] I’m using docker compose setup, with modifications (modified .yml files, third party plugins/themes, etc.) - if so, describe your modifications in your post. Before reporting, see if your issue can be reproduced on the unmodified setup.
  • [ ] I’m not using docker on my primary instance, but my issue can be reproduced on the aforementioned docker setup and/or official demo.

I recently set up a new instance based on the official Docker Compose stack with a few modifications after using an unofficial Docker container that wasn’t being updated anymore for a few years. I noticed that in the new instance, when using three-panel mode, the size of the content panel isn’t being saved through a page refresh. From watching the network tools in my browser, it appears that at some point in the process, the values of the ttrss-ci-width and ttrss-ci-height cookies are overwritten to be 0. Since I don’t see the cookies changing in the response headers, I believe this is happening in the Javascript code.

Specifically, I think this is happening in App.js when setWidescreenMode() is called on line 826. The value passed in for the wide parameter is the current widescreen mode state, so the mode shouldn’t be changing, but on line 922 setWidescreenMode() still sets the cookies to 0 regardless.

This can be reproduced on the demo system as follows:

  1. Switch to three-panel mode.
  2. Click on an article to display the content pane.
  3. Use the splitter bar to resize the content pane.
  4. Refresh the page.
  5. Click on another article to display the content pane again. The content pane will have reverted to its default height (50%, I think?).

As a workaround, I have added a CSS customization to my instance to set the default height of the content panel to 75% to keep it around where I want it.

  • Tiny Tiny RSS version (including git commit id):
    • v23.05-a4543de3
  • Platform (i.e. Linux distro, Docker, PHP, PostgreSQL, etc) versions:
    • Photon OS 5.0
    • Docker engine 23.0.2 (API: 1.42)
    • Using a slightly modified version of the official Docker Compose stack:
      • PostgreSQL 15
      • Extra network configuration for a Traefik reverse proxy
      • Custom version of the web-nginx container to remove the /tt-rss prefix
    • As stated, this is reproducible on the demo system.

thanks for reporting, i’ll make a note to look at this when i have some time to kill.

this reminds me, at some point container nginx config became a template with support for variable substitution, it could be possible to make this prefix configurable now.

now that i think about it, there doesn’t seem to be any need to reset those cookies.

https://gitlab.tt-rss.org/tt-rss/tt-rss/-/commit/d43d6f7dffef14eb026799e1ccb805b758628a80

i’ve changed it so that two sets of geometry cookies are kept (for normal and wide mode) but that really isn’t necessary either, because only one of those is used for each mode. this just makes things a bit easier to debug.

tell me if this breaks everything somehow. :slight_smile:

It’s working for me now. Thanks!