Skip to main content
Browse docs

Preview, review and merge an agent's work

Read an agent's changes, comment on lines, run its preview and checks, then submit, merge and deploy the result.

On this page

An agent's work stays in its task until you submit it. Before you do, use the Changes, Preview and Checks views to see what it changed and whether it works. The basics of the page are in Use the Agents dashboard.

Read the changes

Changes lists the files the task has changed, in a table headed with the app's repository and the number of changed files. A task with linked apps has a table for each repository. To see the commits the agent made along the way, open Commits instead; see Use the Agents dashboard.

  • Each row shows the file, its status and View diff. Choose View diff to open the file's diff under its row, and choose it again to close it. When the task has changed nine or more files, Filter files… narrows the list.
  • Tick Viewed on files you have read.
  • Edit file, above an open diff, lets you change the file yourself. Save file keeps your edit as an uncommitted change in the task. Files up to 100 KB can be edited this way.
  • When the task has a pull request on GitHub, a GitHub review box lists its unresolved review threads, with a link to the pull request and Refresh review threads.
  • To comment, click the button beside a line, or shift-click a second line to cover a range. Write in Leave a comment for the agent… and choose Add comment.
  • When you have comments, a bar shows how many there are. Choose Send to agent to send them all as one message. If the agent is busy, they wait until its turn ends. Discard throws them away.

Preview the task

Preview runs the task's version of the app in a temporary development server, labelled "Preview · not the live app".

  1. Ask the agent for a change first. Until it has edited files, Preview shows "Nothing to preview yet".
  2. Choose ▶ Start. The first preview of an app takes longest; later ones reuse its build cache.
  3. Use Desktop, Fit or Mobile to change the size, ↻ to reload, and Open ↗ to open it in a new tab.
  4. Send to phone opens the preview in the 1904 app on your phone. Sign in to the app on your phone and turn on notifications first, then tap the notification it sends.

One preview runs at a time. If you open another task's preview in a different tab or on your phone, this one shows "Preview moved"; choose Show this task here to bring it back. The preview stops on its own shortly after you leave the view. If the task changes dependencies or the data model, a note warns that the preview may be inaccurate.

When the preview runs on the app's development database and the app has test accounts, a key button sits beside ↻. It opens Sign in to this preview with each test account's username, a Copy button, and Show password. Anything you change while signed in stays in the development database.

An app that runs somewhere other than 1904, such as a repository you imported, may need packages built and its development database set up before it can preview. 1904 only does that with Settings > Tasks > Preview apps hosted outside 1904 turned on, and it starts off. While it's off, such a preview shows "This app runs outside 1904" with Open settings. With it on, the first preview can take a few minutes, and whether it works depends on the app's code and frameworks. When the app's packages change on its main branch, the next preview shows "Installing the app's packages…" first. If they couldn't be installed or built, the preview opens with a warning and Try again. Apps hosted on 1904 always preview.

Check the work

Checks gathers the evidence under Verification:

  • Merge readiness says whether the task merges cleanly into its target, for example "Compatible with main" or "Conflicts need attention". This is about Git only and doesn't prove the app behaves correctly.
  • Repository checks shows your pull request's checks once the code host reports them.
  • Syntax, Types and Secrets are 1904's own checks on the task's code, and a merge waits for them. Some start on their own when the agent finishes a turn; choose Run to run one again.
  • Secrets looks for passwords, keys and tokens on the lines the task changed. 1904 won't commit, push or merge a change that carries one until it's gone or you confirm it isn't a real secret; see When a submission finds a possible secret. A line marked gitleaks:allow is skipped, and the check's summary counts those lines.
  • Lint, Security, Design, Database, Build, Agent files and Preview only warn. They don't block merging.
  • Tests runs every test suite declared in .1904/checks.json, folded into one row.
  • UI runs browser checks the agent keeps in the .1904/ui-tests folder and records each one; choose Watch recording. If there are none, ask the agent to add a feature check for the screens it changed.
  • Project scripts lists your npm scripts that can run here. They run only when you choose Run.
  • Commands the agent ran lists the agent's own test runs. They don't count as checks.
  • Pull request watch sends failing checks, merge conflicts and new review comments to the agent automatically after you submit, and tells you when the pull request is ready to merge. Choose Watch pull request or Stop watching.
  • Repeat a check asks the agent to check something again on a schedule, from every 5 minutes to every 3 hours, up to a number of times you choose, until it reports the condition is met.

Checks view with merge readiness, and the syntax, type, lint and security checks

Submit in one step with Quick Submit

When a task has something to submit, the task header shows Review and Submit once the agent stops working. While any of the task's tabs is working, they stay hidden unless a submission is already running. Submit opens the Quick Submit dialog; once you've ticked Never ask again there, the button reads Quick Submit and submits straight away with your saved choice. If the app rebuilds automatically after submitting, the button says Submit & deploy instead. If the app leaves pull requests open for approval, it says Open PR.

Quick Submit commits all the changes, creates or updates the pull request, and merges it when the repository's checks and the app's approval rules allow. If the submission needs your attention, the task stays open. In the dialog, choose what happens After a successful merge:

  • Continue working on task keeps it open.
  • Close task stops the agent and removes its worktree. Its conversation stays in Task history.

Tick Never ask again to skip the dialog next time. The ▾ next to the button lets you pick Submit & continue or Submit & close for one submission. It also holds two settings that are saved for the app:

  • Merge task changes automatically is on by default. Turn it off and submitting leaves the pull request open for approval and keeps the task open; the button reads Open PR and the menu offers Open pull request. Only an owner can change it.
  • Rebuild and restart app rebuilds the app once your change reaches its deployment branch. Only the app owner can change it, and it is shared with the app's settings.

To change your default later, open Settings > Tasks. Under Submitting, After a submission merges sets what happens to the task (Keep working or Close task), and Confirm before submitting brings the dialog back after you ticked Never ask again. Both are saved to your account, so they follow you to other devices.

Quick Submit dialog with the After a successful merge choices

When a change needs someone's approval

An app can hold changes for a person to approve. The owner sets this in the app's Settings, on the Sharing card under Permissions: Require my approval for changes requested by others holds teammates' changes, and turning off Merge task changes automatically holds every change, including the owner's own.

When your change is held, the submission stops at an open pull request and says it is waiting for the required approval. The people who can approve get a notification, "A change from (your name) needs your approval". It opens the Approve this change page, which shows the task, who asked and the target branch, with See the changes in PR and, once the checks have passed, Approve and merge. If the task changes after approval was requested, the approver is asked again when the new work is ready.

When a submission finds a possible secret

If the secret scan flags something while you submit, 1904 first asks the task's agent to look at each flagged line. The agent marks example or test data as safe, moves a real secret into an environment variable, and the submission carries on by itself once that's done.

If the agent can't clear it, the submission pauses and you get a notification, "Possible secrets need your review". The review shows Review flagged secrets in the repository, with the file and line of each finding. The values themselves are never shown. Then choose one:

  • Ask agent to inspect & fix sends the findings to the agent again. You can add a note first, such as which environment variable to use or that the lines are sample data. The submission continues when the agent finishes.
  • To continue without changing anything, tick I confirm these flagged lines do not contain real credentials or private secrets that must stay out of Git. and choose Attest & continue. This covers this exact version only, so any later edit is scanned again. If the review doesn't offer this, ask the agent to mark lines that aren't secrets instead.
  • Recheck changes scans again, for example after you or the agent changed something.
  • Pause submission stops here and keeps the work. Open agent chat shows what the agent found.

If the agent finds that a real secret was pasted into your messages in the task, the review and a notification tell you to change or rotate that credential with its provider. Do that straight away, even after the code no longer contains it.

The same review appears when you commit or push yourself, such as from Manual process, with Cancel in place of Pause submission.

Review and submit step by step

Choose Review in the header, or Open Review and Submit in Changes, to open the review window.

  1. Check the file list and diff at the bottom.
  2. Choose Submit changes. 1904 writes the commit message and pull request description, then commits, pushes, and merges when checks pass. You see each step as it happens.
  3. To watch the agent or move to other work while it runs, choose Minimize to terminal. The task's header shows the submission, and the indicator beside the notification bell lists every submission by app from any page. Choose either one to reopen the review. Stop after current step stops the submission.
  4. If a step fails, Ask agent to fix this sends the problem to the agent without committing or merging anything.
  5. When it finishes you see "Merged into main" (or your target branch) with View PR, Return to agent and Clean up agent. Cleaning up removes the task's worktree; its conversation stays in Task history.

If a pull request is already open, the review shows its state, such as "Waiting for checks or mergeability", "Checks failed" or "Ready for merge review", with Merge PR when it can merge. If the agent made more changes since, Push changes to PR adds them and merges once checks pass.

Manual process lets you do each step yourself: commit some or all files with your own message, Push branch, Update from the target branch, Load PR status, edit the PR description, Create PR, choose Squash, Merge commit or Rebase, and Merge PR. Under Add review comment you can Send feedback to agent or Post PR comment. Each step asks you to confirm.

Review window for a task with the Submit changes card and the file list

When the target branch moved on

If someone else changed the same files on the target branch, the review shows "Needs reconciling with" the branch and lists the files. Choose Submit changes: 1904 asks this agent to combine both sets of changes, checks the result, and shows you Review merge resolution before anything merges. It tells you what changed, what the agent verified, anything that Must be fixed before you can approve, and any question where The agent needs your decision.

  • Approve and continue shipping commits the resolution and carries on with the submission. If the agent asked you something, answer it in the note or tick Approve as is first.
  • Send back with note asks the agent to revise and return for another review.
  • Stop submission leaves the merge open for you to finish or cancel later.
  • Check again rereads the result if you fixed something meanwhile.

After the change merges

When no changes are waiting, the task header shows the app's deployment state, such as Live or Changes not live, with the one action it calls for, such as Deploy now, beside it. Choose the state to see what it means, with Open app ↗ and App details ↗. If Rebuild and restart app is on, the app rebuilds and restarts on its own once your change reaches its deployment branch, and is briefly unavailable while it restarts.

If the deploy fails because of the app's code, the header offers Fix with agent: 1904 sends the error to this task's agent, checks its fix, merges it and deploys again. When a change from this task caused the failure, the agent may already be working on it, and the header says so. If the problem is on 1904's side, the deployment details say so and it is safe to deploy again. To move changes to your production app, see Release changes to production.

Apps that use direct development

By default, agents work in their own worktree and submit through pull requests. An app owner can change this under the app's settings, Development workflow, Agent dashboard workflow, by choosing Direct development. Then one agent works directly in the app's code and commits to the default branch.

For those tasks, the review shows the changed files and a commit message with Commit or Push commits, Fetch & refresh and Return to agent. Saving from the review stops the agent's terminal first. Quick Submit pushes the changes and keeps the task open.