Skip to content

Conversation

@briangregoryholmes
Copy link
Contributor

@briangregoryholmes briangregoryholmes commented Dec 24, 2025

This PR removes the runtime store and RuntimeProvider component in favor of storing the necessary parameters for querying directly on the httpClient, which now features methods to set and get those properties.

This is a fundamental restructuring that better aligns the storage and access of these properties with how they're used.

On Rill Developer, instanceId is always default and there are no tokens. As such, there is no value in having either of these stored using Svelte's store API. It makes elements that depend on instanceId unnecessarily use derived stores or $ access. It also suggests that it can change, which it cannot. In general, reactivity is not required.

On Rill Cloud, instanceId, host, and JWT are directly tied to a project and, within a project, they are largely stable (JWT may be refreshed). As such, the exact same access mechanism (through the httpClient) can be used. To enable updates to propagate when switching projects, we simply add a high level key on instanceId. This is preferred to the "illusion" of fine grained reactivity. Switching projects is such a fundamental change that "warm" reloading components can cause unexpected issues that are difficult to debug.

To Do:

  • Bring back project refetching based on status
  • Expired JWT refetching

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

@briangregoryholmes briangregoryholmes self-assigned this Dec 24, 2025
@briangregoryholmes briangregoryholmes marked this pull request as draft December 24, 2025 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants