Skip to content

feat(webapp): make the default realtime backend configurable#4231

Merged
ericallam merged 1 commit into
mainfrom
feature/tri-11906-add-realtime_backend_default-env-var-to-set-the-default
Jul 11, 2026
Merged

feat(webapp): make the default realtime backend configurable#4231
ericallam merged 1 commit into
mainfrom
feature/tri-11906-add-realtime_backend_default-env-var-to-set-the-default

Conversation

@ericallam

Copy link
Copy Markdown
Member

Summary

The default realtime backend was hardcoded to Electric. This adds a REALTIME_BACKEND_DEFAULT env var (electric | native | shadow, default electric) that chooses the backend for any environment whose org has no realtimeBackend override. Behavior is unchanged unless you set it; per-org overrides still win.

The default is applied at every point where the per-org flag falls through: the initial value, the flag lookup default, and the error fallback.

@changeset-bot

changeset-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: a0d2a4d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Added the validated REALTIME_BACKEND_DEFAULT environment variable, supporting electric, native, and shadow, with electric as the default. Updated realtime backend resolution to use this value for initialization, feature-flag defaults, and error fallbacks. Documented the new environment variable and its behavior.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description only includes a summary and omits required template sections like Closes #issue, checklist, testing, changelog, and screenshots. Add the missing template sections: Closes #issue, checklist items, Testing steps, Changelog, and Screenshots or explicit N/A entries.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly states the main change: making the default realtime backend configurable.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/tri-11906-add-realtime_backend_default-env-var-to-set-the-default

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ericallam ericallam marked this pull request as ready for review July 10, 2026 21:14

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@ericallam ericallam merged commit 5d0e9d9 into main Jul 11, 2026
33 checks passed
@ericallam ericallam deleted the feature/tri-11906-add-realtime_backend_default-env-var-to-set-the-default branch July 11, 2026 08:36
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.

2 participants