Skip to main content

Preview and sandboxes

The Preview tab runs your app from the session's sandbox, so you can click through the agent's change as it happens. Use its toolbar to open a page, test other screen sizes and read the logs. A sandbox stays awake while someone works in it or watches it, and pauses when nobody does. Press Share preview to show the running app to someone without a Sensei account.

Use the Preview tab​

The Preview tab sits beside Changes and Files in every started session, and beside Artifacts once the agent has written one. Previews belong only to chat sessions.

The session "Show a delivery window on the orders table" with the Preview tab open beside its conversation. The address bar reads "/". The Preview shows the app's home page, with Log in and Sign up in its header, a "Production Ready" badge and the heading "Skip the boilerplate, Ship features". Two buttons sit under it, "git clone kosuke" and "Documentation". On the left are two messages from Sam, two replies from the agent, and the composer with a "1 unresolved comment" chip, an Open PR button and a Dictate button.

ControlWhat it does
Frontend switcherPicks which frontend to show. It appears when the project has more than one.
Address barType a path such as /orders and press Enter. Click the field to pick one of your 20 most recent routes.
Open in new tabOpens the current page in its own browser tab.
RefreshReloads the page in the Preview.
Show logsOpens the logs drawer.
Full previewHides the chat so the Preview fills the window. Press Exit full preview to bring it back.
Responsive toggleTurns responsive mode on or off.
GitHub buttonOpens the pull request, the branch or the repository on GitHub.
Share previewOpens the share dialog.
More actionsHolds Restart sandbox. In a narrow panel it also holds the buttons that do not fit.

The preview reopens on the last page you visited. Each message you send tells the agent which page the Preview is showing.

Test other screen sizes​

Press the responsive toggle, or ⌘⇧M (Ctrl+Shift+M on Windows and Linux). A device bar appears above the page.

  • Pick a device from the list. It groups presets under Mobile, Tablet and Desktop, from iPhone SE to Desktop 4K.
  • Press Rotate to switch between portrait and landscape.
  • Press the size to type a width and height, or drag the frame's edges. Either one switches the list to Custom.

Responsive mode stays on for your next previews until you turn it off.

Read the logs​

Press Show logs, or Ctrl+` on every platform, including Mac. The drawer opens under the Preview. Drag its top edge to resize it.

TabShows
Full logsEvery service's output, each line tagged with its service.
SetupThe output of the project's setup.
Each serviceThat service's output alone, in a tab named after it.

Press Toggle log filter and type to show only matching lines. Press Copy logs to copy the lines on screen. Lines with errors are red and lines with warnings are amber.

Restart the sandbox​

When the sandbox is stuck and does not recover by itself, replace it with a new one.

  1. Press More actions.
  2. Choose Restart sandbox.
  3. Press Restart sandbox in the dialog.

Sensei kills the sandbox, even a paused one, and creates a new one when the Preview opens again or you send the next message. Uncommitted work in the sandbox is lost, and so is the agent's memory of the chat. The chat history stays, and the agent reads it on the next message. The menu item is unavailable on a Todo, Completed or Archived task. While the agent is working on a turn, stop it first.

When a sandbox is awake​

A sandbox costs usage while it is awake. It stays awake only while something needs it:

What is happeningThe sandbox
The agent is working on a turnStays awake
A member has the Preview on screenStays awake
A deploy or another Sensei task runs in itWakes, then pauses again when done
You step away to another browser tab, another page of Sensei, another session or SettingsStays awake for 2 minutes
You close the tab or leave SenseiPauses within about a minute, unless a turn ended in the last 2 minutes
The agent is idle and nobody touches the page for 5 minutesShows "Still there?", then pauses 60 seconds later

Each member's window counts on its own. A colleague watching the same preview keeps it awake for you both.

These actions wake a paused sandbox:

  • Opening a started session
  • Sending a message
  • Pressing Start preview
  • A visit to a share link

Opening the logs or the Artifacts tab never wakes a sandbox. Switching to the Changes or Files tab wakes it once per pause.

Still there?​

After 5 minutes with no mouse movement, click, key press, scroll or touch on the page, a card in the corner reads "Still there?" and counts down 60 seconds. Move the mouse, press a key, or press Keep it running to carry on. When the countdown ends, the preview pauses unless someone else is watching.

Start a paused preview​

A paused sandbox shows "Preview paused" in the Preview tab. Press Start preview to resume it. The Artifacts tab stays readable while a sandbox is paused.

Share a preview​

A share link lets anyone open the running app without a Sensei account. They see the app, not the chat or the code.

  1. Press Share preview.
  2. Press Create share link.
  3. Press Copy share link and send the link.

The link works until you revoke it. It has no expiry and no password. The dialog shows when someone last opened it, or "Not opened yet". Any member of the workspace can create or revoke a link.

Each session has its own link. Sharing is off for Backlog, Completed and Archived sessions.

What a visitor sees​

  • The app, with a frontend switcher when there are several, and buttons to reload it or open it in a new tab.
  • The session's artifacts, under Artifacts, when the session has any. The App button switches back.

A visit wakes a paused sandbox, and that usage counts for your workspace. While it starts, the page shows "Starting preview". If the session has since been completed, archived or moved back to Backlog, the page says "This work is finished". The artifacts stay readable.

Open Share preview and press Revoke link. The link stops working at once for new visits. Someone who already has the page open loses it within 15 minutes. Creating a link again gives a new address.

Sandbox limit​

Your plan limits how many sandboxes can run at once across the workspace. See Plans and billing for the numbers.

When you start, create or resume a task at the limit, the "Sandbox Limit Reached" dialog opens. It lists every running task in the workspace, with its project and branch.

  1. Tick the tasks to stop. The button says how many you need.
  2. Press the confirm button, such as Stop 1 Task & Create New.

Sensei pauses the tasks you picked and carries on with yours. A stopped task keeps its work and wakes again when someone opens it or sends a message.

You can also stop a sandbox yourself. A task with a running sandbox shows a sandbox icon on its card on the Tasks page and in the sidebar. Hover over it and press Stop sandbox. The task's details show the same control in the Sandbox row. Any member can stop any task's sandbox.

Next steps​