feat: Instance context to enable routes and reactivity w/ consistent interface#1315
Open
Pecacheu wants to merge 2 commits into
Open
feat: Instance context to enable routes and reactivity w/ consistent interface#1315Pecacheu wants to merge 2 commits into
Pecacheu wants to merge 2 commits into
Conversation
d324b96 to
bd9890a
Compare
eacb13f to
74f076e
Compare
This was referenced Jun 30, 2026
71c5f1a to
f5a2fe5
Compare
refactor: use Instance.apiUrl instead of CONFIGURATION.DEFAULT_API_URL refactor: use Instance.wsUrl instead of CONFIGURATION.DEFAULT_WS_URL refactor: use Instance.mediaUrl instead of CONFIGURATION.DEFAULT_MEDIA_URL refactor: use Instance.proxyUrl instead of CONFIGURATION.DEFAULT_PROXY_URL refactor: use Instance.gifboxUrl instead of CONFIGURATION.DEFAULT_GIFBOX_URL refactor: use Instance.isStoat instead of CONFIGURATION.IS_STOAT refactor: use Instance.hcaptcha_sitekey instead of CONFIGURATION.HCAPTCHA_SITEKEY refactor: use Instance.maxEmoji instead of CONFIGURATION.MAX_EMOJI refactor: use Instance.enableVideo instead of CONFIGURATION.ENABLE_VIDEO chore: take note of remaining variables to be implemented in instance.ts chore: fix formatting feat: add hostname to Instance.ts feat: modify routes to allow access to other instances Signed-off-by: Gtoasted <git@gtoasted.de>
fix: Use instance global limits in Draft.ts because it is outside of the ClientController context refactor: Move client init from Lifecycle into Instance so that the configuration is only pulled once fix: Use instance prop for server emoji limit Signed-off-by: Pecacheu <3608878+Pecacheu@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Perquisite for:
Supersedes:
Adds the Instance context for accessing instance-specific configurations and detecting the API endpoint from the current instance. Also adds an easy-to-use memo to the ClientController that simplifies limit checks and safely returns defaults if client is unconfigured, and drops some now-unused CONFIGURATION env vars.
Note: This PR does not actually enable instance switching, nor does it add/change any UI. But it is the groundwork for doing so, adding the necessary reactivity, and enabling the route handling for alternate instances.
Edit: Messed around with the commit history a bit to make sure Gtoasted gets credited for their initial contributions to this.
main