Skip to Content
Developer GuideCode Changes and Updates

Code Changes and Updates

Each frontend has its own GitLab repository, and master is what gets built. Everyone who works at a site can change its code.

You areYou can
A Site Admin or Organization AdminPush to master or to branches.
Anyone else at the sitePush branches, which Visor merges for you.

Get a change onto the site

Start a branch

Start from the latest master, with one branch per piece of work:

git fetch origin git switch -c feat/<topic> origin/master

Commit and push

git push -u origin feat/<topic>

You don’t need to open a merge request.

Merge

Ask your AI tool to merge the branch. It uses visor_code_changes, shows what will be merged, and merges after your yes.

If there are conflicts, run git merge origin/master on your branch, resolve them, push and merge again.

Wait for the build

The preview rebuilds in a few minutes. visor_preview_status and visor_preview_wait report its progress, or see the frontend’s Builds tab.

Set it up in Visor

Activate new themes, set up new layouts, then build pages. Then publish them and Deploy.

A merge can reach visitors. Merging into master rebuilds the preview, and the hosting also builds the live website from the merged code, with everything published so far. Merge only what’s ready to go live.

Before you merge

CI runs these on merge requests and on master. You can run them yourself:

npx tsc --noEmit npm test npm run agents:check npm run tokens:check

Also useful, though not in CI by default:

npm run lint npm run check:site-layer npm run build

Tests mock lib/daas.ts, so they never call real data and need no .env.

Template updates

A forked site can take Visor’s template fixes and improvements. Each update is a merge request from the template’s master into your site’s master. Only Site Admins and Organization Admins can take them.

Go to Settings → Frontend → Manage → Code → Template updates, click Get updates, then Merge and build. See Frontends.

After a merge, run git pull on your local master.

If there are conflicts

These happen when your site changed files that the template also changed. Your AI tool can resolve them. The steps are:

git fetch origin master "refs/merge-requests/<iid>/head:template-update" git switch -c chore/template-update-<date> origin/master git merge template-update

Keep your work in your site’s places, and the template’s version everywhere else. If your site had edited a template file, move that change into a site place if you can. Run the checks, push the branch and merge it. GitLab then closes the template update as merged too.

Never force-push master, and never delete the template’s branch.

Clones and forks of frontends

The frontend isHow it updates
A fork of the templateNormal template updates.
A fork of another frontendUpdates from (that frontend). Update the parent first.
A clone, or a fork whose parent is goneBy hand, by a developer.

Several frontends

Each frontend has its own repository, preview, live website, theme and GA ID. All show the site’s content, and all are live at once. Active only marks the one Visor works with. Deploy builds them all.

To add one, see Add a Frontend.

To work on a frontend’s code, download its kit from Settings → Frontend → Manage → Settings, or name it in your request. The MCP tools take a frontend argument.

If you don’t name a frontend, visor_workspace_get uses the active one, while visor_code_changes and visor_template_update use the site’s first one. On a site with several frontends, always name the one you mean.

In Visor, the Code tab lets non-admins merge on the active frontend only. On other frontends, Site Admins merge.

Last updated on