Skip to content

[Feature]: Diff view in the environment editor for draft edits and compare version history #1160

Description

@a8trejo

Preflight

  • I searched existing issues and docs before opening this.
  • This proposal is grounded in a real Roomote use case, not a broad generated feature list.

Problem

The Edit Environment page has no way to see what changed: switching the "Version" dropdown just replaces the editor's content entirely, and there's no way to tell what your own in-progress edits changed relative to the saved config.

Environment configs live in one YAML blob per environment, and every save already creates a row in environment_config_versions — from UI saves, the onboarding agent, the API, and declarative file provisioning.

Anyone reviewing a teammate's YAML change, or an onboarding-agent edit, has to eyeball two YAML blobs manually to find the difference.

Current workaround

Copy the saved YAML out before editing, or open a past version in another tab, then diff the two externally (e.g. paste into a local diff tool). Nobody does this for onboarding-agent edits in practice — those are applied without review.

Proposed behavior

Add a "Diff" tab next to Editor/Yaml/Preview on the Edit Environment page.

It would show line-level diff (with addition/deletion counts) between the currently saved configuration and whatever is currently shown in the editor — either in-progress draft edits, or a past version loaded from the "Version" dropdown.

This reuses the version history already stored in environment_config_versions and the diff-rendering components already built for the sandbox task-diff panel, so it needs no new backend endpoints, schema changes, or git integration.

Affected surfaces

Web dashboard

Self-hosting implications

None — no new env vars, services, ports, credentials, storage, compute, migrations, or provider setup. It's an additive frontend change (one new dependency, diff/jsdiff, for line-level text diffing) built entirely on data the app already stores and queries.

Alternatives considered

Live diffing on every keystroke instead of a dedicated tab. A dedicated tab keeps the default Yaml tab simple and avoids recomputing a diff on every keystroke.

Linking each environment to an external git repo/path and syncing its YAML from there for true source control. Would be more complicated due to webhook/polling infra, provider-specific file-fetch code, and a conflict policy (git-wins vs. UI lock), which is a lot more surface for the same immediate need: visibility into what changed.

Documentation impact

None expected, maybe an optional mention in the environment editor docs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions