Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
230 commits
Select commit Hold shift + click to select a range
6107299
initial PoC WIP
jp-agenta Dec 10, 2025
68ba5b5
fixing social alone
jp-agenta Dec 10, 2025
9249f2b
Merge branch 'chore/offline-agenta' into feat/sso-oidc
jp-agenta Dec 16, 2025
302311f
Merge branch 'chore/offline-agenta' into feat/sso-oidc
jp-agenta Dec 25, 2025
e45eb17
WIP
jp-agenta Dec 25, 2025
bc51c35
Fixing fallbacks
jp-agenta Dec 25, 2025
11169f3
fixing discovery, high level
jp-agenta Dec 25, 2025
e924b23
minor fixes to invites
jp-agenta Dec 25, 2025
db9ab10
Extend OIDC to all SuperTokens built-in providers
jp-agenta Dec 26, 2025
627df12
fix sendgrid enabled conditions
jp-agenta Dec 26, 2025
9b45552
try and simplify env files
jp-agenta Dec 26, 2025
3d6ead7
minor env example fix
jp-agenta Dec 26, 2025
9f49d6c
Merge branch 'chore/offline-agenta' into feat/sso-oidc
jp-agenta Dec 26, 2025
28d8c8a
Implement read-fast for trace_id(s)
jp-agenta Dec 26, 2025
d0d42b0
Add personal/collaborative
jp-agenta Dec 26, 2025
cb39879
Add breadcrumb truncation and smart segment formatting to DrillInView…
ardaerzin Dec 27, 2025
ab8bb36
Disable blur effect on EnhancedDrawer mask by default while preservin…
ardaerzin Dec 27, 2025
892475a
Display only last segment name for collapsed nested column groups in …
ardaerzin Dec 27, 2025
8bf50b0
Replace deprecated bordered prop with variant prop across Tag compone…
ardaerzin Dec 27, 2025
e62fd81
Add CellContentPopover and smart cell content renderers with auto-det…
ardaerzin Dec 28, 2025
d42835f
Refactor evaluation trace queries to use shared trace entity store an…
ardaerzin Dec 28, 2025
10045ed
fix modal ui issues
ashrafchowdury Dec 28, 2025
5de0580
updated the popover class selsectors
ashrafchowdury Dec 28, 2025
e27d37f
fixed trace message color
ashrafchowdury Dec 28, 2025
e8c5ff1
fixed the draft ui issue
ashrafchowdury Dec 28, 2025
93532cd
fix lint
ashrafchowdury Dec 28, 2025
d9a6e16
large organization clean-up (WIP)
jp-agenta Dec 29, 2025
12eab62
add multi-orgs, transfer orgs, rename orgs, rename user, fix minor bugs
jp-agenta Dec 29, 2025
37c0415
v0.72.2
ashrafchowdury Dec 29, 2025
e3e964e
remove unnecessary labels in auth
jp-agenta Dec 29, 2025
c3a149f
fix missing project-id check
jp-agenta Dec 29, 2025
6dfb901
fix clsx import issue
ashrafchowdury Dec 29, 2025
c3b427a
fix lint
ashrafchowdury Dec 29, 2025
86d49cd
Fix transfer issues and more
jp-agenta Dec 29, 2025
1ee76ce
Merge pull request #3315 from Agenta-AI/fix/antd-ui-issues
ashrafchowdury Dec 29, 2025
037e3d7
Merge pull request #3317 from Agenta-AI/fix/evaluation-failure-for-im…
ashrafchowdury Dec 29, 2025
1b7e732
Merge pull request #3316 from Agenta-AI/release/v0.72.2
ashrafchowdury Dec 29, 2025
c4c359b
Fixing and cleaning up tables (org / wrk / prj / usr)
jp-agenta Dec 29, 2025
ec118e7
added copy button on evaluation cell
ashrafchowdury Dec 29, 2025
bda95f1
fix(frontend): keep evaluator name after commit
ashrafchowdury Dec 29, 2025
ac974ba
fix org policy enforcement
jp-agenta Dec 29, 2025
3809e0e
fix imports
jp-agenta Dec 29, 2025
d7393d8
Upgrade Ant Design from 6.1.0 to 6.1.3 and update related @rc-compone…
ardaerzin Dec 29, 2025
1274c6f
Add windowing pagination support to testsets query endpoint with next…
ardaerzin Dec 29, 2025
5126c6e
Add useTestsetFileUpload hook and createDrillInState factory for reus…
ardaerzin Dec 29, 2025
bb31eb5
Add DrillInProvider context to enable property click navigation in JS…
ardaerzin Dec 29, 2025
83bc1d4
Add TestcaseHeader revision dropdown with keyboard navigation, copy a…
ardaerzin Dec 29, 2025
2d04c0c
Add deleteColumnViewportVisibilityAtom for cleanup and fix infinite r…
ardaerzin Dec 29, 2025
0726026
Add radio button onChange handler to trigger row click in TestsetsTab…
ardaerzin Dec 29, 2025
6ab2481
Refactor LoadTestsetModal to use extracted components and atoms for t…
ardaerzin Dec 29, 2025
f78c022
Refactor TraceDataDrillIn to use TraceSpanDrillInView with atom-based…
ardaerzin Dec 29, 2025
96d960c
Update Popover API from overlayInnerStyle to styles.container prop in…
ardaerzin Dec 29, 2025
fb70550
Update Popover API from overlayInnerStyle to styles.container prop in…
ardaerzin Dec 29, 2025
1de29d3
Extract testset upload logic into useTestsetFileUpload hook and simpl…
ardaerzin Dec 29, 2025
8b9e6b3
Add group column rename and delete functionality with editable header…
ardaerzin Dec 29, 2025
420ff0d
Add deleted column filtering to nested object key collection to preve…
ardaerzin Dec 29, 2025
3be7cbd
Merge branch 'frontend-feat/new-testsets-integration' of https://gith…
ardaerzin Dec 29, 2025
869afa5
Merge branch 'main' into frontend-feat/new-testsets-integration
ardaerzin Dec 29, 2025
eadd242
Simplify TestcaseHeader dropdown by removing manual hover state manag…
ardaerzin Dec 29, 2025
c21594f
Replace EvaluatorTestcaseModal with LoadTestsetModal and add callback…
ardaerzin Dec 29, 2025
23caba2
Remove EvaluatorTestcaseModal component in favor of reusing LoadTests…
ardaerzin Dec 29, 2025
eb0b2a9
pleeeenty of UX/UI/functional fixes
jp-agenta Dec 29, 2025
c88a892
Fix sessions onboarding link
mmabrouk Dec 29, 2025
5feb2d1
Add Python SDK session tracking note
mmabrouk Dec 29, 2025
66e4ddc
Organization tab WIP
jp-agenta Dec 29, 2025
b235ee9
Add createStatefulEntityAtomFamily utility and refactor testcase quer…
ardaerzin Dec 30, 2025
55c5b08
Refactor TestcaseModals to use useEffect for modal state sync and imp…
ardaerzin Dec 30, 2025
d69ab00
Replace fetchTestsetRevisions with centralized fetchRevisionsList fro…
ardaerzin Dec 30, 2025
0b18f04
Replace fetchTestsetRevisions with centralized revisionsListQueryAtom…
ardaerzin Dec 30, 2025
ecc6ef5
Refactor LoadTestsetModal to use structured payload with testcases an…
ardaerzin Dec 30, 2025
1522661
Refactor DebugSection to use revision-based testset selection with re…
ardaerzin Dec 30, 2025
662c4d3
v0.72.3
ashrafchowdury Dec 30, 2025
18e2e3c
Merge branch 'frontend-feat/new-testsets-integration' into chore/chec…
jp-agenta Dec 30, 2025
89b7f36
Add testcase entity module with stateful atom family and improve nest…
ardaerzin Dec 30, 2025
b532e8a
Refactor TestcaseCell to use fine-grained cell atoms and improve Test…
ardaerzin Dec 30, 2025
4638952
Refactor TestsetDrawer and DataPreviewEditor to accept initialPath pr…
ardaerzin Dec 30, 2025
9c17bdf
Add initialPath prop to DrillInContent and EntityDrillInView componen…
ardaerzin Dec 30, 2025
d7e2245
Remove debug console.log statements from EvaluatorVariantModal for no…
ardaerzin Dec 30, 2025
7592f6c
add missing testset revision reference to run steps in auto eval
jp-agenta Dec 30, 2025
96c2a9f
Merge pull request #3320 from Agenta-AI/codex/fix-link-for-observabil…
ashrafchowdury Dec 30, 2025
be52f90
Merge pull request #3319 from Agenta-AI/ai/fix-evaluator-name-persist…
ashrafchowdury Dec 30, 2025
e05f652
Merge pull request #3318 from Agenta-AI/improve/add-copy-button-on-ev…
ashrafchowdury Dec 30, 2025
382e24f
Merge pull request #3321 from Agenta-AI/codex/add-info-box-for-python…
ashrafchowdury Dec 30, 2025
37718c0
Merge pull request #3322 from Agenta-AI/release/v0.72.3
ashrafchowdury Dec 30, 2025
7000876
Fixes identities and sessions
jp-agenta Dec 30, 2025
6e9427d
remove logs and prints
jp-agenta Dec 30, 2025
41df0b4
remove more logs
jp-agenta Dec 30, 2025
ad3fe32
fixing routers duplicates and other user race condition issues ?
jp-agenta Dec 30, 2025
2fcfdfa
added provider model metrics
ashrafchowdury Dec 30, 2025
19d7df4
remove more logs
jp-agenta Dec 30, 2025
79b00f7
clean up and remove organization invitations
jp-agenta Dec 30, 2025
6584b1b
feat(sdk): add body param support for variant_slug and variant_version
mmabrouk Dec 30, 2025
e23dbb6
feat(web): add Invoke LLM snippets for variants & fix code snippets
mmabrouk Dec 30, 2025
4d6a8ad
clean up organization invitations
jp-agenta Dec 30, 2025
2fa178a
fix race condition
jp-agenta Dec 30, 2025
7b95e27
fixin domain verification (WIP)
jp-agenta Dec 30, 2025
a04c53e
Remove consolidatedDirtyState module and refactor testset metadata to…
ardaerzin Dec 30, 2025
2ecc60f
Refactor TestsetDrawer to use span IDs with entity atoms and add comm…
ardaerzin Dec 30, 2025
4de1fe3
Add conditional logic to hide export option in table settings when cu…
ardaerzin Dec 30, 2025
1e03384
Remove span cache hydration from TraceDrawer as it is now handled by …
ardaerzin Dec 30, 2025
69f9413
Add export functionality to TestsetsTable with format preference, cus…
ardaerzin Dec 30, 2025
5d97fe0
Refactor testset metadata updates to use direct API calls instead of …
ardaerzin Dec 30, 2025
dceec6c
Refactor DrillInContent to enable universal drill-in navigation and i…
ardaerzin Dec 30, 2025
b2ca939
Refactor NewEvaluationModalInner to use testsetsListQueryAtomFamily i…
ardaerzin Dec 30, 2025
53fe4b1
Refactor testset deletion to support individual revision deletion and…
ardaerzin Dec 30, 2025
9cb5a0c
Refactor EvaluationRunsFilters to use testsetsListQueryAtomFamily ins…
ardaerzin Dec 30, 2025
22c309a
Refactor ObservabilityTable to pass span IDs instead of full data obj…
ardaerzin Dec 30, 2025
30e2c24
Refactor usePreviewEvaluations to remove unused testsets data hooks a…
ardaerzin Dec 30, 2025
7629d54
Refactor TestsetDrawerButton to pass span IDs instead of full trace d…
ardaerzin Dec 30, 2025
90b5b8e
Add testset metadata update API, export functionality with CSV/JSON f…
ardaerzin Dec 30, 2025
b9ef63f
Add blob response handling to axios interceptor to prevent JSON trans…
ardaerzin Dec 30, 2025
93923f3
implmented:
ashrafchowdury Dec 31, 2025
d28653f
revert backend changes for the 'anthropic/' prefix
ashrafchowdury Dec 31, 2025
6275659
fix lint
ashrafchowdury Dec 31, 2025
89e0cba
fix single cetagorical type display issue
ashrafchowdury Dec 31, 2025
0a739cd
fix data revalidation after annotation on trace
ashrafchowdury Dec 31, 2025
ba31a73
Implement model cost retrieval and metadata building for supported LLMs
mmabrouk Dec 31, 2025
57e07ed
v0.72.4
ashrafchowdury Dec 31, 2025
6b8ec0e
fixed all the of the reported issues
ashrafchowdury Dec 31, 2025
1fe6378
Add testset revision download endpoint with CSV/JSON export support a…
ardaerzin Dec 31, 2025
1ac4d39
Upgrade @tanstack/query-core and @tanstack/react-query to 5.90.16, jo…
ardaerzin Dec 31, 2025
6677a34
Merge pull request #3334 from Agenta-AI/fix/annotation-single-cetagor…
ashrafchowdury Dec 31, 2025
eda50bf
Merge pull request #3332 from Agenta-AI/feat/ability-to-delete-multip…
ashrafchowdury Dec 31, 2025
c4914c1
updated tooltip bg color
ashrafchowdury Dec 31, 2025
1fadbfe
Merge pull request #3326 from Agenta-AI/feat/showing-model-metrics-on…
ashrafchowdury Dec 31, 2025
3a1883c
Merge pull request #3330 from Agenta-AI/feat/variant-use-api-snippets
ashrafchowdury Dec 31, 2025
c3eb5b5
Merge pull request #3329 from Agenta-AI/feat/sdk-variant-body-params
ashrafchowdury Dec 31, 2025
da2cadb
Remove unused draft store implementation, change default testset revi…
ardaerzin Dec 31, 2025
5075c3f
Refactor TestsetsTable to use centralized testset entity store instea…
ardaerzin Dec 31, 2025
adae343
Refactor TestcasesTableNew to use centralized testcase entity store i…
ardaerzin Dec 31, 2025
88b0321
Refactor TestsetDrawer and entity state management to use centralized…
ardaerzin Dec 31, 2025
75905df
Refactor DrillInView components to use centralized entity controller …
ardaerzin Dec 31, 2025
a4a0e3e
Refactor LoadTestsetModal and related components to use centralized t…
ardaerzin Dec 31, 2025
f2d0cd2
Refactor EvaluatorVariantModal and DebugSection to use centralized re…
ardaerzin Dec 31, 2025
5e3a0f4
Refactor scenarioTestcase atoms to use centralized testcase controlle…
ardaerzin Dec 31, 2025
07f4e18
Refactor ReferenceLabels and TestsetCells to use centralized revision…
ardaerzin Dec 31, 2025
e6d9a76
Add Entity Controller Pattern documentation to AGENTS.md with compreh…
ardaerzin Dec 31, 2025
13f9214
Merge branch 'frontend-feat/new-testsets-integration' of https://gith…
ardaerzin Dec 31, 2025
6411e4f
Merge pull request #3335 from Agenta-AI/release/v0.72.4
ashrafchowdury Dec 31, 2025
ccf7969
Bump qs and body-parser in /docs
dependabot[bot] Dec 31, 2025
b0761a2
clean up Organization Tab and fix some API bugs
jp-agenta Dec 31, 2025
8e34e79
minor UI fixes
jp-agenta Dec 31, 2025
a79d87b
fix default organization flags
jp-agenta Dec 31, 2025
22f97d7
minor UI fixes
jp-agenta Dec 31, 2025
bd0b417
Minor copy fixes
jp-agenta Dec 31, 2025
50ceed9
minor copy fixes
jp-agenta Dec 31, 2025
31b8cdf
minor flags fix
jp-agenta Dec 31, 2025
c416cd8
Refactor DataPreviewEditor to use EntityDualViewEditor component for …
ardaerzin Dec 31, 2025
269f886
Merge branch 'main' into frontend-feat/new-testsets-integration
ardaerzin Dec 31, 2025
943d304
move sso provider settings to secrets
jp-agenta Dec 31, 2025
2305e1c
fix secrets serialization
jp-agenta Dec 31, 2025
72b3c9a
eslint and fix acces token auth
jp-agenta Jan 2, 2026
3f99ce5
v0.73.0
junaway Jan 2, 2026
9ce5afe
Merge branch 'frontend-feat/new-testsets-integration' into chore/chec…
jp-agenta Jan 2, 2026
d9d6858
ruff format
jp-agenta Jan 2, 2026
417dae2
fix migration owner detection
jp-agenta Jan 2, 2026
fc5c4cc
Refactor TestcaseEditDrawer to persist drill-in navigation path and i…
ardaerzin Jan 2, 2026
2e460fc
Refactor CreateTestsetFromScratch and modal components to use Testset…
ardaerzin Jan 2, 2026
f5b359d
Merge branch 'frontend-feat/new-testsets-integration' of https://gith…
ardaerzin Jan 2, 2026
b09dcab
First SSO login !
jp-agenta Jan 2, 2026
5257fa1
Refactor AddToTestsetDrawer to fix cursor loss during mapping input a…
ardaerzin Jan 2, 2026
bec26bf
Refactor TraceReferences to pass testset revision ID to TestsetTag fo…
ardaerzin Jan 2, 2026
3d96395
Refactor selectTestsetAtom to ensure revision selection is always cle…
ardaerzin Jan 2, 2026
f8a0ae6
Remove auto-generated commit message filtering to display all commit …
ardaerzin Jan 2, 2026
f4856d1
Refactor CommitMessageCell to remove commented-out code that filtered…
ardaerzin Jan 2, 2026
deb0d96
Refactor LoadTestsetModal to fix modal body height and flex behavior …
ardaerzin Jan 2, 2026
2f37d39
Refactor column visibility locking to support explicit columnVisibili…
ardaerzin Jan 2, 2026
36b9e81
Filter out v0 placeholder revisions from testset revision lists and a…
ardaerzin Jan 2, 2026
986e550
Refactor testcases search to use debounced setter and remove search t…
ardaerzin Jan 2, 2026
7bd3073
Add ag.data path prefix handling for trace span entity navigation in …
ardaerzin Jan 2, 2026
f3309fd
Refactor DrillInContent to remove unused props and fix empty path han…
ardaerzin Jan 2, 2026
4f8e077
Add markdown preview toggle to DrillInFieldHeader for string fields w…
ardaerzin Jan 2, 2026
35b2d5d
Add commit message support for new testset creation in AddToTestsetDr…
ardaerzin Jan 2, 2026
1f0890c
chore(docker): remove unnecessary exposed ports in EE dev compose
mmabrouk Jan 3, 2026
cf3161c
chore(docker): remove unnecessary exposed ports in OSS dev compose
mmabrouk Jan 3, 2026
6a4866d
Merge pull request #3339 from Agenta-AI/dependabot/npm_and_yarn/docs/…
mmabrouk Jan 3, 2026
5f01c15
Add instructions for Claude in a new markdown file
mmabrouk Jan 3, 2026
8758eb7
Merge pull request #3346 from Agenta-AI/chore/cleanup-docker-compose-…
mmabrouk Jan 3, 2026
9dc2599
feat(docker): add multi-instance support to dev compose files
mmabrouk Jan 3, 2026
a8986d6
fix(docker): correct Traefik port mapping in OSS gh compose
mmabrouk Jan 3, 2026
3d13f61
Delete hosting/docker-compose/ee/env.ee.dev.instance.example
mmabrouk Jan 3, 2026
fc49664
Fix __dedup_id__
jp-agenta Jan 4, 2026
93ceec9
Merge branch 'frontend-feat/new-testsets-integration' into chore/chec…
jp-agenta Jan 4, 2026
09a16d3
Fix sidebar
jp-agenta Jan 4, 2026
47f4ce6
fix runtime
jp-agenta Jan 4, 2026
6617b89
Merge branch 'frontend-feat/new-testsets-integration' into chore/chec…
jp-agenta Jan 4, 2026
306e9a7
Fix runtime
jp-agenta Jan 4, 2026
7cfa317
fix blank form on reload
jp-agenta Jan 4, 2026
620ac3f
Merge branch 'chore/check-daytona-code-evaluator' into feat/sso-oidc
jp-agenta Jan 4, 2026
29648d6
Add trailing slash to testsets API endpoint in cloneTestset function
ardaerzin Jan 5, 2026
fa73ef5
Add settingsDropdownMenuItems prop to TestcasesTableShell and pass me…
ardaerzin Jan 5, 2026
7a49469
fix patch as delta
jp-agenta Jan 5, 2026
b1d9d3e
Merge branch 'frontend-feat/new-testsets-integration' of github.com:A…
jp-agenta Jan 5, 2026
5ba6d05
preserve ordering upon commit
jp-agenta Jan 5, 2026
f32a7ba
second half of fix
jp-agenta Jan 5, 2026
e8b4653
reduce memory requirements of delta commit from x3 to x2 , still O(n)
jp-agenta Jan 5, 2026
c02e397
Add ImportTestsetRevisionModal component with file upload support for…
ardaerzin Jan 5, 2026
f80c7f2
Merge branch 'frontend-feat/new-testsets-integration' of https://gith…
ardaerzin Jan 5, 2026
d1160b6
fix fetch/query testcases
jp-agenta Jan 5, 2026
917bf86
Merge branch 'frontend-feat/new-testsets-integration' of github.com:A…
jp-agenta Jan 5, 2026
64ec605
Merge branch 'main' into release/v0.73.0
jp-agenta Jan 5, 2026
82baa27
Merge branch 'release/v0.73.0' into frontend-feat/new-testsets-integr…
jp-agenta Jan 5, 2026
08b0570
Remove client-side CSV export from TestcasesTableShell and exclude ac…
ardaerzin Jan 5, 2026
d19d89d
Rename actions column key to __ui_actions__ to avoid conflict with us…
ardaerzin Jan 5, 2026
9ca8486
Merge branch 'frontend-feat/new-testsets-integration' of https://gith…
ardaerzin Jan 5, 2026
61f1907
Merge pull request #3351 from Agenta-AI/fix/docker-compose-gh-traefik…
junaway Jan 5, 2026
75efc91
Update CLAUDE.md
junaway Jan 5, 2026
99d8f6d
Merge pull request #3347 from Agenta-AI/chore/claude-md
ashrafchowdury Jan 5, 2026
4e6b771
larger cleanup
jp-agenta Jan 5, 2026
9b12cf1
remove web ports
jp-agenta Jan 5, 2026
fdec3af
remove redis ports
jp-agenta Jan 5, 2026
058f5bf
Fix COMPOSE_ env var
jp-agenta Jan 5, 2026
1f5c3bb
fix web entrypoints port
jp-agenta Jan 5, 2026
b37c133
minor fix
jp-agenta Jan 5, 2026
15e736c
remove more redis ports
jp-agenta Jan 5, 2026
d1658d9
Merge branch 'fix/larger-docker-compose-cleanup' into feat/docker-com…
jp-agenta Jan 5, 2026
0ac6508
apply ruff
jp-agenta Jan 5, 2026
ba0b205
organize docker compose files
jp-agenta Jan 5, 2026
311584e
header shrink
jp-agenta Jan 5, 2026
1da3afb
header shrink 2
jp-agenta Jan 5, 2026
1f62c0b
remove extra ports
jp-agenta Jan 5, 2026
c13c5b3
Fix final diffs
jp-agenta Jan 5, 2026
7f2e29d
Merge pull request #3350 from Agenta-AI/feat/docker-compose-dev-multi…
junaway Jan 5, 2026
6390f94
Merge branch 'release/v0.73.0' into frontend-feat/new-testsets-integr…
jp-agenta Jan 5, 2026
aba48ff
Merge branch 'frontend-feat/new-testsets-integration' into feat/sso-oidc
jp-agenta Jan 5, 2026
d842983
add COMPOSE_PROJECT_NAME
jp-agenta Jan 5, 2026
ab58697
Fixing Auth pages and Personal Org name
jp-agenta Jan 5, 2026
369be5d
Fix org rename and org/prj switch
jp-agenta Jan 5, 2026
047e242
fix race condition at identity creation
jp-agenta Jan 5, 2026
7f0c6c1
Fixing account linking
jp-agenta Jan 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
113 changes: 113 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,119 @@ export const createItemAtom = atom(

---

### Entity Controller Pattern

For entities requiring CRUD operations with draft state, loading indicators, and cache management, use the **Entity Controller Pattern**. This provides a unified API that abstracts multiple atoms into a single cohesive interface.

**Full documentation:** `web/oss/src/state/entities/shared/README.md`

**Quick Decision - Which API to Use:**

| Need | API | Returns |
|------|-----|---------|
| Full state + actions | `entity.controller(id)` | `[state, dispatch]` |
| Data only | `entity.selectors.data(id)` | `T \| null` |
| Loading/error | `entity.selectors.query(id)` | `QueryState<T>` |
| Dirty indicator | `entity.selectors.isDirty(id)` | `boolean` |
| Single cell (tables) | `entity.selectors.cell({id, col})` | `unknown` |
| Dispatch in atoms | `entity.actions.update/discard` | Write atom |

**Basic Usage:**

```typescript
import {testcase} from "@/oss/state/entities/testcase"

// Full controller - state + dispatch
function TestcaseEditor({testcaseId}: {testcaseId: string}) {
const [state, dispatch] = useAtom(testcase.controller(testcaseId))

if (state.isPending) return <Skeleton />
if (!state.data) return <NotFound />

return (
<Input
value={state.data.input}
onChange={(e) => dispatch({
type: "update",
changes: {input: e.target.value}
})}
/>
)
}

// Fine-grained selector - only re-renders on data change
function TestcaseDisplay({testcaseId}: {testcaseId: string}) {
const data = useAtomValue(testcase.selectors.data(testcaseId))
if (!data) return null
return <div>{data.input}</div>
}
```

**Reading Multiple Entities:**

```typescript
// Create a derived atom that subscribes to all selected entities
const useMultipleTestcases = (ids: string[]) => {
const dataAtom = useMemo(
() => atom((get) => ids.map(id => get(testcase.selectors.data(id))).filter(Boolean)),
[ids.join(",")]
)
return useAtomValue(dataAtom)
}
```

**Anti-Patterns to Avoid:**

```typescript
// BAD - No reactivity, snapshot read
const globalStore = getDefaultStore()
const data = globalStore.get(testcase.selectors.data(id))

// GOOD - Proper subscription
const data = useAtomValue(testcase.selectors.data(id))
```

```typescript
// BAD - Variable shadowing
import {testcase} from "@/oss/state/entities/testcase"
const {testcase, ...rest} = entity // Shadows import!

// GOOD - Rename destructured variable
const {testcase: testcaseField, ...rest} = entity
```

**Available Controllers:**

| Entity | Import | Description |
|--------|--------|-------------|
| Testcase | `testcase` from `@/oss/state/entities/testcase` | Testcase with cell subscriptions + drill-in |
| Trace Span | `traceSpan` from `@/oss/state/entities/trace` | Trace span with attribute drill-in |
| Revision | `revision` from `@/oss/state/entities/testset` | Revision with column management |
| Testset | `testset` from `@/oss/state/entities/testset` | Testset with list/detail queries |

**Architecture:**

```
┌─────────────────────────────────────────────────────────────────┐
│ Controller │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Query │ │ Draft │ │ isDirty │ │
│ │ (server) │→ │ (local) │→ │ (derived) │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
│ ↓ ↓ │
│ ┌─────────────────────────────────────────────────────────────┐│
│ │ Entity Atom (merged) ││
│ └─────────────────────────────────────────────────────────────┘│
└─────────────────────────────────────────────────────────────────┘
```

- **Query atoms** are the single source of truth for server data
- **Draft atoms** store local changes only
- **Entity atoms** merge: `query.data + draft → merged entity`
- **Dirty detection** compares draft to server data

---

**Legacy: SWR Pattern (avoid for new code)**

We previously used SWR with Axios for data fetching. This pattern is still present in older code but should not be used for new features.
Expand Down
7 changes: 7 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Instructions for Claude

Please read and follow all instructions in:

@AGENTS.md

Project conventions, guidelines, and best practices are documented there.
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
)

# Redis client and TracingWorker for publishing spans to Redis Streams
if env.REDIS_URI_DURABLE:
redis_client = Redis.from_url(env.REDIS_URI_DURABLE, decode_responses=False)
if env.redis.uri_durable:
redis_client = Redis.from_url(env.redis.uri_durable, decode_responses=False)
tracing_worker = TracingWorker(
service=tracing_service,
redis_client=redis_client,
Expand Down Expand Up @@ -81,9 +81,10 @@ async def _fetch_project_owner(
WorkspaceMemberDBE.role == "owner",
ProjectDBE.id == project_id,
)
.order_by(WorkspaceMemberDBE.created_at.asc())
)
result = await connection.execute(workspace_owner_query)
owner = result.scalar_one_or_none()
owner = result.scalars().first()
return owner


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,10 @@ async def _fetch_project_owner(
WorkspaceMemberDBE.role == "owner",
ProjectDBE.id == project_id,
)
.order_by(WorkspaceMemberDBE.created_at.asc())
)
result = await connection.execute(workspace_owner_query)
owner = result.scalar_one_or_none()
owner = result.scalars().first()
return owner


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def get_or_create_workspace_default_project(

if project is None:
statement = insert(ProjectDB).values(
project_name="Default Project",
project_name="Default",
is_default=True,
workspace_id=workspace.id,
organization_id=workspace.organization_id,
Expand Down
4 changes: 3 additions & 1 deletion api/ee/databases/postgres/migrations/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ async def get_pending_migration_head():

def run_alembic_migration():
"""
Applies migration for first-time users and also checks the environment variable "AGENTA_AUTO_MIGRATIONS" to determine whether to apply migrations for returning users.
Applies migration for first-time users and also checks the environment variable
"ALEMBIC_AUTO_MIGRATIONS" (legacy: "AGENTA_AUTO_MIGRATIONS") to determine whether
to apply migrations for returning users.
"""

try:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
"""add slug to organizations

Revision ID: 12d23a8f7dde
Revises: 59b85eb7516c
Create Date: 2025-12-25 00:00:00.000000+00:00

"""

from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa

# revision identifiers, used by Alembic.
revision: str = "12d23a8f7dde"
down_revision: Union[str, None] = "59b85eb7516c"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
# Add slug column to organizations table
op.add_column(
"organizations",
sa.Column(
"slug",
sa.String(),
nullable=True,
),
)

# Add unique constraint on slug
op.create_unique_constraint(
"uq_organizations_slug",
"organizations",
["slug"],
)

# Add index for faster lookups
op.create_index(
"ix_organizations_slug",
"organizations",
["slug"],
)


def downgrade() -> None:
# Drop in reverse order
op.drop_index("ix_organizations_slug", table_name="organizations")
op.drop_constraint("uq_organizations_slug", "organizations", type_="unique")
op.drop_column("organizations", "slug")
Loading
Loading