Projects
Website code
Read and edit your website's source from Ulika, build a preview on a new branch, and publish through a pull request. For owners and admins, with checks and safeguards.
Last updated
Website code is the advanced area for changing your site's source, not its content. Ulika reads the code from your GitHub repository, lets an owner or admin edit it, builds a preview from a new branch, and publishes by opening and merging a pull request. For the words and images on your pages, use the editor instead.
Where to find it#
Open a project and look in the left sidebar. Website code is in the Advanced group, described as "Advanced website editing". The page title is Website code.
Where the code comes from#
What you see depends on how the project is connected.
A project connected through GitHub gets a code workspace built from its repository, through Ulika's GitHub App. This is described below as the editor.
A project that already had the older code workspace keeps it. It works the same way for you, with the same buttons.
A project whose repository cannot be reached shows a read-only browser, or an explanation with one action that fixes the problem. The page never shows a dead end. See When the page cannot read your code.
First open#
The first time an owner opens Website code on a GitHub project, Ulika reads the editable source from the repository once and keeps it as the workspace. This only happens for repositories that this workspace has connected to Ulika; Ulika never reads a repository just because its name was typed into a project.
To keep this bounded, the first read is limited:
| Limit | Value |
|---|---|
| Files kept in the workspace | up to 80 |
| Size of one file | up to 100,000 bytes |
| Total read in one go | up to 1,500,000 bytes |
| After a failed first read | Ulika leaves the project alone for 10 minutes, then tries again on the next open |
Files in src, app, pages, components, styles and public are taken first. package.json is not part of the editable set.
If the project's repository is later changed, the stored workspace described the old repository, so Ulika discards it and its code versions and builds a new one from the new repository the next time you open Website code. If a stale page is still open, you may see "This code workspace belongs to the previous repository. Reopen Website code to reload it."
Files that are hidden or refused#
Ulika never shows or edits files that could hold credentials:
Files whose name suggests a secret (for example names containing
secret,credential,tokenorprivate, or ending in.pem,.key,.p12or.pfx),.envfiles and anything in a folder starting with a dot.Files whose content looks like a live credential, such as private key blocks, cloud access keys, payment or GitHub tokens and similar patterns.
Dependencies, build output, lock files, minified files and source maps.
Hidden files are counted for you: "N files hidden for safety because the name or content looks like a credential." Their content is never stored.
Saving is also refused when your own edit would add a credential. The message reads: "This looks like it contains a secret key or token. Keep credentials out of website code." Put secrets in your host's environment variables instead.
The editor#
The editor has a file list on the left and the selected file on the right.
Find a file… filters the list. Some files have friendly names: Website styles (
site-overrides.css, "Applies to every page"), Header code and Footer code (snippets added before</head>and</body>on every page) and Page layout. Other files show their path.A small dot beside a file means its saved draft differs from the live code.
Above the editor, the status reads Saved or Unsaved edits. Save draft saves your edits as a draft. Saving does not touch GitHub.
Reload saved files discards what you typed and loads the last saved draft. If you have unsaved edits, Ulika asks first with Discard unsaved edits? and the buttons Keep editing and Discard unsaved edits. Leaving the page with unsaved edits asks the same question.
Before a draft is accepted, Ulika checks it:
| File type | Check |
|---|---|
.ts, .tsx, .js, .jsx, .mjs, .cjs | Syntax. The first error is shown, with its line number when known. |
.json | "This file is not valid JSON." |
| Any file | No credentials, and the path must be one Ulika offers: "This file is not available for website editing." |
The panel above the editor summarises the path every change takes: Save draft, Build preview, Open preview, Publish code.
Preview#
Click Build preview. Ulika commits your saved draft to a new branch named ulika/code- followed by a short id, based on the current head of your repository's branch. It never commits to an existing branch and never force-pushes. Your host builds that branch, and that build is the preview.
The panel shows the state: Preview requested, Building preview, Preview ready, Preview needs attention or Published. While it builds, this page checks again every few seconds. When it is ready, Open preview opens it in a new tab. If a request seems stuck, Retry preview appears.
Things you may see:
"The preview could not be built on your host. Fix the code and build a new preview." Your host reported a failed build for the preview commit.
"<file> changed in the repository after Ulika read it. Nothing was overwritten. Ask your developer to merge, or reconnect the repository to reload its code." Someone changed the same file on GitHub after Ulika read it. Ulika refuses to overwrite it.
"Save a change to a file first, then build a preview." There is nothing saved to build.
"Save your local edits before building or publishing." You have unsaved edits.
Only one preview is pending at a time. Asking again while one is building reuses it.
When your host reports nothing#
Ulika learns whether a preview built from your host's reports to GitHub. If no host reports a build for the preview commit within about three minutes, Ulika marks the preview ready anyway and points Open preview at the branch on GitHub, so you can review the change there. It flags the preview as unchecked, and publishing it needs one extra confirmation (below).
Publish#
Click Publish code once a preview is ready. Ulika opens a pull request titled Update website code from the preview branch into your repository's branch, and merges it. The merge is pinned to the commit Ulika made, so if the branch moved in the meantime GitHub refuses it and nothing is merged.
Publish without a build check#
For an unchecked preview (your host never reported a build), a dialog asks Publish without a build check? It says: "Your host didn't report a build for this change, so Ulika could not check it. Publish anyway?" Choose Publish anyway to continue, or Keep editing.
What you see afterwards#
| Message | What happened |
|---|---|
| "Website code is merged into your repository. Your host deploys it from there." | The pull request was merged. Your host builds and deploys the branch as usual. |
| "Pull request #N is open on GitHub and waits for approval there. This page notices when it is merged." | GitHub refused the merge, usually because the branch is protected and needs a review. The pull request stays open. |
A waiting pull request is also shown as "Pull request #N is waiting for approval on GitHub." with an Open it link. Approve and merge it on GitHub; the next time Website code loads, Ulika notices the merge and marks the version published. If the pull request is closed without merging, Ulika forgets it and you can publish again. For how protected branches work, see Protected branches.
Other messages when publishing:
"Create and open a working preview before publishing this code." There is no ready preview.
"Your code changed after this preview. Build a new preview before publishing." You saved again after building. Preview exactly what you will publish.
"This code is already being published. Wait a moment, then reload." Another click is publishing the same version. Only one publish per version runs at a time, and a second click reuses the pull request the first one opened.
Code versions#
Code versions lists each preview with its state and time. The version that is live reads Live website code, and the one matching your current draft is marked Current saved draft. Open preview opens an older preview that is still available. Restore draft (after Restore this version as a draft?) replaces your saved draft and any local edits with that version. Build and review a new preview before publishing it. Show more versions loads older entries.
When the page cannot read your code#
If there is no code workspace and the repository cannot be read, Website code shows a read-only browser or an explanation with one button.
The read-only browser#
When Ulika can read the repository but has no editable workspace, you see the repository, branch and the first seven characters of the commit, then "Read-only. Changes reach your site through your repository." The left list (Source files) shows up to 400 readable files, and "Showing the first N files." if there are more. Click a file to read it. A file that may contain a credential reads Hidden for safety, and a file that is missing at that commit, too large (over 200,000 bytes) or not plain text reads This file cannot be shown. A repository with nothing to show reads No source files to show.
At the bottom, Want to change the code? points you at your coding agent. It shows the Claude Code command that adds the Ulika MCP server, which can read the project and open a change in your repository. See MCP tools.
Explanations and their one action#
| Title | Why | Button |
|---|---|---|
| This website has no GitHub repository | The project is not tied to a repository. | Connect a repository |
| Ulika cannot confirm its GitHub access to this repository | Ulika only uses GitHub access that this workspace set up itself, through a connection it made or a connect run it authorised. A repository name alone is never enough, because the GitHub App is installed on many accounts. | Reconnect GitHub |
| Ulika no longer has access to this repository | The App was removed or lost access to the repository. | Reconnect GitHub |
| Ulika cannot see this repository | It may have been renamed, moved, or removed from the App's repository access. | Reconnect GitHub |
| Ulika cannot read this repository's code | The App's permissions were reduced. Review them on GitHub, then connect again. | Reconnect GitHub |
| Ulika's GitHub access is suspended | An admin of the GitHub account can restore it from the GitHub apps settings. | Reconnect GitHub |
| GitHub is busy | GitHub asked Ulika to slow down. | Try again |
| GitHub did not answer | Ulika could not reach GitHub just now. | Try again |
| GitHub is not set up on this deployment | This Ulika has no GitHub App configured. | Back to settings |
Reconnect GitHub opens the project's GitHub connection step. For the details, see GitHub App and GitHub problems.
Related#
Publishing is for content, not code.
Project settings, including Change repository, which reloads the code workspace.
Security and privacy for what Ulika reads and writes in your repository.
Was this page helpful?