[feat] Agent-first sidebar for new signups, Playground as app default #5478
[feat] Agent-first sidebar for new signups, Playground as app default
#5478ashrafchowdury wants to merge 19 commits into
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…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.
|
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 |
…r-first-signup-users
Railway Preview Environment
|
mmabrouk
left a comment
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 winMove the ignored
bodystyles tocontent.
antdPopoverstyles.bodyis not a supported slot for styling the popover panel, so the panelmaxWidth, transparent background, shadow, and border are ignored. Move those declarations tocontentand remove theas PopoverProps["styles"]cast.web/oss/src/services/organization/api/index.ts (1)
191-200: 📐 Maintainability & Code Quality | 🟠 Major | 🏗️ Heavy liftUse 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.tsif 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 liftMake numeric coercion field-aware and finite.
coerceNumericValueis called on observability filters viavalueCodec.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"intonull. 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 liftNormalize the testset shape before creating scenarios.
CreateEvaluationRunInput["testset"]isTestset, whose contract does not guaranteedata; only the revision branch populates it. The cast at Lines 422-426 merely suppresses TypeScript and non-revision inputs can dereferencetestset.dataasundefined, 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 liftModel legacy testcase payloads as a real union.
The comment says legacy testcases carry
inputsinstead ofdata, butdatais required.PreviewTestCasetherefore cannot represent the documented legacy payload, and consumers may readdatawhen 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 winFix the organization-to-project fallback contract.
projectsByOrganizationdrops any project missing bothproj.organization_idand a matchingdefault_workspacefrom the org list, so unowned projects disappear from the sidebar. Ensure/api/projectsreturnsorganization_id, or derive the workspace→org mapping from an endpoint that actually returns it instead of casting org list rows toOrgDetails.web/oss/src/components/SharedDrawers/AnnotateDrawer/assets/types.d.ts-23-24 (1)
23-24: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick winAlign 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 winFilter invalid stale selections before populating the testset drawer.
TestsetTraceDatarequires a stringkeyand non-nulldata, butnode?.keycan be undefined andgetAgData(node ?? undefined)can return null. The cast only hides the mismatch, allowing invalid drawer rows. Skip unresolved nodes/data before callingsetTestsetDrawerData.web/oss/src/hooks/usePostAuthRedirect.ts-139-143 (1)
139-143: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick winDo not write the navigation flag through a stale active-user ID.
If both identity lookups fail, Line [118] leaves the previous
onboardingStorageUserIdAtomvalue untouched. The new setters at Lines [142] and [154] can then persisttrueunder that previous user’snav-simplifiedkey, while the new user remains unsimplified. Gate user-scoped writes on a verifiedsessionUserIdand 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 winScope 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 winPrevent a first-render full-navigation flash.
With
atomWithStorage(..., false)and the defaultgetOnInit,nav-simplifiedrenders asfalsebefore hydration and only switches totrueafter 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 winHandle absent usage data instead of casting it away.
Object.entries(usage!)still throws when the usage request fails, while the member bars receiveundefinedcast asnumberand 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 winGuard 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, andsubscription?.period_endbecomesInvalid Date. Render the date only whensubscription?.period_endexists, 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 winDo not cast a nullable
projectIdtostring.The cast does not change the runtime value, so
nullcan still reachupdateWorkflow. 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 winGuard
projectIdinsidequeryFn.
enabledskips automatic fetches, but manual refetching from a disabledatomWithQuerycan still runqueryFn; add a runtimeprojectIdcheck here sofetchEvaluationScenarioWindow()does not send/evaluations/scenarios/querywith a missing/nullproject_id.Source: MCP tools
web/oss/src/components/EvalRunDetails/utils/buildSkeletonColumns.ts-55-80 (1)
55-80: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winFix the output skeleton argument order instead of preserving the runtime bug.
Lines 115-121 call
createSkeletonGroupColumnswithout the requiredstepType, sostepTypebecomes200,startOrderisundefined, and every output column receivesorder: NaN. KeepstartOrderrequired 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 liftAlign
ScenarioStepEntrywith the keys returned by the batcher.
scenarioSteps.tsstores the result ofsnakeToCamelCaseKeys(rawStep), so top-leveltrace_id/testcase_idbecometraceId/testcaseId. This openRecord<string, any>contract can make snake_case reads compile while returningundefined; 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 winUse 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 winPreserve the
PromptPreviewAttachmentcontract.Lines 179-183 construct an attachment without the required
type: "image"field, even thoughPromptPreviewAttachmentrequires it. Theas unknown ascast 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 winTreat
"online"as an automatic evaluation type.Line 22 enables
"online", butvisibilityStaticMetricMapselects human metrics for every value other than"auto"(Lines 160-163).usePreviewEvaluationsmaps 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.humanweb/oss/src/components/EvalRunDetails/components/views/ConfigurationView/components/ContextChipList.tsx-30-31 (1)
30-31: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy liftPass the resolution result, not just the variant ID.
WorkflowReferenceChiponly fetchesvariantReferenceQueryAtomFamily(revisionId ?? variantId), which can load a missing workflow by variant ID when only the revision is cached. Derive the label inInvocationSectionand 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 winPass the organization PATCH body as an object.
The cast does not change the runtime value: Axios sends a bare string even though
updateOrganizationrequires{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 winValidate invite identifiers before calling the accept API.
The casts allow absent values through as
undefined;acceptWorkspaceInvitethen 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 updateacceptWorkspaceInviteto skip optionalworkspaceId/projectIdwhen they are absent.web/oss/src/lib/hooks/useEvaluationRunMetrics/index.ts-80-84 (1)
80-84: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winPerform the snake_case-to-camelCase conversion before claiming
Metric[].
MetricisSnakeToCamelCaseKeys<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 exposeMetricResponseuntil conversion is implemented.web/oss/src/services/runMetrics/api/index.ts-691-693 (1)
691-693: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winDo not cast incomplete stats to
MetricDistribution.This branch returns raw stats without the required
distributionandbinSizefields, despite the declared return type requiring both. Returnundefinedwhen distribution data is unavailable, or construct a completeMetricDistributionbefore returning.
🟡 Minor comments (18)
web/oss/src/components/pages/evaluations/cellRenderers/cellRenderers.tsx-177-180 (1)
177-180: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winMap
EvaluationStatus.FAILEDexplicitly.The enum defines
FAILEDas"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 byEvaluationStatus.FAILURE.web/oss/src/components/SharedDrawers/AnnotateDrawer/assets/SelectEvaluators/index.tsx-75-78 (1)
75-78: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winDo 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 toselectedEvaluators. 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 winMaterialize a unique row key before handing traces to the virtual table.
Raw
TraceSpanNodevalues do not guaranteekey, 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: normalizetracesinto rows with a guaranteed stablekeyinstead of casting the array.web/oss/src/components/pages/observability/assets/getObservabilityColumns.tsx#L32-L37: alignTraceRowwith 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 winInclude
rawVariantIdin the null-result guard.The guard at Line 113 still returns
nullwhen the invocation contains only a variant ID, discarding the new value extracted here. Add!rawVariantIdto that condition.Suggested fix
- if (!rawAppId && !rawRevisionId && !rawVariantName) return null + if (!rawAppId && !rawRevisionId && !rawVariantId && !rawVariantName) return nullweb/oss/src/components/TestsetsTable/hooks/useTestsetsColumns.tsx-114-115 (1)
114-115: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winCopy the row’s actual ID.
TestsetTableRowusesid, not_id; therefore this expression usually becomes"", andcopyToClipboardreturns without copying. UseString(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 winApply the popover overrides through an antd v6-supported
styleskey.
Popover.styles.bodyis not a Popover slot, and the cast hides the invalid key so the max-width/visual overrides are ignored. Move themaxWidthand visual overrides intostyles.root(the overlay) andstyles.container/styles.contentas 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 winGuard missing testset IDs before rendering
TestsetTag.The filter above accepts slug-only references, so
id as stringcan still beundefinedat runtime and produce a broken testset link. Requireidfor 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 winUse a supported Popover semantic slot instead of
body.Ant Design’s
PopoverclassNames/stylesuseroot,container,content,title, andarrow;bodyis not a documented slot, so this override may be ignored. For the panel padding/dimension changes targeted here, usecontainer(andcontent/rootif needed) instead.Source: MCP tools
docs/design/simplify-nav-new-users/README.md-3-4 (1)
3-4: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winRefresh the planning status.
This README says the work is “ready to implement,” while
status.mdand 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 winAlign 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 winUpdate 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 winAlign 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 winMake the metric ID type guard validate strings.
Boolean(id)accepts truthy non-string values, andrunMetricsare typed asany, sonewMetricIdscan include numeric/boolean/object IDs despite being inferred asstring[]. Narrow withtypeof id === "string"before accepting the ID.web/oss/src/components/EditorViews/SimpleSharedEditor/index.tsx-57-60 (1)
57-60: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winHonor an explicit
editorProps.language.The state now accepts arbitrary
CodeLanguagevalues, but initialization ignoresprops.editorProps?.languageand 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 winPreserve resolver-based drawer styles when applying
width.Ant Design v6 supports
stylesas a resolver function; when it is provided with a non-zerowidth, this code replaces it with an emptywrapper: { 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 winDo not append an empty
run_idsvalue.When
runIdsis[], the cast does not change the runtime value;URLSearchParamsserializes it asrun_ids=. If a scenario ID is also present, the later SWR-key check still sends that empty parameter. Branch ontypeof runIds === "string"and skip empty arrays.web/tsc-error-inventory.md-3-13 (1)
3-13: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winAlign 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 winForward
locale.emptyTextor 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 winExtract a stable, typed provider adapter.
The inline
ChatTurnAssistantActionscomponent is recreated on everyPlaygroundrender. 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 theunknowndouble 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 winResolve the
"success"status contract at its source.Both predicates cast
r.statustostringwhile stating thatMessageExecutionStatusnever 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 winDo not describe
link.traceas dead.
linksAndReferencesAtomaddstraceto returned links, so this access can be live. Add the optional field toTraceDrawerSpanLinkand read it type-safely, or remove the access intentionally; theanycast currently hides this cross-file contract.web/oss/src/components/SharedDrawers/AddToTestsetDrawer/atoms/drawerState.ts (1)
122-123: 🗄️ Data Integrity & Integration | 🔵 Trivial | 🏗️ Heavy liftAlign
TestsetTraceDatawith the actual JSON shape instead of casting it.
extractAgDatacan contain nested arbitrary JSON, butTestsetTraceData["data"]is declared asKeyValuePair. The cast only suppresses TypeScript and leaves downstream consumers with an inaccurate contract; widen the shared data type andoriginalDataaccordingly.Also applies to: 158-158
web/oss/src/components/pages/overview/variants/VariantPopover.tsx (1)
4-4: 📐 Maintainability & Code Quality | 🔵 TrivialRun the required frontend lint fix before commit.
Run
pnpm lint-fixfromweband 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 liftAlign the OSS/entities trace contract once instead of repeating
unknown ascasts.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 localEntityTraceSpandouble-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 toopenFromTrace.web/oss/src/components/SharedDrawers/TraceDrawer/components/AccordionTreePanel.tsx (1)
268-269: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDo not cast
GlobalTokento a completeJSSTheme.
JSSThemealso requiresisDarkandfontWeightMedium; 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 winType the enriched annotation instead of casting through
any.
mergedAnnWithEvaluatoraddsevaluatorto each item, so this is not dead access. Type the memo/grouping result as an enrichedAnnotationDtoand readannotations?.[0]?.evaluatordirectly; 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 liftReplace the nullable
runIdcast with a real contract.
useFocusDrawerSectionsexplicitly acceptsstring | null, whileusePreviewTableDatarequiresstringand uses the value to create run-scoped atom families.(runId ?? undefined) as stringonly 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 receivenull.web/oss/src/state/newObservability/atoms/queryHelpers.ts (1)
367-376: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick winVerify the package-boundary cast.
transformTracingResponse(...)is asserted to beTraceSpanNode[]throughunknown, so any drift between@agenta/entitiesand 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
📒 Files selected for processing (219)
docs/design/simplify-nav-new-users/README.mddocs/design/simplify-nav-new-users/context.mddocs/design/simplify-nav-new-users/plan.mddocs/design/simplify-nav-new-users/research.mddocs/design/simplify-nav-new-users/status.mdweb/ee/next.config.tsweb/ee/src/components/PostSignupForm/PostSignupHeader.tsxweb/ee/src/components/pages/app-management/components/ApiKeyInput.tsxweb/ee/src/components/pages/overview/deployments/HistoryConfig.tsxweb/ee/src/components/pages/settings/Billing/Modals/PricingModal/assets/SubscriptionPlanDetails/index.tsxweb/ee/src/components/pages/settings/Billing/Modals/PricingModal/assets/types.d.tsweb/ee/src/components/pages/settings/Billing/index.tsxweb/ee/tsconfig.jsonweb/oss/next.config.tsweb/oss/src/components/AgentChatSlice/components/clientTools/ElicitationWidget.tsxweb/oss/src/components/DeploymentsDashboard/Table/assets/deploymentColumns.tsxweb/oss/src/components/DeploymentsDashboard/assets/UseApiContent.tsxweb/oss/src/components/DeploymentsDashboard/modals/DeploymentConfirmationModalWrapper.tsxweb/oss/src/components/DrillInView/TraceSpanDrillInView.tsxweb/oss/src/components/DrillInView/viewModes.tsweb/oss/src/components/EditorViews/SimpleSharedEditor/index.tsxweb/oss/src/components/EditorViews/SimpleSharedEditor/types.tsweb/oss/src/components/EditorViews/assets/helper.tsweb/oss/src/components/EnhancedUIs/Drawer/index.tsxweb/oss/src/components/EntityIdentity/useRenameApp.tsweb/oss/src/components/EvalRunDetails/Table.tsxweb/oss/src/components/EvalRunDetails/atoms/metricProcessor.tsweb/oss/src/components/EvalRunDetails/atoms/metrics.tsweb/oss/src/components/EvalRunDetails/atoms/query.tsweb/oss/src/components/EvalRunDetails/atoms/runMetrics.tsweb/oss/src/components/EvalRunDetails/atoms/runMetrics/types.tsweb/oss/src/components/EvalRunDetails/atoms/scenarioColumnValues.tsweb/oss/src/components/EvalRunDetails/atoms/scenarioSteps.tsweb/oss/src/components/EvalRunDetails/atoms/table/columnAccess.tsweb/oss/src/components/EvalRunDetails/atoms/table/columns.tsweb/oss/src/components/EvalRunDetails/atoms/table/run.tsweb/oss/src/components/EvalRunDetails/atoms/table/scenarios.tsweb/oss/src/components/EvalRunDetails/atoms/table/testcases.tsweb/oss/src/components/EvalRunDetails/atoms/table/types.tsweb/oss/src/components/EvalRunDetails/atoms/tableRows.tsweb/oss/src/components/EvalRunDetails/atoms/traces.tsweb/oss/src/components/EvalRunDetails/atoms/types.tsweb/oss/src/components/EvalRunDetails/atoms/variantConfig.tsweb/oss/src/components/EvalRunDetails/components/CompareRunsMenu.tsxweb/oss/src/components/EvalRunDetails/components/EvalTestcaseDrawerAdapter/drawerPayload.tsweb/oss/src/components/EvalRunDetails/components/EvaluatorMetricsChart/BarChart.tsxweb/oss/src/components/EvalRunDetails/components/EvaluatorMetricsChart/index.tsxweb/oss/src/components/EvalRunDetails/components/FocusDrawer.tsxweb/oss/src/components/EvalRunDetails/components/TableCells/MetricCell.tsxweb/oss/src/components/EvalRunDetails/components/columnVisibility/ColumnVisibilityPopoverContent.tsxweb/oss/src/components/EvalRunDetails/components/views/ConfigurationView/components/ContextChipList.tsxweb/oss/src/components/EvalRunDetails/components/views/ConfigurationView/components/EvaluatorSection.tsxweb/oss/src/components/EvalRunDetails/components/views/ConfigurationView/components/InvocationSection.tsxweb/oss/src/components/EvalRunDetails/components/views/ConfigurationView/utils.tsweb/oss/src/components/EvalRunDetails/components/views/OverviewView/components/BaseRunMetricsSection.tsxweb/oss/src/components/EvalRunDetails/components/views/OverviewView/components/EvaluatorTemporalMetricsChart.tsxweb/oss/src/components/EvalRunDetails/components/views/OverviewView/components/MetadataSummaryTable.tsxweb/oss/src/components/EvalRunDetails/components/views/OverviewView/components/MetricComparisonCard.tsxweb/oss/src/components/EvalRunDetails/components/views/OverviewView/components/OverviewPlaceholders.tsxweb/oss/src/components/EvalRunDetails/components/views/OverviewView/hooks/useRunMetricData.tsweb/oss/src/components/EvalRunDetails/components/views/OverviewView/utils/evaluatorMetrics.tsweb/oss/src/components/EvalRunDetails/components/views/SingleScenarioViewerPOC/ScenarioAnnotationPanel/useAnnotationState.tsweb/oss/src/components/EvalRunDetails/components/views/SingleScenarioViewerPOC/types.tsweb/oss/src/components/EvalRunDetails/hooks/usePreviewTableData.tsweb/oss/src/components/EvalRunDetails/utils/buildPreviewColumns.tsxweb/oss/src/components/EvalRunDetails/utils/buildSkeletonColumns.tsweb/oss/src/components/EvalRunDetails/utils/renderChatMessages.tsxweb/oss/src/components/EvaluationRunsTablePOC/atoms/view.tsweb/oss/src/components/EvaluationRunsTablePOC/components/EvaluationRunsDeleteButton.tsxweb/oss/src/components/EvaluationRunsTablePOC/components/EvaluationRunsTable/export/referenceResolvers.tsweb/oss/src/components/EvaluationRunsTablePOC/components/EvaluationRunsTable/index.tsxweb/oss/src/components/EvaluationRunsTablePOC/components/cells/RunMetricCell/index.tsxweb/oss/src/components/EvaluationRunsTablePOC/components/filters/EvaluationRunsHeaderFilters.tsxweb/oss/src/components/EvaluationRunsTablePOC/types.tsweb/oss/src/components/Evaluations/MetricDetailsPopover/assets/ResponsiveMetricChart.tsxweb/oss/src/components/Evaluations/components/MetricDetailsPreviewPopover.tsxweb/oss/src/components/Evaluators/Drawers/HumanEvaluatorDrawer/index.tsxweb/oss/src/components/Evaluators/assets/evaluatorFiltering.tsweb/oss/src/components/Filters/Filters.tsxweb/oss/src/components/InfiniteVirtualTable/atoms/columnHiddenKeys.tsweb/oss/src/components/InfiniteVirtualTable/columns/cells.tsxweb/oss/src/components/InfiniteVirtualTable/columns/createStandardColumns.tsxweb/oss/src/components/InfiniteVirtualTable/columns/types.tsweb/oss/src/components/InfiniteVirtualTable/components/InfiniteVirtualTableInner.tsxweb/oss/src/components/InfiniteVirtualTable/hooks/useColumnVisibility.tsweb/oss/src/components/InfiniteVirtualTable/hooks/useExpandableRows.tsxweb/oss/src/components/InfiniteVirtualTable/hooks/useTableKeyboardShortcuts.tsweb/oss/src/components/InfiniteVirtualTable/types.tsweb/oss/src/components/Layout/assets/Breadcrumbs.tsxweb/oss/src/components/Onboarding/tours/evaluationResultsTour.tsweb/oss/src/components/Placeholders/EmptyComponent/index.tsxweb/oss/src/components/Playground/Components/Menus/SelectVariant/index.tsxweb/oss/src/components/Playground/Components/Modals/CreateVariantModal/assets/types.d.tsweb/oss/src/components/Playground/Components/Modals/CreateVariantModal/index.tsxweb/oss/src/components/Playground/Components/Modals/DeployVariantModal/types.d.tsweb/oss/src/components/Playground/Components/PlaygroundFocusDrawerAdapter/drawerPayload.tsweb/oss/src/components/Playground/Components/TestsetDropdown/TestsetPreviewPanelWrapper.tsxweb/oss/src/components/Playground/Components/TestsetDropdown/index.tsxweb/oss/src/components/Playground/Components/WebWorkerProvider/index.tsxweb/oss/src/components/Playground/Playground.tsxweb/oss/src/components/PlaygroundRouter/PlaygroundLoadingShell.tsxweb/oss/src/components/References/cells/ApplicationCells.tsxweb/oss/src/components/References/cells/TestsetCells.tsxweb/oss/src/components/RequireWorkflowKind/index.tsxweb/oss/src/components/SessionInspector/tabs/StreamsTab.tsxweb/oss/src/components/SharedDrawers/AddToTestsetDrawer/atoms/drawerState.tsweb/oss/src/components/SharedDrawers/AddToTestsetDrawer/components/DataPreviewEditor.tsxweb/oss/src/components/SharedDrawers/AddToTestsetDrawer/hooks/useTestsetDrawer.tsweb/oss/src/components/SharedDrawers/AnnotateDrawer/assets/AnnotateDrawerTitle/index.tsxweb/oss/src/components/SharedDrawers/AnnotateDrawer/assets/SelectEvaluators/index.tsxweb/oss/src/components/SharedDrawers/AnnotateDrawer/assets/hooks/useEvaluatorSchemas.tsweb/oss/src/components/SharedDrawers/AnnotateDrawer/assets/transforms.tsweb/oss/src/components/SharedDrawers/AnnotateDrawer/assets/types.d.tsweb/oss/src/components/SharedDrawers/SessionDrawer/components/SessionDrawerButton/index.tsxweb/oss/src/components/SharedDrawers/SessionDrawer/store/sessionDrawerStore.tsweb/oss/src/components/SharedDrawers/TraceDrawer/components/AccordionTreePanel.tsxweb/oss/src/components/SharedDrawers/TraceDrawer/components/TraceContent/components/AnnotationTabItem/index.tsxweb/oss/src/components/SharedDrawers/TraceDrawer/components/TraceContent/components/OverviewTabItem/index.tsxweb/oss/src/components/SharedDrawers/TraceDrawer/components/TraceContent/components/TraceTypeHeader/index.tsxweb/oss/src/components/SharedDrawers/TraceDrawer/components/TraceHeader/index.tsxweb/oss/src/components/SharedDrawers/TraceDrawer/components/TraceSidePanel/TraceLinkedSpans/index.tsxweb/oss/src/components/SharedDrawers/TraceDrawer/components/TraceSidePanel/TraceReferences/index.tsxweb/oss/src/components/SharedDrawers/TraceDrawer/components/TraceTree/index.tsxweb/oss/src/components/SharedDrawers/TraceDrawer/index.tsxweb/oss/src/components/SharedDrawers/TraceDrawer/store/openInPlayground.tsweb/oss/src/components/SharedDrawers/TraceDrawer/store/traceDrawerStore.tsweb/oss/src/components/Sidebar/components/ListOfOrgs.tsxweb/oss/src/components/Sidebar/components/ListOfProjects.tsxweb/oss/src/components/Sidebar/dynamic/registry.tsweb/oss/src/components/Sidebar/hooks/useSidebarConfig/index.tsxweb/oss/src/components/TestcasesTableNew/components/CommitTestsetModal.tsxweb/oss/src/components/TestcasesTableNew/components/TestcaseRowActionsDropdown.tsxweb/oss/src/components/TestcasesTableNew/components/TestcasesTableShell.tsxweb/oss/src/components/TestcasesTableNew/hooks/useTestcasesTable.tsweb/oss/src/components/TestsetsTable/components/TestsetsHeaderFilters.tsxweb/oss/src/components/TestsetsTable/hooks/useTestsetsColumns.tsxweb/oss/src/components/VariantsComponents/store/registryStore.tsweb/oss/src/components/Webhooks/WebhookLogsTab.tsxweb/oss/src/components/Webhooks/utils/buildPreviewRequest.tsweb/oss/src/components/Webhooks/utils/buildSubscription.tsweb/oss/src/components/pages/agent-home/PlaygroundOnboarding/OnboardingLoader.tsxweb/oss/src/components/pages/agents/AgentsPage.tsxweb/oss/src/components/pages/app-management/modals/CreateAppStatusModal.tsxweb/oss/src/components/pages/app-management/modals/CustomWorkflowModal/hooks/types.d.tsweb/oss/src/components/pages/evaluations/NewEvaluation/Components/NewEvaluationModalContent.tsxweb/oss/src/components/pages/evaluations/NewEvaluation/Components/NewEvaluationModalInner.tsxweb/oss/src/components/pages/evaluations/NewEvaluation/Components/SelectEvaluatorSection/SelectEvaluatorSection.tsxweb/oss/src/components/pages/evaluations/NewEvaluation/types.tsweb/oss/src/components/pages/evaluations/cellRenderers/cellRenderers.tsxweb/oss/src/components/pages/evaluations/onlineEvaluation/assets/helpers.tsweb/oss/src/components/pages/evaluations/onlineEvaluation/components/FiltersPreview.tsxweb/oss/src/components/pages/evaluations/utils.tsweb/oss/src/components/pages/observability/assets/getObservabilityColumns.tsxweb/oss/src/components/pages/observability/components/NodeNameCell.tsxweb/oss/src/components/pages/observability/components/ObservabilityHeader/index.tsxweb/oss/src/components/pages/observability/components/ObservabilityTable/index.tsxweb/oss/src/components/pages/observability/components/SessionsTable/assets/getSessionColumns.tsxweb/oss/src/components/pages/observability/components/SessionsTable/index.tsxweb/oss/src/components/pages/observability/components/TimestampCell.tsxweb/oss/src/components/pages/observability/dashboard/CustomAreaChart.tsxweb/oss/src/components/pages/overview/variants/VariantPopover.tsxweb/oss/src/components/pages/prompts/PromptsPage.tsxweb/oss/src/components/pages/settings/Organization/index.tsxweb/oss/src/hooks/usePostAuthRedirect.tsweb/oss/src/lib/Types.tsweb/oss/src/lib/api/assets/fetchClient.tsweb/oss/src/lib/evaluations/legacy.tsweb/oss/src/lib/helpers/analytics/AgPosthogProvider.tsxweb/oss/src/lib/helpers/dateTimeHelper/index.tsweb/oss/src/lib/hooks/useEvaluationRunMetrics/index.tsweb/oss/src/lib/hooks/useEvaluationRunMetrics/types.tsweb/oss/src/lib/hooks/usePreviewEvaluations/index.tsweb/oss/src/lib/hooks/usePreviewEvaluations/types.tsweb/oss/src/lib/onboarding/atoms.tsweb/oss/src/lib/onboarding/index.tsweb/oss/src/lib/onboarding/widget/store.tsweb/oss/src/lib/traces/traceUtils.tsweb/oss/src/pages/auth/[[...path]].tsxweb/oss/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/index.tsxweb/oss/src/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/overview/index.tsxweb/oss/src/pages/workspaces/accept.tsxweb/oss/src/services/evaluationRuns/api/index.tsweb/oss/src/services/evaluationRuns/api/types.tsweb/oss/src/services/evaluations/api/index.tsweb/oss/src/services/observability/types/index.tsweb/oss/src/services/organization/api/index.tsweb/oss/src/services/runMetrics/api/index.tsweb/oss/src/services/tracing/types/index.tsweb/oss/src/services/workspace/index.tsweb/oss/src/state/app/atoms/fetcher.tsweb/oss/src/state/app/selectors/app.tsweb/oss/src/state/appCreation/status.tsweb/oss/src/state/appState/hooks.tsweb/oss/src/state/entities/shared/createPaginatedEntityStore.tsweb/oss/src/state/newObservability/atoms/controls.tsweb/oss/src/state/newObservability/atoms/queries.tsweb/oss/src/state/newObservability/atoms/queryHelpers.tsweb/oss/src/state/newObservability/helpers/index.tsweb/oss/src/state/newObservability/selectors/tracing.tsweb/oss/src/state/newPlayground/workflowEntityBridge.tsweb/oss/src/state/onboarding/selectors.tsweb/oss/src/state/org/index.tsweb/oss/src/state/project/index.tsweb/oss/src/state/project/selectors/project.tsweb/oss/src/state/url/auth.tsweb/oss/src/state/url/focusDrawer.tsweb/oss/src/state/url/index.tsweb/oss/src/state/url/playground.tsweb/oss/src/state/workspace/atoms/mutations.tsweb/oss/tsconfig.jsonweb/packages/agenta-entities/src/shared/paginated/createPaginatedEntityStore.tsweb/packages/agenta-entities/src/workflow/index.tsweb/packages/agenta-entity-ui/src/variant/components/EnvironmentStatus.tsxweb/packages/agenta-ui/src/Editor/index.tsweb/packages/agenta-ui/src/InfiniteVirtualTable/columns/createStandardColumns.tsxweb/packages/agenta-ui/src/InfiniteVirtualTable/features/InfiniteVirtualTableFeatureShell.tsxweb/packages/agenta-ui/src/InfiniteVirtualTable/types.tsweb/packages/agenta-ui/src/drill-in/context/DrillInUIContext.tsxweb/tsc-error-inventory.md
| // 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> |
There was a problem hiding this comment.
🩺 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.
| // 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 |
There was a problem hiding this comment.
🩺 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.
| // 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) |
There was a problem hiding this comment.
🩺 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-L518web/oss/src/components/SharedDrawers/AddToTestsetDrawer/atoms/drawerState.ts#L571-L573


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, defaultfalse), written only at signupalongside
setIsNewUser(true)inusePostAuthRedirect. The sidebar reads a singlederived atom
advancedNavHiddenAtom; the five entries gained anisHiddenflag drivenby 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 everyonewho 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 fullnav.
advancedNavHiddenAtomis the stable seam for Phase 2: it becomesoverride ?? navSimplifiedDefaultwithout 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 childlinks, 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
tscand ESLint pass clean on OSS and EE.@agenta/osshas no CI-wired vitest runner, so a test inoss/srcwould never run. Covered bytsc+ ESLint + manual QA. Standing up an ossvitest harness is a possible follow-up.
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 branchso the diff shows only the feature, not the TypeScript cleanup underneath it.
docs/design/simplify-nav-new-users/(planningdocs only).
What to QA
project level and only Playground + Observability inside an app. No empty
"Evaluation" section header remains.
agenta:onboarding:<userId>:nav-simplifiedtofalsein localStorage and reload). The full sidebar returns, all pages present./apps/<app_id>/directly. It redirects to/apps/<app_id>/playground.This is part 2 of 2 in a stack made with GitButler: