Skip to content

feat(studio): worker detail page (FE-4189, FE-4197) - #49195

Merged
jordienr merged 30 commits into
masterfrom
jordi/workers-detail
Aug 28, 2026
Merged

jordienr merged 30 commits into
masterfrom
jordi/workers-detail

Conversation

@jordienr

@jordienr jordienr commented Aug 18, 2026 •

Copy link
Copy Markdown
Member

What

The worker detail page at /project/[ref]/workers/[name], reading GET /v2/projects/{ref}/workers/{name}. Base: #49194.

How to test

Only on the Mockamaster project in staging — it is the one project in the alpha allow-list.

  1. Staging dashboard → Mockamaster → Workers → click dashboard-test
  2. Overview: instances read 1 declared / 1 live / 1 ready / 0 stale, no error alerts
  3. Settings: Deno 2, denoland/deno:latest, 2 GB · 1 vCPU, private, US West (locked)
  4. How to call in the header → the snippets name the real worker URL

No write actions. Delete (FE-4190) is deliberately out.

Closes FE-4189
Closes FE-4197

Summary by CodeRabbit

  • New Features
    • Added worker detail pages with overview, requests, logs, builds, and settings tabs.
    • Added worker metadata, runtime details, invocation examples, and local development commands.
    • Added worker log streams with refresh, row selection, loading, empty, and error states.
    • Added worker-specific log formatting and clearer instance status information.
  • Documentation
    • Updated migration tracking to mark the worker route as complete.

@jordienr
jordienr requested a review from a team as a code owner August 18, 2026 11:32
@vercel

vercel Bot commented Aug 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
studio-self-hosted Ready Ready Preview Aug 28, 2026 9:23am
studio-staging Ready Ready Preview Aug 28, 2026 9:23am
5 Skipped Deployments
Project Deployment Actions Updated (UTC)
studio Ignored Ignored Aug 28, 2026 9:23am
design-system Skipped Skipped Aug 28, 2026 9:23am
docs Skipped Skipped Aug 28, 2026 9:23am
ui-library Skipped Skipped Aug 28, 2026 9:23am
zone-www-dot-com Skipped Skipped Aug 28, 2026 9:23am

Request Review

@coderabbitai

coderabbitai Bot commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 67564f6f-622c-46c1-9993-0646684c4eb4

📥 Commits

Reviewing files that changed from the base of the PR and between eb98863 and 6036b04.

📒 Files selected for processing (1)
  • apps/studio/components/interfaces/Workers/WorkerDetail/WorkerOverviewTab.tsx

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

Adds a worker detail page with overview, logs, and settings tabs. The page loads worker data, displays loading and error states, queries worker logs by stream, renders custom log columns, integrates the TanStack route, and updates the migration checklist.

Changes

Worker detail experience

Layer / File(s) Summary
Worker log query support
apps/studio/data/workers/worker-logs-query.ts, apps/studio/data/workers/keys.ts, apps/studio/data/workers/worker-logs-query.test.ts
Adds worker log stream mappings, filtered analytics SQL, React Query options, query keys, and SQL tests.
Worker detail route and shell
apps/studio/routes/project/$ref/workers/$name.tsx, apps/studio/pages/project/[ref]/workers/[name].tsx, apps/studio/components/interfaces/Workers/WorkerDetail/WorkerDetail.tsx
Adds the worker detail route and page shell. The shell loads worker data, renders header states, and switches between tabs.
Worker overview and settings
apps/studio/components/interfaces/Workers/WorkerDetail/WorkerOverviewTab.tsx, apps/studio/components/interfaces/Workers/WorkerDetail/WorkerSettingsTab.tsx
Adds instance status details, resource settings, invocation snippets, and local development commands.
Worker logs tab and table rendering
apps/studio/components/interfaces/Workers/WorkerDetail/WorkerLogsTab.tsx, apps/studio/components/interfaces/Settings/Logs/LogTable.tsx, apps/studio/components/interfaces/Settings/Logs/LogColumnRenderers/WorkersLogsColumnRender.tsx
Adds stream selection, refresh handling, loading and error states, empty-state CLI guidance, row selection, and worker-specific log columns.
Migration checklist
apps/studio/TANSTACK_MIGRATION.md
Marks the worker detail route as complete in the TanStack Start migration checklist.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: 🟡 Moderate · up to 6036b

The worker detail page adds overview, settings, and log views, but the current head still contains a CI-rule violation that can prevent validation, along with bounded correctness and accessibility issues such as misleading runtime settings, stale log selection, and indistinguishable or unannounced status information; the validation blocker should be fixed before merge.

Sequence Diagram(s)

sequenceDiagram
  participant Browser
  participant WorkerDetail
  participant ReactQuery
  participant AnalyticsLogsEndpoint
  participant LogTable
  Browser->>WorkerDetail: open worker detail route
  WorkerDetail->>ReactQuery: load worker data
  ReactQuery-->>WorkerDetail: return worker data
  WorkerDetail->>ReactQuery: load selected log stream
  ReactQuery->>AnalyticsLogsEndpoint: query filtered worker logs
  AnalyticsLogsEndpoint-->>ReactQuery: return log entries
  ReactQuery-->>WorkerDetail: provide log entries
  WorkerDetail->>LogTable: render worker-specific columns
Loading

Suggested reviewers: alaister

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 11 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the main change: adding the Studio worker detail page. It is concise and specific.
Description check ✅ Passed The description explains the worker detail page, API endpoint, test procedure, scope exclusions, and linked issues. It does not follow every template heading and does not confirm that CONTRIBUTING.md …
Full details: Description check

Explanation

The description explains the worker detail page, API endpoint, test procedure, scope exclusions, and linked issues. It does not follow every template heading and does not confirm that CONTRIBUTING.md was read, but it provides the required substantive context.

✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jordi/workers-detail

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@supabase

supabase Bot commented Aug 18, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project xguihxuzqibwxjnimxev because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@jordienr
jordienr force-pushed the jordi/workers-detail branch from c81ee9a to 57a7f59 Compare August 18, 2026 11:39
@jordienr
jordienr force-pushed the jordi/workers-detail branch from 57a7f59 to b67e130 Compare August 18, 2026 11:44
@github-actions

github-actions Bot commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

🎭 Playwright Test Results (next)

passed  242 passed
flaky  1 flaky
skipped  5 skipped

Details

stats  248 tests across 29 suites
duration  5 minutes, 43 seconds
commit  264bdc6

Flaky tests

Features › table-editor.spec.ts › table editor › should show rls accordingly

Skipped tests

Features › auth-users.spec.ts › should show web3 users as enabled when the matching web3 provider is enabled
Features › sql-editor.spec.ts › SQL Editor › snippet favourite works as expected
Features › sql-editor.spec.ts › SQL Editor › share with team works as expected
Features › sql-editor.spec.ts › SQL Editor › folders works as expected
Features › sql-editor.spec.ts › SQL Editor › other SQL snippets actions work as expected

Promote the three log streams (Requests, Logs, Builds) to top-level tabs
instead of nesting them under a single Logs tab, and render each stream
with the shared Logs table (LogTable) that Edge Functions use, replacing
the hand-rolled list. Rename the 'output' stream label to 'Logs'.
…g state

Render the worker logs table with a timestamp (TimestampInfo), severity,
and message column instead of the raw preview columns (which exposed id),
via a new LogTable columnRenderers prop and a WorkersLogsColumnRender.
Show a skeleton loader while the first page of logs is fetching.
Lead with a 'ready of declared' status line and add an info tooltip to
each instance count (Declared, Live, Ready, Stale). Drop the stale
'logs and metrics' section: logs now live in their own tabs and there is
no request-metrics endpoint to surface.
Surface the invocation snippets (curl/js/python) inline below the
instances section, so the overview shows how to reach the worker without
opening the header popover.
Rename the Requests tab to Invocations and the Builds tab to Activity
(tab keys, labels, and the per-stream empty-state labels).
Move the Container, Resources, and Develop locally sections onto the
overview tab and remove the Settings tab. The invocation snippets that
lived in both tabs are now a single How to call section.
The overview tab now carries the full How to call section, so the header
popover just repeated it.
- Move the worker log row parsing into the query file (parseWorkerLogRows),
  replacing the as-cast with a zod schema and adding malformed-row coverage.
- Use dayjs for the logs lookback window.
- Remount the logs tab per stream (key) so a selected log never leaks across
  Invocations/Logs/Activity.
- Pass isPending (not isFetching) to the logs table so a refresh keeps the
  current multi-selection.
- Collapse the empty logs-table header row when a columnRenderers set is used.
- Export the worker log column renderer by name instead of default.
…ppet set

Master's worker snippet tabs dropped curl; use cli/js/python for the
overview How to call section.
@jordienr
jordienr force-pushed the jordi/workers-detail branch from 82269c5 to 487ce8d Compare August 27, 2026 09:24
expect(buildWorkerCliCommands(' ')[0].command).toContain('my-worker')
})

it('does not offer a serve command', () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kind of a pointless test IMO

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol yea missed this slop

…list

The CLI won't ship a workers serve command; run the worker locally with
your own dev server instead.
@jordienr
jordienr force-pushed the jordi/workers-detail branch from ced0442 to 823b119 Compare August 28, 2026 09:18
## What

A Secrets section for Workers (FE-4280), so secrets are viewable without
detouring to Edge Functions. Base: #49242.

- **Nav** — a "Secrets" item under the Workers product menu, next to the
worker list
- **Page** at `/project/[ref]/workers/secrets`, header copy "Environment
variables loaded into every worker at start-up"
- **Route** + `routeTree.gen.ts` regenerated, plus the
`TANSTACK_MIGRATION.md` entry

Gated by `WorkersLayout` (flag + permission), same as the rest of the
product.

## Duplicated page, shared data

Per the ticket, this is the duplicated-page approach — a second entry
point, not a second store. Secrets are project-level
(`/v1/projects/{ref}/secrets`), so the page reuses the existing
`EdgeFunctionSecrets` / `DefaultEdgeFunctionSecrets` components rather
than forking ~400 lines of secret CRUD. Workers and Edge Functions read
and write the same list. The longer-term direction (a shared
Compute-level Secrets section) is out of scope here.

## How to test

Needs the `workers` flag on.

1. Project with the flag → **Workers** in the sidebar → **Secrets**
appears under it
2. Open it → default secrets table + custom secrets, identical to Edge
Functions → Secrets
3. Add/edit/delete a secret here; confirm it shows on the Edge Functions
Secrets page too (same project secrets)

## Note

Two strings inside the reused `EdgeFunctionSecrets` component still say
"edge function secrets" (the no-permission messages). Left as-is to
avoid refactoring shared Edge Functions code in a private-alpha
duplicated page; they'd be resolved by the eventual shared Compute-level
section. Flagging in case reviewers want them parameterized now.

No new tests: the page composes already-tested components and the nav is
a data literal, matching how the Edge Functions Secrets page itself is
covered.

Closes FE-4280
@jordienr
jordienr merged commit 5fd2023 into master Aug 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Braintrust eval report

Evals in progress... ⌛

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants