Repository navigation
feat(studio): worker detail page (FE-4189, FE-4197) - #49195
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
5 Skipped Deployments
|
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughAdds 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. ChangesWorker detail experience
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: 🟡 Moderate · up to 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
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Description checkExplanation 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 💡
🧪 Generate unit tests (beta)
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. Comment |
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
c81ee9a to
57a7f59
Compare
57a7f59 to
b67e130
Compare
🎭 Playwright Test Results (next)Details
Flaky testsFeatures › table-editor.spec.ts › table editor › should show rls accordingly Skipped testsFeatures › auth-users.spec.ts › should show web3 users as enabled when the matching web3 provider is enabled |
6db5366 to
ff09927
Compare
ff09927 to
95e9dd3
Compare
95e9dd3 to
4eb90eb
Compare
4eb90eb to
47e44b7
Compare
47e44b7 to
7a89270
Compare
7a89270 to
81a6bc7
Compare
81a6bc7 to
b3b051e
Compare
b3b051e to
f45c107
Compare
f45c107 to
9d2e887
Compare
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.
82269c5 to
487ce8d
Compare
| expect(buildWorkerCliCommands(' ')[0].command).toContain('my-worker') | ||
| }) | ||
|
|
||
| it('does not offer a serve command', () => { |
There was a problem hiding this comment.
Kind of a pointless test IMO
There was a problem hiding this comment.
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.
ced0442 to
823b119
Compare
## 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
Braintrust eval reportEvals in progress... ⌛ |
What
The worker detail page at
/project/[ref]/workers/[name], readingGET /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.
dashboard-testdenoland/deno:latest, 2 GB · 1 vCPU, private, US West (locked)No write actions. Delete (FE-4190) is deliberately out.
Closes FE-4189
Closes FE-4197
Summary by CodeRabbit