Skip to content

theia: record studio-web/theia as the IDE image source, repoint the default - #8

Closed
NRGGIT wants to merge 1 commit into
mainfrom
studio-ide-new-ui
Closed

theia: record studio-web/theia as the IDE image source, repoint the default#8
NRGGIT wants to merge 1 commit into
mainfrom
studio-ide-new-ui

Conversation

@NRGGIT

@NRGGIT NRGGIT commented Aug 14, 2026

Copy link
Copy Markdown

Source-reference decision

The prototype is already here. The task this PR closes was to import
Andrej's Theia prototype into Studio Web and decide where it should live. That
import already happened — by Andrej, on main — and this PR records the decision
and finishes the parts the import left behind.

Imported from constructorfabric/fabric-poc@main, path poc/theia
Source ref 7fbf5fc3"Bind the portal bridge so an embedded session can hear the portal", 2026-08-06 (the last commit to touch poc/theia)
Landed as b51b18d"theia: bring the IDE session image into this repo, off fabric-poc", 2026-08-11 — verbatim git archive, 325 files, CRLF→LF
Follow-ups 0824412, 477b90c (2026-08-13) — codex agent in-session; added theia/docker/codex-studio.sh
Chosen location studio-web/theia — not fabric-poc/poc/theia

Why studio-web/theia. One product was shipping from two repositories on
two version schemes: backend and frontend on v* out of here, the IDE image on
theia-v* out of there, so no single tag described a working stack. Keeping the
image beside the gear that launches it also puts the ADR, the studio-session
config and the Dockerfile in one diff when the env contract changes.

theia/ is ahead of poc/theia, not a copy of it — verified by file set,
not by assumption:

fabric-poc  poc/theia :  325 blobs
studio-web  theia/    :  326 blobs
only in fabric-poc    :  (none)
only in studio-web    :  docker/codex-studio.sh

Nothing under poc/theia is missing here, so no source needed copying and
there is no ref to import from. Syncing the other direction would lose the two
follow-up fixes.

Changes

One real defect. studio-backend/src/studio_session/config.rs:111
default_image() still returned
ghcr.io/constructorfabric/fabric-poc/cf-studio-theia:edge. All five
config/*.yaml override it, so it only surfaces when studio_session.image is
unset — and then the gear reaches for a private package in a repo that no
longer builds it. It now returns the studio-web image.

ADR-0003 gets an amendment, not a rewrite. The Context and Decision stay as
written on 2026-07-30 — an ADR records a decision as taken. The new section
records the source ref, how the tree arrived, why it lives here, the
build/publish path, and that the session contract is untouched. A pointer under
Status: keeps a reader from trusting the stale fabric-poc/poc/theia in the
original prose.

Docs. README.md and docs/backend-handover.md said the image is built in
fabric-poc by theia-image.yml. They now name release.yml's images job
and a local build command that works from this tree.

Session contract — unchanged

Nothing here touches studio-session's behaviour; the only executable change is
one default string. Per ADR-0003, still true after this PR:

  • Per-workspace IDE session — one container per (tenant, workspace); foreign sessions read as 404 via subject_tenant_id().
  • Loopback-only portsbind_host: "127.0.0.1", allocated from the configured range.
  • Credentials outside the container — the pull reads STUDIO_REGISTRY_USER / STUDIO_REGISTRY_TOKEN from the environment; the Docker API ignores docker login's client-side store, which is why they are explicit.
  • Image pull configurationalways_pull: true refreshes the mutable edge tag, falling back to the local copy when the pull fails.

Verification

Cross-checked every image reference in the repo — the new default matches the
publish path and all five configs:

  • release.yml:29 sets IMAGE_PREFIX = ghcr.io/${{ github.repository }}ghcr.io/constructorfabric/studio-web
  • release.yml:163-173 builds -f theia/Dockerfile and pushes $IMAGE_PREFIX/cf-studio-theia:$t
  • config/{dev,docker,oidc,postgres}.yamlghcr.io/constructorfabric/studio-web/cf-studio-theia:edge
  • config/k8s.yaml → the same image through the Harbor GHCR proxy
  • config.rs default → now identical to the four

No secrets. The diff adds no credential-shaped string. I also scanned the
imported theia/127.0.0.1.har (42 MB, came in with b51b18d) for auth headers,
cookies and token patterns — clean; the eyJ… hits are base64 page bodies, not
JWTs. It is covered by *.har in theia/.dockerignore, so it never enters the
build context. It is repo bloat, not a leak, and removing it is out of scope
here.

What I could not run locally, and why

Stated plainly rather than implied — CI is the verification for this PR:

  • cargo fmt / clippy / test — not run. This machine has no Rust
    toolchain (rustc and rustup absent), and the backend's path dependencies
    need a gears-rust sibling checkout that is not present. ci.yml checks out
    gears-rust and runs fmt, clippy -D warnings, build, test and the
    --list-gears smoke on this PR. The change is a string literal in an existing
    fn … -> String, so it cannot alter types or control flow.
  • docker build -f theia/Dockerfile theia — not run. The Docker daemon is
    not running on this machine (/Users/…/.docker/run/docker.sock absent), so the
    Docker path was unavailable, not skipped. Note the build context has not
    changed since b51b18d, which release.yml has been building on every main
    push since.
  • Launcher smoke test (compose up → POST /studio-session/v1/sessions
    confirm loopback bind) — blocked by the same two, since it needs both the
    backend binary and Docker.

Happy to run either locally on request — the Docker build takes ~10 min and
needs network for the Theia plugin downloads.

Summary by CodeRabbit

  • Documentation

    • Updated setup and handover documentation to reflect the Theia image’s new location and build instructions.
    • Documented unified release publishing and tagging for backend, frontend, and Theia images.
    • Added an architecture decision record amendment covering the image move and unchanged session behavior.
  • Configuration

    • Updated the default Theia image registry path to constructorfabric/studio-web.
    • Aligned documented CI and release references with the current image publishing workflow.

… default

The session image moved out of fabric-poc into theia/ in b51b18d, and the
configs were repointed with it — but the code default and the prose were not.
This finishes that move.

studio_session's default_image() still returned
ghcr.io/constructorfabric/fabric-poc/cf-studio-theia:edge. Every shipped
config/*.yaml overrides it, so it only surfaces when studio_session.image is
unset — and then the gear reaches for a private package in a repo that no
longer builds it. It now returns the studio-web image, which is what
release.yml's images job actually publishes ($IMAGE_PREFIX resolves to
ghcr.io/constructorfabric/studio-web) and what all five configs already name.

ADR-0003 gets an amendment rather than a rewrite: the Context and Decision
stay as written on 2026-07-30, and the new section records the source ref the
prototype came from (fabric-poc@main:poc/theia, last commit 7fbf5fc3), how it
arrived (b51b18d, verbatim git archive, 325 files, CRLF->LF), the two
follow-ups that put theia/ ahead of poc/theia, why it lives here, and that
the session contract — per-workspace container, loopback bind, credentials
from the environment — is untouched.

README and backend-handover said the image is built in fabric-poc by
theia-image.yml. They now name release.yml's images job and the local build
command that works from this tree.

Signed-off-by: Roman Novikov <roman.novikov@constructor.tech>
@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d54fd1d9-d3ac-4417-8cdf-c517722d90e2

📥 Commits

Reviewing files that changed from the base of the PR and between 44d54c1 and 282d5ac.

📒 Files selected for processing (4)
  • README.md
  • docs/backend-handover.md
  • studio-backend/docs/adr/0003-theia-sessions.md
  • studio-backend/src/studio_session/config.rs

📝 Walkthrough

Walkthrough

The documentation records Theia as a local image source under theia/. Release documentation uses the shared workflow and unified tags. Session configuration now defaults to the studio-web Theia image.

Changes

Theia image alignment

Layer / File(s) Summary
Repository source and provenance
README.md, docs/backend-handover.md, studio-backend/docs/adr/0003-theia-sessions.md
Documentation records the image move, local build paths, source history, repository ownership, and unchanged session behavior.
Release documentation and runtime image
README.md, studio-backend/src/studio_session/config.rs
The shared release workflow and unified tag scheme are documented. default_image() now uses ghcr.io/constructorfabric/studio-web/cf-studio-theia:edge.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 282d5

This PR repoints the fallback IDE image to the studio-web image and updates the related documentation; no actionable merge-blocking risk remains beyond normal checks and review.

Possibly related PRs

Suggested reviewers: andrejk666

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: recording the Theia image source and updating the default image reference.
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.
✨ 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 studio-ide-new-ui

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.

@NRGGIT

NRGGIT commented Aug 14, 2026

Copy link
Copy Markdown
Author

Closing — not needed as a PR. The work stays on the studio-ide-new-ui branch for now.

@NRGGIT NRGGIT closed this Aug 14, 2026
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.

1 participant