Fabricator

Code and history

Browse project files and preview images, open the folder in VS Code, inspect diffs, and restore earlier git snapshots from Fabricator's Code view.

Use Code when you want to inspect the files behind your app or understand what changed over time. The current Code view is a viewer: it opens project files in a read-only Monaco editor and can open the project folder in VS Code for editing.

The Code view with the project’s file tree on the left and Dashboard.tsx open in the read-only editor, with Open in VS Code at the top right.

Browse files

  1. Select Code in the project tabs.
  2. Select Files.
  3. Choose a file in the tree.

Fabricator shows project files in a tree and opens text files in the editor. It skips large generated folders such as node_modules, .git, dist, build, .next, .vite and coverage.

The editor shows line numbers, syntax highlighting and a minimap. It does not save edits in the current app source. Use Open in VS Code when you need to edit a file by hand.

The file header can show:

  • The project-relative path.
  • The file size.
  • Copy, which copies the displayed file contents.

If a file is binary, empty, missing or too large to preview, Fabricator shows that message instead of the editor. Text files up to 1 MB open in the editor.

Preview images

Images up to 20 MB, such as PNG, JPEG, GIF, WebP, AVIF, BMP, ICO and SVG files, open as pictures instead of code. Transparent parts show a checkerboard.

  • The header shows the image's size in pixels, such as 1600 × 1000 px, and how large it's shown, such as 42%.
  • A large image shrinks to fit the pane, and a small one, such as an icon, is enlarged to show its detail. Select Actual size, or select the image, to see it at 100%. Select Fit, or the image again, to go back.
  • An SVG file shows Preview and Code: select Code to read its source in the editor, with Copy.

If Fabricator can't show an image, it says "Couldn’t show this image."

Open files from chat or other views

File chips and file references in chat can open the file in Code. The Blueprint and Advisor views also use the same behavior when they link to source files.

When a line number is provided, Fabricator opens the file and reveals that line in the editor.

Open the project in VS Code

Select Open in VS Code in the Code toolbar. Fabricator runs code <project-folder>.

If the code command is not available, Fabricator opens the project folder in the operating system file manager instead and shows: "VS Code isn’t installed, so we opened the project folder instead." Use Get VS Code from that message if you want to install it.

Use the git status pill

The status bar starts with a git item: the branch and the number of uncommitted changes. When the repository has a remote, it can also show changes to get or push.

Open it to use:

  • Switch…, next to the branch, to switch branches.
  • Create…, next to Not on GitHub yet, to put an app with no remote on GitHub.
  • Get latest for remote changes waiting to be pulled.
  • Push for local commits ready to push.
  • Commit all after entering a Commit message.

To have Copilot write the message, select the sparkle button at the end of the message box, Write a message with Copilot. Copilot reads what the commit would include and writes one line on its Auto model, which you can edit before you select Commit all. It doesn't read lockfiles, .env files or the local backend's data in .rayfin-local.

For team apps, Fabricator saves changes through the team workflow instead of using these local push and pull actions.

Put an app on GitHub

When the app's repository has no remote yet, the git item's panel says Not on GitHub yet. To create a GitHub repository for it:

  1. Next to Not on GitHub yet, select Create….
  2. Choose the GitHub account to create the repository as. To use another one, select Add account and finish signing in in the terminal window that opens.
  3. Choose the Owner: that account, or one of its organizations.
  4. Choose Private or Public.
  5. Check the Repository name. It starts as the project's folder name, with characters GitHub doesn't take turned into hyphens.
  6. Select Create repository.

Fabricator creates the repository, pushes the branch you're on with its versions, and says "The app’s versions are at github.com/<owner>/<name>." Uncommitted changes stay on this computer until you commit and push them. From then on, use Push and Get latest as with any remote. You can also create the repository when you create the app; see Create a new project.

Fabricator gets and pushes the app's changes as the account that created the repository, whichever account the GitHub CLI has active. If GitHub already has an empty repository with that name that the account can push to, Fabricator puts the app in it. If an organization doesn't let you create private repositories, Fabricator says so; choose Public or another owner. Creating a repository needs the GitHub CLI: when it isn't installed, select Install from setup, and when it isn't signed in, select Sign in to GitHub.

Switch branches

Select Switch… to list the branches: yours first, then, under On the remote, the ones only on the remote. Type in Filter branches to find one, then select it. A branch that's only on the remote becomes a branch of yours that follows it, so Get latest and Push work with it.

Before it switches, Fabricator saves your uncommitted changes on the branch you're on, as "Save before switching to <branch>", so they're there when you come back. Branches, Get latest and merges wait while Copilot is working.

When your app's packages change

When getting the latest changes, a merge or a switch of branch changes your app's package.json or npm lockfile, including the functions folder's, Fabricator installs the packages again with npm and restarts your app on them. A notice says so while it works, and npm's output is in Output, which the preview toolbar's Output opens in the terminal.

When your changes and the latest changes overlap

Get latest saves your uncommitted changes, then puts your commits after the latest ones. When both change the same lines, it puts everything back as it was and says "Your changes and the latest changes overlap and couldn’t be combined automatically."

Select Ask Copilot to resolve. Fabricator merges the latest changes, and git marks where they overlap in each file. A merge can sometimes combine what the first try couldn't, and then that's it. Otherwise chat asks Copilot to resolve every conflict, check that the app still builds, and finish the merge.

Until the merge is finished, the git item counts the files with conflicts, such as 2 conflicts. Open it to see them, with:

  • Ask Copilot to resolve, to ask Copilot again.
  • Finish merge, once no conflicts are left and the merge still waits to be finished.
  • Cancel merge, to go back to how things were before the merge.

Then select Push to share the merge.

Review history

Select History inside Code to open the timeline.

The History tab: a timeline of saved versions, the files changed in the selected version, and a diff of Expense.ts.

The timeline shows saved git snapshots. It also shows Uncommitted changes when the working tree has files changed since the last snapshot. Fabricator records snapshots as it works, so this view is the safest way to see what changed without using a terminal.

Fabricator saves a snapshot after each chat turn that changed your app, named after your request, so you can go back turn by turn. It also saves one each time it publishes your app. See Develop on this computer.

A project you open from a folder that git doesn't track yet gets a repository when it opens. Its timeline starts with a Start version history snapshot. See Open an existing local project.

Select a timeline entry to see:

  • The changed files.
  • Added, modified, deleted or renamed status.
  • Insertions and deletions.
  • A text diff for the selected file.

Use Side by side or Unified to change the diff layout. Use Wrap for long lines.

Compare snapshots

Use Compare in the timeline to pick a Base snapshot and a Target snapshot. Fabricator lists the differences between them.

You can also use History of this file from the diff header to jump through the commits that touched the selected file.

Send history to chat

The History view can stage context in the Build chat:

  • Send to chat sends the selected snapshot or uncommitted changes.
  • Send comparison sends the selected base-to-target comparison.
  • The chat icon in the diff header sends the selected file's change.

Fabricator switches back to Build and places the context in the composer so you can add your own request before sending.

Restore an earlier version

  1. Select an older timeline entry.
  2. Select Restore this version.
  3. Confirm Restore.

Fabricator saves your current work first if there are uncommitted changes, restores the project to the selected snapshot, and records the restore as a new git commit. What happens next depends on the app:

  • A team app's restore is saved to your working copy on GitHub, and your app on this computer shows the restored version. The dialog says "Fabricator then saves it to your working copy on GitHub. The published app doesn’t change until you publish."
  • Any other app's restore stays on this computer, and your app on this computer shows the restored version. For a published app, the dialog says "Your published app doesn’t change until you publish."

Your current version stays in the timeline, so you can restore it again later. For team apps, restore is scoped to that app's folder; other apps and shared files in the team workspace repository are not restored.

When your published app is on an earlier version than your code, History says "Your published app doesn’t match your current code." Select Publish current version to go back to Build and publish it.

Something wrong on this page?Edit this pageReport an issue with this page

Fabricator is a personal project by Sachin Patney. It is not a Microsoft product and is not affiliated with, endorsed by, sponsored by, or supported by Microsoft.

GitHubMIT LicenseReleasesYouTubeDocumented for Fabricator 1.67.2

On this page