feat(studio): Anonymizer jobs list page [ASTD-325] - #881
Conversation
19aa12d to
8d69260
Compare
|
8d69260 to
4457f3e
Compare
4457f3e to
1a57b58
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (4)
📝 WalkthroughWalkthroughChangesAnonymizer jobs management
Sequence Diagram(s)sequenceDiagram
participant AnonymizerListRoute
participant AnonymizerJobsDataView
participant AnonymizerJobActionsMenu
participant DeleteJobModal
AnonymizerListRoute->>AnonymizerJobsDataView: render jobs table
AnonymizerJobsDataView->>AnonymizerJobActionsMenu: render row actions
AnonymizerJobActionsMenu->>DeleteJobModal: open delete modal
DeleteJobModal-->>AnonymizerJobsDataView: reset jobs query after deletion
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
web/packages/studio/src/components/dataViews/AnonymizerJobsDataView/index.tsx (1)
34-34: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse
import typefor React types.
web/packages/studio/src/components/dataViews/AnonymizerJobsDataView/index.tsx: moveComponentPropsandFCtoimport type.web/packages/studio/src/components/dataViews/AnonymizerJobsDataView/DeleteJobModal.tsx: changeFCto a type-only import.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@web/packages/studio/src/components/dataViews/AnonymizerJobsDataView/index.tsx` at line 34, Use type-only React imports for the specified symbols: update web/packages/studio/src/components/dataViews/AnonymizerJobsDataView/index.tsx lines 34-34 to import ComponentProps and FC with import type, and update web/packages/studio/src/components/dataViews/AnonymizerJobsDataView/DeleteJobModal.tsx lines 12-12 to import FC with import type; leave runtime React imports unchanged.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@web/packages/studio/src/components/dataViews/AnonymizerJobsDataView/DeleteJobModal.tsx`:
- Around line 33-47: Update handleDelete to validate all jobs before invoking
deleteJobMutation, rejecting or reporting any job missing workspace or name
instead of filtering it out. Only proceed with Promise.all and call onDeleted
after every input job passes validation, matching the existing bulk-delete
handler behavior.
In
`@web/packages/studio/src/components/dataViews/AnonymizerJobsDataView/index.tsx`:
- Around line 69-79: Update the bulk deletion flow around jobsToDelete and
deleteJobMutation.mutateAsync so it records each job’s success or failure
instead of relying on Promise.all’s first rejection. Remove successfully deleted
jobs from the selected state, retain failed jobs for retry, and report the
aggregate per-job outcome in the modal; use an atomic bulk endpoint only if one
already exists.
---
Nitpick comments:
In
`@web/packages/studio/src/components/dataViews/AnonymizerJobsDataView/index.tsx`:
- Line 34: Use type-only React imports for the specified symbols: update
web/packages/studio/src/components/dataViews/AnonymizerJobsDataView/index.tsx
lines 34-34 to import ComponentProps and FC with import type, and update
web/packages/studio/src/components/dataViews/AnonymizerJobsDataView/DeleteJobModal.tsx
lines 12-12 to import FC with import type; leave runtime React imports
unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: b1dced1d-358d-4f31-b49b-4ac54da92469
📒 Files selected for processing (4)
web/packages/studio/src/components/AnonymizerJobActionsMenu/index.tsxweb/packages/studio/src/components/dataViews/AnonymizerJobsDataView/DeleteJobModal.tsxweb/packages/studio/src/components/dataViews/AnonymizerJobsDataView/index.tsxweb/packages/studio/src/routes/AnonymizerListRoute/index.tsx
1a57b58 to
cd0afba
Compare
|
Claude says: "Done in cd0afba — FC/ComponentProps now use inline type imports in both files." @coderabbitai |
|
Tip For best results, initiate chat on the files or code changes.
|
Replace the Anonymizer list placeholder with a jobs DataView mirroring Data Designer: paginated list via useAnonymizerListRunJobs, name / description / created / status columns, status + date filters, search, row -> detail navigation, per-row actions (view/cancel/delete), and bulk delete. Empty and loading states included. - components/dataViews/AnonymizerJobsDataView (+ DeleteJobModal) - components/AnonymizerJobActionsMenu - AnonymizerListRoute renders the DataView Signed-off-by: mschwab <mschwab@nvidia.com>
StudioDataView memoizes column defs keyed on the makeColumns identity, so passing a fresh arrow rebuilt every column on each render of a table that polls on an interval. Wrap it in useCallback. Also drop a useCallback whose only dep was the dataViewState object (a new literal every render, so it never memoized) in favor of the hook's already stable resetFilters, narrow handleCancel's dep to the stable mutateAsync ref, and memoize the per-row actions array. Signed-off-by: mschwab <mschwab@nvidia.com>
cd0afba to
d64c068
Compare
What
Builds the Anonymizer jobs list page (ASTD-325), replacing the placeholder from #876 with a real jobs DataView on the SDK from #879.
Part of ASTD-215.
List-page changes (the reviewable diff)
components/dataViews/AnonymizerJobsDataView/— mirrorsDataDesignerJobsDataView:useAnonymizerListRunJobs(polls onJOB_POLLING_INTERVAL_MS)RelativeTime), status (StatusBadge), updated (hidden)$like)getAnonymizerJobRoute), bulk delete (BulkDeleteModal)components/AnonymizerJobActionsMenu/— per-row: View details / Cancel (when cancellable) / DeleteAnonymizerListRouterenders<AnonymizerJobsDataView />Decisions
specand is optional; can add once the builder/detail views land.Depends on
VITE_FF_ANONYMIZER_ENABLED, default false), navuseAnonymizerListRunJobs,RunJob, …)Testing
@nemo/studiotsc --noEmit— no new errors (16 pre-existing come from an ungenerated customizer SDK, identical onmain).VITE_FF_ANONYMIZER_ENABLED(default false) — no surface exposed by default.Notes
Summary by CodeRabbit