Skip to content

[feat] Agent-first sidebar for new signups, Playground as app default #5478

Open
ashrafchowdury wants to merge 19 commits into
release/v0.106.0from
feat/simplify-platform-for-first-signup-users
Open

[feat] Agent-first sidebar for new signups, Playground as app default #5478
ashrafchowdury wants to merge 19 commits into
release/v0.106.0from
feat/simplify-platform-for-first-signup-users

Conversation

@ashrafchowdury

@ashrafchowdury ashrafchowdury commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Context

New signups land on the full platform sidebar — Prompts, the Evaluation group,
Overview, Registry, Evaluations — which is noise when their only goal is building an
agent. Two changes narrow that first experience: new signups get an agent-first
sidebar, and opening any workflow now lands on its Playground instead of the Overview
page (which is one of the pages the simplified sidebar hides).

This is Phase 1 of the plan in docs/design/simplify-nav-new-users/. The Settings →
Account toggle to switch back to the full view (Phase 2) is not in this PR.

Changes

Agent-first sidebar for new signups

The sidebar now hides the advanced areas for users who signed up under this experience:
Prompts and the Evaluation group at the project level; Overview, Registry, and
Evaluations inside an app. Home, Agents, Observability, and the app Playground always
stay.

New durable per-user key navSimplifiedDefaultAtom
(agenta:onboarding:<userId>:nav-simplified, default false), written only at signup
alongside setIsNewUser(true) in usePostAuthRedirect. The sidebar reads a single
derived atom advancedNavHiddenAtom; the five entries gained an isHidden flag driven
by it (app-scope entries OR it onto their existing condition, so nothing that was hidden
before becomes visible).

It deliberately does not reuse isNewUserAtom. That flag is sticky-true for everyone
who ever signed up, so deriving from it would strip advanced nav from existing users.
The fresh key defaults to false, so existing users are unaffected and keep the full
nav.

advancedNavHiddenAtom is the stable seam for Phase 2: it becomes
override ?? navSimplifiedDefault without any consumer changing.

Workflows open in the Playground

Opening an agent or prompt now lands on its Playground, not Overview. This applies
everywhere a workflow is entered: the /apps/[app_id]/ redirect, the sidebar child
links, row clicks on the Agents and Prompts pages, and the app-switch fallback.

Before: apps redirected to /overview, and only evaluators went to /playground.
After: every workflow kind defaults to /playground.

Tests / notes

  • tsc and ESLint pass clean on OSS and EE.
  • No automated sidebar test: @agenta/oss has no CI-wired vitest runner, so a test in
    oss/src would never run. Covered by tsc + ESLint + manual QA. Standing up an oss
    vitest harness is a possible follow-up.
  • Stacked on ts-chore/fix-tsc-issues (PR [chore] Zero out web tsc errors and fail builds on type regressions #5464). Set this PR's base to that branch
    so the diff shows only the feature, not the TypeScript cleanup underneath it.
  • Includes the design workspace under docs/design/simplify-nav-new-users/ (planning
    docs only).

What to QA

  • Sign up a brand-new account. The sidebar shows Home, Agents, Observability at the
    project level and only Playground + Observability inside an app. No empty
    "Evaluation" section header remains.
  • Open an existing account (or flip agenta:onboarding:<userId>:nav-simplified to
    false in localStorage and reload). The full sidebar returns, all pages present.
  • From the Agents or Prompts table, click a row. It opens the Playground, not Overview.
  • Visit /apps/<app_id>/ directly. It redirects to /apps/<app_id>/playground.
  • Regression: open an evaluator workflow. It still lands on the Playground as before.

This is part 2 of 2 in a stack made with GitButler:

ardaerzin and others added 17 commits July 22, 2026 03:13
The playwright suites are owned and type-checked by the tests workspace,
which holds the @playwright/test dependency; tests/manual scripts import
state modules that no longer exist.
- Restore Parameter, CorrectAnswer and _EvaluationScenario to lib/Types.ts
  (removed by cleanup while consumers remained)
- Re-export MetricColumnDefinition from the EvalRunDetails table barrel
- TooltipButtonProps was renamed EnhancedButtonProps; statusMap moved to
  @agenta/entity-ui/variant
- Synthesize full Parameter objects in UseApiContent
- useRunMetricData: type selection as the unwrapped value, not the atom
- Webhook builders: narrow WebhookFormValues union before field access
- filtersAtom: accept updater functions in the write signature
- Organization settings: drop stale react-query v4 useErrorBoundary and
  migrate setQueriesData to the v5 filters shape
- evaluations/utils: surface variantId from invocation metadata
- PreviewTableRow: add index signature required by InfiniteTableRowBase
Mirrors the vetted WP-4e-2a in-place fixes from fe-chore/move-evals-to-packages
(adapted to OSS import paths) plus new fixes for the component layer:

- restore PreviewTestCase to lib/Types; re-export MetricProcessor/MetricScope
- add "input" to EvaluationColumnKind (backend mapping emits it) and type the
  visibility-label column extension in buildPreviewColumns
- recharts v3 API drift in EvaluatorMetricsChart (TooltipContentProps, tuple
  radius, MetricStripEntry contextual typing)
- widen evaluationType to EvaluationRunKind; type query atoms as nullable
- latent runtime bugs typed as-is per WP-4e-2a convention (applyAggregatesToRaw,
  metricProcessor ReferenceErrors, dead metric-group branches) - flagged, not fixed
…ant id

- createPaginatedEntityStore: refreshAtom/actions.refresh accept an optional
  value or updater (bare set() still bumps the counter) - clears the
  'Expected 0 arguments' cluster across testset modals and other consumers
- EnvironmentStatus: variant.id optional; the component already guards it
…ing layers; oss tsc 347->105

Parallel per-area pass, behavior-preserving throughout (latent runtime bugs are
typed as-is with NOTE comments per the WP-4e-2a convention, not silently fixed):

- TraceSpanNode OSS<->entities dual-type: aligned at every crossing with
  documented boundary casts (16 errors -> 0); annotations field added to the
  OSS node (drawer stores attach it at runtime)
- SharedDrawers: broken SessionDrawerButton imports repaired, JSON-schema
  access typed, null-safety in SelectEvaluators/AnnotateDrawer, drawer
  payload/ref/label types aligned with runtime
- observability: extended-column types for custom antd props, TraceRow/
  SessionRow InfiniteTableRowBase conformance, traceTabsAtom updater support,
  ag-attributes selector typing at the producer
- playground/url-state: removed drifted local duplicates of package types,
  eagerAtom->atom where deps are sync, modal/store prop alignment
- onboarding/testsets/org: updater-widened widget UI atom, tour placement
  vocabulary fix, OnboardingLoader next/dynamic compat, org provider API
  types matched to the backend wire shape (settings/flags dicts)
- EvalRunDetails remainder: WP-4e-2a-vetted atom fixes adapted, recharts v3
  formatter/content signatures, stale import paths repointed

Flagged for triage (typed as-is): AddToTestsetDrawer trace draft discard/
update call missing molecule actions; orphaned SessionDrawerButton
…atterns; oss tsc 105->82

- InfiniteVirtualTable: canonical ExtendedColumnType exported from the barrel
  (three local extended-column copies repointed as aliases); pure read fn for
  columnHiddenKeys (write path reconciles versions); memo generic preservation;
  onRow/getRowProps/rowSelection.fixed aligned with antd 6
- antd v6 PopoverStylesType 'body' drops typed as-is (2 sites, existing pattern)
- React 19: JSX.Element -> ReactElement in RequireWorkflowKind
- AgentaNodeDTO: trace_id/span_id added (backend SpanDTO sends them)
- Org.default_workspace: list endpoint strips it - both lookups are latent
  dead code, typed as-is with comments
- FiltersPreview: operatorLabel is a display string, not the operator union
…windowing export

- DrillInUIContext: EditorProvider/SharedEditor slots typed with the real
  component prop types instead of a hand-written subset (root cause of the
  OSS provider assignment errors)
- InfiniteVirtualTable: rowSelection.fixed accepts antd FixedType; locale
  accepted (not yet forwarded - flagged); Editor barrel exports CodeLanguage
- workflow barrel exports WorkflowRevisionWindowing
Wave-2 parallel pass over the final ~105 OSS + 11 EE-only errors, behavior-
preserving throughout (latent bugs typed as-is with NOTE comments per the
WP-4e-2a convention):

- Evaluators/Evaluations: generic evaluator filtering, chart datum typing
- pages/evaluations: NewEvaluation modal props retyped to entities-package
  shapes (stale legacy Types imports dropped); antd 6 tabPlacement vocabulary
- Testcases/Testsets/Deployments: canonical ExtendedColumnType adoption,
  dataset-store variance via Pick<...,'hooks'>
- DrillInView/EditorViews: TMode narrowing via consts, Format|CodeLanguage
  state union, html format menu typing
- app-shell misc: services/state/pages sweep with backend-verified API types
- EE Billing + misc EE-only files

Latent bugs surfaced and typed as-is (chips filed where actionable):
workspace rename sends invalid org PATCH body; SessionInspector reads
status.code the backend never sends; axios.isCancel dead on created
instance; invite accept can interpolate undefined ids
Both apps are at zero tsc errors; flip ignoreBuildErrors to false so
next build guards the baseline. Verified: full oss and ee builds pass
with the gate on.
2 phase:
1. is hide the page
2. add a switch toggle on settings profile tab to get back the llm apps view - this is for people who is older user and invitated there team member to work on
… durable per-user nav default to control the simplified,

-focused sidebar for new signups without impacting existing users.

- export navSimplDefaultAtom from onboarding index- read and set navSimplifiedDefaultAtom in post-auth redirect hook so signup flow seeds the simplified-nav default when creating new users- add advancedNavHiddenAtom selector that derives from the new durable navSimplifiedAtom (separating signup-era default from transient isOnboarding/isUser state)
- update design docs to explain the new atom, the rationale (do not reuse sticky isNewUserAtom) and the1/Phase2 migration seamThis prevents existing users from losing advanced navigation due to thesticky isNewUser flag while allowing newups to get a simplifiedsidebar by default.
@vercel

vercel Bot commented Jul 24, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
agenta-documentation Ready Ready Preview, Comment Jul 24, 2026 12:47pm

Request Review

@dosubot dosubot Bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Jul 24, 2026
@dosubot dosubot Bot added enhancement New feature or request Frontend labels Jul 24, 2026
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 93f176e1-21fc-454c-a5ca-9973b4a51155

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/simplify-platform-for-first-signup-users

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.

…p import

antd v6 renamed es/button/button.d.ts to es/button/Button.d.ts. macOS's
case-insensitive filesystem still resolves the old lowercase specifier, so
local `tsc --noEmit` reported 0 errors while the Linux Docker build failed
with "Cannot find module 'antd/es/button/button'".

Switch to the publicly exported ButtonProps from the antd root. ButtonProps
extends BaseButtonProps, so ButtonProps["type"] and ["size"] are the same
types — no behavior change.

Audited all 6073 resolvable imports across web/{oss,ee,packages} for
case-sensitivity mismatches; this was the only one.
@ashrafchowdury

Copy link
Copy Markdown
Contributor Author

this is phase 1

in phase 2, I suggested having a switch toggle in the settings > profile to go back to the older view to see all the options in the sidebar. This is for older users who would be invited to collaborate with new team members, but they are going to see the new view, so they turn the old view back on

@ashrafchowdury
ashrafchowdury changed the base branch from ts-chore/fix-tsc-issues to release/v0.106.0 July 24, 2026 14:25
@ashrafchowdury
ashrafchowdury marked this pull request as ready for review July 24, 2026 14:55
@ashrafchowdury

Copy link
Copy Markdown
Contributor Author
image image

@github-actions

Copy link
Copy Markdown
Contributor

Railway Preview Environment

Preview URL https://gateway-production-25fd.up.railway.app/w
Project agenta-oss-pr-5478
Image tag pr-5478-08e23b7
Status Deployed
Railway logs Open logs
Workflow logs View workflow run
Updated at 2026-07-24T15:06:52.658Z

@mmabrouk mmabrouk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @ashrafchowdury for the pr howver it is right now unreviewable. Not sure which parent branch you used but the diff is huge. Also, let's have part 2 at the same time, otherwise it is very hard to test

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Note

Due to the large number of review comments, Critical severity comments were prioritized as inline comments.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (4)
web/oss/src/components/EvaluationRunsTablePOC/components/filters/EvaluationRunsHeaderFilters.tsx (1)

454-468: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Move the ignored body styles to content.

antd Popover styles.body is not a supported slot for styling the popover panel, so the panel maxWidth, transparent background, shadow, and border are ignored. Move those declarations to content and remove the as PopoverProps["styles"] cast.

web/oss/src/services/organization/api/index.ts (1)

191-200: 📐 Maintainability & Code Quality | 🟠 Major | 🏗️ Heavy lift

Use the Organization Fern accessor for this request.

This changed API call still uses raw Axios. Move it behind a per-resource accessor (adding one in web/packages/agenta-sdk/src/resources.ts if needed) so organization requests use the shared client contract. As per coding guidelines, “Frontend API code must use per-resource Fern client accessors … never raw axios.”

Source: Coding guidelines

web/oss/src/state/newObservability/helpers/index.ts (1)

4-9: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Make numeric coercion field-aware and finite.

coerceNumericValue is called on observability filters via valueCodec.ts, and it recursively converts every string value it encounters. That can turn identifier strings such as "00123", "1e17", and "0x10" into different numbers, and non-finite inputs like "Infinity" into null. Keep string identifiers/labels unchanged and restrict numeric coercion to fields that are explicitly numeric.

web/oss/src/lib/hooks/usePreviewEvaluations/index.ts (1)

379-390: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Normalize the testset shape before creating scenarios.

CreateEvaluationRunInput["testset"] is Testset, whose contract does not guarantee data; only the revision branch populates it. The cast at Lines 422-426 merely suppresses TypeScript and non-revision inputs can dereference testset.data as undefined, causing the run to be created without scenarios. Define a hydrated testset contract and populate it on every path, then use the same normalized testcase IDs for step creation.

Also applies to: 420-427, 450-472

🟠 Major comments (21)
web/oss/src/lib/Types.ts-71-81 (1)

71-81: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Model legacy testcase payloads as a real union.

The comment says legacy testcases carry inputs instead of data, but data is required. PreviewTestCase therefore cannot represent the documented legacy payload, and consumers may read data when it is absent at runtime. Make the two shapes explicit or normalize the payload before exposing this type.

web/oss/src/components/Sidebar/components/ListOfProjects.tsx-79-83 (1)

79-83: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Fix the organization-to-project fallback contract.

projectsByOrganization drops any project missing both proj.organization_id and a matching default_workspace from the org list, so unowned projects disappear from the sidebar. Ensure /api/projects returns organization_id, or derive the workspace→org mapping from an endpoint that actually returns it instead of casting org list rows to OrgDetails.

web/oss/src/components/SharedDrawers/AnnotateDrawer/assets/types.d.ts-23-24 (1)

23-24: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Align the optional trace-ID contract with the annotation save path.

The drawer now permits missing IDs, but the save path asserts they are required. Missing IDs can yield an empty payload while reporting success; partial IDs can produce invalid links.

  • web/oss/src/components/SharedDrawers/AnnotateDrawer/assets/types.d.ts#L23-L24: require IDs for this flow or explicitly model missing-link behavior.
  • web/oss/src/components/SharedDrawers/AnnotateDrawer/assets/AnnotateDrawerTitle/index.tsx#L131-L131: remove the unsound cast and validate or handle absent IDs before saving.
web/oss/src/components/pages/observability/components/ObservabilityHeader/index.tsx-359-367 (1)

359-367: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Filter invalid stale selections before populating the testset drawer.

TestsetTraceData requires a string key and non-null data, but node?.key can be undefined and getAgData(node ?? undefined) can return null. The cast only hides the mismatch, allowing invalid drawer rows. Skip unresolved nodes/data before calling setTestsetDrawerData.

web/oss/src/hooks/usePostAuthRedirect.ts-139-143 (1)

139-143: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Do not write the navigation flag through a stale active-user ID.

If both identity lookups fail, Line [118] leaves the previous onboardingStorageUserIdAtom value untouched. The new setters at Lines [142] and [154] can then persist true under that previous user’s nav-simplified key, while the new user remains unsimplified. Gate user-scoped writes on a verified sessionUserId and clear or fail on stale identity state.

Also applies to: 151-155

docs/design/simplify-nav-new-users/plan.md-143-153 (1)

143-153: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Scope the Phase 2 override per user.

"agenta:nav:simplified-override" is a browser-wide key, but the plan promises per-user behavior. One user’s choice will apply to the next account in the same browser. Reuse the existing user-scoped storage family or include the user ID in the atom key.

docs/design/simplify-nav-new-users/plan.md-54-68 (1)

54-68: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Prevent a first-render full-navigation flash.

With atomWithStorage(..., false) and the default getOnInit, nav-simplified renders as false before hydration and only switches to true after the client reads localStorage. Guard the full nav until hydration completes, or use a hydration-safe loading/default value that cannot briefly expose advanced items.

web/ee/src/components/pages/settings/Billing/index.tsx-173-174 (1)

173-174: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Handle absent usage data instead of casting it away.

Object.entries(usage!) still throws when the usage request fails, while the member bars receive undefined cast as number and can display invalid values. Use an explicit loading/error/empty state and render the users bars only when the corresponding quota data exists.

Also applies to: 204-223

web/ee/src/components/pages/settings/Billing/index.tsx-132-135 (1)

132-135: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Guard the renewal date when subscription loading fails.

The current render exits only while isSubLoading || isUsageLoading, but it still renders when the subscription query remains absent or errors, and subscription?.period_end becomes Invalid Date. Render the date only when subscription?.period_end exists, or surface the subscription error state before this section.

web/oss/src/components/EntityIdentity/useRenameApp.ts-48-57 (1)

48-57: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Do not cast a nullable projectId to string.

The cast does not change the runtime value, so null can still reach updateWorkflow. Guard or resolve the project scope before issuing the mutation; otherwise valid rename attempts can fail with an invalid API request.

Proposed fix
                 const {projectId} = getProjectValues()
+                if (!projectId) {
+                    throw new Error("Cannot rename an app without a project scope")
+                }
-                await updateWorkflow(projectId as string, {
+                await updateWorkflow(projectId, {
web/oss/src/components/EvalRunDetails/atoms/table/scenarios.ts-274-276 (1)

274-276: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Guard projectId inside queryFn.

enabled skips automatic fetches, but manual refetching from a disabled atomWithQuery can still run queryFn; add a runtime projectId check here so fetchEvaluationScenarioWindow() does not send /evaluations/scenarios/query with a missing/null project_id.

Source: MCP tools

web/oss/src/components/EvalRunDetails/utils/buildSkeletonColumns.ts-55-80 (1)

55-80: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Fix the output skeleton argument order instead of preserving the runtime bug.

Lines 115-121 call createSkeletonGroupColumns without the required stepType, so stepType becomes 200, startOrder is undefined, and every output column receives order: NaN. Keep startOrder required and pass "invocation" explicitly.

Proposed fix
 const createSkeletonGroupColumns = (
     groupId: string,
     label: string,
     kind: EvaluationTableColumnGroup["kind"],
     columnKind: EvaluationColumnKind,
-    stepType: EvaluationTableColumn["stepType"] | number,
-    startOrder?: number,
+    stepType: EvaluationTableColumn["stepType"],
+    startOrder: number,
 ): {columns: EvaluationTableColumn[]; group: EvaluationTableColumnGroup} => {
     const columns: EvaluationTableColumn[] = []
     for (let index = 0; index < SKELETON_COLUMNS_PER_GROUP; index += 1) {
-        const order = (startOrder as number) + index
+        const order = startOrder + index
...
     createSkeletonGroupColumns(
         "outputs",
         "Model Outputs",
         "invocation",
         "invocation",
+        "invocation",
         200,
     )
web/oss/src/components/EvalRunDetails/atoms/types.ts-6-12 (1)

6-12: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Align ScenarioStepEntry with the keys returned by the batcher.

scenarioSteps.ts stores the result of snakeToCamelCaseKeys(rawStep), so top-level trace_id/testcase_id become traceId/testcaseId. This open Record<string, any> contract can make snake_case reads compile while returning undefined; preserve raw fields or update the type and consumers to the actual camel-cased shape.

web/oss/src/components/EvalRunDetails/atoms/table/run.ts-5-5 (1)

5-5: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Use the generated evaluations API client instead of raw axios.

ensureEvaluatorRevisions() now imports the configured axios instance to patch /evaluations/runs/${runId}, but frontend API calls should use the Fern per-resource accessor instead. EvaluationsClient.editRuns() already exposes this PATCH endpoint via @agenta/sdk/resources; add that accessor there if needed and use it for the edited run body.

Source: Coding guidelines

web/oss/src/components/EvalRunDetails/components/views/ConfigurationView/utils.ts-177-183 (1)

177-183: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Preserve the PromptPreviewAttachment contract.

Lines 179-183 construct an attachment without the required type: "image" field, even though PromptPreviewAttachment requires it. The as unknown as cast only hides the mismatch and can break consumers that inspect the attachment type. Create a validated attachment with the required field, or widen the shared type to match the actual runtime shape.

web/oss/src/components/EvalRunDetails/components/columnVisibility/ColumnVisibilityPopoverContent.tsx-22-22 (1)

22-22: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Treat "online" as an automatic evaluation type.

Line 22 enables "online", but visibilityStaticMetricMap selects human metrics for every value other than "auto" (Lines 160-163). usePreviewEvaluations maps online evaluations to automatic, so the popover can expose the wrong static metric columns.

Proposed fix
 const metricsForType =
-    evaluationType === "auto"
+    evaluationType === "auto" || evaluationType === "online"
         ? columnData.staticMetricColumns.auto
         : columnData.staticMetricColumns.human
web/oss/src/components/EvalRunDetails/components/views/ConfigurationView/components/ContextChipList.tsx-30-31 (1)

30-31: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Pass the resolution result, not just the variant ID.

WorkflowReferenceChip only fetches variantReferenceQueryAtomFamily(revisionId ?? variantId), which can load a missing workflow by variant ID when only the revision is cached. Derive the label in InvocationSection and pass that through here, or change the chip to query both IDs and fall back safely; don’t store the label in atom metadata, which keeps raw reference IDs in downstream query keys.

web/oss/src/state/workspace/atoms/mutations.ts-26-27 (1)

26-27: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Pass the organization PATCH body as an object.

The cast does not change the runtime value: Axios sends a bare string even though updateOrganization requires {name: string}. The workspace update can succeed while the organization update fails, leaving the rename partially applied.

Proposed fix
-            updateOrganization(organizationId, name as unknown as {name: string}),
+            updateOrganization(organizationId, {name}),
web/oss/src/pages/workspaces/accept.tsx-97-99 (1)

97-99: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Validate invite identifiers before calling the accept API.

The casts allow absent values through as undefined; acceptWorkspaceInvite then interpolates them directly into the URL and query string, producing incomplete invite URLs unless the handler is changed to intentionally omit optional identifiers. Reject malformed invites before the call, or update acceptWorkspaceInvite to skip optional workspaceId/projectId when they are absent.

web/oss/src/lib/hooks/useEvaluationRunMetrics/index.ts-80-84 (1)

80-84: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Perform the snake_case-to-camelCase conversion before claiming Metric[].

Metric is SnakeToCamelCaseKeys<MetricResponse>, but this identity map preserves the raw snake_case keys. Downstream consumers will read camelCase fields that do not exist. Use the project’s actual conversion helper, or expose MetricResponse until conversion is implemented.

web/oss/src/services/runMetrics/api/index.ts-691-693 (1)

691-693: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Do not cast incomplete stats to MetricDistribution.

This branch returns raw stats without the required distribution and binSize fields, despite the declared return type requiring both. Return undefined when distribution data is unavailable, or construct a complete MetricDistribution before returning.

🟡 Minor comments (18)
web/oss/src/components/pages/evaluations/cellRenderers/cellRenderers.tsx-177-180 (1)

177-180: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Map EvaluationStatus.FAILED explicitly.

The enum defines FAILED as "failed", but the map omits it. Such evaluations fall through to "Unknown" instead of displaying the failure state. Add the same failure label/color used by EvaluationStatus.FAILURE.

web/oss/src/components/SharedDrawers/AnnotateDrawer/assets/SelectEvaluators/index.tsx-75-78 (1)

75-78: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Do not collapse missing slugs to the empty-string sentinel.

All evaluators without a slug share "", while the checkbox still receives a nullish value. A selection containing "" can mark or disable every slug-less evaluator, and clicks can add an invalid value to selectedEvaluators. Filter or disable evaluators without a real slug before rendering.

web/oss/src/components/pages/observability/components/ObservabilityTable/index.tsx-254-256 (1)

254-256: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Materialize a unique row key before handing traces to the virtual table.

Raw TraceSpanNode values do not guarantee key, but the new type and cast assert that they do; the empty-string fallback then collapses rows lacking both identifiers into duplicate table keys.

  • web/oss/src/components/pages/observability/components/ObservabilityTable/index.tsx#L254-L256: normalize traces into rows with a guaranteed stable key instead of casting the array.
  • web/oss/src/components/pages/observability/assets/getObservabilityColumns.tsx#L32-L37: align TraceRow with the normalized runtime shape.
  • web/oss/src/components/pages/observability/components/ObservabilityTable/index.tsx#L290-L293: remove the "" fallback and rely on the normalized unique key.
web/oss/src/components/pages/evaluations/utils.ts-87-93 (1)

87-93: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Include rawVariantId in the null-result guard.

The guard at Line 113 still returns null when the invocation contains only a variant ID, discarding the new value extracted here. Add !rawVariantId to that condition.

Suggested fix
-    if (!rawAppId && !rawRevisionId && !rawVariantName) return null
+    if (!rawAppId && !rawRevisionId && !rawVariantId && !rawVariantName) return null
web/oss/src/components/TestsetsTable/hooks/useTestsetsColumns.tsx-114-115 (1)

114-115: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Copy the row’s actual ID.

TestsetTableRow uses id, not _id; therefore this expression usually becomes "", and copyToClipboard returns without copying. Use String(record.id ?? "") instead.

Proposed fix
-                                            copyToClipboard(String(record._id ?? ""))
+                                            copyToClipboard(String(record.id ?? ""))
web/oss/src/components/TestsetsTable/components/TestsetsHeaderFilters.tsx-49-58 (1)

49-58: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Apply the popover overrides through an antd v6-supported styles key.

Popover.styles.body is not a Popover slot, and the cast hides the invalid key so the max-width/visual overrides are ignored. Move the maxWidth and visual overrides into styles.root (the overlay) and styles.container/styles.content as appropriate for antd 6.1.3.

web/oss/src/components/SharedDrawers/TraceDrawer/components/TraceSidePanel/TraceReferences/index.tsx-88-88 (1)

88-88: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Guard missing testset IDs before rendering TestsetTag.

The filter above accepts slug-only references, so id as string can still be undefined at runtime and produce a broken testset link. Require id for this branch or use a slug-capable component.

web/oss/src/components/SharedDrawers/TraceDrawer/components/TraceTree/index.tsx-203-204 (1)

203-204: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use a supported Popover semantic slot instead of body.

Ant Design’s Popover classNames/styles use root, container, content, title, and arrow; body is not a documented slot, so this override may be ignored. For the panel padding/dimension changes targeted here, use container (and content/root if needed) instead.

Source: MCP tools

docs/design/simplify-nav-new-users/README.md-3-4 (1)

3-4: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Refresh the planning status.

This README says the work is “ready to implement,” while status.md and the implementation state that Phase 1 is already implemented. Mark this document as implemented or clearly label it as a historical plan.

docs/design/simplify-nav-new-users/README.md-15-18 (1)

15-18: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Align the documented Phase 1 scope with the shipped behavior.

Both documents describe a sidebar-only change with no in-app link changes, but this PR also redirects prompt/agent entrypoints and dynamic sidebar children to /playground.

  • docs/design/simplify-nav-new-users/README.md#L15-L18: update the design scope to include the route-entry changes.
  • docs/design/simplify-nav-new-users/status.md#L14-L17: update the implementation status to reflect the broader behavior.
docs/design/simplify-nav-new-users/research.md-3-24 (1)

3-24: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Update the stale sidebar line references.

The documented targets no longer match the implementation: Prompts is Line [78], Evaluation is Line [95], Overview is Line [155], Registry is Line [172], and Evaluations is Line [182] in the supplied sidebar file, not the listed lines. Update these references or use symbol/key references instead.

docs/design/simplify-nav-new-users/plan.md-41-47 (1)

41-47: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Align the plan with the delivered test coverage.

Slice 0 remains a required Phase 1 exit criterion, but the PR objectives state that automated sidebar tests are not included. Mark this slice deferred or replace its exit criterion with the documented manual QA, and track test-runner enablement separately.

web/oss/src/components/EvalRunDetails/atoms/metricProcessor.ts-696-696 (1)

696-696: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Make the metric ID type guard validate strings.

Boolean(id) accepts truthy non-string values, and runMetrics are typed as any, so newMetricIds can include numeric/boolean/object IDs despite being inferred as string[]. Narrow with typeof id === "string" before accepting the ID.

web/oss/src/components/EditorViews/SimpleSharedEditor/index.tsx-57-60 (1)

57-60: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Honor an explicit editorProps.language.

The state now accepts arbitrary CodeLanguage values, but initialization ignores props.editorProps?.language and the fallback effect forces "markdown" for every non-JSON/YAML/HTML editor. A TypeScript or Python editor can therefore show the wrong selected format. Seed from the configured language and only apply the Markdown default when none is provided.

Proposed fix
-    const [language, setLanguage] = useState<Format | CodeLanguage>(() =>
-        isJSON ? "json" : isYAML ? "yaml" : "text",
+    const [language, setLanguage] = useState<Format | CodeLanguage>(() =>
+        isJSON ? "json" : isYAML ? "yaml" : props.editorProps?.language ?? "text",
     )
...
-        } else {
+        } else if (!props.editorProps?.language) {
             setLanguage("markdown")
         }

Also applies to: 80-93

web/oss/src/components/EnhancedUIs/Drawer/index.tsx-20-28 (1)

20-28: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Preserve resolver-based drawer styles when applying width.

Ant Design v6 supports styles as a resolver function; when it is provided with a non-zero width, this code replaces it with an empty wrapper: { width }, discarding user styles. Compose the resolver instead and merge the wrapper width into the resolved styles.

web/oss/src/lib/hooks/useEvaluationRunMetrics/index.ts-42-44 (1)

42-44: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Do not append an empty run_ids value.

When runIds is [], the cast does not change the runtime value; URLSearchParams serializes it as run_ids=. If a scenario ID is also present, the later SWR-key check still sends that empty parameter. Branch on typeof runIds === "string" and skip empty arrays.

web/tsc-error-inventory.md-3-13 (1)

3-13: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Align the inventory dates and phase labels.

The file says it was generated on July 22, 2026, but labels Wave 2 as final on July 24, 2026 and separately calls 105 OSS plus 11 EE-only errors the “Final-tail inventory.” Regenerate the report after the final wave or label these figures explicitly as intermediate/forecast values.

web/packages/agenta-ui/src/InfiniteVirtualTable/features/InfiniteVirtualTableFeatureShell.tsx-142-146 (1)

142-146: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Forward locale.emptyText or remove the prop until implemented.

This API accepts custom empty text but explicitly drops it before rendering, so callers get a silent no-op. Forward it to the inner table and test it, or keep the option out of the public contract until it works.

🧹 Nitpick comments (10)
web/oss/src/components/Playground/Playground.tsx (1)

115-124: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

Extract a stable, typed provider adapter.

The inline ChatTurnAssistantActions component is recreated on every Playground render. If provider entries are consumed as component types, this can remount the assistant subtree and reset local state. Moving it to module scope also gives the unknown double cast a single, reviewable contract boundary.

As per coding guidelines, frontend code should minimize React re-renders and avoid unstable inline functions and objects.

Source: Coding guidelines

web/oss/src/components/Playground/Components/TestsetDropdown/index.tsx (1)

177-180: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Resolve the "success" status contract at its source.

Both predicates cast r.status to string while stating that MessageExecutionStatus never emits "success". Remove the dead branch if that is guaranteed; otherwise widen or normalize the producer type and add coverage. The local casts currently hide a contract mismatch from other consumers.

Also applies to: 237-240

web/oss/src/components/SharedDrawers/TraceDrawer/components/TraceSidePanel/TraceLinkedSpans/index.tsx (1)

57-58: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Do not describe link.trace as dead.

linksAndReferencesAtom adds trace to returned links, so this access can be live. Add the optional field to TraceDrawerSpanLink and read it type-safely, or remove the access intentionally; the any cast currently hides this cross-file contract.

web/oss/src/components/SharedDrawers/AddToTestsetDrawer/atoms/drawerState.ts (1)

122-123: 🗄️ Data Integrity & Integration | 🔵 Trivial | 🏗️ Heavy lift

Align TestsetTraceData with the actual JSON shape instead of casting it.

extractAgData can contain nested arbitrary JSON, but TestsetTraceData["data"] is declared as KeyValuePair. The cast only suppresses TypeScript and leaves downstream consumers with an inaccurate contract; widen the shared data type and originalData accordingly.

Also applies to: 158-158

web/oss/src/components/pages/overview/variants/VariantPopover.tsx (1)

4-4: 📐 Maintainability & Code Quality | 🔵 Trivial

Run the required frontend lint fix before commit.

Run pnpm lint-fix from web and fix all reported errors before committing these frontend changes.

Source: Coding guidelines

web/oss/src/components/SharedDrawers/SessionDrawer/store/sessionDrawerStore.ts (1)

138-147: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy lift

Align the OSS/entities trace contract once instead of repeating unknown as casts.

These sites all bypass assignability checks at the same package boundary. Introduce a shared trace type or one adapter/validator, then consume that contract throughout the trace drawer and Playground flow.

  • web/oss/src/components/SharedDrawers/SessionDrawer/store/sessionDrawerStore.ts#L138-L147: type the transformation result through the shared contract.
  • web/oss/src/components/SharedDrawers/TraceDrawer/components/TraceContent/components/OverviewTabItem/index.tsx#L36-L38: remove the local EntityTraceSpan double-cast.
  • web/oss/src/components/SharedDrawers/TraceDrawer/components/TraceContent/components/OverviewTabItem/index.tsx#L50-L62: consume the shared typed span in drill-in reads.
  • web/oss/src/components/SharedDrawers/TraceDrawer/components/TraceContent/components/TraceTypeHeader/index.tsx#L96-L102: pass the shared type to replay eligibility helpers.
  • web/oss/src/components/SharedDrawers/TraceDrawer/components/TraceHeader/index.tsx#L191-L204: type all relative-navigation transformation branches centrally.
  • web/oss/src/components/SharedDrawers/TraceDrawer/store/openInPlayground.ts#L22-L27: pass the shared trace contract to openFromTrace.
web/oss/src/components/SharedDrawers/TraceDrawer/components/AccordionTreePanel.tsx (1)

268-269: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Do not cast GlobalToken to a complete JSSTheme.

JSSTheme also requires isDark and fontWeightMedium; this cast does not provide them at runtime. Narrow the style callback to the tokens it uses, or construct an adapter that supplies the complete theme contract.

web/oss/src/components/SharedDrawers/TraceDrawer/components/TraceContent/components/AnnotationTabItem/index.tsx (1)

193-194: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Type the enriched annotation instead of casting through any.

mergedAnnWithEvaluator adds evaluator to each item, so this is not dead access. Type the memo/grouping result as an enriched AnnotationDto and read annotations?.[0]?.evaluator directly; this also removes the misleading two-line comment.

As per coding guidelines, in-code comments should be at most one short line unless documenting a genuinely surprising constraint.

Source: Coding guidelines

web/oss/src/components/EvalRunDetails/components/FocusDrawer.tsx (1)

144-145: 🎯 Functional Correctness | 🔵 Trivial | 🏗️ Heavy lift

Replace the nullable runId cast with a real contract.

useFocusDrawerSections explicitly accepts string | null, while usePreviewTableData requires string and uses the value to create run-scoped atom families. (runId ?? undefined) as string only hides the mismatch; it does not make a null key safe. Widen the hook contract and explicitly handle the no-run case, or prove this caller cannot receive null.

web/oss/src/state/newObservability/atoms/queryHelpers.ts (1)

367-376: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Verify the package-boundary cast.

transformTracingResponse(...) is asserted to be TraceSpanNode[] through unknown, so any drift between @agenta/entities and the local trace shape will reach cursor extraction and rendering unchecked. Prefer a compatible return type or explicit mapper, and add a contract test for both traces and spans responses.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 726d6c9a-1864-47cc-a8a1-9964f4542c22

📥 Commits

Reviewing files that changed from the base of the PR and between 3b2b70a and 56fcef8.

📒 Files selected for processing (219)
  • docs/design/simplify-nav-new-users/README.md
  • docs/design/simplify-nav-new-users/context.md
  • docs/design/simplify-nav-new-users/plan.md
  • docs/design/simplify-nav-new-users/research.md
  • docs/design/simplify-nav-new-users/status.md
  • web/ee/next.config.ts
  • web/ee/src/components/PostSignupForm/PostSignupHeader.tsx
  • web/ee/src/components/pages/app-management/components/ApiKeyInput.tsx
  • web/ee/src/components/pages/overview/deployments/HistoryConfig.tsx
  • web/ee/src/components/pages/settings/Billing/Modals/PricingModal/assets/SubscriptionPlanDetails/index.tsx
  • web/ee/src/components/pages/settings/Billing/Modals/PricingModal/assets/types.d.ts
  • web/ee/src/components/pages/settings/Billing/index.tsx
  • web/ee/tsconfig.json
  • web/oss/next.config.ts
  • web/oss/src/components/AgentChatSlice/components/clientTools/ElicitationWidget.tsx
  • web/oss/src/components/DeploymentsDashboard/Table/assets/deploymentColumns.tsx
  • web/oss/src/components/DeploymentsDashboard/assets/UseApiContent.tsx
  • web/oss/src/components/DeploymentsDashboard/modals/DeploymentConfirmationModalWrapper.tsx
  • web/oss/src/components/DrillInView/TraceSpanDrillInView.tsx
  • web/oss/src/components/DrillInView/viewModes.ts
  • web/oss/src/components/EditorViews/SimpleSharedEditor/index.tsx
  • web/oss/src/components/EditorViews/SimpleSharedEditor/types.ts
  • web/oss/src/components/EditorViews/assets/helper.ts
  • web/oss/src/components/EnhancedUIs/Drawer/index.tsx
  • web/oss/src/components/EntityIdentity/useRenameApp.ts
  • web/oss/src/components/EvalRunDetails/Table.tsx
  • web/oss/src/components/EvalRunDetails/atoms/metricProcessor.ts
  • web/oss/src/components/EvalRunDetails/atoms/metrics.ts
  • web/oss/src/components/EvalRunDetails/atoms/query.ts
  • web/oss/src/components/EvalRunDetails/atoms/runMetrics.ts
  • web/oss/src/components/EvalRunDetails/atoms/runMetrics/types.ts
  • web/oss/src/components/EvalRunDetails/atoms/scenarioColumnValues.ts
  • web/oss/src/components/EvalRunDetails/atoms/scenarioSteps.ts
  • web/oss/src/components/EvalRunDetails/atoms/table/columnAccess.ts
  • web/oss/src/components/EvalRunDetails/atoms/table/columns.ts
  • web/oss/src/components/EvalRunDetails/atoms/table/run.ts
  • web/oss/src/components/EvalRunDetails/atoms/table/scenarios.ts
  • web/oss/src/components/EvalRunDetails/atoms/table/testcases.ts
  • web/oss/src/components/EvalRunDetails/atoms/table/types.ts
  • web/oss/src/components/EvalRunDetails/atoms/tableRows.ts
  • web/oss/src/components/EvalRunDetails/atoms/traces.ts
  • web/oss/src/components/EvalRunDetails/atoms/types.ts
  • web/oss/src/components/EvalRunDetails/atoms/variantConfig.ts
  • web/oss/src/components/EvalRunDetails/components/CompareRunsMenu.tsx
  • web/oss/src/components/EvalRunDetails/components/EvalTestcaseDrawerAdapter/drawerPayload.ts
  • web/oss/src/components/EvalRunDetails/components/EvaluatorMetricsChart/BarChart.tsx
  • web/oss/src/components/EvalRunDetails/components/EvaluatorMetricsChart/index.tsx
  • web/oss/src/components/EvalRunDetails/components/FocusDrawer.tsx
  • web/oss/src/components/EvalRunDetails/components/TableCells/MetricCell.tsx
  • web/oss/src/components/EvalRunDetails/components/columnVisibility/ColumnVisibilityPopoverContent.tsx
  • web/oss/src/components/EvalRunDetails/components/views/ConfigurationView/components/ContextChipList.tsx
  • web/oss/src/components/EvalRunDetails/components/views/ConfigurationView/components/EvaluatorSection.tsx
  • web/oss/src/components/EvalRunDetails/components/views/ConfigurationView/components/InvocationSection.tsx
  • web/oss/src/components/EvalRunDetails/components/views/ConfigurationView/utils.ts
  • web/oss/src/components/EvalRunDetails/components/views/OverviewView/components/BaseRunMetricsSection.tsx
  • web/oss/src/components/EvalRunDetails/components/views/OverviewView/components/EvaluatorTemporalMetricsChart.tsx
  • web/oss/src/components/EvalRunDetails/components/views/OverviewView/components/MetadataSummaryTable.tsx
  • web/oss/src/components/EvalRunDetails/components/views/OverviewView/components/MetricComparisonCard.tsx
  • web/oss/src/components/EvalRunDetails/components/views/OverviewView/components/OverviewPlaceholders.tsx
  • web/oss/src/components/EvalRunDetails/components/views/OverviewView/hooks/useRunMetricData.ts
  • web/oss/src/components/EvalRunDetails/components/views/OverviewView/utils/evaluatorMetrics.ts
  • web/oss/src/components/EvalRunDetails/components/views/SingleScenarioViewerPOC/ScenarioAnnotationPanel/useAnnotationState.ts
  • web/oss/src/components/EvalRunDetails/components/views/SingleScenarioViewerPOC/types.ts
  • web/oss/src/components/EvalRunDetails/hooks/usePreviewTableData.ts
  • web/oss/src/components/EvalRunDetails/utils/buildPreviewColumns.tsx
  • web/oss/src/components/EvalRunDetails/utils/buildSkeletonColumns.ts
  • web/oss/src/components/EvalRunDetails/utils/renderChatMessages.tsx
  • web/oss/src/components/EvaluationRunsTablePOC/atoms/view.ts
  • web/oss/src/components/EvaluationRunsTablePOC/components/EvaluationRunsDeleteButton.tsx
  • web/oss/src/components/EvaluationRunsTablePOC/components/EvaluationRunsTable/export/referenceResolvers.ts
  • web/oss/src/components/EvaluationRunsTablePOC/components/EvaluationRunsTable/index.tsx
  • web/oss/src/components/EvaluationRunsTablePOC/components/cells/RunMetricCell/index.tsx
  • web/oss/src/components/EvaluationRunsTablePOC/components/filters/EvaluationRunsHeaderFilters.tsx
  • web/oss/src/components/EvaluationRunsTablePOC/types.ts
  • web/oss/src/components/Evaluations/MetricDetailsPopover/assets/ResponsiveMetricChart.tsx
  • web/oss/src/components/Evaluations/components/MetricDetailsPreviewPopover.tsx
  • web/oss/src/components/Evaluators/Drawers/HumanEvaluatorDrawer/index.tsx
  • web/oss/src/components/Evaluators/assets/evaluatorFiltering.ts
  • web/oss/src/components/Filters/Filters.tsx
  • web/oss/src/components/InfiniteVirtualTable/atoms/columnHiddenKeys.ts
  • web/oss/src/components/InfiniteVirtualTable/columns/cells.tsx
  • web/oss/src/components/InfiniteVirtualTable/columns/createStandardColumns.tsx
  • web/oss/src/components/InfiniteVirtualTable/columns/types.ts
  • web/oss/src/components/InfiniteVirtualTable/components/InfiniteVirtualTableInner.tsx
  • web/oss/src/components/InfiniteVirtualTable/hooks/useColumnVisibility.ts
  • web/oss/src/components/InfiniteVirtualTable/hooks/useExpandableRows.tsx
  • web/oss/src/components/InfiniteVirtualTable/hooks/useTableKeyboardShortcuts.ts
  • web/oss/src/components/InfiniteVirtualTable/types.ts
  • web/oss/src/components/Layout/assets/Breadcrumbs.tsx
  • web/oss/src/components/Onboarding/tours/evaluationResultsTour.ts
  • web/oss/src/components/Placeholders/EmptyComponent/index.tsx
  • web/oss/src/components/Playground/Components/Menus/SelectVariant/index.tsx
  • web/oss/src/components/Playground/Components/Modals/CreateVariantModal/assets/types.d.ts
  • web/oss/src/components/Playground/Components/Modals/CreateVariantModal/index.tsx
  • web/oss/src/components/Playground/Components/Modals/DeployVariantModal/types.d.ts
  • web/oss/src/components/Playground/Components/PlaygroundFocusDrawerAdapter/drawerPayload.ts
  • web/oss/src/components/Playground/Components/TestsetDropdown/TestsetPreviewPanelWrapper.tsx
  • web/oss/src/components/Playground/Components/TestsetDropdown/index.tsx
  • web/oss/src/components/Playground/Components/WebWorkerProvider/index.tsx
  • web/oss/src/components/Playground/Playground.tsx
  • web/oss/src/components/PlaygroundRouter/PlaygroundLoadingShell.tsx
  • web/oss/src/components/References/cells/ApplicationCells.tsx
  • web/oss/src/components/References/cells/TestsetCells.tsx
  • web/oss/src/components/RequireWorkflowKind/index.tsx
  • web/oss/src/components/SessionInspector/tabs/StreamsTab.tsx
  • web/oss/src/components/SharedDrawers/AddToTestsetDrawer/atoms/drawerState.ts
  • web/oss/src/components/SharedDrawers/AddToTestsetDrawer/components/DataPreviewEditor.tsx
  • web/oss/src/components/SharedDrawers/AddToTestsetDrawer/hooks/useTestsetDrawer.ts
  • web/oss/src/components/SharedDrawers/AnnotateDrawer/assets/AnnotateDrawerTitle/index.tsx
  • web/oss/src/components/SharedDrawers/AnnotateDrawer/assets/SelectEvaluators/index.tsx
  • web/oss/src/components/SharedDrawers/AnnotateDrawer/assets/hooks/useEvaluatorSchemas.ts
  • web/oss/src/components/SharedDrawers/AnnotateDrawer/assets/transforms.ts
  • web/oss/src/components/SharedDrawers/AnnotateDrawer/assets/types.d.ts
  • web/oss/src/components/SharedDrawers/SessionDrawer/components/SessionDrawerButton/index.tsx
  • web/oss/src/components/SharedDrawers/SessionDrawer/store/sessionDrawerStore.ts
  • web/oss/src/components/SharedDrawers/TraceDrawer/components/AccordionTreePanel.tsx
  • web/oss/src/components/SharedDrawers/TraceDrawer/components/TraceContent/components/AnnotationTabItem/index.tsx
  • web/oss/src/components/SharedDrawers/TraceDrawer/components/TraceContent/components/OverviewTabItem/index.tsx
  • web/oss/src/components/SharedDrawers/TraceDrawer/components/TraceContent/components/TraceTypeHeader/index.tsx
  • web/oss/src/components/SharedDrawers/TraceDrawer/components/TraceHeader/index.tsx
  • web/oss/src/components/SharedDrawers/TraceDrawer/components/TraceSidePanel/TraceLinkedSpans/index.tsx
  • web/oss/src/components/SharedDrawers/TraceDrawer/components/TraceSidePanel/TraceReferences/index.tsx
  • web/oss/src/components/SharedDrawers/TraceDrawer/components/TraceTree/index.tsx
  • web/oss/src/components/SharedDrawers/TraceDrawer/index.tsx
  • web/oss/src/components/SharedDrawers/TraceDrawer/store/openInPlayground.ts
  • web/oss/src/components/SharedDrawers/TraceDrawer/store/traceDrawerStore.ts
  • web/oss/src/components/Sidebar/components/ListOfOrgs.tsx
  • web/oss/src/components/Sidebar/components/ListOfProjects.tsx
  • web/oss/src/components/Sidebar/dynamic/registry.ts
  • web/oss/src/components/Sidebar/hooks/useSidebarConfig/index.tsx
  • web/oss/src/components/TestcasesTableNew/components/CommitTestsetModal.tsx
  • web/oss/src/components/TestcasesTableNew/components/TestcaseRowActionsDropdown.tsx
  • web/oss/src/components/TestcasesTableNew/components/TestcasesTableShell.tsx
  • web/oss/src/components/TestcasesTableNew/hooks/useTestcasesTable.ts
  • web/oss/src/components/TestsetsTable/components/TestsetsHeaderFilters.tsx
  • web/oss/src/components/TestsetsTable/hooks/useTestsetsColumns.tsx
  • web/oss/src/components/VariantsComponents/store/registryStore.ts
  • web/oss/src/components/Webhooks/WebhookLogsTab.tsx
  • web/oss/src/components/Webhooks/utils/buildPreviewRequest.ts
  • web/oss/src/components/Webhooks/utils/buildSubscription.ts
  • web/oss/src/components/pages/agent-home/PlaygroundOnboarding/OnboardingLoader.tsx
  • web/oss/src/components/pages/agents/AgentsPage.tsx
  • web/oss/src/components/pages/app-management/modals/CreateAppStatusModal.tsx
  • web/oss/src/components/pages/app-management/modals/CustomWorkflowModal/hooks/types.d.ts
  • web/oss/src/components/pages/evaluations/NewEvaluation/Components/NewEvaluationModalContent.tsx
  • web/oss/src/components/pages/evaluations/NewEvaluation/Components/NewEvaluationModalInner.tsx
  • web/oss/src/components/pages/evaluations/NewEvaluation/Components/SelectEvaluatorSection/SelectEvaluatorSection.tsx
  • web/oss/src/components/pages/evaluations/NewEvaluation/types.ts
  • web/oss/src/components/pages/evaluations/cellRenderers/cellRenderers.tsx
  • web/oss/src/components/pages/evaluations/onlineEvaluation/assets/helpers.ts
  • web/oss/src/components/pages/evaluations/onlineEvaluation/components/FiltersPreview.tsx
  • web/oss/src/components/pages/evaluations/utils.ts
  • web/oss/src/components/pages/observability/assets/getObservabilityColumns.tsx
  • web/oss/src/components/pages/observability/components/NodeNameCell.tsx
  • web/oss/src/components/pages/observability/components/ObservabilityHeader/index.tsx
  • web/oss/src/components/pages/observability/components/ObservabilityTable/index.tsx
  • web/oss/src/components/pages/observability/components/SessionsTable/assets/getSessionColumns.tsx
  • web/oss/src/components/pages/observability/components/SessionsTable/index.tsx
  • web/oss/src/components/pages/observability/components/TimestampCell.tsx
  • web/oss/src/components/pages/observability/dashboard/CustomAreaChart.tsx
  • web/oss/src/components/pages/overview/variants/VariantPopover.tsx
  • web/oss/src/components/pages/prompts/PromptsPage.tsx
  • web/oss/src/components/pages/settings/Organization/index.tsx
  • web/oss/src/hooks/usePostAuthRedirect.ts
  • web/oss/src/lib/Types.ts
  • web/oss/src/lib/api/assets/fetchClient.ts
  • web/oss/src/lib/evaluations/legacy.ts
  • web/oss/src/lib/helpers/analytics/AgPosthogProvider.tsx
  • web/oss/src/lib/helpers/dateTimeHelper/index.ts
  • web/oss/src/lib/hooks/useEvaluationRunMetrics/index.ts
  • web/oss/src/lib/hooks/useEvaluationRunMetrics/types.ts
  • web/oss/src/lib/hooks/usePreviewEvaluations/index.ts
  • web/oss/src/lib/hooks/usePreviewEvaluations/types.ts
  • web/oss/src/lib/onboarding/atoms.ts
  • web/oss/src/lib/onboarding/index.ts
  • web/oss/src/lib/onboarding/widget/store.ts
  • web/oss/src/lib/traces/traceUtils.ts
  • web/oss/src/pages/auth/[[...path]].tsx
  • web/oss/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/index.tsx
  • web/oss/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/overview/index.tsx
  • web/oss/src/pages/workspaces/accept.tsx
  • web/oss/src/services/evaluationRuns/api/index.ts
  • web/oss/src/services/evaluationRuns/api/types.ts
  • web/oss/src/services/evaluations/api/index.ts
  • web/oss/src/services/observability/types/index.ts
  • web/oss/src/services/organization/api/index.ts
  • web/oss/src/services/runMetrics/api/index.ts
  • web/oss/src/services/tracing/types/index.ts
  • web/oss/src/services/workspace/index.ts
  • web/oss/src/state/app/atoms/fetcher.ts
  • web/oss/src/state/app/selectors/app.ts
  • web/oss/src/state/appCreation/status.ts
  • web/oss/src/state/appState/hooks.ts
  • web/oss/src/state/entities/shared/createPaginatedEntityStore.ts
  • web/oss/src/state/newObservability/atoms/controls.ts
  • web/oss/src/state/newObservability/atoms/queries.ts
  • web/oss/src/state/newObservability/atoms/queryHelpers.ts
  • web/oss/src/state/newObservability/helpers/index.ts
  • web/oss/src/state/newObservability/selectors/tracing.ts
  • web/oss/src/state/newPlayground/workflowEntityBridge.ts
  • web/oss/src/state/onboarding/selectors.ts
  • web/oss/src/state/org/index.ts
  • web/oss/src/state/project/index.ts
  • web/oss/src/state/project/selectors/project.ts
  • web/oss/src/state/url/auth.ts
  • web/oss/src/state/url/focusDrawer.ts
  • web/oss/src/state/url/index.ts
  • web/oss/src/state/url/playground.ts
  • web/oss/src/state/workspace/atoms/mutations.ts
  • web/oss/tsconfig.json
  • web/packages/agenta-entities/src/shared/paginated/createPaginatedEntityStore.ts
  • web/packages/agenta-entities/src/workflow/index.ts
  • web/packages/agenta-entity-ui/src/variant/components/EnvironmentStatus.tsx
  • web/packages/agenta-ui/src/Editor/index.ts
  • web/packages/agenta-ui/src/InfiniteVirtualTable/columns/createStandardColumns.tsx
  • web/packages/agenta-ui/src/InfiniteVirtualTable/features/InfiniteVirtualTableFeatureShell.tsx
  • web/packages/agenta-ui/src/InfiniteVirtualTable/types.ts
  • web/packages/agenta-ui/src/drill-in/context/DrillInUIContext.tsx
  • web/tsc-error-inventory.md

Comment on lines +266 to +274
// NOTE (latent runtime bug, typed as-is per WP-4e-2a): `applyAggregatesToRaw` is
// referenced below but is not defined or imported anywhere in the codebase. At runtime
// this throws a ReferenceError whenever `buildRunLevelMetricData` is invoked. We declare
// it (emits no JS) to make the type-check faithful WITHOUT altering the runtime behavior.
// Do not "fix" by adding an implementation — that would change behavior. See QA flag.
declare const applyAggregatesToRaw: (
raw: Record<string, any>,
aggregates: ReturnType<typeof computeAggregatedMetrics>,
) => Record<string, any>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🔴 Critical | 🏗️ Heavy lift

Do not mask the missing runtime implementation with declare.

declare const emits no JavaScript, so applyAggregatesToRaw(...) still throws ReferenceError whenever buildRunLevelMetricData runs. Import or implement the function instead of preserving this known crash.

Comment on lines +21 to +27
// NOTE (latent runtime bug, typed as-is per WP-4e-2a): `metricProcessor` is referenced at
// the run-level-gap branch below but no such binding exists in that scope — the processor
// created inside `processMetrics` is named `processor` and is out of scope there. At runtime
// this throws a ReferenceError whenever `shouldMarkRunLevelGap` is true. We declare it
// (emits no JS) so the type-check is faithful WITHOUT changing the runtime behavior. Do not
// "fix" by wiring up a real processor — that would change behavior. See QA flag.
declare const metricProcessor: MetricProcessor

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🔴 Critical | 🏗️ Heavy lift

Do not mask the runtime ReferenceError with an ambient declaration.

declare const emits no JavaScript. The run-level-gap branch will still fail whenever it references metricProcessor, because the real processor is named processor inside processMetrics and is out of scope. Make that processor available to the branch or pass the required callback/state, then remove this declaration.

Comment on lines +261 to +265
// Discard any draft for the removed span.
// NOTE (latent runtime bug, typed as-is): traceSpanMolecule.actions only exposes
// prefetchByIds/evictByIds — discard/update live under reducers. These set() calls
// receive undefined and would throw if reached; kept as-is pending triage.
set((traceSpanMolecule as any).actions.discard, traceKey)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🔴 Critical | 🏗️ Heavy lift

Route all draft mutations through the molecule’s actual writable reducers.

The three paths currently access discard/update through traceSpanMolecule.actions, although the code comments state those operations live under reducers. This can pass undefined to Jotai and crash remove, save, or revert flows.

  • web/oss/src/components/SharedDrawers/AddToTestsetDrawer/atoms/drawerState.ts#L261-L265: replace the invalid discard action used after removing a trace.
  • web/oss/src/components/SharedDrawers/AddToTestsetDrawer/atoms/drawerState.ts#L507-L518: use valid writable reducers for reverting or updating edited data.
  • web/oss/src/components/SharedDrawers/AddToTestsetDrawer/atoms/drawerState.ts#L571-L573: use the same valid discard reducer during revert.
📍 Affects 1 file
  • web/oss/src/components/SharedDrawers/AddToTestsetDrawer/atoms/drawerState.ts#L261-L265 (this comment)
  • web/oss/src/components/SharedDrawers/AddToTestsetDrawer/atoms/drawerState.ts#L507-L518
  • web/oss/src/components/SharedDrawers/AddToTestsetDrawer/atoms/drawerState.ts#L571-L573

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

Labels

enhancement New feature or request Frontend size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants