Commit Graph

328 Commits

Author SHA1 Message Date
Peter Wielander abdca8fd52 [web] Observability config overhaul (#774) 2026-01-14 23:22:30 +01:00
Vercel Release Bot 4bd877b474 Version Packages (beta) (#778) 2026-01-14 13:25:24 +01:00
Vercel Release Bot 101585cce0 Version Packages (beta) (#758)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-13 14:10:19 -08:00
Vercel Release Bot 69da6a2d72 Version Packages (beta) (#755)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-08 18:50:19 -08:00
Pranay Prakash 3fb57e14c8 feat(web): add self-hosted mode for world configuration (#747)
* feat(web): add self-hosted mode for world configuration

When WORKFLOW_TARGET_WORLD env var is set, the web UI operates in
self-hosted mode where the world configuration is locked to server-side
environment variables and cannot be changed via query params or UI.

- Add getHardcodedConfig server action to detect self-hosted mode
- Modify getWorldFromEnv to use server env vars in hardcoded mode
- Create WorldConfigContext to provide config state app-wide
- Update settings sidebar to show locked state with disabled inputs
- Update connection status to show PostgreSQL backend info
- Mask sensitive values (postgres URL) in hardcoded mode UI

* fix: address PR review feedback

- Remove unused ConfigMode type export
- Fix postgres substring to undefined (tooltip has details)
- Extract buildEnvMapFromProcessEnv helper to reduce duplication
- Remove unused EnvMap import from layout-client
- Import HardcodedConfig from web-shared/server instead of re-defining

* Fix: PostgreSQL URL parameter missing from configParsers, causing loss of postgres URL configuration on page reload in dynamic mode

* fix(cli): clear WORKFLOW_TARGET_WORLD when spawning web server

The CLI sets WORKFLOW_TARGET_WORLD as an env var, which the spawned
Next.js server inherits. This caused the web UI to enter self-hosted
mode even when launched via CLI.

Now we explicitly clear WORKFLOW_TARGET_WORLD from the server's
environment so it starts in dynamic mode where config comes from
query params as intended.

* refactor(web): use server-side env vars for world config

BREAKING CHANGE: The web UI no longer supports configuring the world
backend via URL query parameters. Configuration is now read exclusively
from server-side environment variables.

Changes:
- Remove query param parsing from @workflow/web config.ts
- Add ServerConfig interface with non-sensitive display info
- Update all components to use useServerConfig() hook
- Settings sidebar is now read-only
- CLI passes env vars to spawned web server instead of query params
- Server actions use process.env directly (envMap param reserved for future use)

This simplifies the architecture and improves security by never sending
sensitive data (connection strings, auth tokens) to the client.

* fix(web): fix settings sidebar overflow and shorten data dir path

- Add truncate/overflow handling to settings sidebar config values
- Add shortenPath() helper to abbreviate long file paths:
  - Replaces home directory with ~
  - Shows .../last-two-segments if still too long
- Add title attributes for full path on hover

* Update changeest

---------

Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
2026-01-08 18:38:56 -08:00
Vercel Release Bot 073e26a372 Version Packages (beta) (#735) 2026-01-08 19:32:27 +01:00
Peter Wielander dd3db13d54 [world] Remove pause and resume events, actions and states (#751) 2026-01-08 19:29:17 +01:00
Peter Wielander 0d79ff084c [web] Increase contrast on attribute items in sidebar (#736)
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
2026-01-08 11:01:24 +01:00
Vercel Release Bot a0045ac607 Version Packages (beta) (#723) 2026-01-06 18:07:45 -08:00
Hayden Bleasel de3183719c Bump Streamdown (#728)
* Bump Streamdown

* Create clear-drinks-fly.md

* Apply suggestion from @vercel[bot]

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>

---------

Co-authored-by: Pranay Prakash <pranay.gp@gmail.com>
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
2026-01-06 10:03:33 -08:00
Vercel Release Bot 6d7e5035a4 Version Packages (beta) (#711) 2025-12-31 10:17:49 -08:00
Vercel Release Bot b49bb4eb54 Version Packages (beta) (#707) 2025-12-30 11:01:55 +01:00
Peter Wielander 80955e7212 [cli] [web] Allow opening web UI without config validation, show better UI when runs can't be found (#684) 2025-12-28 17:55:24 +01:00
Vercel Release Bot e6b1bef5bb Version Packages (beta) (#693) 2025-12-27 12:40:09 -08:00
Vercel Release Bot 96a4d3a2fd Version Packages (beta) (#676)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-24 09:51:14 -08:00
Peter Wielander 4bc98ff4a1 [web-shared] Move error boundary from web to web-shared and use for sidebar detail view (#674) 2025-12-23 14:02:36 +01:00
Vercel Release Bot 0143da749d Version Packages (beta) (#675) 2025-12-22 16:22:58 +01:00
Peter Wielander 616bc67be4 [web-shared] Fix null access in eventData (#673) 2025-12-22 16:18:17 +01:00
Vercel Release Bot 560dda3014 Version Packages (beta) (#660) 2025-12-20 10:58:29 +01:00
Peter Wielander 88ad5c9bbf [web] Fix hook span display if hooks were already disposed (#658) 2025-12-20 09:52:32 +01:00
Peter Wielander ef22f82c9e [web] Allow resuming hooks with payloads from the UI (#656) 2025-12-20 09:27:01 +01:00
Vercel Release Bot bd3385ff6d Version Packages (beta) (#652)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-19 15:41:36 -08:00
Vercel Release Bot b4132d0895 Version Packages (beta) (#635) 2025-12-18 20:07:06 +01:00
Peter Wielander 4bdd3e5086 Move auth error messages into @workflow/errors package (#638) 2025-12-17 16:54:29 +01:00
Peter Wielander c6f33ee9d3 [web] Show event markers for step_started events (#636) 2025-12-17 10:35:09 +01:00
Peter Wielander ce7d428a07 [world-local] Fix step queries not returning new items for live pagination (#623) 2025-12-17 08:58:42 +01:00
Peter Wielander a84f0db227 [web] Visually distinguish createdAt vs startedAt for run/steps (#622) 2025-12-17 08:58:18 +01:00
Vercel Release Bot fc6a32d6dc Version Packages (beta) (#607) 2025-12-16 21:05:18 +01:00
Peter Wielander 05ea6789e5 [web] Add actions for waking up workflow from sleep and re-enqueue runs for debugging (#582) 2025-12-14 17:39:25 -08:00
Vercel Release Bot 7018f490e6 Version Packages (beta) (#589)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-12 18:11:25 -08:00
Karthik Kalyanaraman a4b67a9b3a [web] Show chat conversation UI when detecting step spans from DurableAgent (#586)
---------

Signed-off-by: Karthik Kalyanaraman <karthik@scale3labs.com>
2025-12-09 16:35:46 -08:00
Vercel Release Bot 76795b0cd0 Version Packages (beta) (#561) 2025-12-09 09:26:51 -08:00
Peter Wielander 161c54ca13 [web] [cli] Add Web and CLI UI for listing and viewing streams (#575) 2025-12-08 18:10:02 -08:00
Peter Wielander 33c254c82c [web] Clean up error handling and surface status code (#572) 2025-12-08 12:59:05 -08:00
Peter Wielander 058757c476 [web] Tidy time helper functions (#562) 2025-12-08 12:16:53 -08:00
Vercel Release Bot 6194ded51b Version Packages (beta) (#533) 2025-12-05 15:24:04 -08:00
Karthik Kalyanaraman 4aecb9996f Add workflow CFG visualization to observability UI (#456)
---------

Signed-off-by: Karthik Kalyanaraman <karthik@scale3labs.com>
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
2025-12-05 12:05:17 -08:00
Pranay Prakash 7969df9f59 [web-shared] Human readable durations in span viewer (#535)
---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: pranay.prakash <pranay.prakash@vercel.com>
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-05 10:37:44 -08:00
Peter Wielander 817245526e [web] Add run data expiry date and status to trace viewer (#549) 2025-12-05 10:29:03 -08:00
Karthik Kalyanaraman 14daeddb2f UX updates to span viewer panel (#457) 2025-12-05 09:38:43 -08:00
Peter Wielander 57a2c328ca [world] Add expiredAt attribute to Run (#515) 2025-12-04 12:05:58 -08:00
Vercel Release Bot 1ea0826fad Version Packages (beta) (#517)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-03 15:50:12 -08:00
Vercel Release Bot 4b79bee16c Version Packages (beta) (#513)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-03 12:07:57 -08:00
Vercel Release Bot 00b12be415 Version Packages (beta) (#499) 2025-12-02 13:01:12 -08:00
Vercel Release Bot 9916f2a4a6 Version Packages (beta) (#447)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-02 10:12:48 -08:00
Vercel Release Bot 87ad24b3b6 Version Packages (beta) (#416) 2025-11-26 19:55:04 -08:00
Nathan Rajlich fb9fd0f893 Add support for closure scope vars in step functions (#358)
### What changed?

- Enhanced the SWC plugin to detect and collect closure variables from nested step functions
- Modified the workflow runtime to pass closure variables to step functions during execution
- Updated the serialization/deserialization logic to handle the new closure variable format
- Added a mechanism to access closure variables within step functions
- Added tests to verify closure variable functionality in nested step functions
- Closure variables are stored on the step function execution's `AsyncLocalStorage`​ context

### Example

```typescript
export async function myWorkflow(baseValue: number) {
  'use workflow';
  const multiplier = 3;
  const prefix = 'Result: ';

  const calculate = async () => {
    'use step';
    const result = baseValue * multiplier;
    return `${prefix}${result}`;
  };

  return await calculate();
}
```

### Why make this change?

Previously, nested step functions couldn't access variables from their parent workflow scope, limiting their usefulness and requiring workarounds like passing all needed values as parameters. This change enables a more natural programming model where step functions can access variables from their enclosing scope, making workflow code more intuitive and reducing the need for explicit parameter passing.
2025-11-25 00:21:05 -08:00
Vercel Release Bot 018c5a053e Version Packages (beta) (#410) 2025-11-24 15:22:23 -08:00
Vercel Release Bot e5c0380bbd Version Packages (beta) (#396) 2025-11-24 14:25:39 -08:00
Vercel Release Bot 7a230a9ad1 Version Packages (beta) (#387)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-22 07:32:12 -08:00