Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[API Feature Request] Add support for multi instance handling #269

Open
tonka3000 opened this issue Oct 31, 2021 · 10 comments
Open

[API Feature Request] Add support for multi instance handling #269

tonka3000 opened this issue Oct 31, 2021 · 10 comments
Labels
api Issues related to API feature request New feature or improvement

Comments

@tonka3000
Copy link
Contributor

tonka3000 commented Oct 31, 2021

There are a lot of extension which would need support for multiple instance.

e.g.

  • GitLab
  • YouTube
  • Twitter
  • Home Assistant

and many more

User often work in more than one instance of a tool. At first I thought it would be job of the extension developer to implement that feature directly into an extension. But over time I came to the opposite conclusion. Raycast should support that directly. For Raycast that should be possible and pretty forward to do. Making multiple root commands for each instance does not make much sense in my opinion because the whole command search would more or less break or at least will be less effective. But Raycast could add a simple + symbol to the preferences and add a tab widget per instance. With each tab the user can set the preferences again. That way the user can create multiple instance very easy and it would not affect the general Raycast workflow.

CleanShot 2021-10-31 at 20 35 05@2x

Raycast can change the supportpath of the extension based on the instance number (maybe this should be a GUID for each instance of an extension), so each instance of an extension can store the data in its own place without clashes.

In a command a user could change the instance like you do it in the GitHub integration with the repositories, maybe also with a fixed shortcut.

CleanShot 2021-10-31 at 20 43 25@2x

Describe the feature and the current behavior/state.

This can only be done per extension, which would be a nightmare, because I would need that in many extensions.

Will this change the current api? How?

This can only affect the first instance of a extension, because you already set a supportpath. But the impl. can be in a way that the first instance of an extension always use the supportpath without an id of the instance.

Who will benefit with this feature?

Everybody how wants to use more than one instance of an extension.

Any Other info.

@tonka3000 tonka3000 added api Issues related to API feature request New feature or improvement labels Oct 31, 2021
@MrChrisRodriguez
Copy link

100%

This is especially true for contractors who work with / support multiple organizations. I have multiple Asana, Linear, Google, Trello, Slack, etc. accounts and would love to be able to create integration shortcuts namespaced by the client, for example.

@T4cC0re
Copy link

T4cC0re commented Sep 3, 2022

This would be really useful, as I need to use multiple GitLab instances at work. Having them all available in raycast would be amazing.

@ItsJamesMurray
Copy link

I would very much like this for Google Workspace as well. I use Google personally and professionally under different accounts — it would be 10x better if I could access both of them via Raycast.

@taylorjdawson
Copy link

@tonka3000 I want this feature as well but I am not following the logic of why this should be handled in raycast directly? The thought of running a separate instance for each account for each site seems like a lot. It feels like it makes more sense for the extension to handle this multi account setup. But I could be missing some context here as I have not built an extension myself yet

@MatthiasGrandl
Copy link

@taylorjdawson it makes more sense to allow multiple instances of one extension, because it keeps extension development simpler and you don’t have to replicate work for every extension that might profit from multiple account support.

@taylorjdawson
Copy link

@MatthiasGrandl hmm interesting if you think about each slack workspace being a separate instance within slack then I think that does actually make a lot of sense. I guess my only concern is that this is a bigger ask and has been open for almost a year (anniversary coming up this Monday) and think time might be better spent coming up with solutions in the meantime with a single instance?

@T4cC0re
Copy link

T4cC0re commented Oct 27, 2022

@taylorjdawson I believe just multiple accounts doesn't cut it for all use cases.
Allowing to instanciate an integration would allow for different configuration of that integration across different instances.

Having rauchst abstract this, would also have integrations benefit from this, which are no longer actively maintained.

I for one need to have access to separate GitLab servers for work. Having the integration implement multiple instances would leave it up for discussion whether connecting to different servers is in scope.
Having multiple integration instanciation in Raycast, would have the integration be unaware that other instances of the integration have a different configuration.

@tonka3000
Copy link
Contributor Author

Hi @taylorjdawson , @MatthiasGrandl , @T4cC0re ,

@taylorjdawson it makes more sense to allow multiple instances of one extension, because it keeps extension development simpler and you don’t have to replicate work for every extension that might profit from multiple account support.

Totally agree

In my opinion there are 2 scenarios and both have legit reasons.

Raycast handle multiple configuration sets

There are no extra maintenance for the extension developer as @MatthiasGrandl already mentioned. This feature can be impl. directly in Raycast with some effort because the node process get all the information from the Raycast process via IPC including the support directory. So everything is there from the nodejs side. I assume that the impl. effort is inside the Raycast process because right now there is an 1:1 relation between extension registration and the instance which get called. The main act is adapting the database but everything is there.

This way the user as well a the developer have a great UX and DX. Things like "what to do when one instance is not reachable" does not exist. Also different config can be handle e.g. you have a GitLab instance with ultimate tier and one with free tier.

The only real downside is that you can't get an overview e.g. from all issues of all your GitLab instance easily, but the question is how beneficial is that to most users.

Extension handle multi accounts

The Extension is aware of multiple configuration sets. This can work with smaller extensions with some commands, but handling the preferences is tricky because Raycast use a declarative approach (which is a good thing in most cases). The extension developer needs to hardcore(!) the configuration sets, which is mostly a bad practice and hard to maintain.
There would be also the option to skip the preferences of the extension and make it all at runtime, but this has also hard to keep maintained and security will be a big problem here as well.

The problem still exists when you try to put the handling into a npm library to shared the logic.

Some of the problems are:

  • How to handle when API are not reachable
  • How to handle different configs

and many more

Concerns

I guess my only concern is that this is a bigger ask and has been open for almost a year (anniversary coming up this Monday) and think time might be better spent coming up with solutions in the meantime with a single instance?

I understand your concerns, but see it from Raycast perspective. They need to get a good income stream and I assume that most paying customers often have mostly one account for a service. I assume this feature has not the highest priority and things like the Teams stuff has more resource allocated now which are directly related to their income stream.

I already started impl. multi account handling in GitLab, but I discard it very fast because it will take a lot of time and code get very hard to maintain.

Ping @pernielsentikaer (if not already done) and ask him. Maybe the Raycast team has a different POV on that topic as well.

I would love to have the Multi instance handling for various reasons but I would fully understand if this has low-priority to ensure that Raycast still exists in 5-10 years.

@bhean
Copy link

bhean commented Sep 21, 2023

I found this issue looking for some way to configure 2 different Gitlab servers in Raycast, and it looks like this could be a great feature for Raycast.

I use my own Gitlab instance for personal projects, and another different instance for work, so currently I'm forced to "choose" between one of them because the extension only allows one URL/token, which is very inconvenient.

Any chance to include this in the Raycast roadmap or something? It's been 2 years since the initial proposal, and still nothing, even when this could be very useful for many people (not only for Gitlab extensions, but also for any of them)

@whatamanoffical
Copy link

Would be great with multi workspace support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issues related to API feature request New feature or improvement
Projects
None yet
Development

No branches or pull requests

8 participants