Page MenuHomePhabricator

Horizon only saves user user settings in browser cookies
Open, LowPublic

Description

When I go to https://horizon.wikimedia.org/settings/ and change the "items per page" to 100, that change will be applied as expected. However, if I log out, clear my cookies, and log back in, those settings will be lost. This hit me because of todays horizon issues, which made it necessary to use a fresh session and made it seem like a good idea to clear cookies.

Apparently the "items per page" setting is stored in the cookie API_RESULT_PAGE_SIZE. I see the "Log lines per instance" count is saved in a cookie named INSTANCE_LOG_LENGTH, the cookie for the language is named horizon_language and for the timezone it's django_timezone. Based on one of this being reset after cookies were cleared, I assume that these cookies are the only place these settings are stored. However, something called 'user settings' should be saved for the user currently logged in, not for that specific machine or that specific session.