jan icon indicating copy to clipboard operation
jan copied to clipboard

feat: let users change default installation directory `janroot`

Open freelerobot opened this issue 1 year ago • 6 comments

Problem I have the code at ~, and now the app backs up data at ~. I'd like to designate another place for app data persistence.

Uploading image.png…

Success Criteria A clear and concise description of what you want to happen.

  1. I go to settings
  2. I type in a new directory
  3. I confirm I want to Change App Data Location
  4. I see a transition/in progress state (if any)
  5. I get a confirmation it was done
  6. I get a prompt to restart the App (if needed)
  7. Upon returning to settings, I see my new path ++ shortcut to open up folder in the new location

Not in scope

  • Letting users change models folder
  • I'd prefer we allow #1381 before letting users fork off folders
  • An Obsidian Vault-like onboarding flow guiding users through choosing vault locations

Additional context Add any other context or screenshots about the feature request here.

freelerobot avatar Dec 14 '23 08:12 freelerobot

Todo

  • [ ] @louis-jan Allow users to choose the default folder configurable on installation
  • [ ] Allow users to change the model folder directory
  • [ ] Allow users to change the installation directory

1. Allow users to choose the default folder configurable on installation

For @louis-jan @namchuai to configure

2. Allow users to change the model folder directory

Full design flow: https://www.figma.com/file/ytn1nRZ17FUmJHTlhmZB9f/Jan-App?type=design&node-id=2052-155715&mode=design&t=ZWZGgzJWErWbLVBs-4

Preview: Users should be able to change model directory in settings/models

Screenshot 2024-01-09 at 5 20 14 PM Screenshot 2024-01-09 at 5 21 44 PM

Error when the folder is not available:

Settings

Side note

Screenshot 2024-01-09 at 5 27 05 PM

3. Allow users to change the installation directory

Similarly for changing app directory Full design flow: https://www.figma.com/file/ytn1nRZ17FUmJHTlhmZB9f/Jan-App?type=design&node-id=2060-186972&mode=design&t=ZWZGgzJWErWbLVBs-4

Data privacy

imtuyethan avatar Jan 09 '24 11:01 imtuyethan

I noticed we're also letting users change model directory, in addition to janroot

Questions:

  1. Does that add engineering complexity?
  2. Does that fundamentally solve the users' issue where they have unique & unpredictable ways of storing model binaries, and want a way to symlink into specific model paths? #1381
  3. What engineering challenges, edge cases, arise, as a result of decoupling /models from janroot? i.e. what happens when I want to delete the App? What happens when i want to package my Jan configs and bring it to a different computer.

My concern is the designs introduce engineering scope creep, that (1) doesn't solve user problems and (2) prone to bugs

freelerobot avatar Jan 10 '24 04:01 freelerobot

  1. Migration will be a challenge where users have downloaded models. We need to relocate the entire directory. There is no fs progress sync for now. Should ask user for the action?
  2. Yes
  3. Decoupling /models from janroot would introduce two kinds of settings: abs vs relv paths (to jan root).

Edge cases:

  • AppData (default created by electron) accidentally removed by users, the global config file is there.
  • Delete app: we should gather all possible locations and ask the user before cleaning them. However, it seems that only Windows users are familiar with un-installers. On MacOS, they will likely not open the dmg file again to run uninstall script, they will prob just delete the jan.app.

louis-jan avatar Jan 10 '24 05:01 louis-jan

  • Delete app: we should gather all possible locations and ask the user before cleaning them. However, it seems that only Windows users are familiar with un-installers. On MacOS, they will likely not open the dmg file again to run uninstall script, they will prob just delete the jan.app.

This is my main concern with increasing the scope of this ticket to let users fork off ~/models.

This means mac users will be left with many orphaned model.jsons even though they deleted the app. Bad practice.

Let's do one thing at a time. Reduce complexity please.

freelerobot avatar Jan 10 '24 05:01 freelerobot

LM Studio has this simple option to relocate local models folder. image

In case of Jan, it could be the entire data-root which also contains all the folders like assistants, models etc.

sukesh-ak avatar Jan 10 '24 10:01 sukesh-ak

To do

Allow users to change the app directory in settings

Design

Full design flow: https://www.figma.com/file/ytn1nRZ17FUmJHTlhmZB9f/Jan-App?type=design&node-id=2270-285004&mode=design&t=e4y3O3QchhS4m1GT-4 cc @louis-jan @urmauur

Preview

Screenshot 2024-01-11 at 6 51 47 PM Screenshot 2024-01-11 at 7 40 23 PM

Error

imtuyethan avatar Jan 11 '24 11:01 imtuyethan

Archive @0xSage's original comment:

Problem I have the code at ~, and now the app backs up data at ~. I'd like to designate another place for app data persistence.

Uploading image.png…

Success Criteria A clear and concise description of what you want to happen.

  1. I go to settings
  2. I type in a new directory
  3. I confirm I want to Change App Data Location
  4. I see a transition/in progress state (if any)
  5. I get a confirmation it was done
  6. I get a prompt to restart the App (if needed)
  7. Upon returning to settings, I see my new path ++ shortcut to open up folder in the new location

Not in scope

  • Letting users change models folder
  • I'd prefer we allow #1381 before letting users fork off folders
  • An Obsidian Vault-like onboarding flow guiding users through choosing vault locations

Additional context Add any other context or screenshots about the feature request here.

imtuyethan avatar Jan 16 '24 06:01 imtuyethan