SolidOS / solidos

The operating system for Solid
https://solidos.solidcommunity.net/
MIT License
127 stars 19 forks source link

Incorrect initialization of prefs and other relevant resources under `settings` directory #197

Open renyuneyun opened 1 year ago

renyuneyun commented 1 year ago

This is related to #123, but from a different perspective and more up-to-date. My deployment is based on the Mashlib Recipe for CSS.

This is related to the following tuples in WebID profile:

<#me>
    space:preferencesFile </my_user/settings/prefs.ttl>;
    solid:privateTypeIndex </my_user/settings/privateTypeIndex.ttl>;
    solid:publicTypeIndex </my_user/settings/publicTypeIndex.ttl>.

As found from #123, CSS will not automatically create these. I was suggested this should be the job of the client/app, thus Mashlib/SolidOS. The relevant files and directories are also not present in the user's storage. Note the user is under its own namespace (my_user) in this CSS set-up. I haven't tested the root user, but could be the same.

If the profile does not contain anything related to prefs or type indecies, Mashlib will not complain anything, but silently disallow doing anything on "Preferences" tab (i.e. show nothing).

If manually adding the above lines, Mashlib will alert user saying it can't find a preference, and can automatically create it for user. But if clicking "yes", it will complain that it can't create it (and the error message is incomplete/incorrect as well). And it did not create it. Manually creating the settings/ folder will have the same behaviour. Screenshot_20221211_114738

Then I manually created the settings/ folder, and the prefs.ttl file. No more complains about prefs.ttl. Then, after navigating to "Preferences" tab, Mashlib complains that it can't find privateTypeIndex.ttl, and is able to automatically create it for me. The Preferences tab also functions now. But whatever I do, it mentions nothing related to publicTypeIndex.ttl.