Files
supabase/apps/studio/components
Claude 2a60bd866f fix(studio): make worker logs actually load in the worker tab
Worker rows only exist on the OTEL logs endpoint; the BigQuery query
builder has no worker sources. The tab was routed by the otelUnifiedLogs
flag, so with the flag off (or not yet loaded) it queried an endpoint that
can never return a worker row. Add a useOtel override to the unified logs
query hooks and download button, and force it on for the worker tab.

Default the tab's time range to the last 24 hours (as master's Activity
tab did) instead of the unified logs' last hour, so one-off lifecycle
events such as deploys and builds are visible when the tab opens. The
seeded range is read by the first fetch and synced into the URL so the
picker, the query and the "Open in Logs" link agree.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R5ev3QGKtXVansc1cz5uzR
2026-09-09 16:32:34 +00:00
..

Writing components

Where to create your components

  • For components that declare the general structure and layout of a page:
    • /components/layouts/xxx
  • For components that are tightly coupled to a specific interface:
    • /components/interfaces/xxx
  • For components that are meant to be reusable across multiple pages:
    • /components/ui/xxx
  • Note: We're gradually moving files out of the to-be-cleaned folder into the respective folders as we refactor

Component structure

  • If a component has constants and utility methods that are tightly coupled to itself, keep them close to the component and enclose them in a folder with an index.tsx as an entry point
  • Otherwise it can just be a file on its own
  • For example:
    • components/ui
      - SampleComponentA
        - SampleComponentA.tsx
        - SampleComponentA.constants.ts
        - SampleComponentA.utils.ts
        - SampleComponentA.types.ts
        - index.ts
      - SampleComponentB.tsx
      

Template for building components


// Declare the prop types of your component
interface ComponentAProps {
  sampleProp: string
}

// Name your component accordingly — use a named export, not a default export
export const ComponentA = ({ sampleProp }: ComponentAProps) => {
  return <div>ComponentA: {sampleProp}</div>
}