Skip to content

Patterns

The workspace screen

A workspace is a planning surface, a timeline, rota, calendar, board or map, that runs full width and scrolls inside itself while the screen around it stays still. Above it sits one toolbar row for the range, today and the presentation, and a selected item opens in a panel over the surface or beside it, so the plan stays in view.

By Bohuslav PoláčekChecked

packages/kit/src/components/screen.tsx
export type WorkspaceScreenProps = Base & {
  archetype: "workspace";
  /** Range, zoom, today. */
  toolbar?: ReactNode;
  /** Panels floating over the surface (a selected item, a legend). */
  floating?: ReactNode;
  /** The board, rota, timeline or map; it scrolls inside itself. */
  children: ReactNode;
};
The workspace's slots in the kit, read from the repository when the site was built.

Anatomy

  • Header (header): the plan's name and one primary action, shown only to people who may plan: Foldline's "Machines" has "Add a run".
  • Toolbar (toolbar): the one row: the range, today and the zoom. Another presentation (timeline or list; day, week or month), the grouping and a legend all go into one DisplayMenu.
  • Surface (children): GanttChart, ResourceTimeline, ScheduleGrid, TimeGrid, MonthCalendar, a SortableBoard or a map. It scrolls inside itself.
  • Floating (floating): panels over the surface, a selected item or a legend. Ridgeway's map floats its trucks in a panel over the map's left side, and a truck's own panel comes in from the right, so the list stays usable.

Width, scroll and how a record opens

Full width from the left gutter to the panel's right edge, so a Gantt's columns run to the edge. The header and the toolbar stay put; the surface under them is clipped to the screen and scrolls inside itself. A record opens in a panel over the surface (decision 0001) or beside it: Foldline's run opens beside the plan, a truck on Ridgeway's map beside the list of trucks.

The kit's manifest picks the surface by the job. ResourceTimeline is for "Bookings or machine time across resources within a day"; a project over weeks is a GanttChart, people by day a ScheduleGrid.

A plan is an editor

The root AGENTS.md: planning views (rota, machines, bookings) are editors, with drag, quick add in an empty cell, copy, live feedback, and the same from the keyboard. Foldline's machine plan shows what that takes:

  • a run is dragged, or moved with the arrow keys, Shift for a day; a press job may go to the other press, finishing stays on its machine;
  • a machine never runs two things at once: the server says so and the run goes back;
  • a move shows at once with an undo in its toast, and when quick moves of one run overlap, a key held down, only the newest answer is written;
  • the dialog names a conflict: an overlap with a named job, a machine that cannot do the step, a start in the past;
  • anyone who may not plan sees the plan without the controls.

The numbers behind it: five days at 28px an hour made the blocks unreadable, so the plan shows two working days from 6:00 to 22:00 at 29px an hour. Two days fit beside the sidebar at 1440px (1,115px for the sheet, measured), and a three-hour run is 87px wide with its title and step on two lines. On a phone two days of sixteen hours do not fit 390px, so the week becomes a list by day. More in the planning editor pattern.

The rules and where they are enforced

What AI coding tools build instead

  • A picture of a plan. A calendar or a Gantt that shows the week but cannot be changed, so the planning stays in a spreadsheet. Here the plan is the editor.
  • Rows of controls. Stonebridge's schedule had four control rows above the Gantt (views, scale, legend, facts), and the Gantt started 145px lower than it needed to; Juniper's rota had four lines of controls in its row. Now there is one row, and the rest sits in DisplayMenu.
  • A view switch in the header. Four demo screens kept a presentation switch in the header or the row, Ridgeway's trucks, Foldline's machines, Riverside's bookings and Martin's purchasing, until no-entity-switch checked presentations too.
  • A page that scrolls as a whole. The time axis and the names of the machines scroll away; here only the surface moves.
  • Five days on a laptop. Blocks too narrow to read; Foldline chose two.

Screens of this type

  • Construction schedule: Stonebridge's Gantt chart of one site, grouped by building object and trade, with inspections and handovers as milestones.
  • Dispatch plan: Ridgeway's morning plan, which checks whether a driver can make the trip within the legal driving hours.
  • Staff rota: the week of one Juniper branch, and the editor a manager plans it in.
  • Roast plan: Fernhill's roasting for today and the next week, worked backwards from what has to leave.
  • Court bookings: the day at Riverside's desk, every court a row and every booking where and when it is.
  • Capacity planning: who at Brightpath works on what in the coming eight weeks.
  • Usage rights and content calendar: Martin's rights and exclusivity over time, and his posts across three platforms.

Example apps with a workspace

Which example apps render a workspace, and the record flows each one uses.Read from the demo's source when the site was built: 8 of 9 example apps render a <Screen archetype="workspace">. Side panel first means RecordPeek, the decision card ApprovalPanel, the history AuditTimeline.

How Foldline's machine plan fills the toolbar

apps/demo/src/modules/print/pages/machines.tsx
toolbar={
  allowed ? (
    <div className="flex flex-wrap items-center gap-2">
      <div className="flex items-center gap-1">
        <Button
          variant="ghost"
          size="icon"
          aria-label={tx("O dva dny zpět", "Back two days")}
          onClick={() => go(-1)}
        >
          <IconChevronLeft aria-hidden="true" />
        </Button>
        <Button onClick={() => go(0)}>{tx("Dnes", "Today")}</Button>
        <Button
          variant="ghost"
          size="icon"
          aria-label={tx("O dva dny dál", "Forward two days")}
          onClick={() => go(1)}
        >
          <IconChevronRight aria-hidden="true" />
        </Button>
      </div>
      {/* The timeline or the list: another presentation is the one "Zobrazení" button (decision 0009). */}
      {!phone ? (
        <DisplayMenu
          className="ml-auto"
          presentation={{
            value: params.get("pohled") === "seznam" ? "list" : "timeline",
            defaultValue: "timeline",
Foldline's machine plan: back and forward by two working days, Today, and the timeline or the list behind one display menu, all in the one toolbar row.

Questions

What is the difference between a workspace and a list?

A list shows records as rows and opens one beside it; a workspace shows them where and when they happen, on a timeline, a rota or a map, and people plan by moving them. A board that is only another view of a filtered list stays a list screen, like Foldline's job pipeline.

Where does the legend of a plan go?

Into the one display menu, with the other presentations and the grouping. A legend in the toolbar row fitted one line on a desktop but became a third row on a phone, so the orientation check now fails it.

What does a planning screen show on a phone?

What fits: Foldline's machine plan becomes a list of runs by day, because two days of sixteen hours do not fit 390px. The surface never makes the page scroll sideways.

Can a schedule be edited from the keyboard?

It has to be. Runs on Foldline's plan move with the arrow keys, by a day with Shift, and the same rules and the same undo apply as for a drag.

Two ways

Build it yourself, or have it built

  • Build it yourself

    Build your app on the framework

    Get the codebase these apps stand on and build yours with Claude Code, Cursor or Codex.

    One payment, lifetime updates

    Get the framework
  • Have it built

    Have us build your app

    Tell us how your team works. We plan the app with you and build it on the same framework at a fixed price.

    After launch, Care keeps it improving, from €99 a month.

    from €1,990

    Describe your app