fix(frontend): enhance JSON object handling and rendering in testset#4510
fix(frontend): enhance JSON object handling and rendering in testset#4510ashrafchowdury wants to merge 3 commits into
Conversation
…Table and related components
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughSummary by CodeRabbit
WalkthroughRemoves JSON-string parsing from column/path utilities, adds native-path traversal helpers, wires a ChangesTransition from stringified JSON parsing to native column values
🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
web/oss/src/components/TestcasesTableNew/components/testcaseCellValueUtils.ts (1)
3-9: ⚡ Quick winAdd a regression test for the native-vs-string split.
This helper now defines a key contract for the rest of the pipeline:
"{}"should stay a string, while native objects/arrays should still flow through JSON-aware rendering. A small table-driven test here would make that behavior much harder to accidentally undo later.web/packages/agenta-entity-ui/src/testcase/TestcaseTable.tsx (1)
77-107: ⚡ Quick winExtract
getNativeColumnValueinto one shared utility.This traversal logic now exists in at least three places in this PR (
TestcaseTable,TestcasesTableShell, andcolumnPathUtils). Since rendering and type-chip inference need to agree exactly on native-path semantics, keeping one implementation will reduce drift risk the next time this behavior changes.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 423560df-6440-41be-ae00-d5aec18d30da
📒 Files selected for processing (7)
web/oss/src/components/TestcasesTableNew/components/TestcasesTableShell.tsxweb/oss/src/components/TestcasesTableNew/components/testcaseCellValueUtils.tsweb/oss/src/state/entities/testcase/columnPathUtils.tsweb/oss/src/state/entities/testcase/columnState.tsweb/packages/agenta-entities/src/testcase/core/columnExtraction.tsweb/packages/agenta-entity-ui/src/shared/EntityTable.tsxweb/packages/agenta-entity-ui/src/testcase/TestcaseTable.tsx
Railway Preview Environment
|
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 45ba387a-3d69-4d13-b2fa-218441af3ed1
📒 Files selected for processing (4)
web/oss/src/components/TestcasesTableNew/components/TestcasesTableShell.tsxweb/oss/src/state/entities/testcase/columnState.tsweb/packages/agenta-entity-ui/src/testcase/TestcaseDataEditor.tsxweb/packages/agenta-entity-ui/src/testcase/TestcaseDataEditor.utils.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- web/oss/src/components/TestcasesTableNew/components/TestcasesTableShell.tsx
Summary
Fix testcase table handling for stringified JSON values.
String values now remain strings throughout testcase table display/type detection:
Testing
Verified locally
Added or updated tests
QA follow-up
Demo
Contributor Resources