Skip to main content

What's new

Sign in to a task's preview, and preview apps you host elsewhere

The key on a task's preview in 1904 open on Sign in to this preview: a note that the preview runs on the app's development database, then two test accounts, Workspace owner and Sales rep, each with a username and a Copy button, one password shown and a Show password button for the other.

A preview is only as useful as the screens you can reach in it, and most of an app sits behind its sign-in page. A few changes to task previews in the Agents dashboard get you past that page, and bring previews to apps that 1904 doesn't run for you.

Getting past the sign-in page

When a task's preview runs on your app's development database and the app has test accounts, a key appears in the bar above the preview, beside reload. Choose it and Sign in to this preview lists each account with its role and username, each with a Copy button. Show password fetches that one password when you ask for it, and checks that you're still allowed to see it every time. These are the same accounts as the App login card on the app's page. Whatever you change while signed in stays in the development database, away from your live data.

When the development database is empty

Test accounts only help if they exist. A preview that finds the app's development database empty now sets it up before the app starts: it applies the migrations on main, then runs the app's seed, which is what creates the accounts. You'll see Setting up the app's database… while that happens. It happens once, and later previews use the same database. If a migration or the seed fails, the preview says which one and starts anyway. An app whose commands have unusual names can declare them as migrate and seed in .1904/preview.json.

Apps you host somewhere else

An app hosted on 1904 previews right away, because its packages are already built and its database is already there. A repository you imported and run somewhere else has neither on 1904. Settings, Tasks has a Previews section with one switch for that, Preview apps hosted outside 1904, and it's off until you turn it on. With it on, the first preview of such an app builds the shared packages it needs, brings 1904's copy of the app up to main, and gives its development database main's migrations and test accounts. That first preview can take a few minutes, and later ones reuse the builds.

Whether it works depends on the codebase. A build, migration or seed that relies on the app's own setup may not run here, and when one fails the preview tells you what failed and starts anyway. With the switch off, an app like this still previews when it needs nothing built. When it does need something, the Preview tab says This app runs outside 1904 and offers Open settings. The agent's own preview follows the same switch, and the agent is told the setting is yours to change, so it carries on and says what it couldn't check.

A narrow panel you can read

Desktop lays your app out at a full desktop width and scales it down to fit the panel, which in a narrow panel leaves the text too small to read. A narrow panel now opens on Fit, where the app fills the panel at its current width. Desktop and Mobile are one click away, and Open shows the preview at full size in its own tab.

← All posts

Start with an idea, or start with what you have.

Use AI supplied by 1904, or connect the subscription you already pay for.