[fix] Sort playground chat sessions by last message [AGE-4016] - #5556
Conversation
… sorting sessions by activity
|
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:
📝 WalkthroughSummary by CodeRabbit
WalkthroughThis PR updates API path normalization and archive generation, adds HITL connect interaction handling, sorts chat sessions by activity, simplifies new-user navigation, migrates table consumers to shared UI packages, consolidates entity types, and updates release and tooling metadata. ChangesBackend routing and archives
Agent experience and navigation
Shared web platform
Release and tooling
Estimated code review effort: 5 (Critical) | ~120 minutes Sequence Diagram(s)sequenceDiagram
participant AgentConversation
participant InteractionDock
participant useConnectFlow
participant OAuthPopup
AgentConversation->>InteractionDock: provide pending connect interaction
InteractionDock->>useConnectFlow: runConnect, cancel, or decline
useConnectFlow->>OAuthPopup: open connection flow
OAuthPopup-->>useConnectFlow: tools:oauth:complete message
useConnectFlow->>InteractionDock: settle output or error
Possibly related PRs
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Railway Preview Environment
Updated at 2026-07-30T08:39:41.179Z |
There was a problem hiding this comment.
Actionable comments posted: 8
🧹 Nitpick comments (2)
api/oss/src/middlewares/prefix.py (1)
40-64: 🚀 Performance & Scalability | 🔵 Trivial | 💤 Low valueRoute-table scan on every request.
_normalizecalls_known()(a linear scan overself._routes()with per-route regex matching) up to twice per request — once forpath, and again foralternatewhen the first misses. This effectively duplicates the matching work the router will redo right after. Likely negligible at typical route-table sizes, and the tradeoff is already called out in the docstring, but worth keeping in mind if the route count grows significantly (e.g., memoizing "known" prefixes, or building a path-prefix set once and reusing it, rather than re-walkingBaseRoute.matches()compiled regexes per call).web/oss/src/components/AgentChatSlice/components/clientTools/useConnectFlow.ts (1)
36-41: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueResolve or drop the open question left in the comment.
// NOTE for Mahmoud: confirm the bound — open question §"abandon timeout".reads as an unresolved TODO addressed to a specific person. If the 3-minute bound is already confirmed, drop the note; otherwise track it as a follow-up rather than shipping it as an inline comment.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 3e9a59ea-42da-4cca-ab58-45f8917921b6
⛔ Files ignored due to path filters (6)
api/uv.lockis excluded by!**/*.lockclients/python/uv.lockis excluded by!**/*.locksdks/python/uv.lockis excluded by!**/*.lockservices/runner/pnpm-lock.yamlis excluded by!**/pnpm-lock.yamlservices/uv.lockis excluded by!**/*.lockweb/pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (186)
.gitleaksignoreapi/entrypoints/routers.pyapi/oss/src/core/mounts/service.pyapi/oss/src/middlewares/prefix.pyapi/oss/tests/pytest/unit/middlewares/test_prefix.pyapi/oss/tests/pytest/unit/test_mounts_file_ops.pyapi/pyproject.tomlclients/python/pyproject.tomldocs/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.mdhosting/kubernetes/helm/Chart.yamlsdks/python/pyproject.tomlservices/pyproject.tomlservices/runner/package.jsonweb/ee/css-modules.d.tsweb/ee/package.jsonweb/ee/tsconfig.jsonweb/oss/css-modules.d.tsweb/oss/package.jsonweb/oss/src/components/AgentChatSlice/AgentConversation.tsxweb/oss/src/components/AgentChatSlice/assets/markdown.tsxweb/oss/src/components/AgentChatSlice/components/AgentMessage.tsxweb/oss/src/components/AgentChatSlice/components/ConnectModelBanner.tsxweb/oss/src/components/AgentChatSlice/components/Inspector/InspectSessionButton.tsxweb/oss/src/components/AgentChatSlice/components/InteractionDock.tsxweb/oss/src/components/AgentChatSlice/components/QueuedMessages.tsxweb/oss/src/components/AgentChatSlice/components/SessionHistoryMenu.tsxweb/oss/src/components/AgentChatSlice/components/SessionRail.tsxweb/oss/src/components/AgentChatSlice/components/ToolActivity.tsxweb/oss/src/components/AgentChatSlice/components/clientTools/ConnectToolWidget.tsxweb/oss/src/components/AgentChatSlice/components/clientTools/useConnectFlow.tsweb/oss/src/components/AgentChatSlice/state/projectSessions.tsweb/oss/src/components/AgentChatSlice/state/sessions.tsweb/oss/src/components/Drives/useSessionDrive.tsweb/oss/src/components/EvalRunDetails/Table.tsxweb/oss/src/components/EvalRunDetails/atoms/table/run.tsweb/oss/src/components/EvalRunDetails/atoms/traces.tsweb/oss/src/components/EvalRunDetails/components/CompareRunsMenu.tsxweb/oss/src/components/EvalRunDetails/components/EvalTestcaseDrawerAdapter/index.tsxweb/oss/src/components/EvalRunDetails/components/FocusDrawerHeader.tsxweb/oss/src/components/EvalRunDetails/components/FocusDrawerSidePanel.tsxweb/oss/src/components/EvalRunDetails/components/columnVisibility/ColumnVisibilityPopoverContent.tsxweb/oss/src/components/EvalRunDetails/components/views/SingleScenarioViewerPOC/ScenarioNavigator.tsxweb/oss/src/components/EvalRunDetails/components/views/SingleScenarioViewerPOC/index.tsxweb/oss/src/components/EvalRunDetails/evaluationPreviewTableStore.tsweb/oss/src/components/EvalRunDetails/hooks/useCellVisibility.tsweb/oss/src/components/EvalRunDetails/hooks/usePreviewColumns.tsxweb/oss/src/components/EvalRunDetails/utils/buildPreviewColumns.tsxweb/oss/src/components/EvaluationRunsTablePOC/atoms/fetchAutoEvaluationRuns.tsweb/oss/src/components/EvaluationRunsTablePOC/atoms/tableStore.tsweb/oss/src/components/EvaluationRunsTablePOC/components/EvaluationRunsTable/index.tsxweb/oss/src/components/EvaluationRunsTablePOC/components/EvaluationRunsTable/types.tsweb/oss/src/components/EvaluationRunsTablePOC/components/columnVisibility/ColumnVisibilityPopoverContent.tsxweb/oss/src/components/EvaluationRunsTablePOC/components/filters/EvaluationRunsHeaderFilters.tsxweb/oss/src/components/EvaluationRunsTablePOC/hooks/useEvaluationRunsColumns/index.tsxweb/oss/src/components/EvaluationRunsTablePOC/hooks/useEvaluationRunsColumns/utils.tsxweb/oss/src/components/EvaluationRunsTablePOC/hooks/useEvaluatorHeaderReference.tsweb/oss/src/components/EvaluationRunsTablePOC/types.tsweb/oss/src/components/InfiniteVirtualTable/InfiniteVirtualTable.tsxweb/oss/src/components/InfiniteVirtualTable/atoms/columnHiddenKeys.tsweb/oss/src/components/InfiniteVirtualTable/atoms/columnVisibility.tsweb/oss/src/components/InfiniteVirtualTable/atoms/columnWidths.tsweb/oss/src/components/InfiniteVirtualTable/columns/cells.tsxweb/oss/src/components/InfiniteVirtualTable/columns/createStandardColumns.tsxweb/oss/src/components/InfiniteVirtualTable/columns/createTableColumns.tsweb/oss/src/components/InfiniteVirtualTable/columns/types.tsweb/oss/src/components/InfiniteVirtualTable/components/ColumnVisibilityHeader.tsxweb/oss/src/components/InfiniteVirtualTable/components/ColumnVisibilityTrigger.tsxweb/oss/src/components/InfiniteVirtualTable/components/InfiniteVirtualTableInner.tsxweb/oss/src/components/InfiniteVirtualTable/components/TableDescription.tsxweb/oss/src/components/InfiniteVirtualTable/components/TableShell.tsxweb/oss/src/components/InfiniteVirtualTable/components/columnVisibility/ColumnVisibilityMenuTrigger.tsxweb/oss/src/components/InfiniteVirtualTable/components/columnVisibility/ColumnVisibilityPopoverContent.tsxweb/oss/src/components/InfiniteVirtualTable/components/columnVisibility/TableSettingsDropdown.tsxweb/oss/src/components/InfiniteVirtualTable/components/filters/FiltersPopoverTrigger.tsxweb/oss/src/components/InfiniteVirtualTable/context/ColumnVisibilityContext.tsweb/oss/src/components/InfiniteVirtualTable/context/ColumnVisibilityFlagContext.tsxweb/oss/src/components/InfiniteVirtualTable/context/VirtualTableScrollContainerContext.tsweb/oss/src/components/InfiniteVirtualTable/createInfiniteDatasetStore.tsweb/oss/src/components/InfiniteVirtualTable/createInfiniteTableStore.tsweb/oss/src/components/InfiniteVirtualTable/features/InfiniteVirtualTableFeatureShell.tsxweb/oss/src/components/InfiniteVirtualTable/features/index.tsweb/oss/src/components/InfiniteVirtualTable/features/useInfiniteTableFeaturePagination.tsweb/oss/src/components/InfiniteVirtualTable/helpers/createSimpleTableStore.tsweb/oss/src/components/InfiniteVirtualTable/helpers/createTableRowHelpers.tsweb/oss/src/components/InfiniteVirtualTable/helpers/index.tsweb/oss/src/components/InfiniteVirtualTable/hooks/useColumnDomRefs.tsweb/oss/src/components/InfiniteVirtualTable/hooks/useColumnVisibility.tsweb/oss/src/components/InfiniteVirtualTable/hooks/useColumnVisibilityControls.tsweb/oss/src/components/InfiniteVirtualTable/hooks/useContainerResize.tsweb/oss/src/components/InfiniteVirtualTable/hooks/useContainerSize.tsweb/oss/src/components/InfiniteVirtualTable/hooks/useEditableTable.tsweb/oss/src/components/InfiniteVirtualTable/hooks/useExpandableRows.tsxweb/oss/src/components/InfiniteVirtualTable/hooks/useHeaderViewportVisibility.tsweb/oss/src/components/InfiniteVirtualTable/hooks/useInfiniteScroll.tsweb/oss/src/components/InfiniteVirtualTable/hooks/useInfiniteTablePagination.tsweb/oss/src/components/InfiniteVirtualTable/hooks/useResizableColumns.tsweb/oss/src/components/InfiniteVirtualTable/hooks/useRowHeight.tsxweb/oss/src/components/InfiniteVirtualTable/hooks/useScopedColumnVisibility.tsxweb/oss/src/components/InfiniteVirtualTable/hooks/useScrollConfig.tsweb/oss/src/components/InfiniteVirtualTable/hooks/useScrollContainer.tsweb/oss/src/components/InfiniteVirtualTable/hooks/useSmartResizableColumns.tsweb/oss/src/components/InfiniteVirtualTable/hooks/useTableActions.tsxweb/oss/src/components/InfiniteVirtualTable/hooks/useTableExport.tsweb/oss/src/components/InfiniteVirtualTable/hooks/useTableHeaderHeight.tsweb/oss/src/components/InfiniteVirtualTable/hooks/useTableKeyboardShortcuts.tsweb/oss/src/components/InfiniteVirtualTable/hooks/useTableManager.tsxweb/oss/src/components/InfiniteVirtualTable/hooks/useTableRowSelection.tsweb/oss/src/components/InfiniteVirtualTable/index.tsweb/oss/src/components/InfiniteVirtualTable/providers/ColumnVisibilityProvider.tsxweb/oss/src/components/InfiniteVirtualTable/providers/InfiniteVirtualTableStoreProvider.tsxweb/oss/src/components/InfiniteVirtualTable/types.tsweb/oss/src/components/InfiniteVirtualTable/utils/columnUtils.tsweb/oss/src/components/Playground/Components/TestsetDropdown/TestsetPreviewPanelWrapper.tsxweb/oss/src/components/SessionInspector/PanelSessionInspectorButton.tsxweb/oss/src/components/SharedDrawers/AddToTestsetDrawer/components/PreviewSection.tsxweb/oss/src/components/SharedDrawers/SessionDrawer/components/SessionDrawerButton/index.tsxweb/oss/src/components/SharedDrawers/SessionDrawer/store/sessionDrawerStore.tsweb/oss/src/components/SharedDrawers/SessionDrawer/types.tsweb/oss/src/components/SharedDrawers/TraceDrawer/components/TraceContent/components/OverviewTabItem/index.tsxweb/oss/src/components/SharedDrawers/TraceDrawer/components/TraceTree/assets/spanVisibility.tsweb/oss/src/components/SharedDrawers/TraceDrawer/components/TraceTree/index.tsxweb/oss/src/components/SharedDrawers/TraceDrawer/store/traceDrawerStore.tsweb/oss/src/components/Sidebar/dynamic/registry.tsweb/oss/src/components/Sidebar/hooks/useSidebarConfig/index.tsxweb/oss/src/components/Sidebar/scopes/settingsScope.tsxweb/oss/src/components/TestcasesTableNew/components/TestcaseHeader.tsxweb/oss/src/components/TestcasesTableNew/components/TestcasesTableShell.tsxweb/oss/src/components/TestcasesTableNew/index.tsxweb/oss/src/components/TestcasesTableNew/state/rowHeight.tsweb/oss/src/components/TestsetsTable/TestsetsTable.tsxweb/oss/src/components/TestsetsTable/assets/createTestsetsColumns.tsxweb/oss/src/components/TestsetsTable/atoms/fetchTestsets.tsweb/oss/src/components/TestsetsTable/components/TestsetsHeaderFilters.tsxweb/oss/src/components/pages/agent-home/OnboardingEntry.tsxweb/oss/src/components/pages/agent-home/hooks/useCreateAgent.tsweb/oss/src/components/pages/agents/AgentsPage.tsxweb/oss/src/components/pages/agents/store.tsweb/oss/src/components/pages/observability/assets/constants.tsweb/oss/src/components/pages/observability/assets/exportUtils.tsweb/oss/src/components/pages/observability/assets/getObservabilityColumns.tsxweb/oss/src/components/pages/observability/components/AvatarTreeContent.tsxweb/oss/src/components/pages/observability/components/NodeNameCell.tsxweb/oss/src/components/pages/observability/components/SessionsTable/assets/getSessionColumns.tsxweb/oss/src/components/pages/observability/components/StatusRenderer.tsxweb/oss/src/components/pages/observability/components/TimestampCell.tsxweb/oss/src/components/pages/prompts/PromptsPage.tsxweb/oss/src/components/pages/settings/FeatureFlags/FeatureFlags.tsxweb/oss/src/components/pages/settings/Organization/General.tsxweb/oss/src/components/pages/settings/assets/navigation.test.tsweb/oss/src/components/pages/settings/assets/navigation.tsweb/oss/src/hooks/usePostAuthRedirect.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/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/index.tsxweb/oss/src/pages/w/[workspace_id]/p/[project_id]/settings/index.tsxweb/oss/src/services/tracing/types/index.tsweb/oss/src/state/app/atoms/fetcher.tsweb/oss/src/state/entities/shared/README.mdweb/oss/src/state/entities/shared/createPaginatedEntityStore.tsweb/oss/src/state/entities/testcase/paginatedStore.tsweb/oss/src/state/entities/testset/paginatedStore.tsweb/oss/src/state/newObservability/atoms/queries.tsweb/oss/src/state/onboarding/selectors.tsweb/oss/src/state/settings/featureFlags.tsweb/oss/tsconfig.jsonweb/package.jsonweb/packages/agenta-api-client/package.jsonweb/packages/agenta-entities/package.jsonweb/packages/agenta-entities/src/evaluationRun/core/schema.tsweb/packages/agenta-entities/src/evaluationRun/etl/resolveMappings.tsweb/packages/agenta-entities/src/trace/etl/exportMatchingTraces.tsweb/packages/agenta-entities/tests/unit/export-matching-traces.test.tsweb/packages/agenta-entity-ui/package.jsonweb/packages/agenta-playground/src/index.tsweb/packages/agenta-playground/src/state/execution/index.tsweb/packages/agenta-playground/src/state/index.tsweb/packages/agenta-shared/package.jsonweb/packages/agenta-ui/src/InfiniteVirtualTable/index.tsweb/packages/agenta-ui/src/InfiniteVirtualTable/types.tsweb/tests/package.json
💤 Files with no reviewable changes (58)
- web/oss/src/components/SharedDrawers/SessionDrawer/types.ts
- web/oss/src/components/InfiniteVirtualTable/providers/ColumnVisibilityProvider.tsx
- web/oss/src/components/InfiniteVirtualTable/components/TableDescription.tsx
- web/oss/src/components/InfiniteVirtualTable/createInfiniteTableStore.ts
- web/oss/src/components/InfiniteVirtualTable/components/filters/FiltersPopoverTrigger.tsx
- web/oss/src/components/InfiniteVirtualTable/features/useInfiniteTableFeaturePagination.ts
- web/oss/src/components/InfiniteVirtualTable/providers/InfiniteVirtualTableStoreProvider.tsx
- web/oss/src/components/InfiniteVirtualTable/columns/cells.tsx
- web/oss/src/components/InfiniteVirtualTable/context/VirtualTableScrollContainerContext.ts
- web/oss/src/components/InfiniteVirtualTable/components/ColumnVisibilityTrigger.tsx
- web/oss/src/components/InfiniteVirtualTable/helpers/index.ts
- web/oss/src/components/InfiniteVirtualTable/atoms/columnWidths.ts
- web/oss/src/components/InfiniteVirtualTable/context/ColumnVisibilityFlagContext.tsx
- web/oss/src/components/InfiniteVirtualTable/hooks/useColumnDomRefs.ts
- web/oss/src/components/InfiniteVirtualTable/components/columnVisibility/TableSettingsDropdown.tsx
- web/oss/src/components/InfiniteVirtualTable/atoms/columnHiddenKeys.ts
- web/oss/src/components/InfiniteVirtualTable/components/ColumnVisibilityHeader.tsx
- web/oss/src/components/InfiniteVirtualTable/hooks/useResizableColumns.ts
- web/oss/src/components/InfiniteVirtualTable/hooks/useInfiniteTablePagination.ts
- web/oss/src/components/InfiniteVirtualTable/hooks/useColumnVisibility.ts
- web/oss/src/components/InfiniteVirtualTable/columns/createTableColumns.ts
- web/oss/src/components/InfiniteVirtualTable/helpers/createTableRowHelpers.ts
- web/oss/src/components/InfiniteVirtualTable/hooks/useContainerSize.ts
- web/oss/src/components/InfiniteVirtualTable/components/TableShell.tsx
- web/oss/src/components/InfiniteVirtualTable/components/columnVisibility/ColumnVisibilityMenuTrigger.tsx
- web/oss/src/components/InfiniteVirtualTable/utils/columnUtils.ts
- web/oss/src/components/InfiniteVirtualTable/hooks/useRowHeight.tsx
- web/oss/src/components/InfiniteVirtualTable/createInfiniteDatasetStore.ts
- web/oss/src/components/InfiniteVirtualTable/hooks/useTableRowSelection.ts
- web/oss/src/components/InfiniteVirtualTable/hooks/useScrollConfig.ts
- web/oss/src/components/InfiniteVirtualTable/columns/types.ts
- web/oss/src/components/InfiniteVirtualTable/helpers/createSimpleTableStore.ts
- web/oss/src/components/InfiniteVirtualTable/hooks/useTableHeaderHeight.ts
- web/oss/src/components/InfiniteVirtualTable/components/columnVisibility/ColumnVisibilityPopoverContent.tsx
- web/oss/src/components/InfiniteVirtualTable/hooks/useTableKeyboardShortcuts.ts
- web/oss/src/components/InfiniteVirtualTable/InfiniteVirtualTable.tsx
- web/oss/src/components/InfiniteVirtualTable/hooks/useInfiniteScroll.ts
- web/oss/src/components/InfiniteVirtualTable/hooks/useTableManager.tsx
- web/oss/src/components/InfiniteVirtualTable/features/index.ts
- web/oss/src/components/InfiniteVirtualTable/hooks/useContainerResize.ts
- web/oss/src/components/InfiniteVirtualTable/hooks/useEditableTable.ts
- web/oss/src/components/InfiniteVirtualTable/hooks/useColumnVisibilityControls.ts
- web/oss/src/components/SharedDrawers/SessionDrawer/components/SessionDrawerButton/index.tsx
- web/oss/src/components/AgentChatSlice/components/AgentMessage.tsx
- web/oss/src/components/InfiniteVirtualTable/columns/createStandardColumns.tsx
- web/oss/src/components/InfiniteVirtualTable/types.ts
- web/oss/src/components/InfiniteVirtualTable/hooks/useTableExport.ts
- web/oss/src/components/InfiniteVirtualTable/atoms/columnVisibility.ts
- web/oss/src/components/InfiniteVirtualTable/hooks/useScopedColumnVisibility.tsx
- web/oss/src/components/InfiniteVirtualTable/hooks/useScrollContainer.ts
- web/oss/src/components/InfiniteVirtualTable/components/InfiniteVirtualTableInner.tsx
- web/oss/src/components/InfiniteVirtualTable/hooks/useHeaderViewportVisibility.ts
- web/oss/src/components/InfiniteVirtualTable/hooks/useTableActions.tsx
- web/oss/src/components/InfiniteVirtualTable/context/ColumnVisibilityContext.ts
- web/oss/src/components/InfiniteVirtualTable/hooks/useSmartResizableColumns.ts
- web/oss/src/components/InfiniteVirtualTable/hooks/useExpandableRows.tsx
- web/oss/src/components/InfiniteVirtualTable/features/InfiniteVirtualTableFeatureShell.tsx
- web/oss/src/components/InfiniteVirtualTable/index.ts
There was a problem hiding this comment.
Caution
Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.
Actionable comments posted: 8
🧹 Nitpick comments (2)
api/oss/src/middlewares/prefix.py (1)
40-64: 🚀 Performance & Scalability | 🔵 Trivial | 💤 Low valueRoute-table scan on every request.
_normalizecalls_known()(a linear scan overself._routes()with per-route regex matching) up to twice per request — once forpath, and again foralternatewhen the first misses. This effectively duplicates the matching work the router will redo right after. Likely negligible at typical route-table sizes, and the tradeoff is already called out in the docstring, but worth keeping in mind if the route count grows significantly (e.g., memoizing "known" prefixes, or building a path-prefix set once and reusing it, rather than re-walkingBaseRoute.matches()compiled regexes per call).web/oss/src/components/AgentChatSlice/components/clientTools/useConnectFlow.ts (1)
36-41: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueResolve or drop the open question left in the comment.
// NOTE for Mahmoud: confirm the bound — open question §"abandon timeout".reads as an unresolved TODO addressed to a specific person. If the 3-minute bound is already confirmed, drop the note; otherwise track it as a follow-up rather than shipping it as an inline comment.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 3e9a59ea-42da-4cca-ab58-45f8917921b6
⛔ Files ignored due to path filters (6)
api/uv.lockis excluded by!**/*.lockclients/python/uv.lockis excluded by!**/*.locksdks/python/uv.lockis excluded by!**/*.lockservices/runner/pnpm-lock.yamlis excluded by!**/pnpm-lock.yamlservices/uv.lockis excluded by!**/*.lockweb/pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (186)
.gitleaksignoreapi/entrypoints/routers.pyapi/oss/src/core/mounts/service.pyapi/oss/src/middlewares/prefix.pyapi/oss/tests/pytest/unit/middlewares/test_prefix.pyapi/oss/tests/pytest/unit/test_mounts_file_ops.pyapi/pyproject.tomlclients/python/pyproject.tomldocs/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.mdhosting/kubernetes/helm/Chart.yamlsdks/python/pyproject.tomlservices/pyproject.tomlservices/runner/package.jsonweb/ee/css-modules.d.tsweb/ee/package.jsonweb/ee/tsconfig.jsonweb/oss/css-modules.d.tsweb/oss/package.jsonweb/oss/src/components/AgentChatSlice/AgentConversation.tsxweb/oss/src/components/AgentChatSlice/assets/markdown.tsxweb/oss/src/components/AgentChatSlice/components/AgentMessage.tsxweb/oss/src/components/AgentChatSlice/components/ConnectModelBanner.tsxweb/oss/src/components/AgentChatSlice/components/Inspector/InspectSessionButton.tsxweb/oss/src/components/AgentChatSlice/components/InteractionDock.tsxweb/oss/src/components/AgentChatSlice/components/QueuedMessages.tsxweb/oss/src/components/AgentChatSlice/components/SessionHistoryMenu.tsxweb/oss/src/components/AgentChatSlice/components/SessionRail.tsxweb/oss/src/components/AgentChatSlice/components/ToolActivity.tsxweb/oss/src/components/AgentChatSlice/components/clientTools/ConnectToolWidget.tsxweb/oss/src/components/AgentChatSlice/components/clientTools/useConnectFlow.tsweb/oss/src/components/AgentChatSlice/state/projectSessions.tsweb/oss/src/components/AgentChatSlice/state/sessions.tsweb/oss/src/components/Drives/useSessionDrive.tsweb/oss/src/components/EvalRunDetails/Table.tsxweb/oss/src/components/EvalRunDetails/atoms/table/run.tsweb/oss/src/components/EvalRunDetails/atoms/traces.tsweb/oss/src/components/EvalRunDetails/components/CompareRunsMenu.tsxweb/oss/src/components/EvalRunDetails/components/EvalTestcaseDrawerAdapter/index.tsxweb/oss/src/components/EvalRunDetails/components/FocusDrawerHeader.tsxweb/oss/src/components/EvalRunDetails/components/FocusDrawerSidePanel.tsxweb/oss/src/components/EvalRunDetails/components/columnVisibility/ColumnVisibilityPopoverContent.tsxweb/oss/src/components/EvalRunDetails/components/views/SingleScenarioViewerPOC/ScenarioNavigator.tsxweb/oss/src/components/EvalRunDetails/components/views/SingleScenarioViewerPOC/index.tsxweb/oss/src/components/EvalRunDetails/evaluationPreviewTableStore.tsweb/oss/src/components/EvalRunDetails/hooks/useCellVisibility.tsweb/oss/src/components/EvalRunDetails/hooks/usePreviewColumns.tsxweb/oss/src/components/EvalRunDetails/utils/buildPreviewColumns.tsxweb/oss/src/components/EvaluationRunsTablePOC/atoms/fetchAutoEvaluationRuns.tsweb/oss/src/components/EvaluationRunsTablePOC/atoms/tableStore.tsweb/oss/src/components/EvaluationRunsTablePOC/components/EvaluationRunsTable/index.tsxweb/oss/src/components/EvaluationRunsTablePOC/components/EvaluationRunsTable/types.tsweb/oss/src/components/EvaluationRunsTablePOC/components/columnVisibility/ColumnVisibilityPopoverContent.tsxweb/oss/src/components/EvaluationRunsTablePOC/components/filters/EvaluationRunsHeaderFilters.tsxweb/oss/src/components/EvaluationRunsTablePOC/hooks/useEvaluationRunsColumns/index.tsxweb/oss/src/components/EvaluationRunsTablePOC/hooks/useEvaluationRunsColumns/utils.tsxweb/oss/src/components/EvaluationRunsTablePOC/hooks/useEvaluatorHeaderReference.tsweb/oss/src/components/EvaluationRunsTablePOC/types.tsweb/oss/src/components/InfiniteVirtualTable/InfiniteVirtualTable.tsxweb/oss/src/components/InfiniteVirtualTable/atoms/columnHiddenKeys.tsweb/oss/src/components/InfiniteVirtualTable/atoms/columnVisibility.tsweb/oss/src/components/InfiniteVirtualTable/atoms/columnWidths.tsweb/oss/src/components/InfiniteVirtualTable/columns/cells.tsxweb/oss/src/components/InfiniteVirtualTable/columns/createStandardColumns.tsxweb/oss/src/components/InfiniteVirtualTable/columns/createTableColumns.tsweb/oss/src/components/InfiniteVirtualTable/columns/types.tsweb/oss/src/components/InfiniteVirtualTable/components/ColumnVisibilityHeader.tsxweb/oss/src/components/InfiniteVirtualTable/components/ColumnVisibilityTrigger.tsxweb/oss/src/components/InfiniteVirtualTable/components/InfiniteVirtualTableInner.tsxweb/oss/src/components/InfiniteVirtualTable/components/TableDescription.tsxweb/oss/src/components/InfiniteVirtualTable/components/TableShell.tsxweb/oss/src/components/InfiniteVirtualTable/components/columnVisibility/ColumnVisibilityMenuTrigger.tsxweb/oss/src/components/InfiniteVirtualTable/components/columnVisibility/ColumnVisibilityPopoverContent.tsxweb/oss/src/components/InfiniteVirtualTable/components/columnVisibility/TableSettingsDropdown.tsxweb/oss/src/components/InfiniteVirtualTable/components/filters/FiltersPopoverTrigger.tsxweb/oss/src/components/InfiniteVirtualTable/context/ColumnVisibilityContext.tsweb/oss/src/components/InfiniteVirtualTable/context/ColumnVisibilityFlagContext.tsxweb/oss/src/components/InfiniteVirtualTable/context/VirtualTableScrollContainerContext.tsweb/oss/src/components/InfiniteVirtualTable/createInfiniteDatasetStore.tsweb/oss/src/components/InfiniteVirtualTable/createInfiniteTableStore.tsweb/oss/src/components/InfiniteVirtualTable/features/InfiniteVirtualTableFeatureShell.tsxweb/oss/src/components/InfiniteVirtualTable/features/index.tsweb/oss/src/components/InfiniteVirtualTable/features/useInfiniteTableFeaturePagination.tsweb/oss/src/components/InfiniteVirtualTable/helpers/createSimpleTableStore.tsweb/oss/src/components/InfiniteVirtualTable/helpers/createTableRowHelpers.tsweb/oss/src/components/InfiniteVirtualTable/helpers/index.tsweb/oss/src/components/InfiniteVirtualTable/hooks/useColumnDomRefs.tsweb/oss/src/components/InfiniteVirtualTable/hooks/useColumnVisibility.tsweb/oss/src/components/InfiniteVirtualTable/hooks/useColumnVisibilityControls.tsweb/oss/src/components/InfiniteVirtualTable/hooks/useContainerResize.tsweb/oss/src/components/InfiniteVirtualTable/hooks/useContainerSize.tsweb/oss/src/components/InfiniteVirtualTable/hooks/useEditableTable.tsweb/oss/src/components/InfiniteVirtualTable/hooks/useExpandableRows.tsxweb/oss/src/components/InfiniteVirtualTable/hooks/useHeaderViewportVisibility.tsweb/oss/src/components/InfiniteVirtualTable/hooks/useInfiniteScroll.tsweb/oss/src/components/InfiniteVirtualTable/hooks/useInfiniteTablePagination.tsweb/oss/src/components/InfiniteVirtualTable/hooks/useResizableColumns.tsweb/oss/src/components/InfiniteVirtualTable/hooks/useRowHeight.tsxweb/oss/src/components/InfiniteVirtualTable/hooks/useScopedColumnVisibility.tsxweb/oss/src/components/InfiniteVirtualTable/hooks/useScrollConfig.tsweb/oss/src/components/InfiniteVirtualTable/hooks/useScrollContainer.tsweb/oss/src/components/InfiniteVirtualTable/hooks/useSmartResizableColumns.tsweb/oss/src/components/InfiniteVirtualTable/hooks/useTableActions.tsxweb/oss/src/components/InfiniteVirtualTable/hooks/useTableExport.tsweb/oss/src/components/InfiniteVirtualTable/hooks/useTableHeaderHeight.tsweb/oss/src/components/InfiniteVirtualTable/hooks/useTableKeyboardShortcuts.tsweb/oss/src/components/InfiniteVirtualTable/hooks/useTableManager.tsxweb/oss/src/components/InfiniteVirtualTable/hooks/useTableRowSelection.tsweb/oss/src/components/InfiniteVirtualTable/index.tsweb/oss/src/components/InfiniteVirtualTable/providers/ColumnVisibilityProvider.tsxweb/oss/src/components/InfiniteVirtualTable/providers/InfiniteVirtualTableStoreProvider.tsxweb/oss/src/components/InfiniteVirtualTable/types.tsweb/oss/src/components/InfiniteVirtualTable/utils/columnUtils.tsweb/oss/src/components/Playground/Components/TestsetDropdown/TestsetPreviewPanelWrapper.tsxweb/oss/src/components/SessionInspector/PanelSessionInspectorButton.tsxweb/oss/src/components/SharedDrawers/AddToTestsetDrawer/components/PreviewSection.tsxweb/oss/src/components/SharedDrawers/SessionDrawer/components/SessionDrawerButton/index.tsxweb/oss/src/components/SharedDrawers/SessionDrawer/store/sessionDrawerStore.tsweb/oss/src/components/SharedDrawers/SessionDrawer/types.tsweb/oss/src/components/SharedDrawers/TraceDrawer/components/TraceContent/components/OverviewTabItem/index.tsxweb/oss/src/components/SharedDrawers/TraceDrawer/components/TraceTree/assets/spanVisibility.tsweb/oss/src/components/SharedDrawers/TraceDrawer/components/TraceTree/index.tsxweb/oss/src/components/SharedDrawers/TraceDrawer/store/traceDrawerStore.tsweb/oss/src/components/Sidebar/dynamic/registry.tsweb/oss/src/components/Sidebar/hooks/useSidebarConfig/index.tsxweb/oss/src/components/Sidebar/scopes/settingsScope.tsxweb/oss/src/components/TestcasesTableNew/components/TestcaseHeader.tsxweb/oss/src/components/TestcasesTableNew/components/TestcasesTableShell.tsxweb/oss/src/components/TestcasesTableNew/index.tsxweb/oss/src/components/TestcasesTableNew/state/rowHeight.tsweb/oss/src/components/TestsetsTable/TestsetsTable.tsxweb/oss/src/components/TestsetsTable/assets/createTestsetsColumns.tsxweb/oss/src/components/TestsetsTable/atoms/fetchTestsets.tsweb/oss/src/components/TestsetsTable/components/TestsetsHeaderFilters.tsxweb/oss/src/components/pages/agent-home/OnboardingEntry.tsxweb/oss/src/components/pages/agent-home/hooks/useCreateAgent.tsweb/oss/src/components/pages/agents/AgentsPage.tsxweb/oss/src/components/pages/agents/store.tsweb/oss/src/components/pages/observability/assets/constants.tsweb/oss/src/components/pages/observability/assets/exportUtils.tsweb/oss/src/components/pages/observability/assets/getObservabilityColumns.tsxweb/oss/src/components/pages/observability/components/AvatarTreeContent.tsxweb/oss/src/components/pages/observability/components/NodeNameCell.tsxweb/oss/src/components/pages/observability/components/SessionsTable/assets/getSessionColumns.tsxweb/oss/src/components/pages/observability/components/StatusRenderer.tsxweb/oss/src/components/pages/observability/components/TimestampCell.tsxweb/oss/src/components/pages/prompts/PromptsPage.tsxweb/oss/src/components/pages/settings/FeatureFlags/FeatureFlags.tsxweb/oss/src/components/pages/settings/Organization/General.tsxweb/oss/src/components/pages/settings/assets/navigation.test.tsweb/oss/src/components/pages/settings/assets/navigation.tsweb/oss/src/hooks/usePostAuthRedirect.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/pages/w/[workspace_id]/p/[project_id]/apps/[app_id]/index.tsxweb/oss/src/pages/w/[workspace_id]/p/[project_id]/settings/index.tsxweb/oss/src/services/tracing/types/index.tsweb/oss/src/state/app/atoms/fetcher.tsweb/oss/src/state/entities/shared/README.mdweb/oss/src/state/entities/shared/createPaginatedEntityStore.tsweb/oss/src/state/entities/testcase/paginatedStore.tsweb/oss/src/state/entities/testset/paginatedStore.tsweb/oss/src/state/newObservability/atoms/queries.tsweb/oss/src/state/onboarding/selectors.tsweb/oss/src/state/settings/featureFlags.tsweb/oss/tsconfig.jsonweb/package.jsonweb/packages/agenta-api-client/package.jsonweb/packages/agenta-entities/package.jsonweb/packages/agenta-entities/src/evaluationRun/core/schema.tsweb/packages/agenta-entities/src/evaluationRun/etl/resolveMappings.tsweb/packages/agenta-entities/src/trace/etl/exportMatchingTraces.tsweb/packages/agenta-entities/tests/unit/export-matching-traces.test.tsweb/packages/agenta-entity-ui/package.jsonweb/packages/agenta-playground/src/index.tsweb/packages/agenta-playground/src/state/execution/index.tsweb/packages/agenta-playground/src/state/index.tsweb/packages/agenta-shared/package.jsonweb/packages/agenta-ui/src/InfiniteVirtualTable/index.tsweb/packages/agenta-ui/src/InfiniteVirtualTable/types.tsweb/tests/package.json
💤 Files with no reviewable changes (58)
- web/oss/src/components/SharedDrawers/SessionDrawer/types.ts
- web/oss/src/components/InfiniteVirtualTable/providers/ColumnVisibilityProvider.tsx
- web/oss/src/components/InfiniteVirtualTable/components/TableDescription.tsx
- web/oss/src/components/InfiniteVirtualTable/createInfiniteTableStore.ts
- web/oss/src/components/InfiniteVirtualTable/components/filters/FiltersPopoverTrigger.tsx
- web/oss/src/components/InfiniteVirtualTable/features/useInfiniteTableFeaturePagination.ts
- web/oss/src/components/InfiniteVirtualTable/providers/InfiniteVirtualTableStoreProvider.tsx
- web/oss/src/components/InfiniteVirtualTable/columns/cells.tsx
- web/oss/src/components/InfiniteVirtualTable/context/VirtualTableScrollContainerContext.ts
- web/oss/src/components/InfiniteVirtualTable/components/ColumnVisibilityTrigger.tsx
- web/oss/src/components/InfiniteVirtualTable/helpers/index.ts
- web/oss/src/components/InfiniteVirtualTable/atoms/columnWidths.ts
- web/oss/src/components/InfiniteVirtualTable/context/ColumnVisibilityFlagContext.tsx
- web/oss/src/components/InfiniteVirtualTable/hooks/useColumnDomRefs.ts
- web/oss/src/components/InfiniteVirtualTable/components/columnVisibility/TableSettingsDropdown.tsx
- web/oss/src/components/InfiniteVirtualTable/atoms/columnHiddenKeys.ts
- web/oss/src/components/InfiniteVirtualTable/components/ColumnVisibilityHeader.tsx
- web/oss/src/components/InfiniteVirtualTable/hooks/useResizableColumns.ts
- web/oss/src/components/InfiniteVirtualTable/hooks/useInfiniteTablePagination.ts
- web/oss/src/components/InfiniteVirtualTable/hooks/useColumnVisibility.ts
- web/oss/src/components/InfiniteVirtualTable/columns/createTableColumns.ts
- web/oss/src/components/InfiniteVirtualTable/helpers/createTableRowHelpers.ts
- web/oss/src/components/InfiniteVirtualTable/hooks/useContainerSize.ts
- web/oss/src/components/InfiniteVirtualTable/components/TableShell.tsx
- web/oss/src/components/InfiniteVirtualTable/components/columnVisibility/ColumnVisibilityMenuTrigger.tsx
- web/oss/src/components/InfiniteVirtualTable/utils/columnUtils.ts
- web/oss/src/components/InfiniteVirtualTable/hooks/useRowHeight.tsx
- web/oss/src/components/InfiniteVirtualTable/createInfiniteDatasetStore.ts
- web/oss/src/components/InfiniteVirtualTable/hooks/useTableRowSelection.ts
- web/oss/src/components/InfiniteVirtualTable/hooks/useScrollConfig.ts
- web/oss/src/components/InfiniteVirtualTable/columns/types.ts
- web/oss/src/components/InfiniteVirtualTable/helpers/createSimpleTableStore.ts
- web/oss/src/components/InfiniteVirtualTable/hooks/useTableHeaderHeight.ts
- web/oss/src/components/InfiniteVirtualTable/components/columnVisibility/ColumnVisibilityPopoverContent.tsx
- web/oss/src/components/InfiniteVirtualTable/hooks/useTableKeyboardShortcuts.ts
- web/oss/src/components/InfiniteVirtualTable/InfiniteVirtualTable.tsx
- web/oss/src/components/InfiniteVirtualTable/hooks/useInfiniteScroll.ts
- web/oss/src/components/InfiniteVirtualTable/hooks/useTableManager.tsx
- web/oss/src/components/InfiniteVirtualTable/features/index.ts
- web/oss/src/components/InfiniteVirtualTable/hooks/useContainerResize.ts
- web/oss/src/components/InfiniteVirtualTable/hooks/useEditableTable.ts
- web/oss/src/components/InfiniteVirtualTable/hooks/useColumnVisibilityControls.ts
- web/oss/src/components/SharedDrawers/SessionDrawer/components/SessionDrawerButton/index.tsx
- web/oss/src/components/AgentChatSlice/components/AgentMessage.tsx
- web/oss/src/components/InfiniteVirtualTable/columns/createStandardColumns.tsx
- web/oss/src/components/InfiniteVirtualTable/types.ts
- web/oss/src/components/InfiniteVirtualTable/hooks/useTableExport.ts
- web/oss/src/components/InfiniteVirtualTable/atoms/columnVisibility.ts
- web/oss/src/components/InfiniteVirtualTable/hooks/useScopedColumnVisibility.tsx
- web/oss/src/components/InfiniteVirtualTable/hooks/useScrollContainer.ts
- web/oss/src/components/InfiniteVirtualTable/components/InfiniteVirtualTableInner.tsx
- web/oss/src/components/InfiniteVirtualTable/hooks/useHeaderViewportVisibility.ts
- web/oss/src/components/InfiniteVirtualTable/hooks/useTableActions.tsx
- web/oss/src/components/InfiniteVirtualTable/context/ColumnVisibilityContext.ts
- web/oss/src/components/InfiniteVirtualTable/hooks/useSmartResizableColumns.ts
- web/oss/src/components/InfiniteVirtualTable/hooks/useExpandableRows.tsx
- web/oss/src/components/InfiniteVirtualTable/features/InfiniteVirtualTableFeatureShell.tsx
- web/oss/src/components/InfiniteVirtualTable/index.ts
🛑 Comments failed to post (7)
docs/design/simplify-nav-new-users/context.md (1)
36-51: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Update the Phase 2 status.
This says the Classic mode switch is a follow-up and does not exist yet, but this PR adds
FeatureFlagsand its persisted override. Describe both phases as implemented so the design record does not mislead follow-up work.docs/design/simplify-nav-new-users/plan.md (1)
145-158: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Keep the documented override atom per-user.
The example stores under the literal key
agenta:onboarding:<userId>:...and places the atom in selectors. Document the existing user-scoped atom family inlib/onboarding/atoms.ts, then import that atom into the selector.Proposed documentation correction
-import { atomWithStorage } from "jotai/utils"; +import { + navSimplifiedDefaultAtom, + navSimplifiedOverrideAtom, +} from "`@/oss/lib/onboarding/atoms`"; -/** null = follow default, true = force simplified, false = force full. Per-user via LS. */ -export const navSimplifiedOverrideAtom = atomWithStorage<boolean | null>( - "agenta:onboarding:<userId>:nav-simplified-override", - null, -); - // Phase 2: explicit choice wins; else fall back to the signup-era default. export const advancedNavHiddenAtom = atom((get) => {📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.import { navSimplifiedDefaultAtom, navSimplifiedOverrideAtom, } from "`@/oss/lib/onboarding/atoms`"; // Phase 2: explicit choice wins; else fall back to the signup-era default. export const advancedNavHiddenAtom = atom((get) => { const override = get(navSimplifiedOverrideAtom); return override ?? get(navSimplifiedDefaultAtom); });web/oss/src/components/pages/agent-home/OnboardingEntry.tsx (1)
40-47: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash set -euo pipefail ast-grep outline web/oss/src/components/pages/agents/store.ts --items all rg -n -A40 -B5 'useAgentsFirstRun' \ web/oss/src/components/pages/agents/store.ts \ web/oss/src/components/pages/agent-home/OnboardingEntry.tsxRepository: Agenta-AI/agenta
Length of output: 11168
🌐 Web query:
TanStack Query useQuery isSuccess isFetching isStale states empty data resolving💡 Result:
In TanStack Query, the
useQueryhook manages complex asynchronous state through two primary variables:status(or its derived booleans) andfetchStatus[1][2]. Status States Thestatusproperty tracks the state of the data itself [1][2]: - pending: The query has no data [1][2]. - success: The query was successful anddatais available [1][2]. - error: The query encountered an error and theerrorproperty is populated [1][2]. - isSuccess (boolean): A derived convenience boolean forstatus === 'success'[3][4]. FetchStatus States ThefetchStatusproperty tracks the state of thequeryFn(whether the network/data-fetching function is currently running) [1][2]: - fetching: The query function is executing (includes initial loading and background refetching) [1][2]. - paused: The query wants to fetch but is paused (e.g., due to network issues) [1][2]. - idle: The query is not currently doing anything [1][2]. - isFetching (boolean): A derived convenience boolean forfetchStatus === 'fetching'[3][4]. Additional Concepts - isStale: A boolean indicating if the data in the cache is older than the definedstaleTimeor has been invalidated [3][4]. A query can be in a success state (having data) while also being stale, which triggers background refetches [1][2]. - Empty Data Handling: If a query function returnsundefined, it is considered a failed query [5]. To represent "empty" data (such as an empty list), you should returnnullor an empty structure (e.g.,[]) from yourqueryFn[5]. If you need to avoidundefinedtypes in TypeScript while waiting for data, you can useinitialDatato provide a default value, or use optional chaining/nullish coalescing (e.g.,data ?? []) when consuming the data [6][7]. Key Distinction: The status tells you if you have data [1][2]. The fetchStatus tells you if the function is running [1][2]. A query can be in asuccessstatus (having cached data) while also being in afetchingfetchStatus (performing a background refetch) [1][2].Citations:
- 1: https://tanstack.com/query/latest/docs/framework/react/guides/queries
- 2: https://tanstack.com/query/v5/docs/framework/react/guides/queries
- 3: https://tanstack.com/query/latest/docs/framework/react/reference/useQuery
- 4: https://tanstack.com/query/v5/docs/framework/react/reference/useQuery
- 5: https://github.com/TanStack/query/blob/main/docs/framework/react/guides/query-functions.md
- 6: TanStack/query#1331
- 7: TanStack/query#8183
🌐 Web query:
TanStack Query initialData stale success isFetching false initialData undefined💡 Result:
In TanStack Query, the behavior where a query using
initialDataappears in asuccessstate but triggers a background fetch is expected if the data is considered "stale" [1][2]. By default,initialDatais treated as "fresh" upon initialization [3][4][5]. Because it is considered fresh, TanStack Query will not trigger a background refetch unless thestaleTimehas elapsed or the query is otherwise invalidated [3][4][6]. If you observeisFetchingset totrue(indicating a background fetch is occurring) despite providinginitialData, it is typically because the query is considered stale [1][2]. This happens if: 1. You have set astaleTimethat is shorter than the time elapsed since the data was supposedly created [3][4]. 2. You are usinginitialDataUpdatedAtto explicitly signal that theinitialDatais already old [3][4][2]. WheninitialDataUpdatedAtis provided, TanStack Query compares this timestamp against the current time andstaleTimeto determine if the data is already stale, triggering an immediate background fetch if it is [4][1][2]. If your goal is to prevent the background fetch, ensure that yourstaleTimeis sufficiently high, or do not provide aninitialDataUpdatedAtthat falls outside thestaleTimewindow [3][6][2]. If your goal is to showinitialDatabut still ensure a fresh fetch occurs, usinginitialDatawith a lowstaleTime(or0) is the correct pattern [5][2]. If you find thatinitialDatais persisting longer than you intend when query keys change, remember thatinitialDatais injected into the cache whenever a new query is created [2]. If you do not want this behavior, consider usingplaceholderDatainstead, which is not persisted to the cache and does not mark the query assuccessin the same wayinitialDatadoes [1][6][2].Citations:
- 1: https://tanstack-query.mintlify.app/guides/initial-query-data
- 2: TanStack/query#9175
- 3: https://tanstack.com/query/latest/docs/framework/react/guides/initial-query-data
- 4: https://tanstack.com/query/v5/docs/framework/react/guides/initial-query-data
- 5: https://tanstack.dev/query/v5/docs/framework/react/guides/initial-query-data
- 6: TanStack/query#6161
🏁 Script executed:
#!/bin/bash set -euo pipefail # Inspect the query options and package versions used for TanStack Query. sed -n '1,80p' web/oss/src/components/pages/agents/store.ts printf '\n--- package versions/dependencies ---\n' rg -n '"`@tanstack/react-query`"|react-query|useQuery' package.json pnpm-lock.yaml web/package.json web/pnpm-lock.yaml -g 'package.json' -g 'pnpm-lock.yaml' || trueRepository: Agenta-AI/agenta
Length of output: 6477
Keep first-run users on the loader through the redirect.
useAgentsFirstRun()can returnfirstRun: truewhile a successfully resolved empty query is no longerfetchingorstale, butresolvingonly covers errors. Since the redirect runs in a post-render effect, paintOnboardingLoaderforfirstRunas well so the onboarding flow doesn’t briefly render/home before/playgroundreplaces the route.web/oss/src/components/pages/settings/Organization/General.tsx (1)
12-16: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash set -euo pipefail ast-grep outline web/packages/agenta-sdk/src/resources.ts --items all ast-grep outline web/oss/src/services/organization/api.ts --items all rg -n -C 2 'organization|Organization' web/packages/agenta-sdk/src/resources.tsRepository: Agenta-AI/agenta
Length of output: 2732
🏁 Script executed:
#!/bin/bash set -u printf 'Files matching Organization/organization/organization:*:\n' git ls-files | rg -n 'Organization|organization|organizations|organizations:' || true printf '\nOrganization component imports and relevant calls:\n' if [ -f "web/oss/src/components/pages/settings/Organization/General.tsx" ]; then sed -n '1,220p' web/oss/src/components/pages/settings/Organization/General.tsx fi printf '\norganization accessor search in SDK resources:\n' rg -n -i 'organization|organizations|get.*Organization.*Client|organization.*Client|Organization.*Client' web/packages/agenta-sdk/src/resources.ts web/packages/agenta-sdk/src || trueRepository: Agenta-AI/agenta
Length of output: 24538
🏁 Script executed:
#!/bin/bash set -euo pipefail printf 'Generated organizations Resource/Client files excerpt:\n' sed -n '1,240p' web/packages/agenta-api-client/src/generated/api/resources/organizations/index.ts 2>/dev/null || true printf '\nGenerated organizations Client exports:\n' sed -n '1,240p' web/packages/agenta-api-client/src/generated/api/resources/organizations/exports.ts 2>/dev/null || true printf '\nCurrent SDK resources.ts with line numbers:\n' sed -n '1,180p' web/packages/agenta-sdk/src/resources.ts printf '\nExisting legacy org services import and contents:\n' sed -n '1,220p' web/oss/src/services/organization/api/index.ts printf '\nImports from legacy OSS organization api across web:\n' rg -n 'from "`@/oss/services/organization/api`"|from "`@/oss/services/organization`|organization/api"|`@agenta/sdk/resources`' web/oss web/packages/agenta-sdk -g '*.ts' -g '*.tsx'Repository: Agenta-AI/agenta
Length of output: 13984
Add an organization Fern resource accessor.
Use
@agenta/sdk/resourcesfordeleteOrganization,transferOrganizationOwnership, andupdateOrganization; addgetOrganizationsClient()toweb/packages/agenta-sdk/src/resources.tsand route these calls through it so the frontend does not extend the legacy OSS API.Source: Coding guidelines
web/oss/src/components/TestsetsTable/TestsetsTable.tsx (1)
367-368: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash rg -n -C 5 'useTableManager|datasetStore|ApiRow|InfiniteDatasetStore' \ web/packages/agenta-ui/src web/oss/src/components/TestsetsTableRepository: Agenta-AI/agenta
Length of output: 50374
🏁 Script executed:
#!/bin/bash set -euo pipefail echo "== locate manager/store files ==" fd -a 'useTableManager|createPaginatedEntityStore|tableStore|fetchTestsets|TestsetsTable' web packages 2>/dev/null | sed 's#^\./##' | head -80 echo echo "== useTableManager outline ==" test -f web/packages/agenta-ui/src/InfiniteVirtualTable/hooks/useTableManager.ts && ast-grep outline web/packages/agenta-ui/src/InfiniteVirtualTable/hooks/useTableManager.ts || true echo echo "== relevant useTableManager.ts ==" cat -n web/packages/agenta-ui/src/InfiniteVirtualTable/hooks/useTableManager.ts | sed -n '1,240p' echo echo "== relevant paginated entity store signature ==" cat -n web/packages/agenta-ui/src/InfiniteVirtualTable/paginated/createPaginatedEntityStore.ts | sed -n '280,320p' echo echo "== testsets table store types and init ==" cat -n web/oss/src/components/TestsetsTable/atoms/tableStore.ts | sed -n '1,120p' cat -n web/oss/src/state/entities/testset.ts | sed -n '1,260p' echo echo "== TestsetsTable relevant lines ==" cat -n web/oss/src/components/TestsetsTable/TestsetsTable.tsx | sed -n '300,390p' echo echo "== all paginatedStore assignments in web/oss ==" rg -n 'paginatedStore|datasetStore: .*store|useTableManager' web/oss/src -C 3Repository: Agenta-AI/agenta
Length of output: 1191
🏁 Script executed:
#!/bin/bash set -euo pipefail echo "== useTableManager file ==" cat -n web/packages/agenta-ui/src/InfiniteVirtualTable/hooks/useTableManager.tsx | sed -n '1,260p' echo echo "== FeatureShell datasetStore/interface usage ==" cat -n web/packages/agenta-ui/src/InfiniteVirtualTable/features/InfiniteVirtualTableFeatureShell.tsx | sed -n '90,125p;740,795p' echo echo "== useInfiniteTableFeaturePagination ==" cat -n web/packages/agenta-ui/src/InfiniteVirtualTable/features/useInfiniteTableFeaturePagination.ts | sed -n '1,60p' echo echo "== paginated entity store result signature ==" cat -n web/packages/agenta-ui/src/InfiniteVirtualTable/paginated/createPaginatedEntityStore.ts | sed -n '280,325p' echo echo "== testsets paginated store source ==" cat -n web/oss/src/components/TestsetsTable/atoms/tableStore.ts | sed -n '45,160p' cat -n web/oss/src/state/entities/testset.ts | sed -n '1,230p' echo echo "== TestsetsTable lines ==" cat -n web/oss/src/components/TestsetsTable/TestsetsTable.tsx | sed -n '1,120p;330,390p' echo echo "== type invariant probe from source text ==" python3 - <<'PY' from pathlib import Path for p in [ "web/packages/agenta-ui/src/InfiniteVirtualTable/hooks/useTableManager.tsx", "web/packages/agenta-ui/src/InfiniteVirtualTable/features/InfiniteVirtualTableFeatureShell.tsx", "web/packages/agenta-ui/src/InfiniteVirtualTable/features/useInfiniteTableFeaturePagination.ts", "web/packages/agenta-ui/src/InfiniteVirtualTable/paginated/createPaginatedEntityStore.ts", "web/oss/src/components/TestsetsTable/atoms/tableStore.ts", "web/oss/src/components/TestsetsTable/TestsetsTable.tsx", ]: print(f"\n-- {p} --") s=Path(p).read_text() for needle in [ "interface UseTableManagerConfig", "type UseTableManagerConfig", "datasetStore?:", "Pick<InfiniteDatasetStore<Row, ApiRow", "Pick<InfiniteDatasetStore<Row, unknown,", "paginatedStore" ]: if needle in s: idx=s.index(needle) print(s[max(0, idx-500):idx+1200]) PYRepository: Agenta-AI/agenta
Length of output: 18406
🏁 Script executed:
#!/bin/bash set -euo pipefail echo "== actual testset entity files ==" fd -a 'testset.*' web/oss/src/web web/oss/src/state web 2>/dev/null | grep -E 'web/oss/src/(state|components|.*testset)' | sed -n '1,80p' echo echo "== references to testset entity atoms/types ==" rg -n "export const testset|type TestsetTableRow|interface TestsetTableRow|testset\.paginated|type TestsetApiRow|const testset" web/oss/src web/packages/agenta-ui/src web/packages/agenta-entities/src -A 4 -B 2 | sed -n '1,220p' echo echo "== createSimpleTableStore and SimpleTableStore datasetStore signature ==" cat -n web/packages/agenta-ui/src/InfiniteVirtualTable/paginated/createSimpleTableStore.ts | sed -n '1,220p'Repository: Agenta-AI/agenta
Length of output: 25457
🏁 Script executed:
#!/bin/bash set -euo pipefail echo "== find createSimpleTableStore ==" fd -a 'createSimpleTableStore|simpleTableStore' web | sed -n '1,40p' echo echo "== all SimpleTableStore definitions/usages ==" rg -n "interface SimpleTableStore|type SimpleTableStore|createSimpleTableStore|datasetStore:.*SimpleTableStore|store: SimpleTableStore|store:" web/packages/agenta-ui/src web/oss/src/state web/oss/src/components/TestsetsTable -C 3 | sed -n '1,260p' echo echo "== testset entity directory files ==" find web/oss/src/state/entities/testset -maxdepth 1 -type f -print | sort for f in web/oss/src/state/entities/testset/*; do echo echo "-- $f --" cat -n "$f" | sed -n '1,180p' doneRepository: Agenta-AI/agenta
Length of output: 50374
🏁 Script executed:
#!/bin/bash set -euo pipefail echo "== pagination consumer ==" cat -n web/packages/agenta-ui/src/InfiniteVirtualTable/hooks/useInfiniteTablePagination.ts | sed -n '1,180p' echo echo "== SimpleTableStore implementation ==" cat -n web/packages/agenta-ui/src/InfiniteVirtualTable/helpers/createSimpleTableStore.ts | sed -n '1,180p' echo echo "== testset controller relevant setup ==" cat -n web/oss/src/state/entities/testset/testsetController.ts | sed -n '1,140p;170,240p' echo echo "== testset paginated store factory ==" cat -n web/oss/src/state/entities/testset/paginatedStore.ts | sed -n '1,180p'Repository: Agenta-AI/agenta
Length of output: 26853
Align
useTableManagerwith the actual store shape.
useTableManager<TestsetTableRow>accepts onlyInfiniteDatasetStore<TestsetTableRow, unknown, unknown>, whiletestset.paginated.storeisInfiniteDatasetStore<TestsetTableRow, TestsetApiRow, TestsetPaginatedMeta>. KeepTestsetApiRowin the manager/shell/pagination generics or use an explicit typed adapter instead ofas never, so incompatible row state cannot slip through.web/oss/src/pages/w/[workspace_id]/p/[project_id]/settings/index.tsx (1)
121-138: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Replace the legacy demo-tag color literal.
Line 134 uses
--ag-c-0517290F, which is prohibited and will not follow the supported theme-token contract. Use Ant Design semantic tokens instead.Proposed fix
- {isDemoOrg && <Tag className="bg-[var(--ag-c-0517290F)] m-0 font-normal">demo</Tag>} + {isDemoOrg && ( + <Tag className="m-0 bg-[var(--ant-color-fill-secondary)] font-normal text-[var(--ant-color-text-secondary)]"> + demo + </Tag> + )}As per coding guidelines, “Consume theme colors through Ant Design semantic tokens, Tailwind color utilities, or supported
var(--ag-color*)variables; do not use raw hex colors or--ag-c-*literals.”📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.const buildOrganizationTitle = useCallback( (label: string) => ( <div className="flex items-center gap-2"> <span>{label}</span> <Tooltip title={isOrgIdCopied ? "Copied!" : "Click to copy organization ID"}> <Tag className="cursor-pointer flex items-center gap-1" onClick={handleCopyOrgId} > <Link size={14} weight="bold" /> <span>Organization ID</span> </Tag> </Tooltip> {isDemoOrg && ( <Tag className="m-0 bg-[var(--ant-color-fill-secondary)] font-normal text-[var(--ant-color-text-secondary)]"> demo </Tag> )} </div> ), [handleCopyOrgId, isDemoOrg, isOrgIdCopied], )Source: Coding guidelines
web/package.json (1)
28-28: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
pnpm --filter `@agenta/oss` exec tsgo --version pnpm --filter `@agenta/ee` exec tsgo --versionRepository: Agenta-AI/agenta
Length of output: 3154
🏁 Script executed:
#!/bin/bash set -u echo "== package files ==" git ls-files | rg '(^|/)package\.json$|pnpm-workspace\.yaml$|AGENTS\.md$' | sed -n '1,200p' echo echo "== web/package.json relevant dependency/scripts ==" if [ -f web/package.json ]; then python3 - <<'PY' import json p='web/package.json' with open(p) as f: data=json.load(f) for key in ('dependencies','devDependencies','optionalDependencies','peerDependencies','scripts'): print(f'-- {key} --') v=data.get(key, {}) for name in sorted(v): if name.lower().replace('_','-').replace('.','-') in ('`@typescript/native-preview`','tsgo') or 'typescript' in name.lower() or name=='type-check:native': print(f'{name}: {v[name]}') if not any(n.lower().replace('_','-').replace('.','-') in ('`@typescript/native-preview`','tsgo','type-check:native') or 'typescript' in n.lower() for n in v): print('(no matches)') PY fi echo echo "== workspace files matching `@agenta/oss` and `@agenta/ee` ==" for p in $(git ls-files | rg '(^|/)package\.json$'); do if python3 - <<'PY' "$p" import json, sys p=sys.argv[1] with open(p) as f: data=json.load(f) pkg=data.get('name','') if pkg in ('`@agenta/oss`','`@agenta/ee`'): print(p) print(json.dumps(data.get('scripts'), indent=2)) PY then :; fi done echo echo "== search type-check:native and tsgo ==" rg -n '"type-check:native"|tsgo|`@typescript/native-preview`' -S .Repository: Agenta-AI/agenta
Length of output: 50373
Fix filtered
tsgoexecution.
@typescript/native-previewis only declared at the workspace root, whiletype-check:nativerunspnpm --filter@agenta/ossexec tsgoandpnpm --filter@agenta/eeexec tsgo. The filtered commands fail unless the tool is declared in those packages or invokes root-installedtsgoexplicitly.Also applies to: 55-56
…ctivity Local turn-settle bump used Date.now() directly, which could overwrite a newer server heartbeat under clock skew and briefly sink the session in history. Use Math.max, matching the reconciler. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Context
In the playground chat, the session history picker (and the tab rail) ordered sessions by creation time. A conversation you just chatted in stayed buried below stale-but-newer sessions, which made navigating multiple sessions awkward. Fixes #5553.
Root cause: sessions carried no "last activity" signal at all. Both history atoms sorted purely on
createdAt, even though the server already tracks last activity via theupdated_atheartbeat.Changes
Sessions now carry a
lastMessageAtfield, and the history/archived lists sort by it (falling back tocreatedAt, then to 0 for pre-upgrade sessions with neither). It is fed from two places so ordering is both durable and immediate:updated_at(falling back tocreated_at) intolastMessageAt, so ordering is correct across devices and after a reload. Local and remote values are merged withMath.max, so a fresh local turn is never clobbered by a lagging heartbeat and vice versa.lastMessageAtis stamped tonow, so the active chat jumps to the top instantly instead of waiting for the next 60s reconcile.The local stamp is gated on the
streaming → settledstatus transition. This is the subtle part: hydration and history restore set messages whilestatusstays"ready", so an unguarded stamp would back-date an old, freshly-reopened session to "now". Gating on the transition means only a real turn bumps the time.The displayed timestamp in the history rows and tab rail now reads
lastMessageAt ?? createdAtso the shown time matches the sort order.Sort key, before:
after:
Tests / notes
pnpm eslintandtsc --noEmitpass clean on all touched files.lastMessageAtreuses the server heartbeat already fetched by the session-list query, so there is no extra request and nothing new to prune on delete.What to QA
🤖 Generated with Claude Code