Visual Editor not able to edit after deployment

I have the visual editor working locally for my site. I can edit pages, i can search for them in the dropdown. but after deploying, that isn’t available anymore. I am the owner.

I have tried to restart multiple times.
project: coa-visual-editor-test
https://devserver-preview–coa-visual-editor-test.netlify.app

Here is my config:

import { defineStackbitConfig } from "@stackbit/types";
import { GitContentSource } from "@stackbit/cms-git";

export default defineStackbitConfig({
    stackbitVersion: "~0.6.0",
    ssgName: "custom",
    nodeVersion: "18",
    devCommand: "npm run start",
    contentSources: [
        new GitContentSource({
            rootPath: __dirname,
            contentDirs: ["docs"],
            models: [
                {
                    name: "doc",
                    type: "page",
                    urlPath: "/docs/{slug}",         // public URL path for docs
                    filePath: "docs/{slug}.md",      // where new docs will be saved
                    fields: [
                        {
                            name: "title",
                            type: "string",
                            label: "Title",
                            required: true,
                            default: "New Doc Title",
                        },
                        {
                            name: "description",
                            type: "string",
                            label: "Description",
                        },
                        { name: "keywords", type: "list", items: { type: "string" } },
                        { name: "processed", type: "boolean", default: true },
                        {
                            name: "type",
                            type: "string",
                            const: "doc",
                            hidden: true, // don’t let editors change it
                        },
                        { name: "markdown_content", type: "markdown", label: "Body" },
                    ],
                },

            ],
            assetsConfig: {
                referenceType: "static",
                staticDir: "static",
                uploadDir: "img",
                publicPath: "/",
            },
        }),
    ],
});

Apparently, I’m rubber ducking today. I chose preview as the branch, but was making my PRs to main, so my stackbit.config was never updated.
Change that setting for the visual editor preview to your main branch. Then editing will work.

Thanks so much for sharing the solution!