Skip to content

feat(studio): Move intake to span based model#79

Merged
BrianNewsom merged 4 commits into
mainfrom
brnewsom/fp-167-remove-unused-intake-surface-area-2
May 28, 2026
Merged

feat(studio): Move intake to span based model#79
BrianNewsom merged 4 commits into
mainfrom
brnewsom/fp-167-remove-unused-intake-surface-area-2

Conversation

@BrianNewsom
Copy link
Copy Markdown
Contributor

@BrianNewsom BrianNewsom commented May 27, 2026

This large review is primarily concerned with:

  • Removing references to deprecated intake concepts (entries, threads, etc.) that are being replaced by spans and traces. Deleting all the cruft that came along with this.
  • Updating Studio to show these new concepts. It was a non-goal to do a full redesign here (e.g. an actual tree-view, etc.) -- this was about showing the data somewhere for now. I just did some brief pairing with @rrhyne on this.
Screenshot 2026-05-27 at 2 49 40 PM Screenshot 2026-05-27 at 2 54 46 PM Screenshot 2026-05-27 at 2 45 46 PM

Summary by CodeRabbit

  • New Features

    • Redesigned Intake area centered on Traces and Spans with list and detail pages
    • Span detail and Trace detail views, including span annotations and a telemetry data view with filtering, pagination, and status badges
  • Refactor

    • Intake navigation and routes restructured from entry-oriented flows to traces/spans
    • Simplified job/status handling surfaced in the UI
  • Removed

    • Legacy entry/thread/export views and related entry-focused UI components

Review Change Stack

@BrianNewsom BrianNewsom requested review from a team as code owners May 27, 2026 20:56
Signed-off-by: Brian Newsom <brnewsom@nvidia.com>
@BrianNewsom BrianNewsom force-pushed the brnewsom/fp-167-remove-unused-intake-surface-area-2 branch from 0b64da6 to 919acc7 Compare May 27, 2026 20:57
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 27, 2026

Suite Lines Covered Line Rate Branch Rate
Unit Tests 18244/24191 75.4% 61.9%
Integration Tests 11667/22973 50.8% 25.9%

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: e862c854-ae7d-4e89-b30c-a8c345e4ecc5

📥 Commits

Reviewing files that changed from the base of the PR and between 7cd7c58 and ce6a344.

📒 Files selected for processing (10)
  • web/packages/common/src/utils/query.ts
  • web/packages/studio/src/components/IntakeAnnotationsPanel/index.spec.tsx
  • web/packages/studio/src/components/IntakeAnnotationsPanel/index.tsx
  • web/packages/studio/src/components/IntakeSpansTable/index.tsx
  • web/packages/studio/src/components/IntakeTelemetryDataView/index.tsx
  • web/packages/studio/src/components/IntakeTracesTable/index.tsx
  • web/packages/studio/src/mocks/handlers.ts
  • web/packages/studio/src/mocks/intake/telemetry.ts
  • web/packages/studio/src/routes/IntakeSpanDetailRoute/index.tsx
  • web/packages/studio/src/routes/IntakeTraceDetailRoute/index.tsx
🚧 Files skipped from review as they are similar to previous changes (9)
  • web/packages/common/src/utils/query.ts
  • web/packages/studio/src/components/IntakeAnnotationsPanel/index.spec.tsx
  • web/packages/studio/src/components/IntakeTelemetryDataView/index.tsx
  • web/packages/studio/src/components/IntakeSpansTable/index.tsx
  • web/packages/studio/src/components/IntakeAnnotationsPanel/index.tsx
  • web/packages/studio/src/routes/IntakeSpanDetailRoute/index.tsx
  • web/packages/studio/src/routes/IntakeTraceDetailRoute/index.tsx
  • web/packages/studio/src/mocks/intake/telemetry.ts
  • web/packages/studio/src/components/IntakeTracesTable/index.tsx

📝 Walkthrough

Walkthrough

Migrate intake from entries/threads/export-jobs to traces/spans telemetry: consolidate job status types, remove FlexibleMessage→OpenAI conversion, add span utilities, telemetry DataView and status badge, implement traces/spans tables and detail routes, annotations panel, update routes/helpers/navigation, and add MSW telemetry mocks.

Changes

Intake telemetry refactor

Layer / File(s) Summary
Schema & small constants
web/packages/common/src/constants/query.ts, web/packages/common/src/utils/chat.ts, web/packages/common/src/utils/query.ts, web/packages/studio/src/components/DatasetFileSelect/constants.ts, web/packages/studio/src/components/DatasetFileSelect/index.tsx, web/packages/studio/src/constants/routes.ts, web/packages/studio/src/components/dataViews/CustomModelsDataView/index.tsx
Consolidate job status to PlatformJobStatus, replace/remove aliased imports, remove FlexibleMessage→OpenAI conversion, relocate FeedbackAddToDatasetFileSource enum, add traceId/spanId route params, and update intake route helper imports.
Remove entry-based intake surface
web/packages/studio/src/components/IntakeEntriesTable/*, web/packages/studio/src/components/IntakeEntryConversation/*, web/packages/studio/src/components/IntakeEventsList/*, web/packages/studio/src/components/IntakeThreadPanel/*, web/packages/studio/src/components/form/AnnotationForm/*, web/packages/studio/src/components/modals/AnnotationModal/*, web/packages/studio/src/components/buttons/ExportEntriesButton/*, web/packages/studio/src/components/dataViews/ExportJobsDataView/*, web/packages/studio/src/components/sidePanels/ExportJobPanel/*, web/packages/studio/src/util/entries.ts, web/packages/studio/src/mocks/intake/entries.ts, web/packages/studio/src/mocks/intake/exportJobs.ts
Delete entry/thread/event components, annotation form/modal/export UI, many tests and stories, and entry utility functions and entry/export mock fixtures.
Span telemetry utilities
web/packages/studio/src/util/intakeTelemetry.ts, web/packages/studio/src/util/intakeTelemetry.spec.ts
Add span formatters (integers/cost/duration), display helpers (trace/span names, subject), evaluation-context detection/summary, stable ordering, and buildSpanHierarchyRows to produce hierarchical rows with orphan/cycle tagging; include unit tests.
IntakeTelemetryDataView & toolbar
web/packages/studio/src/components/IntakeTelemetryDataView/index.tsx
Generic DataView wrapper with toolbar supporting search, filter toggle (inline/portaled), bulk actions, optional two-line cell clamping, row-click wrapping, empty-state and pagination handling.
IntakeTelemetryStatusBadge
web/packages/studio/src/components/IntakeTelemetryStatusBadge/index.tsx, spec
Badge mapping SpanStatus → icon/color/label with tests.
IntakeTracesTable
web/packages/studio/src/components/IntakeTracesTable/index.tsx, spec
Traces table with linked trace IDs, duration, span/error counts, tokens, cost, started timestamp filtering, error/empty states, and workspace gating.
IntakeSpansTable
web/packages/studio/src/components/IntakeSpansTable/index.tsx, spec
Spans table supporting flat/hierarchy modes (via buildSpanHierarchyRows), status/kind filtering, span name with hierarchy spacer, subject, optional trace link, duration/tokens/cost columns, and empty/error states.
IntakeAnnotationsPanel
web/packages/studio/src/components/IntakeAnnotationsPanel/index.tsx, spec
Panel listing annotations for a span/session with feedback (thumb) creation, note creation, deletion, mutation-state handling, query invalidation, and loading/empty UI.
IntakeTraceDetailRoute
web/packages/studio/src/routes/IntakeTraceDetailRoute/index.tsx, spec
Trace detail page: fetch trace, breadcrumbs, Trace Summary (timestamps/duration/spans/errors/cost), embed IntakeSpansTable filtered by trace, optional Evaluation Context panel, and error/loading/404 handling.
IntakeSpanDetailRoute
web/packages/studio/src/routes/IntakeSpanDetailRoute/index.tsx
Span detail page: fetch span, render Span Summary (metadata, links, status, optional error), render input/output code snippets, Usage panel, and embed IntakeAnnotationsPanel; handle 404/loading/error states.
Route helpers, layout & navigation
web/packages/studio/src/routes/utils.ts, web/packages/studio/src/constants/routes.ts, web/packages/studio/src/routes/IntakeLayout/index.tsx, web/packages/studio/src/routes/index.tsx, web/packages/studio/src/routes/WorkspaceLayout/WorkspaceSideNav.tsx, web/packages/studio/src/routes/CustomizationJobListRoute/index.tsx, web/packages/studio/src/tests/title-change.spec.tsx, web/packages/studio/src/routes/index.spec.tsx
Replace entry/thread/export-job routes and helpers with traces/spans variants, add INTAKE_FILTER_ACTION_TARGET_ID for filter portal, set IntakeLayout tabs to Traces/Spans, update sidebar links and other route consumers, and update tests to include trace/span params.
Telemetry mocks & MSW handlers
web/packages/studio/src/mocks/intake/telemetry.ts, web/packages/studio/src/mocks/handlers.ts
Add mock traces/spans pages and lookup helpers; implement in-memory annotations with reset/create/delete and paginated listing; wire MSW handlers for traces, spans, and annotations (list/detail/create/delete) supporting filtering and pagination; remove entries/export-job mocks.
Misc: stories/tests/dep
various removed stories/tests and web/packages/studio/package.json
Remove stories/tests tied to removed components; update package.json dependency swap (remove unique-names-generator, add use-debounce).
  • Suggested reviewers:
    • asutermo
    • marcusds
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch brnewsom/fp-167-remove-unused-intake-surface-area-2

Signed-off-by: Brian Newsom <brnewsom@nvidia.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 6

🧹 Nitpick comments (10)
web/packages/common/src/utils/query.ts (3)

4-4: ⚡ Quick win

Use import type for PlatformJobStatus.

PlatformJobStatus is only used as a type (Line 10), so this should be type-only.

Proposed change
-import { PlatformJobStatus } from '`@nemo/sdk/generated/platform/schema`';
+import type { PlatformJobStatus } from '`@nemo/sdk/generated/platform/schema`';

As per coding guidelines, web/**/*.{ts,tsx}: Use import type for type-only imports in TypeScript.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/packages/common/src/utils/query.ts` at line 4, The import brings in
PlatformJobStatus as a runtime import but it is only used as a type; change the
import statement to a type-only import by replacing the current import with
"import type { PlatformJobStatus } from '`@nemo/sdk/generated/platform/schema`';"
so the symbol is erased at runtime and follows the project's type-only import
guideline (look for the existing PlatformJobStatus import at the top of the file
and the type usage around line where query functions reference
PlatformJobStatus).

10-10: ⚡ Quick win

Add an explicit return type to this exported function.

This is a public utility and should declare its return type explicitly.

Proposed change
-export const getJobRefetchInterval = (status?: PlatformJobStatus) => {
+export const getJobRefetchInterval = (status?: PlatformJobStatus): number | false => {

As per coding guidelines, web/**/*.{ts,tsx}: Use explicit return types for public APIs and complex functions in TypeScript.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/packages/common/src/utils/query.ts` at line 10, The exported function
getJobRefetchInterval currently lacks an explicit return type; update its
signature to include an explicit return type (for example number | undefined or
the precise union your implementation returns) by changing the declaration to:
export const getJobRefetchInterval = (status?: PlatformJobStatus):
<explicit-type> => { ... } so the public utility has a clear, annotated return
type.

8-8: ⚡ Quick win

Replace relative import with an absolute alias path.

Line 8 uses a relative import, which is disallowed in web/**.

Proposed change
-import { CJobTerminalStatuses } from '../constants/query';
+import { CJobTerminalStatuses } from '`@nemo/common/src/constants/query`';

As per coding guidelines, web/**/*.{ts,tsx,js,jsx}: Never use relative imports; always use absolute alias paths.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/packages/common/src/utils/query.ts` at line 8, The import of
CJobTerminalStatuses in query.ts uses a relative path ("../constants/query");
change it to the project's configured absolute alias import (e.g., import {
CJobTerminalStatuses } from '`@/constants/query`' or the project's equivalent
alias) so it conforms to the web/** no-relative-imports rule—verify the correct
alias in tsconfig/paths and replace the relative "../constants/query" reference
with that alias throughout.
web/packages/studio/src/components/IntakeTelemetryDataView/index.tsx (1)

27-35: ⚡ Quick win

Use import type for React type-only imports.

Move ComponentProps, ReactNode, and RefObject to import type to satisfy TS import rules.

As per coding guidelines, web/**/*.{ts,tsx}: Use import type for type-only imports in TypeScript.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/packages/studio/src/components/IntakeTelemetryDataView/index.tsx` around
lines 27 - 35, Update the React import to use type-only imports for
ComponentProps, ReactNode, and RefObject: change the import so those three
symbols are imported with "import type" (while keeping non-type imports like
useEffect, useMemo, useState and createPortal as regular imports); ensure
ComponentProps, ReactNode, and RefObject are no longer brought in as value
imports to satisfy TypeScript type-only import rules.
web/packages/studio/src/components/IntakeSpansTable/index.tsx (1)

35-35: ⚡ Quick win

Split React type-only imports into import type.

ComponentProps, FC, and ReactNode should be type imports.

As per coding guidelines, web/**/*.{ts,tsx}: Use import type for type-only imports in TypeScript.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/packages/studio/src/components/IntakeSpansTable/index.tsx` at line 35,
The import line currently brings in type-only symbols ComponentProps, FC, and
ReactNode using a value import; change it to use TypeScript's type-only imports
by replacing those with an `import type` specifier (e.g., `import type {
ComponentProps, FC, ReactNode } from 'react';`) while keeping any non-type
imports as regular imports if present; update the import at the top of
IntakeSpansTable (the line importing from 'react') to use `import type` for
these three symbols.
web/packages/studio/src/components/IntakeTracesTable/index.tsx (1)

24-24: ⚡ Quick win

Use import type for ComponentProps, FC, and ReactNode.

These are type-only symbols and should be imported with import type.

As per coding guidelines, web/**/*.{ts,tsx}: Use import type for type-only imports in TypeScript.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/packages/studio/src/components/IntakeTracesTable/index.tsx` at line 24,
The import line currently brings in type-only symbols as runtime imports; change
it to a type-only import by using "import type" for ComponentProps, FC, and
ReactNode so TypeScript emits no runtime require for them—update the import that
currently reads "import { ComponentProps, FC, type ReactNode } from 'react';" to
import those three as types (ComponentProps, FC, ReactNode) ensuring only type
imports are used.
web/packages/studio/src/routes/IntakeSpanDetailRoute/index.tsx (1)

41-91: ⚡ Quick win

Make spanId param handling null-safe and use type-only import for FC.

Line 91 uses an assertion that suppresses missing-param handling. Line 41 should use import type for FC. Use typed params plus an explicit !spanId guard before calling useGetSpan(...).

As per coding guidelines, "Use import type for type-only imports in TypeScript", "Implement strict null checks and handle undefined/null explicitly in TypeScript", and "Use type assertions sparingly; prefer type guards and narrowing in TypeScript".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/packages/studio/src/routes/IntakeSpanDetailRoute/index.tsx` around lines
41 - 91, The component uses a value-only import for FC and an unsafe assertion
when reading the spanId param; change "import { FC }" to "import type { FC }"
and replace the "useParams() as { [ROUTE_PARAMS.spanId]: string }" assertion
with a typed params interface (e.g. interface Params { [ROUTE_PARAMS.spanId]?:
string } and useParams<Params>()), then add an explicit guard in
IntakeSpanDetailRoute (e.g. if (!spanId) return early or render an error/loading
state) before calling useGetSpan or any span-related logic so spanId is
null-safe; update references to ROUTE_PARAMS.spanId, useParams,
IntakeSpanDetailRoute, and useGetSpan accordingly.
web/packages/studio/src/routes/IntakeTraceDetailRoute/index.tsx (1)

35-43: ⚡ Quick win

Replace asserted route params with null-safe typing.

Line 43 casts away undefined from useParams, which bypasses strict null checks; Line 35 should import FC as a type-only import. Use useParams<...>() with an explicit missing-param guard before useGetTrace(...), and switch to import type { FC } ....

As per coding guidelines, "Use import type for type-only imports in TypeScript", "Implement strict null checks and handle undefined/null explicitly in TypeScript", and "Use type assertions sparingly; prefer type guards and narrowing in TypeScript".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/packages/studio/src/routes/IntakeTraceDetailRoute/index.tsx` around lines
35 - 43, Replace the non-null assertion and regular FC import: change the import
to a type-only import (import type { FC } ...) and call useParams with a generic
(useParams<{ traceId?: string }>()), then add an explicit null/undefined guard
for the traceId inside IntakeTraceDetailRoute before calling hooks that require
it (e.g., before useGetTrace or any trace-dependent logic) — if traceId is
missing, handle it (early return, error UI, or redirect). Update references to
ROUTE_PARAMS.traceId to use the narrowed traceId variable after the guard so no
assertion is needed.
web/packages/studio/src/components/IntakeAnnotationsPanel/index.spec.tsx (1)

9-10: ⚡ Quick win

Rename file-level constants to SCREAMING_SNAKE_CASE.

Line 9 and Line 10 should use SPAN_ID / SESSION_ID to match the constants naming rule.

As per coding guidelines, web/**/*.{ts,tsx,js,jsx}: Use SCREAMING_SNAKE_CASE for constants and environment variables.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/packages/studio/src/components/IntakeAnnotationsPanel/index.spec.tsx`
around lines 9 - 10, Rename the file-level constants spanId and sessionId to
SCREAMING_SNAKE_CASE (SPAN_ID and SESSION_ID) throughout the test file so all
references (declarations and any usages) in
IntakeAnnotationsPanel/index.spec.tsx are updated accordingly; ensure you update
both the constant declarations and every place they are referenced in the file
(e.g., any test setup or assertions) so the code compiles and follows the
project's constants naming rule.
web/packages/studio/src/components/IntakeAnnotationsPanel/index.tsx (1)

33-33: ⚡ Quick win

Use import type for React type-only imports.

Line 33 should split runtime imports from type imports (ChangeEvent, FC, FormEvent).

Suggested change
-import { ChangeEvent, FC, FormEvent, useMemo, useState } from 'react';
+import { useMemo, useState } from 'react';
+import type { ChangeEvent, FC, FormEvent } from 'react';

As per coding guidelines, web/**/*.{ts,tsx}: Use import type for type-only imports in TypeScript.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/packages/studio/src/components/IntakeAnnotationsPanel/index.tsx` at line
33, Split the mixed React import so runtime hooks are imported normally and
type-only symbols use `import type`; specifically, keep useMemo and useState in
the regular import and move ChangeEvent, FC, and FormEvent into a separate
`import type { ChangeEvent, FC, FormEvent } from 'react'` statement to follow
the project's type-only import guideline.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@web/packages/studio/src/components/IntakeAnnotationsPanel/index.tsx`:
- Around line 102-179: The note form currently uses local state (noteText),
manual handlers (handleNoteChange, handleNoteSubmit) and trim/validation logic;
replace this with react-hook-form and a zod schema using zodResolver: create a
Zod schema (e.g., noteSchema) validating a nonempty trimmed "text" field,
initialize useForm({ resolver: zodResolver(noteSchema), defaultValues: { text:
'' } }), wire the form JSX to register("text") and use handleSubmit for
submission instead of handleNoteChange/handleNoteSubmit, and in the submit
handler call createAnnotation.mutateAsync with kind:
NoteAnnotationInputKind.note, text (already validated/trimmed), session_id and
span_id, clear the form via reset() and call refreshAnnotations(); remove
noteText state and related handlers and ensure mutationError is still set via
catch using getAnnotationErrorMessage.

In `@web/packages/studio/src/components/IntakeSpansTable/index.spec.tsx`:
- Around line 4-6: The import groups are out of order: put external libraries
before internal `@studio` imports. Reorder the top imports so userEvent (from
'`@testing-library/user-event`') and other external packages come first, followed
by internal imports like IntakeSpansTable, renderRoute, and screen (from
'`@studio/`*'), preserving relative imports last; update the import statements
referencing IntakeSpansTable, renderRoute, screen, and userEvent accordingly to
match the repo's "external, internal, relative" import grouping rule.

In `@web/packages/studio/src/components/IntakeTelemetryDataView/index.tsx`:
- Around line 228-229: The empty-state copy in IntakeTelemetryDataView still
uses “Entries”; update the fallback text to be telemetry-neutral by changing the
header and emptyMessage props (the JSX attributes header="No Entries Found" and
emptyMessage="No entries available.") to something like header="No Data Found"
and emptyMessage="No telemetry data available." so it no longer references the
deprecated entries model.
- Around line 76-107: The toolbar visibility logic currently sets rendersToolbar
= Boolean(searchField || slotEnd || rendersInlineToggle) and therefore omits the
toolbar (and its BulkActions) when only renderBulkActions is provided; update
the rendersToolbar computation to include renderBulkActions (e.g., include
renderBulkActions in the Boolean expression) so DataView.Toolbar is rendered
whenever renderBulkActions exists, ensuring slotBulkActions (the BulkActions
render) runs; adjust any related conditional (where DataView.Toolbar and
slotBulkActions are used) to rely on the new rendersToolbar value.

In `@web/packages/studio/src/mocks/handlers.ts`:
- Around line 547-553: The pagination inputs parsed from url.searchParams (page
and page_size) are only checked with Number.isNaN, allowing 0 or negative values
through; update the parsing logic used before calling mockAnnotationsPage to
coerce and clamp to positive integers: parse the values into numbers, ensure
they are integers and greater than zero (e.g., use Number.isInteger and > 0 or
Math.max(1, parsed) semantics), defaulting to 1 for page and 100 for pageSize
when invalid, and pass those validated/clamped values into mockAnnotationsPage
(referencing the page, pageSize variables and the url.searchParams.get calls).

In `@web/packages/studio/src/mocks/intake/telemetry.ts`:
- Around line 238-239: The current generation of annotation_id using
`annotation-${mockAnnotations.length + 1}` can produce duplicate IDs after
deletions; update the ID generation in the mock where `annotation_id` is
assigned (the object creation that references `mockAnnotations`) to use a stable
unique ID generator (e.g., UUID, nanoid, or a monotonic timestamp-based id)
instead of relying on `mockAnnotations.length`; ensure the new value replaces
the `annotation-${...}` expression everywhere mocks are created so deletes and
mutation tests no longer produce ambiguous or flaky IDs.

---

Nitpick comments:
In `@web/packages/common/src/utils/query.ts`:
- Line 4: The import brings in PlatformJobStatus as a runtime import but it is
only used as a type; change the import statement to a type-only import by
replacing the current import with "import type { PlatformJobStatus } from
'`@nemo/sdk/generated/platform/schema`';" so the symbol is erased at runtime and
follows the project's type-only import guideline (look for the existing
PlatformJobStatus import at the top of the file and the type usage around line
where query functions reference PlatformJobStatus).
- Line 10: The exported function getJobRefetchInterval currently lacks an
explicit return type; update its signature to include an explicit return type
(for example number | undefined or the precise union your implementation
returns) by changing the declaration to: export const getJobRefetchInterval =
(status?: PlatformJobStatus): <explicit-type> => { ... } so the public utility
has a clear, annotated return type.
- Line 8: The import of CJobTerminalStatuses in query.ts uses a relative path
("../constants/query"); change it to the project's configured absolute alias
import (e.g., import { CJobTerminalStatuses } from '`@/constants/query`' or the
project's equivalent alias) so it conforms to the web/** no-relative-imports
rule—verify the correct alias in tsconfig/paths and replace the relative
"../constants/query" reference with that alias throughout.

In `@web/packages/studio/src/components/IntakeAnnotationsPanel/index.spec.tsx`:
- Around line 9-10: Rename the file-level constants spanId and sessionId to
SCREAMING_SNAKE_CASE (SPAN_ID and SESSION_ID) throughout the test file so all
references (declarations and any usages) in
IntakeAnnotationsPanel/index.spec.tsx are updated accordingly; ensure you update
both the constant declarations and every place they are referenced in the file
(e.g., any test setup or assertions) so the code compiles and follows the
project's constants naming rule.

In `@web/packages/studio/src/components/IntakeAnnotationsPanel/index.tsx`:
- Line 33: Split the mixed React import so runtime hooks are imported normally
and type-only symbols use `import type`; specifically, keep useMemo and useState
in the regular import and move ChangeEvent, FC, and FormEvent into a separate
`import type { ChangeEvent, FC, FormEvent } from 'react'` statement to follow
the project's type-only import guideline.

In `@web/packages/studio/src/components/IntakeSpansTable/index.tsx`:
- Line 35: The import line currently brings in type-only symbols ComponentProps,
FC, and ReactNode using a value import; change it to use TypeScript's type-only
imports by replacing those with an `import type` specifier (e.g., `import type {
ComponentProps, FC, ReactNode } from 'react';`) while keeping any non-type
imports as regular imports if present; update the import at the top of
IntakeSpansTable (the line importing from 'react') to use `import type` for
these three symbols.

In `@web/packages/studio/src/components/IntakeTelemetryDataView/index.tsx`:
- Around line 27-35: Update the React import to use type-only imports for
ComponentProps, ReactNode, and RefObject: change the import so those three
symbols are imported with "import type" (while keeping non-type imports like
useEffect, useMemo, useState and createPortal as regular imports); ensure
ComponentProps, ReactNode, and RefObject are no longer brought in as value
imports to satisfy TypeScript type-only import rules.

In `@web/packages/studio/src/components/IntakeTracesTable/index.tsx`:
- Line 24: The import line currently brings in type-only symbols as runtime
imports; change it to a type-only import by using "import type" for
ComponentProps, FC, and ReactNode so TypeScript emits no runtime require for
them—update the import that currently reads "import { ComponentProps, FC, type
ReactNode } from 'react';" to import those three as types (ComponentProps, FC,
ReactNode) ensuring only type imports are used.

In `@web/packages/studio/src/routes/IntakeSpanDetailRoute/index.tsx`:
- Around line 41-91: The component uses a value-only import for FC and an unsafe
assertion when reading the spanId param; change "import { FC }" to "import type
{ FC }" and replace the "useParams() as { [ROUTE_PARAMS.spanId]: string }"
assertion with a typed params interface (e.g. interface Params {
[ROUTE_PARAMS.spanId]?: string } and useParams<Params>()), then add an explicit
guard in IntakeSpanDetailRoute (e.g. if (!spanId) return early or render an
error/loading state) before calling useGetSpan or any span-related logic so
spanId is null-safe; update references to ROUTE_PARAMS.spanId, useParams,
IntakeSpanDetailRoute, and useGetSpan accordingly.

In `@web/packages/studio/src/routes/IntakeTraceDetailRoute/index.tsx`:
- Around line 35-43: Replace the non-null assertion and regular FC import:
change the import to a type-only import (import type { FC } ...) and call
useParams with a generic (useParams<{ traceId?: string }>()), then add an
explicit null/undefined guard for the traceId inside IntakeTraceDetailRoute
before calling hooks that require it (e.g., before useGetTrace or any
trace-dependent logic) — if traceId is missing, handle it (early return, error
UI, or redirect). Update references to ROUTE_PARAMS.traceId to use the narrowed
traceId variable after the guard so no assertion is needed.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: b705aafc-964c-49b0-a799-e5664865b4eb

📥 Commits

Reviewing files that changed from the base of the PR and between ba0bbfc and 919acc7.

📒 Files selected for processing (114)
  • web/packages/common/src/constants/query.ts
  • web/packages/common/src/utils/chat.ts
  • web/packages/common/src/utils/query.ts
  • web/packages/studio/src/api/intake/constants.ts
  • web/packages/studio/src/api/intake/utils.ts
  • web/packages/studio/src/components/DatasetFileSelect/constants.ts
  • web/packages/studio/src/components/DatasetFileSelect/index.tsx
  • web/packages/studio/src/components/IntakeAnnotationPanel/index.tsx
  • web/packages/studio/src/components/IntakeAnnotationsPanel/index.spec.tsx
  • web/packages/studio/src/components/IntakeAnnotationsPanel/index.tsx
  • web/packages/studio/src/components/IntakeEntriesTable/EntryBulkDeleteModal.spec.tsx
  • web/packages/studio/src/components/IntakeEntriesTable/EntryBulkDeleteModal.tsx
  • web/packages/studio/src/components/IntakeEntriesTable/EntryBulkExportModal.spec.tsx
  • web/packages/studio/src/components/IntakeEntriesTable/EntryBulkExportModal.tsx
  • web/packages/studio/src/components/IntakeEntriesTable/EntryRatingCell.tsx
  • web/packages/studio/src/components/IntakeEntriesTable/EntryStatusCell.tsx
  • web/packages/studio/src/components/IntakeEntriesTable/EntryThumbCell.tsx
  • web/packages/studio/src/components/IntakeEntriesTable/IntakeEntriesTable.stories.tsx
  • web/packages/studio/src/components/IntakeEntriesTable/index.spec.tsx
  • web/packages/studio/src/components/IntakeEntriesTable/index.tsx
  • web/packages/studio/src/components/IntakeEntriesTable/utils.spec.ts
  • web/packages/studio/src/components/IntakeEntriesTable/utils.ts
  • web/packages/studio/src/components/IntakeEntryConversation/README.md
  • web/packages/studio/src/components/IntakeEntryConversation/components/Annotation.test.tsx
  • web/packages/studio/src/components/IntakeEntryConversation/components/Annotation.tsx
  • web/packages/studio/src/components/IntakeEntryConversation/components/AssistantResponse.test.tsx
  • web/packages/studio/src/components/IntakeEntryConversation/components/AssistantResponse.tsx
  • web/packages/studio/src/components/IntakeEntryConversation/components/ChatView.tsx
  • web/packages/studio/src/components/IntakeEntryConversation/components/JSONView.tsx
  • web/packages/studio/src/components/IntakeEntryConversation/components/LastUserMessage.tsx
  • web/packages/studio/src/components/IntakeEntryConversation/components/SystemPrompt.test.tsx
  • web/packages/studio/src/components/IntakeEntryConversation/components/SystemPrompt.tsx
  • web/packages/studio/src/components/IntakeEntryConversation/components/ThumbStatus.test.tsx
  • web/packages/studio/src/components/IntakeEntryConversation/components/ThumbStatus.tsx
  • web/packages/studio/src/components/IntakeEntryConversation/index.spec.tsx
  • web/packages/studio/src/components/IntakeEntryConversation/index.tsx
  • web/packages/studio/src/components/IntakeEventsList/README.md
  • web/packages/studio/src/components/IntakeEventsList/components/EventListItem.test.tsx
  • web/packages/studio/src/components/IntakeEventsList/components/EventListItem.tsx
  • web/packages/studio/src/components/IntakeEventsList/components/EventListItemLayout.test.tsx
  • web/packages/studio/src/components/IntakeEventsList/components/EventListItemLayout.tsx
  • web/packages/studio/src/components/IntakeEventsList/components/ReviewerAnnotationEvent.test.tsx
  • web/packages/studio/src/components/IntakeEventsList/components/ReviewerAnnotationEvent.tsx
  • web/packages/studio/src/components/IntakeEventsList/components/ThumbTag.test.tsx
  • web/packages/studio/src/components/IntakeEventsList/components/ThumbTag.tsx
  • web/packages/studio/src/components/IntakeEventsList/components/UserActionEvent.test.tsx
  • web/packages/studio/src/components/IntakeEventsList/components/UserActionEvent.tsx
  • web/packages/studio/src/components/IntakeEventsList/components/UserFeedbackEvent.test.tsx
  • web/packages/studio/src/components/IntakeEventsList/components/UserFeedbackEvent.tsx
  • web/packages/studio/src/components/IntakeEventsList/index.tsx
  • web/packages/studio/src/components/IntakeSpansTable/index.spec.tsx
  • web/packages/studio/src/components/IntakeSpansTable/index.tsx
  • web/packages/studio/src/components/IntakeTelemetryDataView/index.tsx
  • web/packages/studio/src/components/IntakeTelemetryStatusBadge/index.spec.tsx
  • web/packages/studio/src/components/IntakeTelemetryStatusBadge/index.tsx
  • web/packages/studio/src/components/IntakeThreadPanel/components/AssistantMessageBubble.tsx
  • web/packages/studio/src/components/IntakeThreadPanel/components/SystemMessageBubble.tsx
  • web/packages/studio/src/components/IntakeThreadPanel/components/ThreadConversation.tsx
  • web/packages/studio/src/components/IntakeThreadPanel/components/ToolResponseBubble.tsx
  • web/packages/studio/src/components/IntakeThreadPanel/components/UserMessageBubble.tsx
  • web/packages/studio/src/components/IntakeThreadPanel/index.tsx
  • web/packages/studio/src/components/IntakeThreadsTable/IntakeThreadsTable.stories.tsx
  • web/packages/studio/src/components/IntakeThreadsTable/index.tsx
  • web/packages/studio/src/components/IntakeTracesTable/index.spec.tsx
  • web/packages/studio/src/components/IntakeTracesTable/index.tsx
  • web/packages/studio/src/components/buttons/ExportEntriesButton/index.spec.tsx
  • web/packages/studio/src/components/buttons/ExportEntriesButton/index.tsx
  • web/packages/studio/src/components/charts/FeedbackRatingPieChart/constants.ts
  • web/packages/studio/src/components/charts/FeedbackRatingPieChart/index.tsx
  • web/packages/studio/src/components/charts/FeedbackSentimentLineChart/index.tsx
  • web/packages/studio/src/components/charts/FeedbackSentimentLineChart/utils.spec.ts
  • web/packages/studio/src/components/charts/FeedbackSentimentLineChart/utils.ts
  • web/packages/studio/src/components/dataViews/CustomModelsDataView/index.tsx
  • web/packages/studio/src/components/dataViews/ExportJobsDataView/ExportJobsDataView.stories.tsx
  • web/packages/studio/src/components/dataViews/ExportJobsDataView/index.spec.tsx
  • web/packages/studio/src/components/dataViews/ExportJobsDataView/index.tsx
  • web/packages/studio/src/components/form/AnnotationForm/AnnotationErrorMessage.tsx
  • web/packages/studio/src/components/form/AnnotationForm/constants.ts
  • web/packages/studio/src/components/form/AnnotationForm/index.tsx
  • web/packages/studio/src/components/form/AnnotationForm/useCreateReviewerAnnotation.tsx
  • web/packages/studio/src/components/form/AnnotationForm/utils.spec.ts
  • web/packages/studio/src/components/form/AnnotationForm/utils.ts
  • web/packages/studio/src/components/form/NewExportJobForm/constants.tsx
  • web/packages/studio/src/components/form/NewExportJobForm/index.spec.tsx
  • web/packages/studio/src/components/form/NewExportJobForm/index.tsx
  • web/packages/studio/src/components/modals/AnnotationModal/index.tsx
  • web/packages/studio/src/components/sidePanels/ExportJobPanel/index.tsx
  • web/packages/studio/src/constants/intakeJobs.ts
  • web/packages/studio/src/constants/routes.ts
  • web/packages/studio/src/mocks/handlers.ts
  • web/packages/studio/src/mocks/intake/entries.ts
  • web/packages/studio/src/mocks/intake/exportJobs.ts
  • web/packages/studio/src/mocks/intake/telemetry.ts
  • web/packages/studio/src/routes/CustomizationJobListRoute/index.tsx
  • web/packages/studio/src/routes/IntakeEntriesRoute/index.tsx
  • web/packages/studio/src/routes/IntakeEntryEventsRoute/index.tsx
  • web/packages/studio/src/routes/IntakeEntryLayout/index.tsx
  • web/packages/studio/src/routes/IntakeEntryMessagesRoute/index.tsx
  • web/packages/studio/src/routes/IntakeEntryMetadataRoute/index.tsx
  • web/packages/studio/src/routes/IntakeExportJobsRoute/index.tsx
  • web/packages/studio/src/routes/IntakeLayout/index.tsx
  • web/packages/studio/src/routes/IntakeSpanDetailRoute/index.tsx
  • web/packages/studio/src/routes/IntakeThreadsRoute/index.tsx
  • web/packages/studio/src/routes/IntakeTraceDetailRoute/index.spec.tsx
  • web/packages/studio/src/routes/IntakeTraceDetailRoute/index.tsx
  • web/packages/studio/src/routes/WorkspaceLayout/WorkspaceSideNav.tsx
  • web/packages/studio/src/routes/index.spec.tsx
  • web/packages/studio/src/routes/index.tsx
  • web/packages/studio/src/routes/utils.ts
  • web/packages/studio/src/tests/title-change.spec.tsx
  • web/packages/studio/src/util/entries.spec.ts
  • web/packages/studio/src/util/entries.ts
  • web/packages/studio/src/util/intakeTelemetry.spec.ts
  • web/packages/studio/src/util/intakeTelemetry.ts
💤 Files with no reviewable changes (85)
  • web/packages/studio/src/components/IntakeAnnotationPanel/index.tsx
  • web/packages/studio/src/components/IntakeEntryConversation/components/Annotation.tsx
  • web/packages/studio/src/components/IntakeEntryConversation/components/JSONView.tsx
  • web/packages/studio/src/components/form/AnnotationForm/useCreateReviewerAnnotation.tsx
  • web/packages/studio/src/constants/intakeJobs.ts
  • web/packages/studio/src/api/intake/constants.ts
  • web/packages/studio/src/components/IntakeThreadPanel/components/UserMessageBubble.tsx
  • web/packages/studio/src/components/IntakeEventsList/components/UserFeedbackEvent.test.tsx
  • web/packages/studio/src/components/IntakeEntriesTable/IntakeEntriesTable.stories.tsx
  • web/packages/studio/src/mocks/intake/entries.ts
  • web/packages/studio/src/components/IntakeEventsList/components/ReviewerAnnotationEvent.test.tsx
  • web/packages/studio/src/components/IntakeEntriesTable/utils.spec.ts
  • web/packages/studio/src/components/IntakeEntriesTable/EntryBulkDeleteModal.spec.tsx
  • web/packages/studio/src/components/IntakeEntriesTable/index.spec.tsx
  • web/packages/studio/src/components/IntakeThreadPanel/components/AssistantMessageBubble.tsx
  • web/packages/studio/src/mocks/intake/exportJobs.ts
  • web/packages/studio/src/components/IntakeEventsList/components/UserActionEvent.tsx
  • web/packages/studio/src/components/IntakeEventsList/components/ReviewerAnnotationEvent.tsx
  • web/packages/studio/src/components/IntakeEventsList/components/EventListItemLayout.test.tsx
  • web/packages/studio/src/components/charts/FeedbackSentimentLineChart/utils.spec.ts
  • web/packages/studio/src/components/IntakeEventsList/index.tsx
  • web/packages/studio/src/components/IntakeEntryConversation/components/AssistantResponse.test.tsx
  • web/packages/studio/src/components/charts/FeedbackRatingPieChart/constants.ts
  • web/packages/studio/src/components/charts/FeedbackSentimentLineChart/index.tsx
  • web/packages/studio/src/components/form/AnnotationForm/AnnotationErrorMessage.tsx
  • web/packages/studio/src/components/IntakeEntryConversation/components/Annotation.test.tsx
  • web/packages/studio/src/components/IntakeEntriesTable/index.tsx
  • web/packages/studio/src/components/dataViews/ExportJobsDataView/index.spec.tsx
  • web/packages/studio/src/components/charts/FeedbackRatingPieChart/index.tsx
  • web/packages/studio/src/components/IntakeEntryConversation/components/AssistantResponse.tsx
  • web/packages/studio/src/components/IntakeEntryConversation/components/LastUserMessage.tsx
  • web/packages/studio/src/routes/IntakeThreadsRoute/index.tsx
  • web/packages/studio/src/routes/IntakeEntryLayout/index.tsx
  • web/packages/studio/src/components/IntakeEventsList/components/UserFeedbackEvent.tsx
  • web/packages/studio/src/components/dataViews/ExportJobsDataView/ExportJobsDataView.stories.tsx
  • web/packages/studio/src/routes/IntakeEntryEventsRoute/index.tsx
  • web/packages/studio/src/components/form/NewExportJobForm/index.tsx
  • web/packages/studio/src/components/IntakeEntryConversation/index.spec.tsx
  • web/packages/studio/src/components/IntakeEntryConversation/components/SystemPrompt.test.tsx
  • web/packages/studio/src/routes/IntakeExportJobsRoute/index.tsx
  • web/packages/studio/src/components/IntakeThreadPanel/components/ThreadConversation.tsx
  • web/packages/studio/src/components/IntakeEventsList/components/EventListItemLayout.tsx
  • web/packages/studio/src/components/form/AnnotationForm/utils.spec.ts
  • web/packages/studio/src/components/IntakeEventsList/components/UserActionEvent.test.tsx
  • web/packages/studio/src/components/IntakeEventsList/components/ThumbTag.test.tsx
  • web/packages/studio/src/components/IntakeEntriesTable/EntryBulkExportModal.tsx
  • web/packages/studio/src/components/charts/FeedbackSentimentLineChart/utils.ts
  • web/packages/studio/src/components/IntakeThreadsTable/IntakeThreadsTable.stories.tsx
  • web/packages/studio/src/components/dataViews/ExportJobsDataView/index.tsx
  • web/packages/studio/src/components/IntakeEventsList/components/ThumbTag.tsx
  • web/packages/studio/src/routes/IntakeEntriesRoute/index.tsx
  • web/packages/studio/src/components/IntakeEntryConversation/components/ThumbStatus.test.tsx
  • web/packages/studio/src/components/buttons/ExportEntriesButton/index.spec.tsx
  • web/packages/studio/src/components/form/AnnotationForm/index.tsx
  • web/packages/studio/src/components/IntakeThreadPanel/components/ToolResponseBubble.tsx
  • web/packages/studio/src/components/IntakeEventsList/README.md
  • web/packages/studio/src/components/IntakeEntryConversation/components/ChatView.tsx
  • web/packages/studio/src/routes/IntakeEntryMessagesRoute/index.tsx
  • web/packages/studio/src/components/IntakeThreadsTable/index.tsx
  • web/packages/studio/src/api/intake/utils.ts
  • web/packages/studio/src/routes/IntakeEntryMetadataRoute/index.tsx
  • web/packages/studio/src/components/form/AnnotationForm/utils.ts
  • web/packages/studio/src/components/IntakeEntryConversation/components/ThumbStatus.tsx
  • web/packages/studio/src/components/form/AnnotationForm/constants.ts
  • web/packages/studio/src/components/IntakeEntryConversation/README.md
  • web/packages/studio/src/components/IntakeEntryConversation/index.tsx
  • web/packages/studio/src/components/IntakeEventsList/components/EventListItem.tsx
  • web/packages/studio/src/components/IntakeEventsList/components/EventListItem.test.tsx
  • web/packages/studio/src/components/modals/AnnotationModal/index.tsx
  • web/packages/studio/src/components/IntakeEntriesTable/EntryThumbCell.tsx
  • web/packages/studio/src/components/buttons/ExportEntriesButton/index.tsx
  • web/packages/studio/src/components/form/NewExportJobForm/constants.tsx
  • web/packages/studio/src/components/IntakeEntryConversation/components/SystemPrompt.tsx
  • web/packages/studio/src/util/entries.ts
  • web/packages/studio/src/components/IntakeEntriesTable/EntryRatingCell.tsx
  • web/packages/studio/src/components/IntakeEntriesTable/EntryBulkExportModal.spec.tsx
  • web/packages/studio/src/components/IntakeEntriesTable/EntryStatusCell.tsx
  • web/packages/studio/src/components/form/NewExportJobForm/index.spec.tsx
  • web/packages/studio/src/components/IntakeEntriesTable/EntryBulkDeleteModal.tsx
  • web/packages/studio/src/components/IntakeEntriesTable/utils.ts
  • web/packages/studio/src/components/sidePanels/ExportJobPanel/index.tsx
  • web/packages/studio/src/components/IntakeThreadPanel/components/SystemMessageBubble.tsx
  • web/packages/studio/src/components/IntakeThreadPanel/index.tsx
  • web/packages/studio/src/util/entries.spec.ts
  • web/packages/common/src/utils/chat.ts

Comment thread web/packages/studio/src/components/IntakeAnnotationsPanel/index.tsx Outdated
Comment thread web/packages/studio/src/components/IntakeSpansTable/index.spec.tsx
Comment thread web/packages/studio/src/components/IntakeTelemetryDataView/index.tsx Outdated
Comment thread web/packages/studio/src/components/IntakeTelemetryDataView/index.tsx Outdated
Comment thread web/packages/studio/src/mocks/handlers.ts Outdated
Comment thread web/packages/studio/src/mocks/intake/telemetry.ts Outdated
Signed-off-by: Brian Newsom <brnewsom@nvidia.com>
Copy link
Copy Markdown
Contributor

@shanaiabuggy shanaiabuggy left a comment

Choose a reason for hiding this comment

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

🚀

…-area-2

Signed-off-by: Brian Newsom <brnewsom@nvidia.com>

# Conflicts:
#	web/packages/studio/src/api/intake/utils.ts
@BrianNewsom BrianNewsom enabled auto-merge May 28, 2026 17:14
@BrianNewsom BrianNewsom added this pull request to the merge queue May 28, 2026
Merged via the queue into main with commit de31578 May 28, 2026
30 checks passed
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.

3 participants