SaaS.Dev

Change what a screen shows

Say "show a renewal countdown on each lease" and a Component fills one named slot of a derived screen, while every other part keeps deriving.

In the design, a Component fills one named slot of a derived screen, and every other part keeps deriving. A fix to the derived screen still reaches your App, around the slot.

Before it runs
NeedsAn App, from Build my app
Who says yesYou. Your agent shows you the change and waits for your Approval.
You leave the chatNever
OfferedNot by your agent: the guide record waits for an App Verb that sets a slot

What you get

In the design, each derived screen names its slots. A slot binds the record or records in view, and takes any Component whose props bind to them.

SlotWhere it sitsBinds
list.toolbarabove a list, beside its search boxthe list's records and its search
list.emptyin place of a list with no recordsthe Noun
record.headerat the top of a record pagethe record
record.asidebeside the record page's fieldsthe record
record.actionswith the record page's buttonsthe record and the Verbs the reader may call
record.tabas one more tab on a record pagethe record
form.afterbelow a form's inputsthe values in the form
dashboard.sectionas one section of a Dashboardthe Dashboard's scope

For a Lease on leaseclock.com, a countdown to endsOn sits in record.aside. The list, the fields, the forms and the Renew button still derive from the Lease Noun.

Your agent does

In the design, your agent writes the Component, names it in a slot, and publishes the App with App.publish.

Ask
Show a renewal countdown on each lease.
Put a first-lease prompt on the empty lease list.
components/RenewalCountdown.mdx
---
props:
  lease: { type: Lease, required: true }
renderers: [web, markdown]
---
Shows the days left until a lease's endsOn date, and turns amber at 90 days.
apps/app/app.mdx
---
kind: saas
mount: /app
nouns: [Property, Lease]
personas:
  manager: { access: admin, opens: leases }
  assistant: { access: member, opens: leases }
  landlord: { access: viewer, opens: properties }
slots:
  Lease:
    record.aside: RenewalCountdown
    list.empty: FirstLeasePrompt
---
  1. Your agent writes components/RenewalCountdown.mdx, with one prop typed Lease.
  2. It names the Component in record.aside for Lease.
  3. It checks that the lease prop binds to the record that record.aside binds.
  4. It shows you the record page with the countdown, and waits for your yes.
  5. It publishes the App, and each Persona that may read a lease sees the countdown.

The markdown renderer gives an agent the countdown as text, beside every other part of the record page.

Change it

SayWhat changes
"Show the countdown on the list too."The Component also fills list.toolbar, bound to the list's records
"Add a documents tab to each lease."A second Component fills record.tab, bound to the lease
"Replace the whole lease record page."A view file replaces one screen; the list and forms keep deriving

A whole-screen change is a view file at one route of the App:

apps/app/leases/[lease]/view.mdx
<ThingDetail />
<RenewalCountdown />
<VerbSheet verb="Lease.renew" />

Under the hood

A slot never widens what the reader may do. A Component in record.actions calls Verbs through the same Permissions as the derived buttons, and the Verb's rules decide.

PartEntries
NounsApp, Component, Persona, Permission
CallsApp.publish; the record waits for a Verb that sets a slot
EventsApp.published
DepthEvery slot, screens the definition cannot derive

Contents