Skip to content

[release] v0.98.0#4251

Merged
bekossy merged 36 commits intomainfrom
release/v0.98.0
May 4, 2026
Merged

[release] v0.98.0#4251
bekossy merged 36 commits intomainfrom
release/v0.98.0

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented May 4, 2026

New version v0.98.0 in

  • (web)
  • web/oss
  • web/ee
  • sdk
  • api
  • services

ashrafchowdury and others added 30 commits April 22, 2026 11:44
…tor cache supporting archived workflows and persistent metadata entries.
…and consolidate paginated store logic with shared helpers
…paginated store with shared helpers and factory functions
…lecule-based pattern and add unarchive support
Previously the archived apps page briefly displayed the "no archived
apps" empty state before swapping to the loaded table. Render the table
(with skeleton rows) while the archived count query is in flight so the
empty state only appears once we know the list is actually empty.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 4, 2026

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

Project Deployment Actions Updated (UTC)
agenta-documentation Ready Ready Preview, Comment May 4, 2026 11:32am

Request Review

@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label May 4, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 4, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 57c9b8f8-5cd9-41e3-9367-03bcb58de125

📥 Commits

Reviewing files that changed from the base of the PR and between 1952bd6 and 94cf939.

📒 Files selected for processing (1)
  • web/oss/tests/playwright/acceptance/app/app-management.ts

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Archived views for Apps, Evaluators, and Testsets with restore (unarchive) support, archive-aware tables (mode-specific columns, filters, exports), and a shared ArchivedEntityLayout.
  • UX

    • Replaced “Delete” flows/labels with “Archive” where applicable; archived items are hidden but restorable; archive-specific empty states and actions.
  • Documentation

    • Added design spec for archived-entities view.
  • Tests

    • Updated acceptance tests to reflect Archive flows.
  • Chores

    • Version bumped to 0.98.0 across packages.

Walkthrough

Adds frontend "archived" views for Apps, Evaluators, and Testsets: shared ArchivedEntityLayout, archived pages, mode-aware table columns and stores, archive/unarchive lifecycle APIs, UI copy/icons switched from delete→archive, shared pagination utilities, Playwright test updates, and repo manifest version bumps 0.97.0→0.98.0.

Changes

Archived-entities feature (apps, evaluators, testsets)

Layer / File(s) Summary
Design / Spec
docs/design/archive-workflows/archived-entities-view-design.md
Frontend archived view v4 design: per-entity archived pages, mode-aware columns/actions, client-side archived filtering by deleted_at, restore behavior via unarchive APIs.
Shared utilities / types
web/oss/src/state/entities/shared/utils.ts, web/oss/src/state/entities/shared/index.ts, web/packages/agenta-entities/src/workflow/core/types.ts
Added emptyFetchResult, getCursorOffset, createDateDescComparator and re-exported them; added workflowRefs to workflow list params.
API additions
web/oss/src/services/testsets/api/index.ts, web/packages/agenta-entities/src/testset/api/mutations.ts, web/packages/agenta-entities/src/testset/api/index.ts
Added unarchiveTestset POST helper and re-exported it in testset API barrel.
Molecule lifecycle APIs
web/packages/agenta-entities/src/workflow/state/molecule.ts, web/packages/agenta-entities/src/testset/state/testsetMolecule.ts
Added lifecycle namespaces exposing archive/unarchive methods with projectId resolution and cache invalidation.
Entity stores / pagination
web/oss/src/state/entities/testset/paginatedStore.ts, web/oss/src/components/Evaluators/store/evaluatorsPaginatedStore.ts, web/oss/src/components/pages/app-management/store/appWorkflowStore.ts
Introduced archived-mode paginated stores/caches, mode-aware meta atoms, get*TableState(mode) helpers, and invalidate helpers for active+archived flows.
Row shapes / transform
web/oss/src/state/entities/testset/paginatedStore.ts, web/oss/src/components/Evaluators/store/evaluatorsPaginatedStore.ts, web/oss/src/components/pages/app-management/store/appWorkflowStore.ts
Extended table row types with deletedAt/deletedById; added transformRow mappers for active vs archived rows; adjusted skeleton merge behavior.
Column factories / actions
web/oss/src/components/TestsetsTable/assets/createTestsetsColumns.tsx, web/oss/src/components/Evaluators/Table/assets/evaluatorColumns.tsx, web/oss/src/components/pages/app-management/components/appWorkflowColumns.tsx
Column factories accept mode option; archived mode adds Archived at/by columns and swaps destructive actions for Restore/view actions; added restore callbacks.
Table components / wiring
web/oss/src/components/TestsetsTable/TestsetsTable.tsx, web/oss/src/components/Evaluators/Table/EvaluatorsTable.tsx, web/oss/src/components/pages/app-management/components/ApplicationManagementSection.tsx
Tables accept tableMode/mode, select paginated store via get*TableState(mode), adjust scopeId/storage keys/export filenames, hide create/manage UI in archived view, enable export in archived mode.
Pages & layout
web/oss/src/components/ArchivedEntityLayout/*, web/oss/src/components/pages/*/Archived*.tsx, web/oss/src/pages/.../archived/index.tsx, web/ee/.../archived/index.tsx
Added ArchivedEntityLayout, per-entity Archived pages rendering existing registries in archived mode, and thin Next.js route re-exports in OSS/EE.
Modal / UI copy & icons
web/oss/src/components/pages/app-management/modals/DeleteAppModal/*, web/oss/src/components/pages/testset/modals/DeleteTestset.tsx, web/oss/src/components/Evaluators/components/DeleteEvaluatorsModal/*, web/oss/src/components/Evaluators/assets/cells/TableDropdownMenu/index.tsx
Renamed delete→archive in UI copy, switched trash icons to archive icons, added optional onArchived callback wiring in app delete modal store.
Controller / registry logic
web/oss/src/components/Evaluators/index.tsx, web/oss/src/components/pages/app-management/index.tsx, web/oss/src/components/pages/prompts/PromptsPage.tsx
Registries/pages refactored to accept mode, use molecule lifecycle APIs for archive/unarchive, adjust tab/onboarding gating, and simplify invalidation flows.
Filters / header / selection
web/oss/src/components/TestsetsTable/components/*, web/oss/src/components/TestsetsTable/hooks/useTestsetsColumns.tsx
Filters/header components made table-mode aware via getTestsetTableState(tableMode); action labels/icons updated for archive.
Store/query adjustments
web/oss/src/components/pages/prompts/store.ts, web/packages/agenta-entities/src/workflow/state/evaluatorUtils.ts
Workflows listing filters out deleted rows; refetch uses queryClient.invalidateQueries; evaluator invalidation clears paginated archived/active query caches.
Shared store plumbing
web/oss/src/state/entities/shared/createPaginatedEntityStore.ts
Changed transformRow merging: use customMerge to merge transformed API fields into skeleton and clear __isSkeleton.
Tests
web/oss/tests/playwright/...
Playwright acceptance tests updated to expect Archive labeling/messages for evaluators, apps, and testsets.

Version bump cohort

Layer / File(s) Summary
Manifest version updates
api/pyproject.toml, sdk/pyproject.toml, services/pyproject.toml, web/package.json, web/ee/package.json, web/oss/package.json
All listed package manifests bumped package version from 0.97.00.98.0. No other manifest fields changed.

Sequence Diagram(s)

sequenceDiagram
participant Browser as Browser UI
participant Table as Table Component
participant Molecule as lifecycle Molecule
participant API as Backend API
participant Cache as Query Client
participant Store as Paginated Store

Browser->>Table: User clicks "Archive" on row
Table->>Molecule: lifecycle.archive(id, {projectId})
Molecule->>API: POST /.../archive
API-->>Molecule: 200 OK
Molecule->>Cache: invalidate relevant queries (active & archived lists, item cache)
Cache-->>Store: refetch/clear caches
Store-->>Table: updated data
Table-->>Browser: updated UI

Browser->>Table: User clicks "Restore" in Archived view
Table->>Molecule: lifecycle.unarchive(id, {projectId})
Molecule->>API: POST /.../unarchive
API-->>Molecule: 200 OK
Molecule->>Cache: invalidate archived+active caches
Cache-->>Store: refetch
Store-->>Table: refreshed rows
Table-->>Browser: item appears in active view
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch release/v0.98.0

@dosubot dosubot Bot added size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels May 4, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 9

Caution

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

⚠️ Outside diff range comments (2)
web/oss/src/components/TestsetsTable/TestsetsTable.tsx (1)

127-129: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Use the management invalidator for archive/delete mutations.

mutate() only refreshes the currently mounted store. The archived table now has its own in-memory cache in web/oss/src/state/entities/testset/paginatedStore.ts, so archiving from the active view or deleting from the archived view can leave the other mode stale until reload. DeleteTestsetModal still calls this callback.

🧹 Suggested fix
-    const mutate = useCallback(() => {
-        setRefreshTrigger()
-    }, [setRefreshTrigger])
+    const mutate = useCallback(() => {
+        invalidateTestsetManagementQueries()
+    }, [])
web/oss/src/components/pages/prompts/PromptsPage.tsx (1)

419-425: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Abort the retry if archiving the failed prompt did not succeed.

catch(console.error) swallows the cleanup failure and the code immediately retries creation anyway. If the partial workflow is still present, the retry can collide on the same slug/name and leave orphaned failed prompts behind.

Suggested fix
             const {projectId} = getProjectValues()
-            await workflowMolecule.lifecycle
-                .archive(statusData.appId, {projectId})
-                .catch(console.error)
-            refetchWorkflows()
+            try {
+                await workflowMolecule.lifecycle.archive(statusData.appId, {projectId})
+                refetchWorkflows()
+            } catch (error) {
+                console.error("Failed to archive prompt before retry:", error)
+                message.error("Couldn't clean up the failed prompt. Please try again.")
+                return
+            }
         }
🧹 Nitpick comments (6)
docs/design/archive-workflows/archived-entities-view-design.md (1)

65-92: 💤 Low value

Consider adding a language specifier to the fenced code block.

The architecture diagram uses an unspecified code block. Adding a language like text or plaintext would satisfy markdown linting and improve rendering consistency.

Suggested fix
-```
+```text
 web/oss/src/components/ArchivedEntityLayout/              ← NEW (shared OSS layout)
web/oss/src/components/TestsetsTable/assets/createTestsetsColumns.tsx (1)

66-72: ⚖️ Poor tradeoff

Consider typing revision-specific fields in TestsetTableRow.

The repeated (record as any).__isRevision, (record as any).__version, and (record as any).__commitMessage casts suggest these fields exist on revision rows but aren't typed. Adding optional fields to TestsetTableRow (or a discriminated union) would provide type safety and eliminate the casts.

Suggested approach
// In TestsetTableRow or as a separate type:
interface TestsetRevisionRow extends TestsetTableRow {
  __isRevision: true
  __version?: number | null
  __commitMessage?: string | null
}

// Then use a type guard:
function isRevisionRow(row: TestsetTableRow): row is TestsetRevisionRow {
  return Boolean((row as any).__isRevision)
}
web/oss/src/state/entities/testset/paginatedStore.ts (1)

37-42: ⚡ Quick win

Use the OSS alias for the shared entity helpers.

This new import reaches into shared state via a relative path, which makes the module boundary brittle and diverges from the repo’s alias convention.

♻️ Suggested cleanup
 import {
     createDateDescComparator,
     createPaginatedEntityStore,
     emptyFetchResult,
     getCursorOffset,
-} from "../shared"
+} from "@/oss/state/entities/shared"

As per coding guidelines, "Prefer @/oss/* import alias for shared utilities, helpers, types, hooks, and state that work the same in both EE and OSS".

web/oss/src/components/pages/app-management/components/ApplicationManagementSection.tsx (2)

54-65: 💤 Low value

Type assertion as never bypasses type safety.

The as never cast on datasetStore suppresses type checking. Consider either:

  1. Fixing the type mismatch at the source (store type definitions)
  2. Using a more specific type assertion that preserves some safety
Suggested improvement
     const table = useTableManager<AppWorkflowRow>({
-        datasetStore: tableState.paginatedStore.store as never,
+        datasetStore: tableState.paginatedStore.store,
         scopeId: isArchived ? "archived-app-workflows" : "app-workflows",

If the types don't align, investigate why getAppWorkflowTableState returns a store with incompatible types and fix at the definition level.


172-175: 💤 Low value

Minor: Redundant conditional check.

When isArchived is true, primaryActionsNode is already undefined (line 112), so the additional !isArchived && check is redundant.

Simplified expression
                     primaryActions={
-                        !isArchived && primaryActionsNode ? primaryActionsNode : undefined
+                        primaryActionsNode
                     }
web/oss/src/components/pages/app-management/store/appWorkflowStore.ts (1)

60-71: ⚖️ Poor tradeoff

Consider caching archived workflows to avoid duplicate fetches.

fetchArchivedAppWorkflows is called both in the paginated store's fetchPage (line 224) and in the count query (line 256). Each call makes a full API request and filters client-side. For archived views, this means two network requests for the same data.

This is acceptable if archived workflow volumes are low, but could be optimized with a shared cache or by extracting the count from the paginated store's first fetch.

Also applies to: 249-262


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: fe1bf0f6-7819-4019-84f3-a3465b0ee2a4

📥 Commits

Reviewing files that changed from the base of the PR and between 23eb7e5 and beef379.

📒 Files selected for processing (60)
  • docs/design/archive-workflows/archived-entities-view-design.md
  • web/ee/src/pages/w/[workspace_id]/p/[project_id]/apps/archived/index.tsx
  • web/ee/src/pages/w/[workspace_id]/p/[project_id]/evaluators/archived/index.tsx
  • web/ee/src/pages/w/[workspace_id]/p/[project_id]/testsets/archived/index.tsx
  • web/oss/src/components/ArchivedEntityLayout/index.tsx
  • web/oss/src/components/ArchivedEntityLayout/types.ts
  • web/oss/src/components/Evaluators/ArchivedEvaluatorsPage.tsx
  • web/oss/src/components/Evaluators/Table/EvaluatorsTable.tsx
  • web/oss/src/components/Evaluators/Table/assets/evaluatorColumns.tsx
  • web/oss/src/components/Evaluators/assets/cells/TableDropdownMenu/index.tsx
  • web/oss/src/components/Evaluators/components/DeleteEvaluatorsModal/assets/DeleteEvaluatorsModalContent/index.tsx
  • web/oss/src/components/Evaluators/components/DeleteEvaluatorsModal/index.tsx
  • web/oss/src/components/Evaluators/index.tsx
  • web/oss/src/components/Evaluators/store/evaluatorsPaginatedStore.ts
  • web/oss/src/components/TestcasesTableNew/hooks/api.ts
  • web/oss/src/components/TestsetsTable/TestsetsTable.tsx
  • web/oss/src/components/TestsetsTable/assets/createTestsetsColumns.tsx
  • web/oss/src/components/TestsetsTable/components/TestsetsFiltersContent.tsx
  • web/oss/src/components/TestsetsTable/components/TestsetsFiltersSummary.tsx
  • web/oss/src/components/TestsetsTable/components/TestsetsHeaderFilters.tsx
  • web/oss/src/components/TestsetsTable/hooks/useTestsetsColumns.tsx
  • web/oss/src/components/pages/app-management/ArchivedAppsPage.tsx
  • web/oss/src/components/pages/app-management/components/ApplicationManagementSection.tsx
  • web/oss/src/components/pages/app-management/components/appWorkflowColumns.tsx
  • web/oss/src/components/pages/app-management/index.tsx
  • web/oss/src/components/pages/app-management/modals/DeleteAppModal/index.tsx
  • web/oss/src/components/pages/app-management/modals/DeleteAppModal/store/deleteAppModalStore.ts
  • web/oss/src/components/pages/app-management/store/appWorkflowStore.ts
  • web/oss/src/components/pages/app-management/store/index.ts
  • web/oss/src/components/pages/prompts/PromptsPage.tsx
  • web/oss/src/components/pages/prompts/components/PromptsTableSection.tsx
  • web/oss/src/components/pages/prompts/hooks/usePromptsColumns.tsx
  • web/oss/src/components/pages/prompts/store.ts
  • web/oss/src/components/pages/testset/ArchivedTestsetsPage.tsx
  • web/oss/src/components/pages/testset/modals/DeleteTestset.tsx
  • web/oss/src/pages/w/[workspace_id]/p/[project_id]/apps/archived/index.tsx
  • web/oss/src/pages/w/[workspace_id]/p/[project_id]/evaluators/archived/index.tsx
  • web/oss/src/pages/w/[workspace_id]/p/[project_id]/testsets/archived/index.tsx
  • web/oss/src/services/testsets/api/index.ts
  • web/oss/src/state/app/atoms/fetcher.ts
  • web/oss/src/state/app/selectors/app.ts
  • web/oss/src/state/appState/parse.ts
  • web/oss/src/state/entities/shared/createPaginatedEntityStore.ts
  • web/oss/src/state/entities/shared/index.ts
  • web/oss/src/state/entities/shared/utils.ts
  • web/oss/src/state/entities/testset/index.ts
  • web/oss/src/state/entities/testset/paginatedStore.ts
  • web/oss/src/state/entities/testset/store.ts
  • web/oss/src/state/entities/testset/testsetController.ts
  • web/oss/tests/playwright/acceptance/evaluators/tests.ts
  • web/oss/tests/playwright/acceptance/testsset/testset-management.ts
  • web/packages/agenta-entities/src/shared/user/UserAuthorLabel.tsx
  • web/packages/agenta-entities/src/testset/api/index.ts
  • web/packages/agenta-entities/src/testset/api/mutations.ts
  • web/packages/agenta-entities/src/testset/index.ts
  • web/packages/agenta-entities/src/testset/state/testsetMolecule.ts
  • web/packages/agenta-entities/src/workflow/api/api.ts
  • web/packages/agenta-entities/src/workflow/core/types.ts
  • web/packages/agenta-entities/src/workflow/state/evaluatorUtils.ts
  • web/packages/agenta-entities/src/workflow/state/molecule.ts
💤 Files with no reviewable changes (1)
  • web/packages/agenta-entities/src/shared/user/UserAuthorLabel.tsx
✅ Files skipped from review due to trivial changes (9)
  • web/oss/src/components/ArchivedEntityLayout/types.ts
  • web/oss/src/components/Evaluators/components/DeleteEvaluatorsModal/index.tsx
  • web/ee/src/pages/w/[workspace_id]/p/[project_id]/evaluators/archived/index.tsx
  • web/oss/src/pages/w/[workspace_id]/p/[project_id]/testsets/archived/index.tsx
  • web/oss/src/pages/w/[workspace_id]/p/[project_id]/apps/archived/index.tsx
  • web/oss/src/components/pages/testset/ArchivedTestsetsPage.tsx
  • web/oss/src/pages/w/[workspace_id]/p/[project_id]/evaluators/archived/index.tsx
  • web/ee/src/pages/w/[workspace_id]/p/[project_id]/testsets/archived/index.tsx
  • web/ee/src/pages/w/[workspace_id]/p/[project_id]/apps/archived/index.tsx

Comment thread web/oss/src/components/Evaluators/index.tsx
Comment thread web/oss/src/components/Evaluators/index.tsx
Comment thread web/oss/src/components/pages/app-management/index.tsx
Comment thread web/oss/src/components/TestcasesTableNew/hooks/api.ts
Comment thread web/oss/src/components/TestsetsTable/TestsetsTable.tsx
Comment thread web/oss/src/state/app/atoms/fetcher.ts
Comment thread web/oss/src/state/entities/testset/paginatedStore.ts
@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions Bot commented May 4, 2026

Railway Preview Environment

Status Destroyed (PR closed)

Updated at 2026-05-04T11:54:30.687Z

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
web/oss/src/components/Evaluators/index.tsx (1)

257-259: 💤 Low value

Consider using extractApiErrorMessage for consistent error handling.

The handleRestore callback (line 228) uses extractApiErrorMessage(error) for user-friendly error messages, but this handler uses a generic string. For consistency and better debugging, consider using the same pattern here.

♻️ Suggested fix
         } catch (error) {
             console.error(error)
-            message.error("Failed to archive evaluators")
+            message.error(extractApiErrorMessage(error))
         } finally {
web/oss/src/components/TestsetsTable/assets/createTestsetsColumns.tsx (1)

66-67: Extract revision metadata properties into a typed helper to eliminate repeated any casts.

The TestsetTableRow type doesn't include __isRevision, __version, and __commitMessage properties—they're added at runtime for revision rows. Currently, accessing them requires repeated (record as any) casts (15 total instances), bypassing TypeScript checks. Introduce a typed revision view helper instead:

Suggested refactor
+type TestsetRevisionMeta = {
+    __isRevision?: boolean
+    __version?: string | number | null
+    __commitMessage?: string | null
+}
+
+const asRevisionMeta = (record: TestsetTableRow) =>
+    record as TestsetTableRow & TestsetRevisionMeta
...
-                const isRevision = Boolean((record as any).__isRevision)
+                const revision = asRevisionMeta(record)
+                const isRevision = Boolean(revision.__isRevision)
...
-                    const version = (record as any).__version
+                    const version = revision.__version
...
-                const isRevision = Boolean((record as any).__isRevision)
+                const revision = asRevisionMeta(record)
+                const isRevision = Boolean(revision.__isRevision)
...
-                const commitMessage = (record as any).__commitMessage
+                const commitMessage = revision.__commitMessage

Also applies to: 72, 119, 125, 190, 197, 202, 210, 220, 228, 236, 241, 250, 257, 262, 271


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ae71bb91-71b5-477f-b92e-b234a96c693d

📥 Commits

Reviewing files that changed from the base of the PR and between beef379 and 1952bd6.

📒 Files selected for processing (2)
  • web/oss/src/components/Evaluators/index.tsx
  • web/oss/src/components/TestsetsTable/assets/createTestsetsColumns.tsx

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label May 4, 2026
@bekossy bekossy merged commit bd447c0 into main May 4, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants