Web console and editor experience
The web console and the VS Code extension are the main human interfaces to Hatchet. The console helps operators view and manage tenant and organization resources. The extension helps developers inspect workflow structure while they write code. Together, they connect local workflow design with deployed workflow operation.
Interface model
The two interfaces serve different points in the workflow life cycle. The web console works with authenticated organization and tenant state. The extension works with the developer's local source before execution.
Application entry
The frontend starts with shared user, tenant, organization, theme, and query state. The route tree then selects the authentication, onboarding, organization, tenant, and resource view that matches the current URL. The root also owns cross-cutting browser features such as notices, support, and optional visual experiments. frontend/…/root.tsx and frontend/…/router.tsx define this application boundary.
The browser entry also declares Hatchet's page identity and link-preview metadata. Named public social-card assets support previews when a console URL is shared outside the browser. frontend/…/index.html defines this external presentation boundary.
References: frontend/…/root.tsx• L14-37 frontend/…/router.tsx• L28-57 frontend/…/app-context.tsx• L83-106 frontend/…/index.html• L4-54
Authentication and access
Authentication moves a person from a login method into an authenticated user and tenant context. The console supports basic sign-in when the instance exposes it and can offer a one-time email link. An organization can disable direct sign-in, in which case the page explains that the user must use the configured organization sign-in path. frontend/…/index.tsx and frontend/…/direct-sign-in-disabled.tsx define these entry states.
The console can require multifactor authentication (MFA) before it grants access to user and tenant resources. MFA means a second proof such as a passkey, an authenticator code, or a recovery code. A pending login moves to a dedicated verification page. A completed proof clears stale tenant credentials before the application loads the requested destination. frontend/…/index.tsx, frontend/…/use-mfa.ts, and frontend/…/mfa.ts define this boundary.
References: frontend/…/index.tsx• L21-83 frontend/…/direct-sign-in-disabled.tsx• L1-11 frontend/…/index.tsx• L16-72 frontend/…/use-mfa.ts• L80-131 frontend/…/mfa.ts• L1-26
Workspace onboarding
Workspace onboarding moves an authenticated user to a usable organization and tenant. The flow verifies email when required, accepts invitations, creates an organization with its first tenant, creates a tenant in an existing organization, or explains that an organization member must grant tenant access. frontend/…/authenticated.tsx chooses the path after user, invitation, organization, and tenant data are ready.
The setup pages keep the next destination in the route flow. Creating the first organization leads to tenant setup. Creating a tenant leads to its overview. A user with an organization but no tenant receives an access explanation instead of an empty operator workspace. frontend/…/index.tsx, frontend/…/index.tsx, and frontend/…/index.tsx define these outcomes.
References: frontend/…/authenticated.tsx• L239-371 frontend/…/index.tsx• L16-47 frontend/…/index.tsx• L41-73 frontend/…/index.tsx• L31-66 frontend/…/index.tsx• L27-70
Operator console
The web console is a tenant-scoped control surface for daily workflow operations. Its route model connects authentication and onboarding with workflows, runs, workers, events, logs, schedules, limits, streams, endpoints, sandbox providers, managed workers, settings, and organization views. The active user and tenant context decides which workspace the operator can reach. frontend/…/router.tsx defines the navigation boundary.
The console supports both self-hosted and control-plane-backed deployments. A control plane adds organizations and exchanges a tenant credential before tenant requests reach the tenant service. A self-hosted deployment uses the tenant service directly. frontend/…/user-universe.tsx, frontend/…/app-context.tsx, and frontend/…/api.ts keep these modes behind one browser experience.
Tenant and organization routes also produce human-readable breadcrumbs. Resource identifiers remain visible for detail pages while known routes receive stable labels such as Runs, Workflows, Organization, and Billing & Usage. frontend/…/breadcrumbs.ts defines this navigation aid.
References: frontend/…/router.tsx• L457-787 frontend/…/user-universe.tsx• L17-104 frontend/…/app-context.tsx• L144-222 frontend/…/api.ts• L217-280 frontend/…/Api.ts• L435-765 frontend/…/breadcrumbs.ts• L39-330
Developer editor
The VS Code extension is a local authoring aid for workflow developers. It adds a Show Hatchet DAG action to supported workflow files in TypeScript, Python, Ruby, and Go. The action opens a webview that shows task nodes and dependency edges beside the source. frontend/…/package.json and frontend/…/extension.ts define the supported editor actions.
The extension does not run a workflow or prove that local source matches a deployed workflow. It finds workflow declarations, resolves task relationships when project information is available, and falls back to a source-level view when it is not. Selecting a graph node opens the related source location inside the workspace. frontend/…/dag-panel.ts and frontend/…/App.tsx define this authoring boundary.
References: frontend/…/package.json• L1-33 frontend/…/extension.ts• L12-115 frontend/…/dag-panel.ts• L12-40 frontend/…/dag-panel.ts• L148-219 frontend/…/App.tsx• L39-159
Component validation
Storybook provides an isolated browser view for frontend components and pages. Its shared preview supplies the app theme and query state, while selected stories use Mock Service Worker (MSW) to model service responses without changing the production app. The runs table stories cover normal, empty, loading, and narrow layouts. frontend/…/main.ts, frontend/…/preview.tsx, and frontend/…/runs-table.stories.tsx define this validation surface.
The Storybook mock worker is served only by Storybook. It is excluded from the production app and from unused-code checks, so local request simulation does not become a deployed browser behavior. frontend/…/mockServiceWorker.js, frontend/app/.prettierignore, and frontend/…/knip.json define this boundary.
References: frontend/…/main.ts• L8-25 frontend/…/preview.tsx• L8-73 frontend/…/runs-table.stories.tsx• L23-116 frontend/…/.prettierignore• L1-6 frontend/…/knip.json• L1-16
Console resource views
The console presents tenant resources as linked operational views. Operators can move from a broad activity view to a resource page and then to the run or task details that explain what happened.
Tenant overview
The tenant overview gives an operator a quick view of current activity. It combines recent run and failure signals with queue and worker state. It also provides the entry point for first-task setup when a tenant has no completed activity. frontend/…/overview-dashboard.tsx and its dashboard panels define this starting view.
The overview uses one rolling 24-hour window for its activity panels. The runs panel combines status totals with a time chart and links to the full runs investigation view. This lets an operator move from a signal to the records behind it. frontend/…/overview-dashboard.tsx and frontend/…/tasks-panel.tsx define this relationship.
References: frontend/…/overview-dashboard.tsx• L12-92 frontend/…/tasks-panel.tsx• L48-147
First-task setup
First-task setup guides a developer from an empty tenant to a completed task run. It offers an agent-assisted path and a manual path. Both paths help select an SDK, connect the project to the tenant, start or connect a worker, and confirm the result before the user explores the rest of the console. frontend/…/onboarding-modal.tsx and frontend/…/onboarding-steps.tsx define the guide.
The setup state is tenant-scoped and survives refreshes through the browser and tenant API. This lets the guide resume after a reconnect while still using live worker and run state for completion checks. frontend/…/use-onboarding-progress.ts defines the progress boundary.
References: frontend/…/onboarding-modal.tsx• L53-70 frontend/…/onboarding-steps.tsx• L166-176 frontend/…/use-onboarding-progress.ts• L93-186
Workflow catalog
The workflow catalog gives operators a searchable view of workflows in the active tenant. Each workflow can lead to its state, triggers, recent runs, and behavior settings. Operators with write access can trigger work, pause or resume a workflow, or remove it. frontend/…/index.tsx and frontend/…/index.tsx define this operational view.
Workflow triggering supports direct JSON input and a form built from the workflow's published input schema. The operator can run the workflow now, schedule one run, or create a recurring trigger. Both input modes produce the same request to the workflow service. frontend/…/trigger-workflow-form.tsx defines this authoring surface.
The workflow settings view makes the deployed behavior readable without asking the operator to inspect raw service data. It shows event and cron triggers, concurrency rules, priority or sticky settings, and the workflow configuration. frontend/…/workflow-general-settings.tsx defines this summary.
References: frontend/…/index.tsx• L20-107 frontend/…/index.tsx• L33-317 frontend/…/trigger-workflow-form.tsx• L181-200 frontend/…/workflow-general-settings.tsx• L48-80
Run investigation
The runs view helps operators find executions across a tenant. A run detail view joins the execution graph with activity, input, output, metadata, traces, and logs. It follows active work as its state changes and distinguishes delayed visibility from a missing run. frontend/…/index.tsx and frontend/…/index.tsx define this investigation view.
The runs workspace combines status counts, a time chart, and a paged table. When the runs filter feature is enabled, a sidebar exposes time, status, workflow, metadata, idempotency-key, and DAG grouping filters. The same filter state drives the metrics and table, which lets an operator move from a count or chart interval to the matching runs. frontend/…/runs-table.tsx and frontend/…/runs-filter-sidebar.tsx define this workspace.
The output view keeps payload access limits visible. It renders failed structured errors as readable JSON or text and keeps the original error available for copying. The log view supports live task state, time display, metadata fields, error details, and links to related tasks. frontend/…/index.tsx, frontend/…/step-run-output.tsx, frontend/…/log-viewer.tsx, and frontend/…/utils.ts define this investigation boundary.
Task events use shared severity meaning so the run view can separate critical failures from warning conditions and normal progress. Durable task eviction has its own state because it explains a change in execution placement rather than a normal success or failure. frontend/…/event-utils.ts defines these operator-facing meanings.
When a run has dependent steps, the detail view lets the operator switch between a graph view and a minimap view. The control is hidden for a run without dependencies, and the preferred view remains a local presentation choice. frontend/…/view-toggle.tsx defines this focused navigation aid.
The investigation flow moves from tenant activity to a focused run and then to related task or replay actions:
flowchart LR
A[Tenant run list] --> B[Run detail]
B --> C[Execution graph]
B --> D[Activity and events]
B --> E[Input and output]
B --> F[Traces and logs]
C --> G[Task detail]
B --> H[Replay or replay as new]
H --> I[New trigger]
References: frontend/…/index.tsx• L13-73 frontend/…/runs-table.tsx• L100-408 frontend/…/runs-filter-sidebar.tsx• L144-653 frontend/…/index.tsx• L144-555 frontend/…/event-utils.ts• L1-111 frontend/…/view-toggle.tsx• L23-44 frontend/…/step-run-output.tsx• L7-39 frontend/…/log-viewer.tsx• L296-608 frontend/…/utils.ts• L152-180 frontend/…/use-replay-as-new.tsx• L10-80
Execution controls
The console exposes controls around workflow execution. Operators can inspect workers, managed workers, events, logs, schedules, recurring jobs, rate limits, and concurrency. These views explain both the work that is running and the limits or triggers that shape when it can run. frontend/…/router.tsx and the tenant navigation define this group of operational surfaces.
Concurrency controls show limits on simultaneous work when the tenant feature is available. The view keeps the selected strategy and key in the URL so an operator can share or refresh the same inspection state. frontend/…/router.tsx and frontend/…/index.tsx define this feature boundary.
Managed worker views extend these controls to hosted worker capacity. They connect source and build settings with worker instances, deploy events, logs, and resource metrics. The cloud API contract gives these views a common operator model for worker health and deployment state. frontend/…/router.tsx, frontend/…/Api.ts, and frontend/…/data-contracts.ts define this boundary.
References: frontend/…/router.tsx• L526-787 frontend/…/router.tsx• L1163-1220 frontend/…/index.tsx• L21-177 frontend/…/Api.ts• L435-765 frontend/…/data-contracts.ts• L184-372
Durable stream topics
The streams view gives operators a tenant-level view of durable stream topics. A durable stream topic stores messages outside a workflow run, so the console focuses on topic activity, retention, and the position from which a new reader starts. The view appears only when the tenant has the durable-stream capability. frontend/…/index.tsx defines this operator view.
Topics appear after their first publication and remain while messages are retained. The list shows topic identity, retained message count, recent publication, retention, and the starting offset. This helps an operator distinguish an empty topic from a topic whose new readers begin after an offset reset. frontend/…/stream-topic-columns.tsx and frontend/…/data-contracts.ts define the displayed meaning.
References: frontend/…/index.tsx• L29-127 frontend/…/use-stream-topics.tsx• L25-89 frontend/…/stream-topic-columns.tsx• L9-159 frontend/…/data-contracts.ts• L921-950
Serverless endpoint operations
The endpoint view manages public HTTPS destinations that Hatchet polls for workflow actions and uses to deliver assigned tasks. Operators can create, edit, enable, disable, and delete endpoints. The detail view joins endpoint configuration with health, registered actions, and recent delivery events. frontend/…/index.tsx and frontend/…/index.tsx define this control surface.
Health and enabled state explain whether an endpoint can receive normal delivery. Health checks explain registration failures. Delivery events explain later task failures. The dashboard, REST API, and generated SDK clients share this endpoint life cycle. frontend/…/managing-endpoints.mdx and frontend/…/troubleshooting.mdx describe the same operator boundary.
References: frontend/…/index.tsx• L76-207 frontend/…/index.tsx• L75-330 frontend/…/managing-endpoints.mdx• L9-43 frontend/…/troubleshooting.mdx• L8-25
Sandbox provider management
Sandbox provider management gives tenant operators a place to connect the external vendor that supplies isolated sandbox execution. A provider is the tenant-scoped connection that lets the sandbox SDK create work through that vendor. The console lists providers by vendor and health, opens a detail view for configuration and observed events, and lets members with write access create, update, enable, disable, or delete connections. frontend/…/index.tsx, frontend/…/index.tsx, and frontend/…/use-sandbox-providers.tsx define this tenant-scoped boundary.
The connection flow asks for a vendor, a write-only API key, and settings such as a default template, idle limit, labels, and vendor-specific options. It supports Daytona, E2B, Archil, and Freestyle. The detail view shows whether the latest credential check succeeded and records provider events such as sandbox creation or failure. List, detail, and event views refresh while open so operators can see changing provider health without leaving the page. This is the operator side of sandbox SDK and provider management. frontend/…/create-provider-dialog.tsx, frontend/…/form-fields.tsx, frontend/…/kinds.ts, and frontend/…/data-contracts.ts define the connection contract.
Disabling a provider stops new sandbox task operations while existing vendor sandboxes remain in place. Deleting a provider removes Hatchet's sandboxes and snapshots and makes related runs unavailable for replay; it does not remove machines from the vendor account. The console requires an explicit disable or delete confirmation because these actions have different effects. frontend/…/disable-provider-dialog.tsx, frontend/…/delete-provider-dialog.tsx, and frontend/…/Api.ts define these lifecycle boundaries.
The sandbox pages are available only when the tenant has the sandbox operator entitlement. Self-hosted deployments show that sandboxes are a Hatchet Cloud feature, while control-plane tenants without the entitlement receive a support path instead of provider controls. frontend/…/gate.tsx defines this availability boundary.
References: frontend/…/index.tsx• L19-140 frontend/…/index.tsx• L47-265 frontend/…/use-sandbox-providers.tsx• L21-94 frontend/…/create-provider-dialog.tsx• L39-215 frontend/…/form-fields.tsx• L46-298 frontend/…/disable-provider-dialog.tsx• L7-62 frontend/…/delete-provider-dialog.tsx• L20-156 frontend/…/events-log.tsx• L11-69 frontend/…/gate.tsx• L8-35 frontend/…/kinds.ts• L37-107 frontend/…/Api.ts• L280-433 frontend/…/data-contracts.ts• L1097-1203
Resource list behavior
Shared resource lists give operators a consistent way to search, filter, inspect, refresh, and page through large result sets. The table keeps useful prior data visible while a new page loads. It also distinguishes an empty resource set from a loading or failed request. Lists can expose filter controls and column visibility together, or move the filters into a dedicated side panel when the view needs more space. frontend/…/data-table.tsx, frontend/…/data-table-toolbar.tsx, and frontend/…/data-table-options.tsx define the common list experience.
Search and filters serve different purposes. Search buffers text before a meaningful request. Filters validate structured values and preserve them in the page URL so a view can be shared or refreshed without losing its scope. Filter controls support time ranges, status choices, key-value conditions, lists, and column visibility. frontend/…/search-bar-with-filters.tsx, frontend/…/data-table-options.tsx, and frontend/…/use-zod-column-filters.ts define this relationship.
Small settings lists use the same human-readable table idea without the full resource-list controls. frontend/…/simple-table.tsx supplies column labels, cell rendering, and stable row identity for organization members, invitations, regions, tokens, and SSO domains.
References: frontend/…/data-table.tsx• L50-194 frontend/…/data-table-pagination.tsx• L18-126 frontend/…/data-table-toolbar.tsx• L69-155 frontend/…/data-table-options.tsx• L582-687 frontend/…/search-bar-with-filters.tsx• L54-102 frontend/…/use-zod-column-filters.ts• L10-114 frontend/…/simple-table.tsx• L12-55
Retention-aware history
History views respect the tenant's data retention window. Preset and custom time ranges that reach beyond retained data are adjusted or blocked before the request is sent, and the console explains the limit through a self-hosted message or an upgrade path in the control plane. Events, logs, and runs use the same rule so their time controls have the same meaning. frontend/…/retention.ts, frontend/…/use-retention-gate.ts, frontend/…/retention-upgrade-dialog.tsx, frontend/…/use-events.tsx, frontend/…/use-tenant-logs.tsx, and frontend/…/use-runs-table-filters.tsx define this shared boundary.
Charts can select a time span by drag. The selected span becomes the custom range used by the related list, while the date picker keeps the time of day and marks dates outside retention. frontend/…/zoomable.tsx and frontend/…/date-time-picker.tsx define this interaction.
References: frontend/…/retention.ts• L20-153 frontend/…/use-retention-gate.ts• L11-60 frontend/…/retention-upgrade-dialog.tsx• L31-97 frontend/…/use-events.tsx• L117-176 frontend/…/use-tenant-logs.tsx• L248-300 frontend/…/use-runs-table-filters.tsx• L179-258 frontend/…/zoomable.tsx• L61-137 frontend/…/date-time-picker.tsx• L28-117
Organization and tenant management
Organization and tenant settings define the access and account boundary around the operational console. Tenant settings affect one workspace. Organization settings affect members, tenant membership, deployment choices, identity, compliance, and billing.
Tenant switching
Tenant switching is the fast path between accessible workspaces. In control-plane mode it groups tenants under organizations. In self-hosted mode it presents a flat tenant list. Archived tenants are removed before the operator sees the choices. frontend/…/organization-selector.tsx and frontend/…/tenant-switcher.tsx define these modes.
The switcher supports search, recent tenants, keyboard access, and common tenant actions. Recent choices stay in the browser and are checked against current access before display. The active tenant is also the context used by tenant API requests and tenant-scoped visual settings. frontend/…/tenant-switcher-panel.tsx and frontend/…/app-context.tsx define this relationship.
The switching flow groups or flattens the current memberships before it changes the active tenant view:
flowchart LR
A[Load memberships and organizations] --> B[Remove archived tenants]
B --> C[Group or flatten tenants]
C --> D[Open switcher]
D --> E{Search or recent choice}
E --> F[Select tenant]
E --> G[Open tenant action]
F --> H[Update active tenant view]
G --> I[Open settings or tenant route]
References: frontend/…/organization-selector.tsx• L47-104 frontend/…/tenant-switcher.tsx• L33-155 frontend/…/tenant-switcher-panel.tsx• L40-75 frontend/…/tenant-switcher-panel.tsx• L173-257 frontend/…/use-recent-tenants.ts• L4-30 frontend/…/app-context.tsx• L115-180
Navigation shell
The authenticated shell keeps the active workspace visible while the operator moves through the console. The top navigation provides breadcrumbs, notifications, organization or tenant selection, account actions, theme selection, and logout. The Hatchet logo also acts as the desktop sidebar collapse control. frontend/…/top-nav.tsx defines this shared shell.
The shell shows optional navigation only when the deployment and tenant capabilities allow it. It also connects the operator to documentation, support, and the current application version. Development builds add a footer with Query, Router, and Flags panels. These panels expose local inspection tools for request state, route state, and feature behavior without changing the normal operator flow. frontend/…/authenticated.tsx and frontend/…/devtools.tsx supply this development-only shell state.
Tenant resource policy alerts extend the shell's notification role. The console polls the active tenant's policy and turns warning or exhausted limits into dismissible notices that link to tenant billing settings. This gives operators an early signal before a resource limit blocks work. frontend/…/resource-limits.ts defines that alert boundary.
References: frontend/…/top-nav.tsx• L54-159 frontend/…/top-nav.tsx• L162-335 frontend/…/authenticated.tsx• L535-593 frontend/…/devtools.tsx• L9-73 frontend/…/resource-limits.ts• L13-89
Tenant settings
Tenant settings give an operator a tenant-local place to manage the tenant name, API access, members, integrations, resource limits, and early-access features. The settings navigation keeps these choices separate from organization-wide account settings. frontend/…/settings-nav-items.tsx defines the boundary.
The resource limits view makes policy state readable as an operator table. It shows each limited resource's current value, cap, warning threshold, meter window, and last refill. The policy covers workers, concurrency slots, events, task runs, cron and schedule triggers, incoming webhooks, and stream resources. frontend/…/resource-limit-columns.tsx and frontend/…/data-contracts.ts define these meanings.
The Labs page provides controlled access to early features such as durable streams, sandboxes, and serverless. It explains when a paid plan or admin access is required and asks for confirmation before disabling a feature that affects existing tenant resources. frontend/…/labs-preview.tsx defines this operator safeguard.
References: frontend/…/settings-nav-items.tsx• L17-163 frontend/…/resource-limit-columns.tsx• L7-103 frontend/…/data-contracts.ts• L228-239 frontend/…/data-contracts.ts• L1807-1829 frontend/…/labs-preview.tsx• L10-198 frontend/…/settings-row.tsx• L3-37
Organization access
Organization settings let authorized operators manage people, tenant boundaries, management tokens, deployment regions, single sign-on, compliance, and billing. Organization roles and tenant grants decide which members can enter each tenant. Tags and user groups can link organization membership to tenant access. frontend/…/index.tsx defines this account boundary.
Organization owners can invite members with organization and tenant access, manage roles, and review member MFA status. Owners can also archive organizations or tenants only when the related billing and active-resource conditions allow it. These actions change the access boundary for other people, so the console separates them from routine settings.
References: frontend/…/index.tsx• L156-195 frontend/…/index.tsx• L503-621 frontend/…/index.tsx• L888-915 frontend/…/data-contracts.ts• L734-922
Multifactor settings
User security settings let a signed-in user add, remove, or replace MFA methods. Supported methods include passkeys and authenticator apps. Recovery codes provide a one-use fallback when the other methods are unavailable. frontend/…/index.tsx defines the management experience.
Sensitive changes require proof with an existing method when one exists. The page keeps newly issued recovery codes visible until the user acknowledges that they saved them. This prevents the console from silently replacing the only view of those codes. frontend/…/index.tsx and frontend/…/use-mfa.ts define this safety boundary.
References: frontend/…/index.tsx• L136-223 frontend/…/index.tsx• L252-310 frontend/…/index.tsx• L613-783 frontend/…/use-mfa.ts• L100-158
Billing and usage
Organization billing gives operators one place to view plans, current-period usage, limits, invoices, and plan changes. It is shown only when billing is available. Tenant billing links lead to this organization boundary so plan state is not split across tenant pages. frontend/…/settings-nav-items.tsx and the billing page define this placement.
Usage separates billing-period totals from live shard counts and from refill-based tenant limits. Operators can filter the view by tenant and time range. Graphable usage opens a daily chart and inventory values open a per-tenant count view. frontend/…/usage-this-period.tsx and frontend/…/usage-features.ts define these meanings.
The view marks approaching and exhausted refill-based limits and can link the operator to an upgrade path. It does not treat every plan allowance as a meter. This keeps an unmetered allowance from appearing as false zero usage. frontend/…/usage-features.ts and frontend/…/usage-this-period.tsx define the distinction.
References: frontend/…/settings-nav-items.tsx• L74-160 frontend/…/usage-this-period.tsx• L498-595 frontend/…/usage-this-period.tsx• L708-976 frontend/…/usage-features.ts• L56-207 frontend/…/usage-features.ts• L368-500
Feature availability
Feature flags, entitlements, deployment mode, and member access decide which console surfaces appear. A feature can be absent from navigation, blocked at the route, or shown as unavailable when its service is not enabled. The API remains the final authority when an operator acts. frontend/…/router.tsx, the tenant settings page, and the feature and entitlement checks define this layered boundary.
In development builds, the footer's Flags panel lets an engineer set each known flag to its default, on, or off state. The panel shows the last value evaluated for the active tenant and reads the same query state used by the feature checks. These overrides are browser-local and do not change tenant feature state. frontend/…/devtools-feature-flags.tsx and frontend/…/use-feature-flags.ts define this inspection boundary.
The normal feature check uses the active tenant to evaluate a flag. It falls back to the flag's no-PostHog default when no tenant exists or evaluation fails. Production builds ignore local override storage, so a stale browser value cannot enable an unreleased feature there. frontend/…/use-feature-flags.ts defines this layered behavior.
References: frontend/…/router.tsx• L571-594 frontend/…/router.tsx• L717-751 frontend/…/labs-preview.tsx• L61-99 frontend/…/settings-nav-items.tsx• L17-161 frontend/…/devtools-feature-flags.tsx• L11-127 frontend/…/use-feature-flags.ts• L9-83
Recovery states
The console gives common navigation failures a clear next action. It distinguishes an unexpected application error, a new application version, a missing page, a missing resource, an expired retained resource, and a tenant the current user cannot access. frontend/…/tenant-forbidden.tsx adds a tenant picker so a user with other memberships can recover without starting over.
The forbidden view also surfaces pending invitations because accepting an invitation can grant access without a new page load. After access changes, the route reloads its tenant data rather than leaving the user on a stale denial page. Alternative tenants exclude the requested tenant and archived tenants, then follow the same organization grouping used by the normal switcher. frontend/…/tenant-forbidden.tsx defines this recovery path.
References: frontend/…/tenant-forbidden.tsx• L101-157 frontend/…/tenant-forbidden.tsx• L167-235 frontend/…/tenant-forbidden.tsx• L268-318 frontend/…/router.tsx• L463-522
Interface boundaries
The console and extension meet Hatchet through different trust and freshness boundaries. The console represents shared service state. The extension represents local source intent.
API and tenant context
The browser uses generated API clients and data contracts for organization, tenant, workflow, run, stream, endpoint, billing, worker, access, and sandbox provider resources. In control-plane mode, a tenant route checks membership before it loads tenant data. It then obtains a tenant exchange credential so later requests use the correct tenant service. frontend/…/router.tsx, frontend/…/user-universe.tsx, and frontend/…/api.ts define this request boundary.
Tenant routing resolves the exchange credential from the most specific available tenant context. An explicit request tenant wins first. The tenant in the request path wins next, followed by the browser location and the last tenant stored in the browser. This prevents a page switch or stale browser value from sending a request with a credential for the wrong tenant. Control-plane status uses shared cached metadata: a known result remains stable during later transient errors, while a first-load transient error can retry instead of being treated as a disabled control plane. frontend/…/api.ts and frontend/…/api.test.ts define and verify this request boundary.
The active tenant is therefore more than a label in the navigation. It selects the service context for tenant operations and scopes browser-local choices such as recent workspaces and the optional visual mode. Query definitions in frontend/…/queries.ts keep tenant and organization identity in the cache keys, so views do not treat data from one workspace as data from another. Generated data contracts also define the resource policy, workflow event meanings, and sandbox provider state that the console presents to operators. frontend/…/app-context.tsx, frontend/…/api.ts, and frontend/…/data-contracts.ts define this relationship.
References: frontend/…/router.tsx• L457-512 frontend/…/user-universe.tsx• L72-104 frontend/…/app-context.tsx• L158-222 frontend/…/api.ts• L23-31 frontend/…/api.ts• L69-173 frontend/…/api.ts• L175-228 frontend/…/api.ts• L240-298 frontend/…/api.test.ts• L65-182 frontend/…/queries.ts• L43-205 frontend/…/data-contracts.ts• L228-239 frontend/…/data-contracts.ts• L592-609 frontend/…/data-contracts.ts• L1097-1203 frontend/…/data-contracts.ts• L1807-1829
State freshness
The console treats API responses as shared service state and refreshes views that can change while open. Active runs, usage limits, endpoint status, user memberships, and sandbox provider health can therefore update without a full page change. The extension treats the open document as the source of truth and recomputes its graph after source edits. frontend/…/authenticated.tsx, frontend/…/usage-this-period.tsx, frontend/…/resource-limits.ts, frontend/…/use-sandbox-providers.tsx, and frontend/…/extension.ts show these different freshness models.
The runs, events, logs, overview, and sandbox provider views keep prior data visible while a new result is loading. This avoids replacing a useful operational view with a blank state during polling. frontend/…/data-table.tsx, frontend/…/use-events.tsx, frontend/…/use-tenant-logs.tsx, and frontend/…/use-sandbox-providers.tsx define this presentation rule.
References: frontend/…/authenticated.tsx• L450-510 frontend/…/usage-this-period.tsx• L518-540 frontend/…/resource-limits.ts• L63-89 frontend/…/use-sandbox-providers.tsx• L20-30 frontend/…/extension.ts• L89-115 frontend/…/data-table.tsx• L142-159 frontend/…/use-events.tsx• L277-304 frontend/…/use-tenant-logs.tsx• L134-195
Local presentation state
Some interface choices are intentionally local to the browser. Theme choice persists as a browser preference. Banana mode is an optional visual experiment whose state is scoped by tenant when tenant context exists. It changes the visual shell and can show a non-interactive banana animation. It does not change workflow, run, or access state. frontend/…/use-banana-mode.ts, frontend/…/banana-mode.tsx, and frontend/…/banana-mode.module.css define this presentation boundary.
The logo uses the normal Hatchet mark and wordmark by default. When banana mode is active, the same logo interface renders the alternate visual mark without changing navigation meaning. frontend/…/hatchet-logo.tsx and frontend/…/banana-logo.tsx define this shared presentation contract.
The frontend also gives charts, tables, logs, code blocks, and form controls shared light and dark color roles. This keeps operational meaning such as status, error, and selected state readable across the console and Storybook. frontend/…/index.css, frontend/…/chart.tsx, and frontend/…/preview.tsx define this visual contract.
References: frontend/…/use-banana-mode.ts• L1-37 frontend/…/banana-mode.tsx• L51-117 frontend/…/banana-mode.module.css• L1-99 frontend/…/hatchet-logo.tsx• L6-51 frontend/…/banana-logo.tsx• L76-129 frontend/…/index.css• L5-111 frontend/…/chart.tsx• L34-97 frontend/…/preview.tsx• L24-37
Editor source boundary
The extension has no tenant session in its graph flow. Its trust boundary is the local VS Code workspace, project type information, and the language server. It can show a workflow that has not been deployed, but it cannot confirm the deployed workflow matches the open source. frontend/…/workflow-type-analyzer.ts and frontend/…/dag-panel.ts define this limit.
The host and webview communicate workflow shape, loading state, fallback state, and source navigation actions. The graph remains an authoring aid rather than a second operational console. frontend/…/dag-panel.ts and frontend/…/App.tsx define this separation.
References: frontend/…/workflow-type-analyzer.ts• L51-79 frontend/…/dag-panel.ts• L122-219 frontend/…/App.tsx• L39-159
Change checklist
When these files or sections are changed, remember to consider these:
- When authentication or MFA routing changes, preserve the distinction between a signed-out user, a pending second-factor login, and an authenticated user with stale tenant credentials.
- When control-plane request handling changes, keep membership checks, exchange-token tenant selection, API base URL selection, metadata caching, timeout behavior, and the self-hosted path aligned.
- When exchange-token tenant selection changes, keep explicit request context, request-path parsing, browser-location fallback, stored-tenant fallback, and the API tests aligned.
- When onboarding redirects change, preserve the separate outcomes for email verification, pending invitations, missing organization, missing tenant membership, and a tenant with no completed run.
- When tenant membership data changes, keep organization grouping, archived-tenant filtering, recent-tenant validation, and tenant route access checks consistent.
- When a tenant or organization setting is renamed or moved, update the settings navigation, canonical route, legacy redirect, and access gate together.
- When organization roles or tags change, keep invitation grants, user-group access, tenant tags, member visibility, and tenant selection aligned.
- When MFA methods or recovery-code actions change, preserve step-up checks, one-time code display, session invalidation, and the pending-login redirect.
- When billing usage or resource policy contracts change, keep period totals, live inventory counts, refill-based limits, plan allowances, limit labels, meter windows, refill dates, and notification links distinct.
- When a resource becomes optional, update its entitlement or feature check, route, navigation item, empty state, and API contract together.
- When shared table behavior changes, preserve stable row identity, loading versus empty states, URL filter state, side-panel layout behavior, and unknown-total pagination behavior.
- When run filters change, keep status counts, running sub-filters, time ranges, metadata operators, sidebar controls, URL state, and API parameters aligned.
- When run event types change, update their severity, title, color, and failure meaning together so the run detail does not present one event with conflicting signals.
- When the run shape or view preference changes, keep the graph/minimap visibility rule and the local preferred view aligned with dependency data.
- When retention contracts change, update preset labels, date blocking, automatic range adjustment, upgrade messaging, and every history view that uses the shared gate.
- When workflow output or log presentation changes, keep restricted payload handling, readable error formatting, copy behavior, live log state, and related-task links aligned.
- When sandbox provider or managed worker contracts change, update generated API data, query keys, forms, health meaning, event mappings, entitlement gates, enable/disable confirmations, deletion effects, and refresh behavior together.
- When tenant or organization routes change, update the breadcrumb route labels and dynamic resource-name handling with the route tree.
- When the extension's workflow model changes, keep declaration discovery, source fallback, host-to-webview messages, graph edges, and source navigation compatible.
- When the DAG shape changes, keep the console run graph and extension graph semantics aligned without treating either view as the authority for the other.
- When feature flag checks or development tools change, keep tenant evaluation, no-PostHog fallbacks, development-only overrides, query-cache display, and production isolation aligned.
- When Storybook stories or mocks change, keep the preview providers, mock worker scope, route context, and production build exclusions separate.
- When frontend package or lock metadata changes, keep the app's build, type checks, test commands, and Storybook toolchain resolved from the same package state.
- When logo, page identity, social-card metadata, or theme behavior changes, keep link previews and the normal and banana presentation variants accessible while keeping local presentation state separate from operational state.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| A tenant route loads before membership is known | The console can request tenant data for a user who has no access | The route checks membership before tenant fetch and exchange-token creation in frontend/…/router.tsx |
| A control-plane request uses the wrong tenant for its exchange credential | The browser can send a valid request to the wrong tenant service | Explicit request tenant context wins, then the request-path tenant, location, and stored fallback in frontend/…/api.ts |
| Control-plane metadata has a transient first-load failure and is treated as disabled | Tenant requests can go to the control-plane host where tenant routes do not exist | Shared metadata query state retries transient failures and only treats a non-retryable client error as a definitive absence in frontend/…/api.ts |
| A control-plane request hangs across a region | The browser can wait near its own long request limit before entering recovery | Control-plane calls use a bounded 15-second timeout in frontend/…/api.ts |
| A pending MFA login loads the normal application shell | The user can appear signed in without completing the required second factor | The response boundary sends mfa_required responses to /auth/mfa in frontend/…/api.ts |
| A user finishes MFA with cached exchange credentials | Later tenant requests can use credentials from before the proof | MFA completion removes exchange-token queries before navigation in frontend/…/use-mfa.ts |
| An exchange token cannot be fetched and the request proceeds unchanged | A tenant request can reach the wrong host and fail as a misleading route error | The interceptor rejects with the token-fetch error instead of sending the request unchanged in frontend/…/api.ts |
| A user opens a tenant that is no longer accessible | The console presents a dead workspace choice | The forbidden view removes the requested tenant and archived tenants before offering alternatives in frontend/…/tenant-forbidden.tsx |
| An invitation grants access while the forbidden view remains mounted | The user can stay on a stale access-denied page after accepting the invitation | The forbidden view watches membership changes and invalidates the route after access appears in frontend/…/tenant-forbidden.tsx |
| A run filter writes statuses and its running sub-filter in separate updates | One filter can overwrite the other and show the wrong run set | useRunFilterActions writes the related values together in frontend/…/use-run-filter-actions.ts |
| A time range reaches before tenant retention | The request can return no useful history or show a misleading empty state | Shared retention helpers adjust or block the range and open the retention dialog in frontend/…/use-retention-gate.ts and frontend/…/retention-upgrade-dialog.tsx |
| A daily refill meter is shown as billing-period usage | An operator can misread a current-window cap as total monthly consumption | Usage rows keep period totals separate from live daily meters in frontend/…/usage-features.ts |
An unmetered allowance is shown as 0 / limit | An operator can read a plan allowance as consumed usage | Usage display rows hide non-metered allowances in frontend/…/usage-features.ts |
| A resource policy adds a resource without matching console labels | The settings table can show no useful name while alerts use an internal resource value | Keep the generated TenantResource values and the settings and notification label maps aligned in frontend/…/data-contracts.ts, frontend/…/resource-limit-columns.tsx, and frontend/…/resource-limits.ts |
| A resource limit alert uses a stale tenant policy | An operator can miss that work is near or at a limit | The notification query is scoped to the active tenant and refetches every two minutes in frontend/…/resource-limits.ts |
| A resource entitlement is removed but its route stays visible | The operator can reach a page that the tenant cannot use | Route, navigation, and page gates are controlled together for optional resources in frontend/…/router.tsx and frontend/…/settings-nav-items.tsx |
| A structured error is displayed as escaped JSON | A stack trace becomes hard to read and diagnose | Error display formatting expands JSON line-break escapes while preserving the original value for copying in frontend/…/utils.ts and frontend/…/utils.test.ts |
| A failed run with restricted payloads renders its error as normal output | A user can see data that the tenant policy should hide | Run and task output views check payload restriction before rendering code in frontend/…/index.tsx and frontend/…/step-run-output.tsx |
| A new task event is added without an event title or severity mapping | The run can show the wrong impact or fail while converting the event to a title | Keep generated event values and the severity and title mappings exhaustive in frontend/…/data-contracts.ts and frontend/…/event-utils.ts |
| The graph/minimap control appears for a run with no dependent steps | The detail view adds a control with no useful alternate view | The toggle checks the workflow shape before rendering in frontend/…/view-toggle.tsx |
| A provider API key is treated as returned configuration | A secret can be exposed in the provider detail view or cached data | Provider contracts mark keys write-only and the form only sends a new key when supplied in frontend/…/data-contracts.ts and frontend/…/use-sandbox-providers.tsx |
| A provider config uses an unsupported key | Provider creation or update is rejected even though the form appears valid | Vendor-specific allowed keys are shown and validated against the provider contract in frontend/…/kinds.ts and frontend/…/form-fields.tsx |
| A provider is disabled without explaining the effect on new task operations | New sandbox operations fail while an operator may expect existing sandboxes to be deleted or paused | The disable dialog states that existing vendor sandboxes remain and requires confirmation in frontend/…/disable-provider-dialog.tsx |
| A provider is deleted without acknowledging its Hatchet-side data loss | Sandboxes and snapshots disappear and related runs cannot be replayed | The delete dialog requires all impact acknowledgements and the exact provider name while noting that vendor machines are untouched in frontend/…/delete-provider-dialog.tsx |
| A sandbox provider event kind is added without a log level or label | The provider event log can show an undefined severity or event name | Keep provider event kinds, labels, and levels exhaustive in frontend/…/data-contracts.ts and frontend/…/events-log.tsx |
| Sandbox entitlement is absent but provider routes remain usable | An operator can reach controls for a feature unavailable to the deployment or tenant | The sandbox gate checks entitlement and deployment mode before rendering provider pages in frontend/…/gate.tsx |
| A feature flag override is used as a production entitlement | A local browser choice could appear to grant a released feature | Override reads are disabled outside development builds in frontend/…/use-feature-flags.ts |
| The Flags panel shows a stale or wrong evaluated value | An engineer can diagnose the wrong tenant feature state | The panel reads tenant-keyed query results and orders them by their latest success or failure time in frontend/…/devtools-feature-flags.tsx |
| A feature check has no tenant data and no resolved result | A feature-gated page can render before the service decides whether the feature is available | The hook exposes a loading state while tenant evaluation is pending in frontend/…/use-feature-flags.ts |
| A Storybook mock worker is included in the production app | Test responses or a service worker can affect a deployed console | Storybook serves the worker from its own static directory and excludes it from the app build in frontend/…/main.ts and frontend/app/.prettierignore |
| A workflow source change finishes after a newer edit | The extension can show a stale graph beside current source | The extension cancels or supersedes older analysis work in frontend/…/dag-panel.ts |
| A task node resolves outside the open workspace | Selecting the node can open an unintended local path | The extension checks the task file against the workspace boundary in frontend/…/dag-panel.ts |
| Project type information cannot resolve cross-file tasks | The graph can omit relationships without explanation | The extension falls back to source-level analysis and labels incomplete cross-file data in frontend/…/dag-panel.ts and frontend/…/App.tsx |
| Banana mode state is shared across tenants | A local visual choice can appear to be an operational tenant setting | Banana preferences use tenant-scoped browser keys in frontend/…/use-banana-mode.ts |
Key files
| File | Why to read it |
|---|---|
| frontend/…/package.json | Shows the frontend run, build, type, test, Storybook, and browser-check entry points. |
| frontend/…/index.html | Shows the browser entry point, product metadata, and external link-preview contract. |
| frontend/…/root.tsx | Shows the shared frontend providers and global presentation boundary. |
| frontend/…/router.tsx | Shows authentication, onboarding, organization, tenant, resource, redirect, and settings navigation. |
| frontend/…/breadcrumbs.ts | Shows how tenant and organization routes become readable navigation trails. |
| frontend/…/authenticated.tsx | Shows authenticated redirects, tenant selection, onboarding, invitations, usage notices, the shell, and development-only tools. |
| frontend/…/user-universe.tsx | Shows the user's tenant memberships and control-plane organization context. |
| frontend/…/app-context.tsx | Shows how route identity becomes the active user and tenant context. |
| frontend/…/api.ts | Shows control-plane detection, tenant exchange credentials, request timeout, MFA response routing, and browser API routing. |
| frontend/…/api.test.ts | Shows the expected tenant-source precedence and HTTP error status behavior for browser API routing. |
| frontend/…/queries.ts | Shows how organization and tenant resources are named and scoped in query state. |
| frontend/…/data-contracts.ts | Shows the shared meanings for workflow events, run payload access, tenant resources, resource policies, and sandbox provider state. |
| frontend/…/data-contracts.ts | Shows cloud resource states, worker contracts, provider kinds, health state, write-only key contracts, provider events, and entitlements. |
| frontend/…/Api.ts | Shows cloud operations for sandbox providers, managed workers, metrics, logs, and organization resources. |
| frontend/…/index.tsx | Shows the pending-login MFA experience and recovery-code handoff. |
| frontend/…/use-mfa.ts | Shows MFA completion, session refresh, error meaning, and credential invalidation. |
| frontend/…/overview-dashboard.tsx | Shows the operator activity entry point and rolling activity window. |
| frontend/…/tasks-panel.tsx | Shows run totals, activity charting, polling, and the link to the runs view. |
| frontend/…/trigger-workflow-form.tsx | Shows operator input authoring and immediate, scheduled, and recurring trigger paths. |
| frontend/…/workflow-general-settings.tsx | Shows how deployed workflow triggers and behavior settings are summarized. |
| frontend/…/runs-table.tsx | Shows the runs workspace, metrics, filters, actions, empty states, and responsive sidebar layout. |
| frontend/…/runs-filter-sidebar.tsx | Shows the focused run filter experience. |
| frontend/…/use-runs-table-filters.tsx | Shows URL-backed run filter state and retention handling. |
| frontend/…/index.tsx | Shows the run investigation view across graph, payloads, activity, traces, logs, and replay. |
| frontend/…/event-utils.ts | Shows how task events become operator-facing severity and titles. |
| frontend/…/view-toggle.tsx | Shows when operators can switch between run graph and minimap views. |
| frontend/…/log-viewer.tsx | Shows live log presentation, error details, metadata, and task links. |
| frontend/…/utils.ts | Shows the shared readable formatting for structured workflow errors. |
| frontend/…/resource-limits.ts | Shows how tenant resource policy state becomes operator notifications. |
| frontend/…/resource-limit-columns.tsx | Shows the operator meaning of resource limit values, alarms, meter windows, and refills. |
| frontend/…/use-events.tsx | Shows event filters, polling, URL state, pagination, and retention-aware history. |
| frontend/…/use-tenant-logs.tsx | Shows log search, infinite history, metrics, polling, and retention-aware time ranges. |
| frontend/…/data-table.tsx | Shows the shared behavior for resource lists. |
| frontend/…/data-table-toolbar.tsx | Shows the common relationship between search, filters, columns, refresh, and actions. |
| frontend/…/data-table-options.tsx | Shows filter types and column visibility controls. |
| frontend/…/zoomable.tsx | Shows chart display, tooltips, and drag-to-select time ranges. |
| frontend/…/date-time-picker.tsx | Shows date and time selection inside the retention boundary. |
| frontend/…/retention-upgrade-dialog.tsx | Shows the self-hosted and control-plane responses to a blocked history range. |
| frontend/…/index.tsx | Shows feature-gated execution control inspection. |
| frontend/…/index.tsx | Shows the operator view for durable stream topics. |
| frontend/…/index.tsx | Shows endpoint health, delivery events, diagnosis, and enablement. |
| frontend/…/index.tsx | Shows the tenant-scoped provider list, entitlement gate, and empty state. |
| frontend/…/index.tsx | Shows provider configuration, health, enablement, and observed events. |
| frontend/…/use-sandbox-providers.tsx | Shows provider data freshness, validation, mutation behavior, and form-to-API contracts. |
| frontend/…/create-provider-dialog.tsx | Shows vendor selection and the provider connection flow. |
| frontend/…/edit-provider-dialog.tsx | Shows provider updates and optional API-key rotation. |
| frontend/…/disable-provider-dialog.tsx | Shows the effect-aware disable confirmation. |
| frontend/…/delete-provider-dialog.tsx | Shows the destructive provider deletion confirmation and its data-loss warning. |
| frontend/…/events-log.tsx | Shows how provider events become readable log entries. |
| frontend/…/gate.tsx | Shows deployment and entitlement checks for sandbox provider pages. |
| frontend/…/kinds.ts | Shows supported sandbox vendors and their operator-facing settings. |
| frontend/…/simple-table.tsx | Shows the compact table contract used by organization settings. |
| frontend/…/organization-selector.tsx | Shows organization-aware tenant selection. |
| frontend/…/tenant-switcher-panel.tsx | Shows tenant search, recent choices, and workspace actions. |
| frontend/…/index.tsx | Shows organization access, team, tenant, region, SSO, compliance, and lifecycle settings. |
| frontend/…/index.tsx | Shows user MFA method and recovery-code management. |
| frontend/…/usage-this-period.tsx | Shows organization usage, tenant filtering, charts, limits, and upgrade paths. |
| frontend/…/usage-features.ts | Shows the meaning of period usage, live inventory, plan allowance, and refill meters. |
| frontend/…/use-feature-flags.ts | Shows tenant feature evaluation, default behavior, loading state, and development override isolation. |
| frontend/…/devtools.tsx | Shows the development-only Query, Router, and Flags inspection panels. |
| frontend/…/devtools-feature-flags.tsx | Shows local flag choices and the display of the active tenant's evaluated values. |
| frontend/…/main.ts | Shows Storybook scope, addons, mock-worker serving, and production plugin exclusions. |
| frontend/…/preview.tsx | Shows Storybook theme and query providers plus opt-in MSW loading. |
| frontend/…/runs-table.stories.tsx | Shows isolated runs-page scenarios and responsive layout coverage. |
| frontend/…/extension.ts | Shows extension activation, supported files, commands, and source update handling. |
| frontend/…/dag-panel.ts | Shows workflow analysis, workspace safety, webview messages, and source navigation. |
| frontend/…/App.tsx | Shows graph, loading, empty, fallback, and theme states in the editor. |
| frontend/…/index.css | Shows shared light and dark visual roles and responsive console layout rules. |
| frontend/…/use-banana-mode.ts | Shows the browser-local and tenant-scoped presentation preference boundary. |